PageRenderTime 375ms queryTime 65ms sortTime 6ms getByIdsTime 72ms findMatchingLines 122ms

100+ results results for 'php preg_match_all repo:kvz/phpjs' (375 ms)

Not the results you expected?
AnalyzerClassFileSystemLocator.php https://github.com/Proudio-Interactive/pdepend.git | PHP | 196 lines
                    
39 * @category   QualityAssurance
                    
40 * @package    PHP_Depend
                    
41 * @subpackage Metrics
                    
43 * @copyright  2008-2011 Manuel Pichler. All rights reserved.
                    
44 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
45 * @version    SVN: $Id$
                    
50/**
                    
51 * Locator that searches for PHP_Depend analyzers that follow the PHP_Depend
                    
52 * convention and are present the PHP_Depend source tree.
                    
54 * @category   QualityAssurance
                    
55 * @package    PHP_Depend
                    
56 * @subpackage Metrics
                    
58 * @copyright  2008-2011 Manuel Pichler. All rights reserved.
                    
59 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
60 * @version    Release: @package_version@
                    
                
qubaid_condition_test.php https://github.com/pauln/moodle.git | PHP | 161 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
17/**
                    
18 * This file contains tests for some of the code in ../datalib.php.
                    
19 *
                    
29global $CFG;
                    
30require_once(dirname(__FILE__) . '/../lib.php');
                    
31
                    
42        $newparams = array();
                    
43        preg_match_all('/(?<!:):([a-z][a-z0-9_]*)/', $sql, $named_matches);
                    
44        foreach($named_matches[1] as $param) {
                    
                
api.php https://github.com/doidata/doicms.git | PHP | 216 lines
                    
7 *
                    
8 * PHP versions 4 and 5
                    
9 *
                    
9 *
                    
10 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
                    
11 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
17 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
18 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
                    
19 * @package       cake
                    
97
                    
98		$parsed = $this->__parseClass($path . $file .'.php');
                    
99
                    
155						"\t\tAvailable values:\n\n".
                    
156						"\t\tbehavior\tLook for class in CakePHP behavior path\n".
                    
157						"\t\tcache\tLook for class in CakePHP cache path\n".
                    
                
QueryBuilder.php https://gitlab.com/Fiestus/Stroyteka | PHP | 184 lines
                    
1<?php
                    
2/**
                    
174        $sql = str_replace(', [', ",\n[", $sql);
                    
175        if (preg_match_all('/^\s*\[(.*?)\]\s+(.*?),?$/m', $sql, $matches)) {
                    
176            foreach ($matches[1] as $i => $c) {
                    
                
datalib_test.php https://github.com/epsd/moodle.git | PHP | 161 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
17/**
                    
18 * This file contains tests for some of the code in ../datalib.php.
                    
19 *
                    
29global $CFG;
                    
30require_once(dirname(__FILE__) . '/../lib.php');
                    
31
                    
33/**
                    
34 * Unit tests for some of the code in ../datalib.php.
                    
35 *
                    
42        $newparams = array();
                    
43        preg_match_all('/(?<!:):([a-z][a-z0-9_]*)/', $sql, $named_matches);
                    
44        foreach($named_matches[1] as $param) {
                    
                
websocket.class.php https://github.com/captn3m0/ariel.git | PHP | 162 lines
                    
1<?php  
                    
2
                    
110        //Get the numbers
                    
111        preg_match_all('/([\d]+)/', $key1, $key1_num);
                    
112        preg_match_all('/([\d]+)/', $key2, $key2_num);
                    
116        //Count spaces
                    
117        preg_match_all('/([ ]+)/', $key1, $key1_spc);
                    
118        preg_match_all('/([ ]+)/', $key2, $key2_spc);
                    
                
StringParser.php git://github.com/egeniq/adapto.git | PHP | 213 lines
                    
1<?php
                    
2/**
                    
154        $matches = array();
                    
155        preg_match_all("/\[[^\]]*\]|[^[]+/", $this->m_string, $matches);
                    
156        return $matches;
                    
                
preg_match.js https://gitlab.com/orvi2014/phpjs | JavaScript | 208 lines
                    
12  // Before finding this, I was working on a script to search through an SQLite database to build our Unicode expressions automatically; I may finish that as it should be expandable for the future, and be an extra eye to confirm Steve's work
                    
13  // Also need to look at/integrate with Michael Grier's http://mgrier.com/te5t/preg_match_all.js ; http://mgrier.com/te5t/testpma.html ; http://mgrier.com/te5t/testpma.php
                    
14
                    
39      flagPart = pattern.slice(lastDelimPos + 1);
                    
40      // Fix: Need to study http://php.net/manual/en/regexp.reference.php more thoroughly
                    
41      // e.g., internal options i, m, s, x, U, X, J; conditional subpatterns?, comments, recursive subpatterns,
                    
49            break;
                    
50          case 'e': // used in preg_replace only but ignored elsewhere; "does normal substitution of backreferences in the replacement string, evaluates it as PHP code, and uses the result for replacing the search string". "Single quotes, double quotes, backslashes and NULL chars will be escaped by backslashes in substituted backreferences."
                    
51            // Safely ignorable
                    
60            throw 'The passed flag "' + flag + '" is presently unsupported in ' + getFuncName(arguments.callee);
                    
61          case 'X': // "additional functionality of PCRE that is incompatible with Perl. Any backslash in a pattern that is followed by a letter that has no special meaning causes an error, thus reserving these combinations for future expansion"; not in use in PHP presently
                    
62            throw 'X flag is unimplemented at present';
                    
67              // x[a-fA-F\d][a-fA-F\d] (hex)
                    
68              // "Back references to the named subpatterns can be achieved by (?P=name) or, since PHP 5.2.4, also by \k<name>, \k'name', \k{name} or \g{name}"
                    
69              // Unicode classes (with u flag only)
                    
                
Typography.php https://bitbucket.org/myockey/clearcreek-chapel-website.git | PHP | 410 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.2.4 or newer
                    
6 *
                    
86		{
                    
87			if (preg_match_all("#(<!\-\-.*?\-\->)#s", $str, $matches))
                    
88			{
                    
196						// we will retain them instead of using our tags.
                    
197						'/(<p[^>*?]>)<p>/'	=> '$1', // <?php BBEdit syntax coloring bug fix
                    
198
                    
408
                    
409/* End of file Typography.php */
                    
410/* Location: ./system/libraries/Typography.php */
                    
                
ElementLiteral.php https://gitlab.com/src-run/scrible | PHP | 310 lines
                    
1<?php
                    
2
                    
258        // @codeCoverageIgnoreStart
                    
259        return preg_match_all("/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/", $this->text);
                    
260        // @codeCoverageIgnoreEnd
                    
                
em-events.php https://gitlab.com/Blueprint-Marketing/interoccupy.net | PHP | 274 lines
                    
1<?php
                    
2/*
                    
33					$args = EM_Events::get_post_search( array_merge($args, $_REQUEST) );
                    
34					em_locate_template('templates/calendar-day.php',true, array('args'=>$args));
                    
35				}elseif ( $wp_query->get('bookings_page') && empty($my_bookings_page_id)) {
                    
36					//Bookings Page
                    
37					em_locate_template('templates/my-bookings.php',true);
                    
38				}elseif ( is_object($EM_Event)) {
                    
38				}elseif ( is_object($EM_Event)) {
                    
39					em_locate_template('templates/event-single.php',true, array('args'=>$args));	
                    
40				}else{
                    
45						$args['long_events'] = 1;
                    
46						em_locate_template('templates/events-calendar.php',true, array('args'=>$args));
                    
47					}else{
                    
52						}
                    
53						em_locate_template('templates/events-list.php', true, array('args'=>$args));
                    
54					}
                    
                
init.php https://github.com/yoniweb/forkcms-Golden-Gate.git | PHP | 497 lines
                    
1<?php
                    
2
                    
48
                    
49		// set a default timezone if no one was set by PHP.ini
                    
50		if(ini_get('date.timezone') == '') date_default_timezone_set('Europe/Brussels');
                    
73		// require spoon
                    
74		require_once 'spoon/spoon.php';
                    
75
                    
101		// exceptions
                    
102		$exceptions['backend'] = BACKEND_CORE_PATH . '/engine/backend.php';
                    
103		$exceptions['backendajaxaction'] = BACKEND_CORE_PATH . '/engine/ajax_action.php';
                    
103		$exceptions['backendajaxaction'] = BACKEND_CORE_PATH . '/engine/ajax_action.php';
                    
104		$exceptions['backendbaseajaxaction'] = BACKEND_CORE_PATH . '/engine/base.php';
                    
105		$exceptions['backenddatagriddb'] = BACKEND_CORE_PATH . '/engine/datagrid.php';
                    
105		$exceptions['backenddatagriddb'] = BACKEND_CORE_PATH . '/engine/datagrid.php';
                    
106		$exceptions['backenddatagridarray'] = BACKEND_CORE_PATH . '/engine/datagrid.php';
                    
107		$exceptions['backendbaseconfig'] = BACKEND_CORE_PATH . '/engine/base.php';
                    
                
Misc.php https://gitlab.com/Gashler/dp | PHP | 2173 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * A PHP-Based RSS and Atom Feed Framework.
                    
6 * Takes the hard work out of managing a complete RSS/Atom solution.
                    
41 * @link http://simplepie.org/ SimplePie
                    
42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
                    
43 */
                    
101		$name = preg_quote($realname, '/');
                    
102		if (preg_match_all("/<($name)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$name>|(\/)?>)/siU", $string, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE))
                    
103		{
                    
118				$return[$i]['attribs'] = array();
                    
119				if (isset($matches[$i][2][0]) && preg_match_all('/[\x09\x0A\x0B\x0C\x0D\x20]+([^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*)(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"([^"]*)"|\'([^\']*)\'|([^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?/', ' ' . $matches[$i][2][0] . ' ', $attribs, PREG_SET_ORDER))
                    
120				{
                    
379	 *
                    
380	 * To generate it, run `php create.php` on the command line, and copy the
                    
381	 * output to replace this function.
                    
                
comment.php https://gitlab.com/Gashler/dp | PHP | 1477 lines
                    
1<?php
                    
2/**
                    
50	if ( $max_links = get_option( 'comment_max_links' ) ) {
                    
51		$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
                    
52		$num_links = apply_filters( 'comment_max_links_url', $num_links, $url ); // provide for counting of $url as a link
                    
                
VideoController.php https://gitlab.com/macitsimsek/fastsubtitle | PHP | 644 lines
                    
1<?php
                    
2
                    
28        $parcala	=	('@<tr class="(.*?)"> <td class="primary_photo"> <a href="(.*?)" ><img src="(.*?)" /></a> </td> <td class="result_text"> <a href="(.*?)" >(.*?)</a>(.*?)</td> </tr>@');
                    
29        preg_match_all($parcala,$page,$cikti);
                    
30        $sonucdizi	=	$cikti[5];
                    
131        return $name['data']['cast'];
                    
132        return \GuzzleHttp\json_decode(file_get_contents('https://tr.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&formatversion=2&titles='.$name),true)['query']['pages'][0]['extract'];
                    
133    }
                    
137        $input      =   str_replace(' ','+',$input);
                    
138        $name       =   \GuzzleHttp\json_decode(file_get_contents('https://en.wikipedia.org/w/api.php?action=query&list=search&utf8=&formatversion=2&format=json&srsearch='.$input),true);
                    
139        foreach ($name['query']['search'] as $perName){
                    
141            if($name==$input){
                    
142                $content    =   \GuzzleHttp\json_decode(file_get_contents('https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&formatversion=2&titles='.$name),true)['query']['pages'][0]['extract'];
                    
143                $tr     =   new TranslateClient('en','tr');
                    
147        }
                    
148        $name       =   \GuzzleHttp\json_decode(file_get_contents('https://tr.wikipedia.org/w/api.php?action=query&list=search&utf8=&formatversion=2&format=json&srsearch='.$input),true);
                    
149        foreach ($name['query']['search'] as $perName){
                    
                
comment.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1484 lines
                    
1<?php
                    
2/**
                    
49	if ( $max_links = get_option( 'comment_max_links' ) ) {
                    
50		$num_links = preg_match_all( '/<a [^>]*href/i', apply_filters( 'comment_text', $comment ), $out );
                    
51		$num_links = apply_filters( 'comment_max_links_url', $num_links, $url ); // provide for counting of $url as a link
                    
                
Test.php https://gitlab.com/ealexis.t/trends | PHP | 1084 lines
                    
49        if ($asString) {
                    
50            if ($test instanceof PHPUnit_Framework_SelfDescribing) {
                    
51                return $test->toString();
                    
200
                    
201        // https://bugs.php.net/bug.php?id=63055
                    
202        $matches = array();
                    
231
                    
232        if (!empty($required['PHP']) && version_compare(PHP_VERSION, $required['PHP'], '<')) {
                    
233            $missing[] = sprintf('PHP %s (or later) is required.', $required['PHP']);
                    
236        if (!empty($required['PHPUnit'])) {
                    
237            $phpunitVersion = PHPUnit_Runner_Version::id();
                    
238            if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) {
                    
238            if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) {
                    
239                $missing[] = sprintf('PHPUnit %s (or later) is required.', $required['PHPUnit']);
                    
240            }
                    
                
Route.php https://gitlab.com/ealexis.t/trends | PHP | 945 lines
                    
1<?php
                    
2
                    
223    {
                    
224        preg_match_all('/\{(\w+?)\?\}/', $this->uri, $matches);
                    
225
                    
417    {
                    
418        preg_match_all('/\{(.*?)\}/', $this->domain().$this->uri, $matches);
                    
419
                    
                
functions.php https://gitlab.com/ealexis.t/trends | PHP | 812 lines
                    
1<?php
                    
2namespace GuzzleHttp\Psr7;
                    
79    if (is_scalar($resource)) {
                    
80        $stream = fopen('php://temp', 'r+');
                    
81        if ($resource !== '') {
                    
107        case 'NULL':
                    
108            return new Stream(fopen('php://temp', 'r+'), $options);
                    
109    }
                    
135        foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
                    
136            if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
                    
137                $m = $matches[0];
                    
269/**
                    
270 * Safely opens a PHP stream resource using a filename.
                    
271 *
                    
271 *
                    
272 * When fopen fails, PHP normally raises a warning. This function adds an
                    
273 * error handler that checks for errors and throws an exception instead.
                    
                
Form_validation.php https://gitlab.com/lisit1003/TTPHPServer | PHP | 1382 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
114		// into its components so that we can fetch the corresponding POST data later
                    
115		if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
                    
116		{
                    
117			// Note: Due to a bug in current() that affects some versions
                    
118			// of PHP we can not pass function call directly into it
                    
119			$x = explode('[', $field);
                    
614				{
                    
615					// If our own wrapper function doesn't exist we see if a native PHP function does.
                    
616					// Users can use any native PHP function call that has one param.
                    
                
shortcodes.php https://gitlab.com/VTTE/sitios-vtte | PHP | 671 lines
                    
1<?php
                    
2/**
                    
145	if ( shortcode_exists( $tag ) ) {
                    
146		preg_match_all( '/' . get_shortcode_regex() . '/', $content, $matches, PREG_SET_ORDER );
                    
147		if ( empty( $matches ) ) {
                    
207	// Find all registered tag names in $content.
                    
208	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
                    
209	$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
                    
259
                    
260	// phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation
                    
261	return '\\['                             // Opening bracket.
                    
288		. '(\\]?)';                          // 6: Optional second closing brocket for escaping shortcodes: [[tag]].
                    
289	// phpcs:enable
                    
290}
                    
                
comment.php https://gitlab.com/VTTE/sitios-vtte | PHP | 1531 lines
                    
1<?php
                    
2/**
                    
46
                    
47	/** This filter is documented in wp-includes/comment-template.php */
                    
48	$comment = apply_filters( 'comment_text', $comment, null, array() );
                    
52	if ( $max_links ) {
                    
53		$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
                    
54
                    
                
class-wp-text-diff-renderer-table.php https://gitlab.com/VTTE/sitios-vtte | PHP | 551 lines
                    
1<?php
                    
2/**
                    
199
                    
200				/** This filter is documented in wp-includes/wp-diff.php */
                    
201				$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'deleted' );
                    
224
                    
225				/** This filter is documented in wp-includes/wp-diff.php */
                    
226				$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'unchanged' );
                    
274				// If they're too different, don't include any <ins> or <del>'s.
                    
275				if ( preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
                    
276					// Length of all text between <ins> or <del>.
                    
                
intialise_conversation.php https://gitlab.com/tutaalexandr/bot_local | PHP | 690 lines
                    
1<?php
                    
2
                    
6  * Version: 2.4.8
                    
7  * FILE: chatbot/core/conversation/intialise_conversation.php
                    
8  * AUTHOR: Elizabeth Perreau and Dave Morton
                    
221    {
                    
222      $matches = preg_match_all("# ?(([^\.\?!]*)+(?:[\.\?!]|(?:<br ?/?>))*)#ui", $value, $sentences);
                    
223      $cmatch = 0;
                    
                
find_aiml.php https://gitlab.com/tutaalexandr/bot_local | PHP | 1036 lines
                    
1<?php
                    
2  /***************************************
                    
5    * Version: 2.4.8
                    
6    * FILE: find_aiml.php
                    
7    * AUTHOR: Elizabeth Perreau and Dave Morton
                    
206      $aiml_thatpattern_wildcards = (!empty($aiml_thatpattern)) ? build_wildcard_RegEx($aiml_thatpattern) : '';
                    
207      $aiml_thatpattern_wc_matches = (!empty($aiml_thatpattern_wildcards)) ? preg_match_all($aiml_thatpattern_wildcards,$current_thatpattern) : 0;
                    
208
                    
282   * Takes a sentence and converts AIML wildcards to Regular Expression wildcards
                    
283   * so that it can be matched in php using pcre search functions
                    
284   *
                    
                
tcpdf_parser.php https://gitlab.com/staging06/myproject | PHP | 511 lines
                    
1<?php
                    
2//============================================================+
                    
2//============================================================+
                    
3// File name   : tcpdf_parser.php
                    
4// Version     : 1.0.001
                    
30//
                    
31// Description : This is a PHP class for parsing PDF documents.
                    
32//
                    
36 * @file
                    
37 * This is a PHP class for parsing PDF documents.<br>
                    
38 * @package com.tecnick.tcpdf
                    
43// include class for decoding filters
                    
44require_once(dirname(__FILE__).'/tcpdf_filters.php');
                    
45
                    
47 * @class TCPDF_PARSER
                    
48 * This is a PHP class for parsing PDF documents.<br>
                    
49 * @package com.tecnick.tcpdf
                    
                
Type.php https://gitlab.com/staging06/myproject | PHP | 475 lines
                    
1<?php
                    
2/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
                    
6 *
                    
7 * PHP versions 5
                    
8 *
                    
8 *
                    
9 * LICENSE: This source file is subject to version 3.0 of the PHP license
                    
10 * that is available through the world-wide-web at the following URI:
                    
10 * that is available through the world-wide-web at the following URI:
                    
11 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
                    
12 * the PHP License and are unable to obtain it through the web, please
                    
12 * the PHP License and are unable to obtain it through the web, please
                    
13 * send a note to license@php.net so we can mail you a copy immediately.
                    
14 *
                    
19 * @license    http://www.gnu.org/copyleft/lesser.html  GNU LGPL 2.1
                    
20 * @version    CVS: $Id: Type.php 6844 2011-06-03 14:46:51Z dMetzger $
                    
21 * @link       http://pear.php.net/package/XML_Feed_Parser/
                    
                
roots-cleanup.php https://gitlab.com/blueprintmrk/bladencountyrecords | PHP | 515 lines
                    
1<?php
                    
2
                    
58  $output = roots_root_relative_url($input);
                    
59  preg_match_all('!([^/]+)/([^/]+)!', $output, $matches);
                    
60  if (isset($matches[1]) && isset($matches[2])) {
                    
68$roots_options = roots_get_theme_options();
                    
69if (!is_admin() && !in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) && $roots_options['root_relative_urls']) {
                    
70  add_filter('bloginfo_url', 'roots_root_relative_url');
                    
183
                    
184  // stop Gravity Forms from outputting CSS since it's linked in header.php
                    
185  if (class_exists('RGForms')) {
                    
190  // why you might want to keep it: http://wordpress.stackexchange.com/questions/5451/what-does-l10n-js-do-in-wordpress-3-1-and-how-do-i-remove-it/5484#5484
                    
191  // don't load jQuery through WordPress since it's linked in header.php
                    
192  if (!is_admin()) {
                    
                
class.add-from-server.php https://gitlab.com/blueprintmrk/bladencountyrecords | PHP | 678 lines
                    
1<?php
                    
2class add_from_server {
                    
69		if ( $this->user_allowed() )
                    
70			$links[] = '<a href="' . admin_url('upload.php?page=add-from-server') . '">' . __('Import Files', 'add-from-server') . '</a>';
                    
71		if ( current_user_can('manage_options') )
                    
71		if ( current_user_can('manage_options') )
                    
72			$links[] = '<a href="' . admin_url('options-general.php?page=add-from-server-settings') . '">' . __('Options', 'add-from-server') . '</a>';
                    
73
                    
135
                    
136		include 'class.add-from-server-settings.php';
                    
137		$this->settings = new add_from_server_settings(&$this);
                    
207			// Ensure only valid placeholders are used:
                    
208			if ( preg_match_all('!%(.*?)%!', $o, $placeholders) ) {
                    
209				$valid_ph = array('username', 'role');
                    
405
                    
406		if ( 'upload.php' == $pagenow )
                    
407			$url = admin_url('upload.php?page=add-from-server');
                    
                
Runner.php https://gitlab.com/Blueprint-Marketing/wp-cli | PHP | 708 lines
                    
112
                    
113		if ( !preg_match( '|^\s*require\s*\(?\s*(.+?)/wp-blog-header\.php([\'"])|m', $index_code, $matches ) ) {
                    
114			return false;
                    
149		while ( is_readable( $dir ) ) {
                    
150			if ( file_exists( "$dir/wp-load.php" ) ) {
                    
151				return $dir;
                    
154			if ( file_exists( "$dir/index.php" ) ) {
                    
155				if ( $path = self::extract_subdir_path( "$dir/index.php" ) )
                    
156					return $path;
                    
324	/**
                    
325	 * Returns wp-config.php code, skipping the loading of wp-settings.php
                    
326	 *
                    
347		if ( !$found_wp_settings ) {
                    
348			WP_CLI::error( 'Strange wp-config.php file: wp-settings.php is not loaded directly.' );
                    
349		}
                    
                
comment.php https://gitlab.com/Blueprint-Marketing/WordPress-1 | PHP | 1591 lines
                    
1<?php
                    
2/**
                    
46
                    
47	/** This filter is documented in wp-includes/comment-template.php */
                    
48	$comment = apply_filters( 'comment_text', $comment );
                    
51	if ( $max_links = get_option( 'comment_max_links' ) ) {
                    
52		$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
                    
53		/**
                    
                
qtranslate_core.php https://gitlab.com/Blueprint-Marketing/interoccupy.net | PHP | 826 lines
                    
1<?php // encoding: utf-8
                    
2
                    
91		$prefered_languages = array();
                    
92		if(isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && preg_match_all("#([^;,]+)(;[^,0-9]*([0-9\.]+)[^,]*)?#i",$_SERVER["HTTP_ACCEPT_LANGUAGE"], $matches, PREG_SET_ORDER)) {
                    
93			$priority = 1.0;
                    
122	global $wp_default_secret_key;
                    
123	if(strpos($q_config['url_info']['url'],'wp-login.php')!==false && defined('AUTH_KEY') && isset($wp_default_secret_key) && $wp_default_secret_key != AUTH_KEY) {
                    
124		global $error;
                    
276	$permalink_structure = get_option('permalink_structure');
                    
277	if($permalink_structure===""||strpos($permalink_structure,'?')!==false||strpos($permalink_structure,'index.php')!==false) $url_mode = QT_URL_QUERY;
                    
278	
                    
                
ext_pcre.php https://gitlab.com/Blueprint-Marketing/hhvm | PHP | 414 lines
                    
1<?hh
                    
2// @generated by docskel.php
                    
3
                    
45 *   PREG_RECURSION_LIMIT_ERROR (see also pcre.recursion_limit)
                    
46 *   PREG_BAD_UTF8_ERROR PREG_BAD_UTF8_OFFSET_ERROR (since PHP 5.3.0)
                    
47 */
                    
76 *      Using offset is not equivalent to passing substr($subject, $offset)
                    
77 *   to preg_match_all() in place of the subject string, because pattern
                    
78 *   can contain assertions such as ^, $ or (?=x). See preg_match() for
                    
84<<__Native>>
                    
85function preg_match_all(string $pattern,
                    
86                        string $subject,
                    
186 *   be replaced by an empty string.   replacement may contain references
                    
187 *   of the form \\n or (since PHP 4.0.4) $n, with the latter form being
                    
188 *   the preferred one. Every such reference will be replaced by the text
                    
                
wp-diff.php https://gitlab.com/webkod3r/tripolis | PHP | 544 lines
                    
1<?php
                    
2/**
                    
12	/** Text_Diff class */
                    
13	require( dirname(__FILE__).'/Text/Diff.php' );
                    
14	/** Text_Diff_Renderer class */
                    
14	/** Text_Diff_Renderer class */
                    
15	require( dirname(__FILE__).'/Text/Diff/Renderer.php' );
                    
16	/** Text_Diff_Renderer_inline class */
                    
16	/** Text_Diff_Renderer_inline class */
                    
17	require( dirname(__FILE__).'/Text/Diff/Renderer/inline.php' );
                    
18}
                    
199
                    
200				/** This filter is documented in wp-includes/wp-diff.php */
                    
201				$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'deleted' );
                    
226
                    
227				/** This filter is documented in wp-includes/wp-diff.php */
                    
228				$line = apply_filters( 'process_text_diff_html', $processed_line, $line, 'unchanged' );
                    
                
shortcodes.php https://gitlab.com/webkod3r/tripolis | PHP | 614 lines
                    
1<?php
                    
2/**
                    
171	if ( shortcode_exists( $tag ) ) {
                    
172		preg_match_all( '/' . get_shortcode_regex() . '/', $content, $matches, PREG_SET_ORDER );
                    
173		if ( empty( $matches ) )
                    
212	// Find all registered tag names in $content.
                    
213	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
                    
214	$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
                    
                
comment.php https://gitlab.com/webkod3r/tripolis | PHP | 1569 lines
                    
1<?php
                    
2/**
                    
45
                    
46	/** This filter is documented in wp-includes/comment-template.php */
                    
47	$comment = apply_filters( 'comment_text', $comment );
                    
50	if ( $max_links = get_option( 'comment_max_links' ) ) {
                    
51		$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
                    
52
                    
                
functions.php https://gitlab.com/webkod3r/tripolis | PHP | 579 lines
                    
1<?php
                    
2
                    
15	}
                    
16	$class_path = get_template_directory() . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'class-' . strtolower( str_replace( '_', '-', $class_name ) ) . '.php';
                    
17	if ( file_exists( $class_path ) ) {
                    
24 */
                    
25include_once get_template_directory() . '/framework/plugins/multiple_sidebars.php';
                    
26require_once get_template_directory() . '/framework/plugins/post-link-plus.php';
                    
26require_once get_template_directory() . '/framework/plugins/post-link-plus.php';
                    
27require_once get_template_directory() . '/framework/plugins/multiple-featured-images/multiple-featured-images.php';
                    
28
                    
31 */
                    
32require_once( get_template_directory() . '/framework/admin/index.php' );
                    
33
                    
57 */
                    
58require_once( get_template_directory() . '/includes/class-tgm-plugin-activation.php' );
                    
59require_once( get_template_directory() . '/includes/avada-tgm.php' );
                    
                
cssparser.class.php https://gitlab.com/webkod3r/tripolis | PHP | 587 lines
                    
1<?php
                    
2/**
                    
106		
                    
107		//preg_match_all( '/(?ims)([a-z0-9\s\.\:#_\-@]+)\{([^\}]*)\}/', $css, $arr);
                    
108		preg_match_all( '/(?ims)([a-z0-9\,\s\.\:#_\-@]+)\{([^\}]*)\}/', $css, $arr);
                    
                
config.php https://gitlab.com/webkod3r/tripolis | PHP | 1246 lines
                    
1<?php
                    
2/*-----------------------------------------------------------------------------------*/
                    
92
                    
93preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
                    
94
                    
                
class-content-boxes.php https://gitlab.com/webkod3r/tripolis | PHP | 972 lines
                    
1<?php
                    
2class FusionSC_ContentBoxes {
                    
106
                    
107		preg_match_all( '/(\[content_box (.*?)\](.*?)\[\/content_box\])/s', $content, $matches );
                    
108		$this->total_num_of_columns = count( $matches[0] );
                    
                
class-fusion-reversal.php https://gitlab.com/webkod3r/tripolis | PHP | 1328 lines
                    
1<?php
                    
2	/**
                    
195
                    
196				preg_match_all( '/' . Fusion_Core_Reversal::get_shortcode_regex() . '/s', $content, Fusion_Core_Reversal::$matches, PREG_SET_ORDER );
                    
197
                    
342				$text    = preg_replace( "/[\x{00a0}\x{200b}]+/u", " ", $text );
                    
343				if ( preg_match_all( $pattern, $text, $match, PREG_SET_ORDER ) ) {
                    
344					foreach ( $match as $m ) {
                    
380
                    
381				preg_match_all( '/' . Fusion_Core_Reversal::get_shortcode_regex( $ignored_shortcode ) . '/s', $content, $matches, PREG_SET_ORDER );
                    
382				if ( empty( $matches ) ) {
                    
433						$children = array();
                    
434						preg_match_all( '/' . Fusion_Core_Reversal::get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
                    
435
                    
                
class-wp-press-this.php https://gitlab.com/webkod3r/tripolis | PHP | 1550 lines
                    
1<?php
                    
2/**
                    
67
                    
68		if ( preg_match_all( '/<img [^>]+>/', $content, $matches ) && current_user_can( 'upload_files' ) ) {
                    
69			foreach ( (array) $matches[0] as $image ) {
                    
480		} else {
                    
481			require_once( ABSPATH . WPINC . '/class-oembed.php' );
                    
482			$oembed = _wp_oembed_get_object();
                    
                
Test.php https://gitlab.com/judielsm/Handora | PHP | 1019 lines
                    
45     */
                    
46    public static function describe(PHPUnit_Framework_Test $test, $asString = true)
                    
47    {
                    
187
                    
188        // https://bugs.php.net/bug.php?id=63055
                    
189        $matches = array();
                    
216
                    
217        if (!empty($required['PHP']) && version_compare(PHP_VERSION, $required['PHP'], '<')) {
                    
218            $missing[] = sprintf('PHP %s (or later) is required.', $required['PHP']);
                    
221        if (!empty($required['PHPUnit'])) {
                    
222            $phpunitVersion = PHPUnit_Runner_Version::id();
                    
223            if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) {
                    
223            if (version_compare($phpunitVersion, $required['PHPUnit'], '<')) {
                    
224                $missing[] = sprintf('PHPUnit %s (or later) is required.', $required['PHPUnit']);
                    
225            }
                    
                
cssmgr.php https://gitlab.com/cserobiul/Bitm-PHP-CRUD-Practice | PHP | 1364 lines
                    
1<?php
                    
2
                    
26	{
                    
27		preg_match_all('/<style[^>]*media=["\']([^"\'>]*)["\'].*?<\/style>/is', $html, $m);
                    
28		for ($i = 0; $i < count($m[0]); $i++) {
                    
32		}
                    
33		preg_match_all('/<link[^>]*media=["\']([^"\'>]*)["\'].*?>/is', $html, $m);
                    
34		for ($i = 0; $i < count($m[0]); $i++) {
                    
44		// case so we can use str_replace later.
                    
45		preg_match_all('/<style.*?>(.*?)<\/style>/si',$html,$m);
                    
46		if (count($m[1])) {
                    
65		$regexp = '/<link[^>]*rel=["\']stylesheet["\'][^>]*href=["\']([^>"\']*)["\'].*?>/si';
                    
66		$x = preg_match_all($regexp, $html, $cxt);
                    
67		if ($x) {
                    
71		$regexp = '/<link[^>]*href=["\']([^>"\']*)["\'][^>]*?rel=["\']stylesheet["\'].*?>/si';
                    
72		$x = preg_match_all($regexp, $html, $cxt);
                    
73		if ($x) {
                    
                
htmLawed.php https://gitlab.com/kingcody/Mods-for-HESK | PHP | 723 lines
                    
1<?php
                    
2
                    
6Dual licensed with LGPL 3 and GPL 2+
                    
7A PHP Labware internal utility; www.bioinformatics.org/phplabware/internal_utilities/htmLawed
                    
8
                    
28 if(isset($x[1])){
                    
29  preg_match_all('`(?:^|-|\+)[^\-+]+?(?=-|\+|$)`', $x, $m, PREG_SET_ORDER);
                    
30  for($i=count($m); --$i>=0;){$m[$i] = $m[$i][0];}
                    
                
Lexer.php https://gitlab.com/ShizuoLamperouge/Dashboard | PHP | 411 lines
                    
1<?php
                    
2
                    
98        // find all token starts in one go
                    
99        preg_match_all($this->regexes['lex_tokens_start'], $this->code, $matches, PREG_OFFSET_CAPTURE);
                    
100        $this->positions = $matches;
                    
243            $number = (float) $match[0];  // floats
                    
244            if (ctype_digit($match[0]) && $number <= PHP_INT_MAX) {
                    
245                $number = (int) $match[0]; // integers lower than the maximum
                    
                
BaseFormatConverter.php https://gitlab.com/afzalpotenza/YII_salon | PHP | 510 lines
                    
93     *
                    
94     * [php date() function format]: http://php.net/manual/en/function.date.php
                    
95     * [ICU format]: http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax
                    
197            'mm' => 'i',    // Minutes with leading zeros
                    
198            's' => 's',     // Seconds, without leading zeros, not supported by php but we fallback
                    
199            'ss' => 's',    // Seconds, with leading zeros
                    
243     *
                    
244     * [php date() function format]: http://php.net/manual/en/function.date.php
                    
245     * [ICU format]: http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax
                    
249     */
                    
250    public static function convertDatePhpToIcu($pattern)
                    
251    {
                    
251    {
                    
252        // http://php.net/manual/en/function.date.php
                    
253        return strtr($pattern, [
                    
                
Mysql4.php https://bitbucket.org/acidel/buykoala.git | PHP | 289 lines
                    
1<?php

                    
2/**

                    
9 * It is also available through the world-wide-web at this URL:

                    
10 * http://opensource.org/licenses/osl-3.0.php

                    
11 * If you did not receive a copy of the license and are unable to

                    
23 * @copyright   Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)

                    
25 */

                    
114        $matches = array();

                    
115        preg_match_all($regExp, $row['Create Table'], $matches, PREG_SET_ORDER);

                    
116

                    
                
Cost_Utils.php https://gitlab.com/kath.de/cibedo_cibedo.de | PHP | 481 lines
                    
1<?php
                    
2/**
                    
319			// Get the required parts
                    
320			if ( preg_match_all( '/' . $price_regex . '/', $cost, $matches ) ) {
                    
321				$cost = reset( $matches );
                    
389		$matches = array();
                    
390		preg_match_all( '!\d+(?:([' . preg_quote( $this->_supported_decimal_separators ) . '])\d+)?!',
                    
391			$original_string_cost,
                    
                
my.php https://bitbucket.org/johnroyer/phpwind8.7.git | PHP | 436 lines
                    
1<?php
                    
2!defined('A_P') && exit('Forbidden');
                    
7if($s) {//底部快捷
                    
8	require_once(R_P.'require/showimg.php');
                    
9	list($faceurl) = showfacedesign($winddb['icon'],1,'m');
                    
35	if ($db_tcheck ){
                    
36		require_once(R_P.'require/postfunc.php');
                    
37		$userInfo = $userService->get($winduid,false,true);
                    
40	}
                    
41	preg_match_all('/@([^\\&\'"\/\*,<>\r\t\n\s#%?@::]+)\s?/i', $atc_content, $matchs);
                    
42	if($matchs[1]){
                    
55	if ($ismessage) {
                    
56		require_once(A_P . 'weibo/require/sendmessage.php');
                    
57	}
                    
82	$weiboList = $weiboService->getUserWeibos($winduid,$page,$perpage);
                    
83	$pages = numofpage($count, $page, $pageCount, 'apps.php?q=weibo&do=my&', null, 'weiboList.my');
                    
84
                    
                
Form_validation.php https://gitlab.com/ricoru21/py_incidencia | PHP | 1382 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
114		// into its components so that we can fetch the corresponding POST data later
                    
115		if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
                    
116		{
                    
117			// Note: Due to a bug in current() that affects some versions
                    
118			// of PHP we can not pass function call directly into it
                    
119			$x = explode('[', $field);
                    
                
helpers.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 1160 lines
                    
1<?php
                    
2/**
                    
56		if ( is_string( $thumb_size ) ) {
                    
57			preg_match_all( '/\d+/', $thumb_size, $thumb_matches );
                    
58			if ( isset( $thumb_matches[0] ) ) {
                    
365*
                    
366* php 5.2+
                    
367*
                    
369*
                    
370* <?php
                    
371* $thumb = get_post_thumbnail_id();
                    
373* ?>
                    
374* <img src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" />
                    
375*
                    
524 * identify and build design specially for VC shortcodes.
                    
525 * Used in wp-content/plugins/js_composer/include/classes/core/class-vc-base.php\Vc_Base\bodyClass
                    
526 *
                    
                
class-vc-base.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 873 lines
                    
1<?php
                    
2/**
                    
96		if ( $this->post_admin === false ) {
                    
97			require_once vc_path_dir( 'CORE_DIR', 'class-vc-post-admin.php' );
                    
98			$this->post_admin = new Vc_Post_Admin();
                    
252	public function addShortCode( array $shortcode ) {
                    
253		require_once vc_path_dir( 'SHORTCODES_DIR', 'shortcodes.php' );
                    
254		$this->shortcodes[$shortcode['base']] = new WPBakeryShortCodeFishBones( $shortcode );
                    
386		}
                    
387		preg_match_all( '/' . get_shortcode_regex() . '/', $content, $shortcodes );
                    
388		foreach ( $shortcodes[2] as $index => $tag ) {
                    
485			delete_option( 'wpb_js_composer_do_activation_redirect' );
                    
486			wp_redirect( admin_url( 'options-general.php?page=vc_settings&build_css=1' ) );
                    
487		}
                    
                
font-awesome.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 634 lines
                    
1<?php
                    
2
                    
11//
                    
12//		preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
                    
13//
                    
                
SharedPageUrls.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 736 lines
                    
1<?php
                    
2
                    
117            $matches =array();
                    
118            if ($post && ($post_pages_number = preg_match_all('/\<\!\-\-nextpage\-\-\>/', $post->post_content,$matches))>0) {
                    
119                global $wp_rewrite;
                    
                
class.photon.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 619 lines
                    
1<?php
                    
2
                    
9
                    
10	// Allowed extensions must match http://code.trac.wordpress.org/browser/photon/index.php#L31
                    
11	protected static $extensions = array(
                    
41	 * Register actions and filters, but only if basic Photon functions are available.
                    
42	 * The basic functions are found in ./functions.photon.php.
                    
43	 *
                    
90
                    
91		if ( preg_match_all( '#(?:<a[^>]+?href=["|\'](?P<link_url>[^\s]+?)["|\'][^>]*?>\s*)?(?P<img_tag><img[^>]+?src=["|\'](?P<img_url>[^\s]+?)["|\'].*?>){1}(?:\s*</a>)?#is', $content, $images ) ) {
                    
92			foreach ( $images as $key => $unused ) {
                    
259					// Detect if image source is for a custom-cropped thumbnail and prevent further URL manipulation.
                    
260					if ( ! $fullsize_url && preg_match_all( '#-e[a-z0-9]+(-\d+x\d+)?\.(' . implode('|', self::$extensions ) . '){1}$#i', basename( $src ), $filename ) )
                    
261						$fullsize_url = true;
                    
                
class.media-extractor.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 436 lines
                    
1<?php
                    
2/**
                    
97		if ( self::MENTIONS & $what_to_extract ) {
                    
98			if ( preg_match_all( '/(^|\s)@(\w+)/u', $stripped_content, $matches ) ) {
                    
99				$mentions = array_values( array_unique( $matches[2] ) ); //array_unique() retains the keys!
                    
109		/** Some hosts may not compile with --enable-unicode-properties and kick a warning:
                    
110		  *   Warning: preg_match_all() [function.preg-match-all]: Compilation failed: support for \P, \p, and \X has not been compiled
                    
111		  * Therefore, we only run this code block on wpcom, not in Jetpack.
                    
116			//   https://github.com/twitter/twitter-text/blob/master/java/src/com/twitter/Regex.java
                    
117			if ( preg_match_all( '/(?:^|\s)#(\w*\p{L}+\w*)/u', $stripped_content, $matches ) ) {
                    
118				$hashtags = array_values( array_unique( $matches[1] ) ); //array_unique() retains the keys!
                    
131		$shortcode_pattern = '/' . get_shortcode_regex() . '/s';
                    
132 		if ( preg_match_all( $shortcode_pattern, $content, $matches ) ) {
                    
133
                    
205			// (we treat embed links as just another link)
                    
206			if ( preg_match_all( '#(?:^|\s|"|\')(https?://([^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))))#', $content, $matches ) ) {
                    
207
                    
                
class.jetpack-post-images.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 505 lines
                    
1<?php
                    
2
                    
36		// Find all the slideshows
                    
37		preg_match_all( '/' . get_shortcode_regex() . '/sx', $post->post_content, $slideshow_matches, PREG_SET_ORDER );
                    
38
                    
103		// Find all the galleries
                    
104		preg_match_all( '/' . get_shortcode_regex() . '/s', $post->post_content, $gallery_matches, PREG_SET_ORDER );
                    
105
                    
112
                    
113			preg_match_all( '/<img\s+[^>]*src=([\'"])([^\'"]*)\\1/', $gallery, $image_match, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE );
                    
114
                    
288
                    
289		preg_match_all( '!<img.*src=[\'"]([^"]+)[\'"].*/?>!iUs', $html, $matches );
                    
290		if ( !empty( $matches[1] ) ) {
                    
                
shortcodes.php https://gitlab.com/darmawan.fatria/df-skp-2014 | PHP | 557 lines
                    
1<?php
                    
2/**
                    
159	if ( shortcode_exists( $tag ) ) {
                    
160		preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
                    
161		if ( empty( $matches ) )
                    
446	$text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
                    
447	if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) {
                    
448		foreach ($match as $m) {
                    
                
class-wp-press-this.php https://gitlab.com/darmawan.fatria/df-skp-2014 | PHP | 1466 lines
                    
1<?php
                    
2/**
                    
67
                    
68		if ( preg_match_all( '/<img [^>]+>/', $content, $matches ) && current_user_can( 'upload_files' ) ) {
                    
69			foreach ( (array) $matches[0] as $image ) {
                    
                
tcpdf_parser.php https://gitlab.com/vince.omega/General-Code-Dump-From-Desktop | PHP | 811 lines
                    
1<?php
                    
2//============================================================+
                    
2//============================================================+
                    
3// File name   : tcpdf_parser.php
                    
4// Version     : 1.0.014
                    
30//
                    
31// Description : This is a PHP class for parsing PDF documents.
                    
32//
                    
36 * @file
                    
37 * This is a PHP class for parsing PDF documents.<br>
                    
38 * @package com.tecnick.tcpdf
                    
43// include class for decoding filters
                    
44require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
                    
45
                    
47 * @class TCPDF_PARSER
                    
48 * This is a PHP class for parsing PDF documents.<br>
                    
49 * @package com.tecnick.tcpdf
                    
                
cssmgr.php https://gitlab.com/Zinnurain/destination_finder_beta | PHP | 1226 lines
                    
1<?php
                    
2
                    
21function ReadCSS($html) {
                    
22	preg_match_all('/<style[^>]*media=["\']([^"\'>]*)["\'].*?<\/style>/is',$html,$m);
                    
23	for($i=0; $i<count($m[0]); $i++) {
                    
27	}
                    
28	preg_match_all('/<link[^>]*media=["\']([^"\'>]*)["\'].*?>/is',$html,$m);
                    
29	for($i=0; $i<count($m[0]); $i++) {
                    
40	preg_replace('/<\/style>/i', '</style>', $html);
                    
41	preg_match_all('/<style.*?>(.*?)<\/style>/si',$html,$m);
                    
42	if (count($m[1])) { 
                    
61	$regexp = '/<link[^>]*rel=["\']stylesheet["\'][^>]*href=["\']([^>"\']*)["\'].*?>/si';
                    
62	$x = preg_match_all($regexp,$html,$cxt);
                    
63	if ($x) { 
                    
67	$regexp = '/<link[^>]*href=["\']([^>"\']*)["\'][^>]*?rel=["\']stylesheet["\'].*?>/si';
                    
68	$x = preg_match_all($regexp,$html,$cxt);
                    
69	if ($x) { 
                    
                
compat.php https://gitlab.com/hop23typhu/bryepoxy | PHP | 580 lines
                    
2/**
                    
3 * WordPress implementation for PHP functions either missing from older PHP versions or not included by default.
                    
4 *
                    
180		// Use the regex unicode support to separate the UTF-8 characters into an array.
                    
181		preg_match_all( '/./us', $str, $match );
                    
182		return count( $match[0] );
                    
421	 *
                    
422	 * Compatibility shim for PHP <5.4
                    
423	 *
                    
423	 *
                    
424	 * @link https://secure.php.net/jsonserializable
                    
425	 *
                    
452	 *
                    
453	 * @see http://php.net/manual/en/function.array-replace-recursive.php#109390
                    
454	 *
                    
                
class.VTP.php https://gitlab.com/vanthanhhoh/devlovebook | PHP | 496 lines
                    
61		$this->IsCache = $IsCache;
                    
62		$this->CompiledPHPCode = $TPLFileOrHtmlStringOrCompiledPHPCode;
                    
63		return $this;
                    
195					$PhpCompiled = ($echo ? 'echo ' : NULL) . (!empty($ExtraParams) ? "$FunctionName($VariableName,$ExtraParams)" : "$FunctionName($VariableName)");
                    
196					$PhpCompiled = '<?php ' . $PhpCompiled . ' ?>';
                    
197					$Code = str_replace($Tag['key'], $PhpCompiled, $Code);
                    
221				elseif($echo) {
                    
222					$PhpCompiled = '<?php ' . ($echo ? 'echo ' : NULL) . $this->VariableTrueForm('$' . $Value['Var']) . ' ?>';
                    
223				}
                    
241				if($echo) {
                    
242					$PhpCompiled = '<?php ' . ($echo ? 'echo ' : NULL) . $Value['Var'] . ' ?>';
                    
243				}
                    
259				if($echo)
                    
260					$PhpCompiled = '<?php ' . ($echo ? 'echo ' : NULL) . $this->VariableTrueForm('$' . $Value['Var']) . ' ?>';
                    
261				else
                    
                
class.VTE.php https://gitlab.com/vanthanhhoh/devlovebook | PHP | 596 lines
                    
60		$this->IsCache = $IsCache;
                    
61		$this->CompiledPHPCode = $CompiledPHPCode;
                    
62		return $this;
                    
239						$PhpCompiled = !empty($ExtraParams) ? "$InitializeVar $Math $FunctionName($VarOnly,$ExtraParams)" : "$InitializeVar $Math $FunctionName($VarOnly)";
                    
240						$PhpCompiled = '<?php ' . $PhpCompiled . ' ?>';
                    
241						$Code = str_replace($Tag['key'], $PhpCompiled, $Code);
                    
270						$PhpCompiled = ($echo ? 'echo ' : NULL) . $PhpCompiled;
                    
271						$PhpCompiled = '<?php ' . $PhpCompiled . ' ?>';
                    
272						$Code = str_replace($Tag['key'], $PhpCompiled, $Code);
                    
317				if($echo) {
                    
318					$PhpCompiled = '<?php ' . ($echo ? 'echo ' : NULL) . $Value['Var'] . ' ?>';
                    
319				}
                    
335				if($echo)
                    
336					$PhpCompiled = '<?php ' . ($echo ? 'echo ' : NULL) . $this->VariableTrueForm('$' . $Value['Var']) . ' ?>';
                    
337				else
                    
                
AutoLoader.class.php https://github.com/cj/Project-Pier.git | PHP | 300 lines
                    
1<?php
                    
2  
                    
28    */
                    
29    private $index_filename = 'autoloader_index.php';
                    
30    
                    
42    */
                    
43    private $scan_file_extension = 'class.php';
                    
44    
                    
116    * 	creates an associative array (class name => class file) 
                    
117    * - Generates the array in PHP code and saves it as index file
                    
118    *
                    
138    private function createIndexFile() {
                    
139      /* generate php index file */
                    
140      $index_content = "<?php\n";
                    
196    /**
                    
197    * Parse a file for PHP classes and add them to our classIndex
                    
198    *
                    
                
toolbox.php https://gitlab.com/Gashler/sg | PHP | 427 lines
                    
1<?php
                    
2defined('WYSIJA') or die('Restricted access');
                    
27        #put all opened tags into an array
                    
28        preg_match_all('#<([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result);
                    
29        $openedtags = $result[1];   #put all closed tags into an array
                    
29        $openedtags = $result[1];   #put all closed tags into an array
                    
30        preg_match_all('#</([a-z]+)>#iU', $html, $result);
                    
31        $closedtags = $result[1];
                    
66    function _make_domain_name($url=false){
                    
67        if(!$url) $url=admin_url('admin.php');
                    
68
                    
                
LayoutRule.php https://gitlab.com/axeltizon/magento-demopoweraccess | PHP | 519 lines
                    
1<?php
                    
2/**
                    
375        foreach ($patterns as $pattern => $type) {
                    
376            if (preg_match_all($pattern, $contents, $matches, PREG_SET_ORDER)) {
                    
377                foreach ($matches as $match) {
                    
                
Input.php https://gitlab.com/rezaul007/Hospital-information-bank | PHP | 887 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
108	 *
                    
109	 * Holds a cache of php://input contents
                    
110	 *
                    
117	 *
                    
118	 * Parsed from php://input at runtime
                    
119	 *
                    
193		}
                    
194		elseif (($count = preg_match_all('/(?:^[^\[]+)|\[[^]]*\]/', $index, $matches)) > 1) // Does the index contain array notation
                    
195		{
                    
315	/**
                    
316	 * Fetch an item from the php://input stream
                    
317	 *
                    
                
Test.php https://gitlab.com/rmoshiur81/Larave-Grading | PHP | 1140 lines
                    
196
                    
197        // https://bugs.php.net/bug.php?id=63055
                    
198        $matches = [];
                    
235        $operator = empty($required['PHP']['operator']) ? '>=' : $required['PHP']['operator'];
                    
236        if (!empty($required['PHP']) && !version_compare(PHP_VERSION, $required['PHP']['version'], $operator)) {
                    
237            $missing[] = sprintf('PHP %s %s is required.', $operator, $required['PHP']['version']);
                    
240        if (!empty($required['PHPUnit'])) {
                    
241            $phpunitVersion = PHPUnit_Runner_Version::id();
                    
242
                    
242
                    
243            $operator = empty($required['PHPUnit']['operator']) ? '>=' : $required['PHPUnit']['operator'];
                    
244            if (!version_compare($phpunitVersion, $required['PHPUnit']['version'], $operator)) {
                    
244            if (!version_compare($phpunitVersion, $required['PHPUnit']['version'], $operator)) {
                    
245                $missing[] = sprintf('PHPUnit %s %s is required.', $operator, $required['PHPUnit']['version']);
                    
246            }
                    
                
VTimeZone.php https://gitlab.com/rsilveira1987/Expresso | PHP | 389 lines
                    
1<?php
                    
2/**
                    
12/**
                    
13 * convert vtimezone to php timezone
                    
14 * http://tools.ietf.org/html/rfc5545#section-3.6.5
                    
21    /**
                    
22     * gets php's DateTimeZone identifier from given VTIMEZONE and optional prodid
                    
23     * 
                    
51    /**
                    
52     * gets vtimezone string from php timezone identifier
                    
53     * 
                    
139    {
                    
140        $phpTZIDs = DateTimeZone::listIdentifiers();
                    
141        
                    
142        if (preg_match('/TZID:(.*)/', $VTimeZone, $tzid)) {
                    
143            // php timezones
                    
144            if (in_array($tzid[1], $phpTZIDs)) {
                    
                
Notes.php https://gitlab.com/rsilveira1987/Expresso | PHP | 676 lines
                    
1<?php
                    
2/**
                    
156            $regexp = "/$attr\s?\((.*?)\)/";
                    
157            $works = preg_match_all($regexp, $note, $matches);
                    
158            if(count($matches[1]) == 0){ // try translated in case of no results
                    
159                $regexp = '/'.$translate->_($attr).'\s?\((.*?)\)/';
                    
160                $works = preg_match_all($regexp, $note, $matches);
                    
161            }
                    
                
pricing-table.php https://gitlab.com/hunt9310/ras | PHP | 372 lines
                    
1<?php
                    
2/**
                    
179		$pattern = '\\[(\\[?)(wr_item_pricing_table_attr)(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*+(?:\\[(?!\\/\\2\\])[^\\[]*+)*+)\\[\\/\\2\\])?)(\\]?)';
                    
180		preg_match_all( "/$pattern/s", $sub_shortcode, $matches );
                    
181		$arr_sub_shortcode['WR_Item_Pricing_Table_Attr'] = $matches[0];
                    
189		$pattern = '\\[(\\[?)(wr_item_pricing_table)(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*+(?:\\[(?!\\/\\2\\])[^\\[]*+)*+)\\[\\/\\2\\])?)(\\]?)';
                    
190		preg_match_all( "/$pattern/s", $sub_shortcode, $matches );
                    
191		$arr_sub_shortcode['WR_Item_Pricing_Table']      = $matches[0];
                    
195				$pattern = '\\[(\\[?)(wr_item_pricing_table_attr_value)(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*+(?:\\[(?!\\/\\2\\])[^\\[]*+)*+)\\[\\/\\2\\])?)(\\]?)';
                    
196				preg_match_all( "/$pattern/s", $item, $matches );
                    
197				$arr_values['WR_Item_Pricing_Table_Attr_Value'] = $matches[0];
                    
271		$pattern = '\\[(\\[?)(wr_item_pricing_table_attr)(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*+(?:\\[(?!\\/\\2\\])[^\\[]*+)*+)\\[\\/\\2\\])?)(\\]?)';
                    
272		preg_match_all( "/$pattern/s", $arr_sub_shortcodes['wr_item_pricing_table_attr'], $matches );
                    
273		$arr_prtbl_atts = $matches[0];
                    
                
youtube.php https://gitlab.com/hunt9310/ras | PHP | 391 lines
                    
1<?php
                    
2
                    
45	foreach ( array( 'regexp', 'regexp_ent', 'old_regexp', 'old_regexp_ent', 'ifr_regexp', 'ifr_regexp_ent' ) as $reg ) {
                    
46		if ( ! preg_match_all( $$reg, $content, $matches, PREG_SET_ORDER ) )
                    
47			continue;
                    
370if ( ! is_admin() && apply_filters( 'jetpack_comments_allow_oembed', true ) ) {
                    
371	// We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out.
                    
372	// Higher priority because we need it before auto-link and autop get to it
                    
                
polldaddy.php https://gitlab.com/hunt9310/ras | PHP | 578 lines
                    
1<?php
                    
2
                    
95		foreach ( $regexes as $regex ) {
                    
96			if ( ! preg_match_all( $regex, $content, $matches, PREG_SET_ORDER ) ) {
                    
97				continue;
                    
108					$content = str_replace( $match[0], " [polldaddy poll=$id]", $content );
                    
109					/** This action is documented in modules/shortcodes/youtube.php */
                    
110					do_action( 'jetpack_embed_to_shortcode', 'polldaddy', $id );
                    
188			if ( empty( $title ) ) {
                    
189				/** This filter is documented in core/src/wp-includes/general-template.php */
                    
190				$title = apply_filters( 'wp_title', $post->post_title, '', '' );
                    
                
class.photon.php https://gitlab.com/hunt9310/ras | PHP | 945 lines
                    
1<?php
                    
2
                    
9
                    
10	// Allowed extensions must match http://code.trac.wordpress.org/browser/photon/index.php#L31
                    
11	protected static $extensions = array(
                    
41	 * Register actions and filters, but only if basic Photon functions are available.
                    
42	 * The basic functions are found in ./functions.photon.php.
                    
43	 *
                    
80
                    
81		if ( preg_match_all( '#(?:<a[^>]+?href=["|\'](?P<link_url>[^\s]+?)["|\'][^>]*?>\s*)?(?P<img_tag><img[^>]*?\s+?src=["|\'](?P<img_url>[^\s]+?)["|\'].*?>){1}(?:\s*</a>)?#is', $content, $images ) ) {
                    
82			foreach ( $images as $key => $unused ) {
                    
282					// Detect if image source is for a custom-cropped thumbnail and prevent further URL manipulation.
                    
283					if ( ! $fullsize_url && preg_match_all( '#-e[a-z0-9]+(-\d+x\d+)?\.(' . implode('|', self::$extensions ) . '){1}$#i', basename( $src ), $filename ) )
                    
284						$fullsize_url = true;
                    
                
class.jetpack-post-images.php https://gitlab.com/hunt9310/ras | PHP | 583 lines
                    
1<?php
                    
2
                    
42		// Find all the slideshows
                    
43		preg_match_all( '/' . get_shortcode_regex() . '/sx', $post->post_content, $slideshow_matches, PREG_SET_ORDER );
                    
44
                    
320
                    
321		preg_match_all( '!<img.*src=[\'"]([^"]+)[\'"].*/?>!iUs', $html, $matches );
                    
322		if ( !empty( $matches[1] ) ) {
                    
                
filters.php https://gitlab.com/clusterpress/clusterpress-sites-forum | PHP | 737 lines
                    
1<?php
                    
2/**
                    
326
                    
327	preg_match_all( '/<a\s[^>]*>(.*)<\/a>/siU', $retval, $as );
                    
328
                    
                
CDbCommandBuilder.php https://gitlab.com/Griffolion/Final-Year-Project | PHP | 876 lines
                    
1<?php
                    
2/**
                    
157			$params1=array();
                    
158			preg_match_all('/(:\w+)/',$sql,$params1);
                    
159			$params2=array();
                    
159			$params2=array();
                    
160			preg_match_all('/(:\w+)/',$this->applyOrder($sql,$criteria->order),$params2);
                    
161			foreach(array_diff($params2[0],$params1[0]) as $param)
                    
168			$params1=array();
                    
169			preg_match_all('/(:\w+)/',$sql,$params1);
                    
170			$params2=array();
                    
170			$params2=array();
                    
171			preg_match_all('/(:\w+)/',$sql.' '.(is_array($criteria->select) ? implode(', ',$criteria->select) : $criteria->select),$params2);
                    
172			foreach(array_diff($params2[0],$params1[0]) as $param)
                    
                
MarkdownExtra.php https://gitlab.com/atelier-bek/atelier-bek.be | PHP | 1625 lines
                    
1<?php
                    
2#
                    
4#
                    
5# PHP Markdown Extra
                    
6# Copyright (c) 2004-2015 Michel Fortin  
                    
6# Copyright (c) 2004-2015 Michel Fortin  
                    
7# <https://michelf.ca/projects/php-markdown/>
                    
8#
                    
155		# Split on components
                    
156		preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', $attr, $matches);
                    
157		$elements = $matches[0];
                    
                
AbstractProcessTest.php https://gitlab.com/xolotsoft/pumasruiz | PHP | 1165 lines
                    
72        // command with exec
                    
73        $p = $this->getProcess('exec php '.__DIR__.'/NonStopableProcess.php 3');
                    
74        $p->start();
                    
253    {
                    
254        $p = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 0; while ($n < 3) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }')));
                    
255
                    
266
                    
267        $p = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 0; while ($n < 3) { if (\'W\' === file_get_contents('.var_export($lock, true).')) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; file_put_contents('.var_export($lock, true).', \'R\'); } usleep(100); }')));
                    
268
                    
282    {
                    
283        $p = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 0; while ($n < 3) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }')));
                    
284
                    
296
                    
297        $p = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 0; while ($n < 3) { if (\'W\' === file_get_contents('.var_export($lock, true).')) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; file_put_contents('.var_export($lock, true).', \'R\'); } usleep(100); }')));
                    
298
                    
                
Utf8.php https://gitlab.com/xolotsoft/pumasruiz | PHP | 773 lines
                    
1<?php
                    
2
                    
17 * UTF-8 Grapheme Cluster aware string manipulations implementing the quasi complete
                    
18 * set of native PHP string functions that need UTF-8 awareness and more.
                    
19 * Missing are printf-family functions.
                    
32    {
                    
33        return (bool) preg_match('//u', $s); // Since PHP 5.2.5, this also excludes invalid five and six bytes sequences
                    
34    }
                    
47
                    
48            preg_match_all('/./u', $s, $s);
                    
49
                    
246    {
                    
247        if (50418 > PHP_VERSION_ID || 50500 == PHP_VERSION_ID) {
                    
248            // Don't use grapheme_stripos because of https://bugs.php.net/61860
                    
266    {
                    
267        if (50418 > PHP_VERSION_ID || 50500 == PHP_VERSION_ID) {
                    
268            // Don't use grapheme_strripos because of https://bugs.php.net/61860
                    
                
Utf8.php https://gitlab.com/xolotsoft/pumasruiz | PHP | 602 lines
                    
49
                    
50            preg_match_all('/./u', $s, $s);
                    
51
                    
106            {
                    
107                // Workaround https://bugs.php.net/65732
                    
108                $var = str_replace("\r\n", "\n", $var);
                    
180    {
                    
181/**/    if (PHP_VERSION_ID < 50400)
                    
182/**/    {
                    
214    {
                    
215/**/    if (50418 > PHP_VERSION_ID || 50500 == PHP_VERSION_ID)
                    
216/**/    {
                    
230    {
                    
231/**/    if (50418 > PHP_VERSION_ID || 50500 == PHP_VERSION_ID)
                    
232/**/    {
                    
                
functions.php https://gitlab.com/xolotsoft/pumasruiz | PHP | 802 lines
                    
1<?php
                    
2namespace GuzzleHttp\Psr7;
                    
80        case 'string':
                    
81            $stream = fopen('php://temp', 'r+');
                    
82            if ($resource !== '') {
                    
105        case 'NULL':
                    
106            return new Stream(fopen('php://temp', 'r+'), $options);
                    
107    }
                    
133        foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
                    
134            if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
                    
135                $m = $matches[0];
                    
259/**
                    
260 * Safely opens a PHP stream resource using a filename.
                    
261 *
                    
261 *
                    
262 * When fopen fails, PHP normally raises a warning. This function adds an
                    
263 * error handler that checks for errors and throws an exception instead.
                    
                
Emogrifier.php https://gitlab.com/yousafsyed/easternglamor | PHP | 970 lines
                    
1<?php
                    
2namespace Pelago;
                    
233            // process the CSS file for selectors and definitions
                    
234            preg_match_all('/(?:^|[\\s^{}]*)([^{]+){([^}]*)}/mis', $cssParts['css'], $matches, PREG_SET_ORDER);
                    
235
                    
                
ComplexTypeStrategy.php https://gitlab.com/yousafsyed/easternglamor | PHP | 451 lines
                    
1<?php
                    
2/**
                    
228
                    
229        if (preg_match_all('/{([a-z]+):(.+)}/Ui', $documentation, $matches)) {
                    
230            for ($i = 0; $i < count($matches[0]); $i++) {
                    
324     * @return string|null
                    
325     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
                    
326     */
                    
                
functions.php https://gitlab.com/Magi1053/Extra | PHP | 1203 lines
                    
1<?php
                    
2// Prevent file from being loaded directly
                    
8
                    
9require dirname( __FILE__ ) . '/widgets.php';
                    
10
                    
11if ( is_admin() ) {
                    
12	require dirname( __FILE__ ) . '/admin/admin.php';
                    
13}
                    
16	if ( current_theme_supports( 'et-post-formats' ) ) {
                    
17		require dirname( __FILE__ ) . '/post-formats.php';
                    
18	}
                    
21		if ( current_theme_supports( 'et-post-formats' ) ) {
                    
22			require dirname( __FILE__ ) . '/admin/post-formats.php';
                    
23		}
                    
272		$GLOBALS['comment'] = $comment; ?>
                    
273		<li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?> - <?php comment_excerpt(); ?>
                    
274	<?php }
                    
                
wpseo-non-ajax-functions.php https://gitlab.com/ngochuynh1991/cuacuon | PHP | 564 lines
                    
1<?php
                    
2/**
                    
22
                    
23	// Setting title_test to > 0 forces the plugin to output the title below through a filter in class-frontend.php.
                    
24	$expected_title = 'This is a Yoast Test Title';
                    
63 *
                    
64 * @since 1.4.14 Moved from dashboard.php and adjusted - see changelog
                    
65 *
                    
81	$file = false;
                    
82	if ( file_exists( get_stylesheet_directory() . '/header.php' ) ) {
                    
83		// Theme or child theme.
                    
83		// Theme or child theme.
                    
84		$file = get_stylesheet_directory() . '/header.php';
                    
85	}
                    
85	}
                    
86	elseif ( file_exists( get_template_directory() . '/header.php' ) ) {
                    
87		// Parent theme in case of a child theme.
                    
                
class-wpseo-replace-vars.php https://gitlab.com/ngochuynh1991/cuacuon | PHP | 1215 lines
                    
1<?php
                    
2/**
                    
163		$replacements = array();
                    
164		if ( preg_match_all( '`%%([^%]+(%%single)?)%%?`iu', $string, $matches ) ) {
                    
165			$replacements = $this->set_up_replacements( $matches, $omit );
                    
                
CssToInlineStyles.php https://gitlab.com/kimting254/wbms | PHP | 677 lines
                    
1<?php
                    
2namespace TijsVerkoyen\CssToInlineStyles;
                    
6 *
                    
7 * @author         Tijs Verkoyen <php-css-to-inline-styles@verkoyen.eu>
                    
8 * @version        1.5.5
                    
117            // match the style blocks
                    
118            preg_match_all('|<style(.*)>(.*)</style>|isU', $this->html, $matches);
                    
119
                    
                
Route.php https://gitlab.com/kimting254/wbms | PHP | 971 lines
                    
1<?php namespace Illuminate\Routing;
                    
2
                    
252	{
                    
253		preg_match_all('/\{(\w+?)\?\}/', $this->uri, $matches);
                    
254
                    
474	{
                    
475		preg_match_all('/\{(.*?)\}/', $this->domain().$this->uri, $matches);
                    
476
                    
                
tcpdf_parser.php https://gitlab.com/joshuacurci/swim-crm | PHP | 815 lines
                    
1<?php
                    
2//============================================================+
                    
2//============================================================+
                    
3// File name   : tcpdf_parser.php
                    
4// Version     : 1.0.16
                    
30//
                    
31// Description : This is a PHP class for parsing PDF documents.
                    
32//
                    
36 * @file
                    
37 * This is a PHP class for parsing PDF documents.<br>
                    
38 * @package com.tecnick.tcpdf
                    
43// include class for decoding filters
                    
44require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
                    
45
                    
47 * @class TCPDF_PARSER
                    
48 * This is a PHP class for parsing PDF documents.<br>
                    
49 * @package com.tecnick.tcpdf
                    
                
Utils.php https://gitlab.com/koutyan777/Genisys | PHP | 574 lines
                    
131		$data = $machine . PHP_MAXPATHLEN;
                    
132		$data .= PHP_INT_MAX;
                    
133		$data .= PHP_INT_SIZE;
                    
201		if(self::$os === null or $recalculate){
                    
202			$uname = php_uname("s");
                    
203			if(stripos($uname, "Darwin") !== false){
                    
203			if(stripos($uname, "Darwin") !== false){
                    
204				if(strpos(php_uname("m"), "iP") === 0){
                    
205					self::$os = "ios";
                    
339			$ascii = preg_replace('#([^\x20-\x7E])#', ".", $line);
                    
340			$output .= str_pad(dechex($counter << 4), 4, "0", STR_PAD_LEFT) . "  " . $hex . " " . $ascii . PHP_EOL;
                    
341		}
                    
391				PHP_SAPI,
                    
392				(string) PHP_INT_MAX . "." . PHP_INT_SIZE,
                    
393				serialize($_SERVER),
                    
                
Element.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 635 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright  Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
163                $pathArr = $pathMatches = array();
                    
164                if(preg_match_all($regex, $path, $pathMatches)) {
                    
165                    $pathArr = $pathMatches[1];
                    
348            /**
                    
349             * @see http://bugs.php.net/bug.php?id=41867 , fixed in 5.2.4
                    
350             */
                    
479                if (!isset($node->$nodeName) || $overwrite) {
                    
480                    // http://bugs.php.net/bug.php?id=36795
                    
481                    // comment on [8 Feb 8:09pm UTC]
                    
                
youtube.php https://gitlab.com/thisishayat/itv-2016 | PHP | 389 lines
                    
1<?php
                    
2
                    
44	foreach ( array( 'regexp', 'regexp_ent', 'old_regexp', 'old_regexp_ent', 'ifr_regexp', 'ifr_regexp_ent' ) as $reg ) {
                    
45		if ( ! preg_match_all( $$reg, $content, $matches, PREG_SET_ORDER ) )
                    
46			continue;
                    
366if ( apply_filters( 'jetpack_comments_allow_oembed', get_option('embed_autourls') ) ) {
                    
367	// We attach wp_kses_post to comment_text in default-filters.php with priority of 10 anyway, so the iframe gets filtered out.
                    
368	if ( ! is_admin() ) {
                    
                
functions.php https://gitlab.com/thisishayat/itv-2016 | PHP | 626 lines
                    
1<?php
                    
2
                    
2
                    
3if ( !function_exists( 'cminds_parse_php_info' ) ) {
                    
4
                    
4
                    
5	function cminds_parse_php_info() {
                    
6		$obstartresult = ob_start();
                    
7		if ( $obstartresult ) {
                    
8			$phpinforesult = phpinfo( INFO_MODULES );
                    
9			if ( $phpinforesult == FALSE ) {
                    
140			$tags		 = array(); //inistialize empty array
                    
141			preg_match_all( '/(<\/?([\w+]+)[^>]*>)?([^<>]*)/', $text, $tags, PREG_SET_ORDER );
                    
142			foreach ( $tags as $tag ) {
                    
161					$entities		 = array();
                    
162					if ( preg_match_all( '/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', $tag[ 3 ], $entities, PREG_OFFSET_CAPTURE ) ) {
                    
163						foreach ( $entities[ 0 ] as $entity ) {
                    
                
CphpBB.php https://gitlab.com/ezeql/fups | PHP | 449 lines
                    
25
                    
26/* File       : classes/CphpBB.php.
                    
27 * Description: The phpBB forum scraper class, descending from FUPSBase.
                    
29
                    
30require_once __DIR__.'/../phpBB-days-and-months-intl.php';
                    
31
                    
94					# N.B. Must not match any results matched by any other search_results_page_data regex - the results of all are combined!
                    
95					'search_results_page_data' => '#<span class="topictitle"><a name="p(\d+?)".*viewforum\.php\?f=(\d+?)[^>]*>([^<]*)</a>.*viewtopic\.php\?f=\d+?&amp;t=(\d+?)[^>]*>([^<]*)</a>.*viewtopic\.php\?[^>]*>([^<]*)</a>.*</b>[ ]([^<]*)</p>#Us',
                    
96					'search_results_page_data_order' => array('title' => 6, 'ts' => 7, 'forum' => 3, 'topic' => 5, 'forumid' => 2, 'topicid' => 4, 'postid' => 1),
                    
153					'post_contents'             => '#<a name="p(\\d+)">.*<td valign="top">\\s*<table width="100%" cellspacing="5">\\s*<tr>\\s*<td>\\s*?(.*)(\\s*?<br /><br />\\s*<span class="gensmall">.*</span>|)\\n\\s*<br clear="all" /><br />#Us',
                    
154					'prev_page'                 => '#<a href="\\./viewtopic\\.php\\?f=(\\d+)&amp;t=(\\d+)&amp;start=(\\d+)">[^<]+</a>&nbsp;&nbsp;<a href="\\./viewtopic\\.php\\?f=\\d+&amp;t=\\d+[^"]*">\\d+</a><span class="page-sep">,#',
                    
155					/* 'next_page'                => ? (not constructed yet), */
                    
159					'user_name'                => '#alt="[^\\[]*\\[ (.*) \\]"#',
                    
160					'search_results_page_data' => '#<span class="topictitle">.*&nbsp;<a href="viewtopic\\.php\\?t=(\\d+?).*class="topictitle">([^<]*)</a></span></td>.*<span class="postdetails">[^:]*:&nbsp;<b><a href="viewforum\\.php\\?f=(\\d+?)[^>]*>([^<]*)</a></b>&nbsp; &nbsp;[^:]*: ([^&]*?)&nbsp;.*viewtopic\\.php\\?p=(\\d+?)[^>]*>([^<]*)</a></b></span>#Us',
                    
161					'search_results_page_data_order' => array('topicid' => 1, 'topic' => 2, 'forumid' => 3, 'forum' => 4, 'ts' => 5, 'postid' => 6, 'title' => 7),
                    
172					// N.B. Must not match any results matched by any other search_results_page_data regex - the results of all are combined!
                    
173					'search_results_page_data' => '#<tr>\\s*<td[^>]*><span class="topictitle"><img src="[^"]+" align="absmiddle" />&nbsp; .*:&nbsp;<a href="viewtopic\\.php\\?t=(\\d+)&amp;highlight=" class="topictitle">([^<]*)</a></span></td>\\s*</tr>\\s*<tr>\\s*<td width="\\d+" align="left" valign="top" class="row1" rowspan="2"><span class="name"><b><a href="profile\\.php\\?mode=viewprofile&amp;u=3">[^<]*</a></b></span><br />\\s*<br />\\s*<span class="postdetails">[^<]*<b>[^<]*</b><br />\\s*[^<]*<b>[^<]*</b></span><br />\\s*</td>\\s*<td width
                    
                
CXenForo.php https://gitlab.com/ezeql/fups | PHP | 291 lines
                    
1<?php
                    
2
                    
3/* 
                    
4 * FUPS: Forum user-post scraper. An extensible PHP framework for scraping and
                    
5 * outputting the posts of a specified user from a specified forum/board
                    
25
                    
26/* File       : classes/CXenForo.php.
                    
27 * Description: The XenForo forum scraper class, descending from FUPSBase.
                    
48			//   </search/[searchid]/?page=[pagenum]> using
                    
49			// preg_match_all with flags set to PREG_SET_ORDER so that each entry of
                    
50			// $matches ends up with the following matches in the order specified in
                    
196		// if (!curl_setopt_array($this->ch, $opts)) {
                    
197		// 	$this->exit_err('Failed to set the following cURL options:'.PHP_EOL.var_export($opts, true), __FILE__, __METHOD__, __LINE__);
                    
198		// }
                    
223		// if (!curl_setopt_array($this->ch, $opts)) {
                    
224		// 	$this->exit_err('Failed to set the following cURL options:'.PHP_EOL.var_export($opts, true), __FILE__, __METHOD__, __LINE__);
                    
225		// }
                    
                
CFUPSBase.php https://gitlab.com/ezeql/fups | PHP | 1135 lines
                    
32require_once __DIR__.'/../common.php';
                    
33require_once __DIR__.'/../phpBB-days-and-months-intl.php';
                    
34
                    
36	# The maximum time in seconds before the script chains a new instance of itself and then exits,
                    
37	# to avoid timeouts due to exceeding the PHP commandline max_execution_time ini setting.
                    
38	public    $FUPS_CHAIN_DURATION =  null;
                    
40	protected $have_written_to_admin_err_file = false;
                    
41	protected $required_settings = array('base_url', 'extract_user_id', 'php_timezone');
                    
42	protected $optional_settings = array('start_from_date', 'non_us_date_format', 'debug');
                    
227		if (!class_exists('ZipArchive')) {
                    
228			$this->write_err('Unable to create output archive: the "ZipArchive" class does not exist. You can install it using these online instructions: <http://php.net/manual/en/zip.installation.php>.', __FILE__, __METHOD__, __LINE__);
                    
229		} else {
                    
296			if (!try_run_bg_proc($cmd)) {
                    
297				$this->exit_err('Apologies, the server encountered a technical error: it was unable to initiate a chained background process to continue the task of scraping, sorting and finally presenting your posts. The command used was:'.PHP_EOL.PHP_EOL.$cmd.PHP_EOL.PHP_EOL.'Any output was:'.PHP_EOL.implode(PHP_EOL, $output).PHP_EOL.PHP_EOL.'You might like to try again.', __FILE__, __METHOD__, __LINE__);
                    
298			}
                    
                
Generator.php https://gitlab.com/marvin1/soundcloud | PHP | 563 lines
                    
1<?php
                    
2
                    
2
                    
3require(dirname(__FILE__) . "/Entry.php");
                    
4
                    
90    $this->options = $options;
                    
91    $this->source = str_replace(PHP_EOL, "\n", $options['source']);
                    
92    $this->entries = Entry::getEntries($this->source);
                    
113    // tokenize inline code snippets
                    
114    preg_match_all('/`[^`]+`/', $string, $tokenized);
                    
115    $tokenized = $tokenized[0];
                    
145  private static function interpolate( $string, $object ) {
                    
146    preg_match_all('/#\{([^}]+)\}/', $string, $tokens);
                    
147    $tokens = array_unique(array_pop($tokens));
                    
                
mysql.php https://gitlab.com/endomorphosis/greenrenaissancejoomla | PHP | 685 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3* @version		$Id: mysql.php 9978 2008-02-01 17:23:39Z ircmaxell $
                    
4* @package		Joomla.Framework
                    
6* @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
                    
7* @license		GNU/GPL, see LICENSE.php
                    
8* Joomla! is free software. This version may have been modified pursuant
                    
11* other free or open source software licenses.
                    
12* See COPYRIGHT.php for copyright notices and details.
                    
13*/
                    
259			$si = $this->getVersion();
                    
260			preg_match_all( "/(\d+)\.(\d+)\.(\d+)/i", $si, $m );
                    
261			if ($m[1] >= 4) {
                    
                
mysql.php https://gitlab.com/endomorphosis/OLAAaction | PHP | 692 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3* @version		$Id: mysql.php 16385 2010-04-23 10:44:15Z ian $
                    
4* @package		Joomla.Framework
                    
6* @copyright	Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
                    
7* @license		GNU/GPL, see LICENSE.php
                    
8* Joomla! is free software. This version may have been modified pursuant
                    
11* other free or open source software licenses.
                    
12* See COPYRIGHT.php for copyright notices and details.
                    
13*/
                    
262			$si = $this->getVersion();
                    
263			preg_match_all( "/(\d+)\.(\d+)\.(\d+)/i", $si, $m );
                    
264			if ($m[1] >= 4) {
                    
                
Result.php https://gitlab.com/gustCL/syscar | PHP | 830 lines
                    
1<?php
                    
2
                    
69		if (isset($this->limit) && $this->notORM->driver == "oci") {
                    
70			$where[] = ($where ? " AND " : "") . "(" . ($this->offset ? "rownum > $this->offset AND " : "") . "rownum <= " . ($this->limit + $this->offset) . ")"; //! rownum > doesn't work - requires subselect (see adminer/drivers/oracle.inc.php)
                    
71		}
                    
91		$return = array();
                    
92		preg_match_all('~\\b([a-z_][a-z0-9_.:]*[.:])[a-z_*]~i', $val, $matches);
                    
93		foreach ($matches[1] as $names) {
                    
95			if ($names != "$parent.") { // case-sensitive
                    
96				preg_match_all('~\\b([a-z_][a-z0-9_]*)([.:])~i', $names, $matches, PREG_SET_ORDER);
                    
97				foreach ($matches as $match) {
                    
148				}
                    
149				$pattern = '(^' . preg_quote(dirname(__FILE__)) . '(\\.php$|[/\\\\]))'; // can be static
                    
150				foreach (debug_backtrace() as $backtrace) {
                    
                
options.php https://gitlab.com/alexprowars/bitrix | PHP | 490 lines
                    
26$module_id = "support";
                    
27IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$module_id."/include.php");
                    
28IncludeModuleLangFile(__FILE__);
                    
39$message = false;
                    
40require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$module_id."/include.php");
                    
41if($REQUEST_METHOD=="POST" && $Update <> '' && $SUP_RIGHT>="W" && check_bitrix_sessid())
                    
57	COption::SetOptionString($module_id, "REINDEX_MSG_S", $REINDEX_MSG_S);
                    
58	if (preg_match_all('|#|'.BX_UTF_PCRE_MODIFIER, $SUPERTICKET_COUPON_FORMAT, $_tmp) && is_array($_tmp[0]) && count($_tmp[0]) >= 6)
                    
59	{
                    
324						'dataType': 'html',
                    
325						'url': "ticket_messages_reindex.php",
                    
326						'data':  data,
                    
338<?$tabControl->BeginNextTab();?>
                    
339<?require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/admin/group_rights.php");?>
                    
340<?$tabControl->Buttons();?>
                    
                
query.php https://gitlab.com/alexprowars/bitrix | PHP | 678 lines
                    
1<?php
                    
2
                    
126		$match = array();
                    
127		if (preg_match_all("/(".$this->table_aliases_regex."\\.[a-zA-Z0-9_]+|[0-9]+|'[^']*') (?:=) ([0-9]+|'[^']*')/", $or_match[1], $match))
                    
128		{
                    
                
dateconverter.php https://gitlab.com/alexprowars/bitrix | PHP | 1114 lines
                    
1<?php
                    
2namespace Bitrix\Main\Text;
                    
52		}
                    
53		if (preg_match_all("/(".implode('|', $pattern).")/", $text, $match, PREG_OFFSET_CAPTURE))
                    
54		{
                    
112		}
                    
113		if (preg_match_all("/(".implode('|', $pattern).")/", $text, $match, PREG_OFFSET_CAPTURE))
                    
114		{
                    
188		}
                    
189		if (preg_match_all("/(".implode('|', $pattern).")/", $text, $match, PREG_OFFSET_CAPTURE))
                    
190		{
                    
266		}
                    
267		if (preg_match_all("/([0-2][0-9]:[0-5][0-9])/", $text, $match, PREG_OFFSET_CAPTURE))
                    
268		{
                    
303		}
                    
304		if (preg_match_all("/".implode('|', $pattern)."/", $text, $match, PREG_OFFSET_CAPTURE))
                    
305		{
                    
                
liveid.php https://gitlab.com/alexprowars/bitrix | PHP | 1825 lines
                    
1<?php
                    
2
                    
5/**
                    
6 * FILE:        windowslivelogin.php
                    
7 *
                    
8 * DESCRIPTION: Sample implementation of Web Authentication and Delegated
                    
9 *              Authentication protocol in PHP. Also includes trusted
                    
10 *              sign-in and application verification sample
                    
393		//Split $offers by ";" and then take only substring before first ":"
                    
394		if(preg_match_all("/(^|;)([^:;]*)/", $offers, $arMatch))
                    
395		{
                    
535     * debugging output, set this to true. In this implementation
                    
536     * errors will be logged using the PHP error_log function.
                    
537     */
                    
546     * function does nothing if the debug flag has not been set with
                    
547     * setDebug. Otherwise, errors are logged using the PHP error_log
                    
548     * function.
                    
                
command.php https://gitlab.com/alexprowars/bitrix | PHP | 916 lines
                    
1<?php
                    
2/**
                    
308		$commandList = Array();
                    
309		if (preg_match_all("/^\\/(?P<COMMAND>[^\\040\\n]*)(\\040?)(?P<PARAMS>.*)$/m", $messageFields['MESSAGE'], $matches))
                    
310		{
                    
462			$grantAccess = false;
                    
463			if (preg_match_all("/^\\/(?P<COMMAND>[^\\040\\n]*)(\\040?)(?P<PARAMS>.*)$/m", $message['MESSAGE'], $matches))
                    
464			{
                    
                
Form_validation.php https://gitlab.com/dsasmita/talita-shop | PHP | 1190 lines
                    
1<?php
                    
2
                    
7 *
                    
8 * An open source application development framework for PHP 5.1.6 or newer
                    
9 *
                    
108        // into its components so that we can fetch the corresponding POST data later
                    
109        if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches)) {
                    
110            // Note: Due to a bug in current() that affects some versions
                    
110            // Note: Due to a bug in current() that affects some versions
                    
111            // of PHP we can not pass function call directly into it
                    
112            $x = explode('[', $field);
                    
                
cssmgr.php https://gitlab.com/sylver.gocloud/gocloudasia-college-system-framework | PHP | 1248 lines
                    
1<?php
                    
2
                    
31	if ($CSSstr ) {
                    
32		preg_match_all('/(.*?)\{(.*?)\}/',$CSSstr,$styles);
                    
33		for($i=0; $i < count($styles[1]) ; $i++)  {
                    
75function ReadCSS($html) {
                    
76	preg_match_all('/<style[^>]*media=["\']([^"\'>]*)["\'].*?<\/style>/is',$html,$m);
                    
77	for($i=0; $i<count($m[0]); $i++) {
                    
81	}
                    
82	preg_match_all('/<link[^>]*media=["\']([^"\'>]*)["\'].*?>/is',$html,$m);
                    
83	for($i=0; $i<count($m[0]); $i++) {
                    
94	preg_replace('/<\/style>/i', '</style>', $html);
                    
95	preg_match_all('/<style.*?>(.*?)<\/style>/si',$html,$m);
                    
96	if (count($m[1])) { 
                    
115	$regexp = '/<link[^>]*rel=["\']stylesheet["\'][^>]*href=["\']([^>"\']*)["\'].*?>/si';
                    
116	$x = preg_match_all($regexp,$html,$cxt);
                    
117	if ($x) { 
                    
                
HtmlToTextTest.php https://gitlab.com/reasonat/test8 | PHP | 387 lines
                    
1<?php
                    
2
                    
17  /**
                    
18   * Converts a string to its PHP source equivalent for display in test messages.
                    
19   *
                    
24   *   An HTML representation of the text string that, when displayed in a
                    
25   *   browser, represents the PHP source code equivalent of $text.
                    
26   */
                    
50  protected function assertHtmlToText($html, $text, $message, $allowed_tags = NULL) {
                    
51    preg_match_all('/<([a-z0-6]+)/', Unicode::strtolower($html), $matches);
                    
52    $tested_tags = implode(', ', array_unique($matches[1]));
                    
                
SearchQuery.php https://gitlab.com/reasonat/test8 | PHP | 648 lines
                    
1<?php
                    
2
                    
226    // something between two spaces, optionally quoted.
                    
227    preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->searchExpression, $keywords, PREG_SET_ORDER);
                    
228
                    
                
CssToInlineStyles.php https://gitlab.com/techniconline/kmc | PHP | 686 lines
                    
1<?php
                    
2namespace TijsVerkoyen\CssToInlineStyles;
                    
9 *
                    
10 * @author         Tijs Verkoyen <php-css-to-inline-styles@verkoyen.eu>
                    
11 * @version        1.5.4
                    
130            // match the style blocks
                    
131            preg_match_all('|<style(.*)>(.*)</style>|isU', $this->html, $matches);
                    
132
                    
                
Route.php https://gitlab.com/techniconline/kmc | PHP | 951 lines
                    
1<?php namespace Illuminate\Routing;
                    
2
                    
244    {
                    
245        preg_match_all('/\{(\w+?)\?\}/', $this->uri, $matches);
                    
246
                    
464    {
                    
465        preg_match_all('/\{(.*?)\}/', $this->domain() . $this->uri, $matches);
                    
466
                    
                
Client.php https://gitlab.com/mjahn/lovelybooks-client | PHP | 1426 lines
                    
1<?php
                    
2
                    
74	protected function parseAjaxLinks($content) {
                    
75		$iMax = preg_match_all('/Wicket\.Ajax\.ajax\({[^}]*?"u":"([^"]+)".*?,"c":"(id[^"]+)"/', $content, $matches);
                    
76		$this->ajax = [];;
                    
413
                    
414		$iMax = preg_match_all('/<li><a href="#" data-id="(\d+)">\s+<a href="\/autor\/([^\/]+)\/[^\/]+\/" class="bookImgContainer medium"><img src="([^"]+)" alt="([^"]+)"/', $content, $matches);
                    
415		$user['lastadded'] = [];
                    
446
                    
447		$iMax = preg_match_all('/<div class="singlebook">\s+<[^<]+<a href="(\/autor\/(
                    
                
Hash.php https://gitlab.com/manuperazafa/elsartenbackend | PHP | 1059 lines
                    
2/**
                    
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
10 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
11 * @link          http://cakephp.org CakePHP(tm) Project
                    
12 * @package       Cake.Utility
                    
12 * @package       Cake.Utility
                    
13 * @since         CakePHP(tm) v 2.2.0
                    
14 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
                    
41 * @return mixed The value fetched from the array, or null.
                    
42 * @link http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::get
                    
43 */
                    
89 *   if there are no matches.
                    
90 * @link http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::extract
                    
91 */
                    
                
CakeRoute.php https://gitlab.com/manuperazafa/elsartenbackend | PHP | 549 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
10 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
11 * @link          http://cakephp.org CakePHP(tm) Project
                    
12 * @since         CakePHP(tm) v 1.3
                    
12 * @since         CakePHP(tm) v 1.3
                    
13 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
                    
14 */
                    
139
                    
140		preg_match_all('#:([A-Za-z0-9_-]+[A-Z0-9a-z])#', $route, $namedElements);
                    
141		foreach ($namedElements[1] as $i => $name) {
                    
302				} else {
                    
303					if (preg_match_all('/\[([A-Za-z0-9_-]+)?\]/', $key, $matches, PREG_SET_ORDER)) {
                    
304						$matches = array_reverse($matches);
                    
                
 

Source

Language