100+ results results for 'php preg_quote repo:bwall/PHP-RFI-Payload-Decoder' (458 ms)
1<?php 2/** 103 foreach ($wpcf7 as $key => $val) { 104 $val = preg_replace('/' . preg_quote($site_url, '/') . '/i', $new_site_url, $val); 105 $val = preg_replace('/' . preg_quote($admin_email, '/') . '/i', $new_admin_email, $val);ArticleHTMLGalley.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 259 lines
1<?php 2 3/** 4 * @file classes/article/ArticleHTMLGalley.inc.php 5 * 14 15// $Id: ArticleHTMLGalley.inc.php,v 1.33 2009/05/12 16:57:20 asmecher Exp $ 16 53 $imageUrl = Request::url(null, 'article', 'viewFile', array($this->getArticleId(), $this->getBestGalleyId($journal), $image->getFileId())); 54 $pattern = preg_quote(rawurlencode($image->getOriginalFileName())); 55readmes.inc.php https://gitlab.com/Gashler/sg | PHP | 233 lines
1<?php 2/** 62 if (!function_exists ("NC_Markdown")) 63 include_once dirname (dirname (__FILE__)) . "/externals/markdown/nc-markdown.inc.php"; 64 70 { 71 preg_match ("/(\=\= )(" . preg_quote ($specific_section, "/") . ")( \=\=)(.+?)([\r\n]+\=\= |$)/si", $rm, $m); 72 101 { 102 $rm = preg_replace ("/\<pre\>\<code\>/i", '<pre lang="php" escaped="true">', $rm); 103 $rm = preg_replace ("/\<\/code\>\<\/pre\>/i", '</pre>', $rm); 153 { 154 $rm = preg_replace ("/\<pre\>\<code\>/i", '<pre lang="php" escaped="true">', $rm); 155 $rm = preg_replace ("/\<\/code\>\<\/pre\>/i", '</pre>', $rm); 225 226 preg_match ("/(^)(" . preg_quote ($key, "/") . ")(\:)( )(.+?)($)/m", $readme[$path], $m); 227String.php https://gitlab.com/michield/phpList | PHP | 276 lines
1<?php 2namespace phpList\helper; 3 4use phpList\phpList; 5 8 * Class containing string helper functions 9 * @package phpList 10 */ 113 } 114 # $text = preg_replace('~'.preg_quote($fullmatch).'~',$linkreplace,$text); 115 $text = str_replace($fullmatch, $linkreplace, $text); 161 "'&#(\d+);'e" 162 ); // evaluate as php 163 200 foreach ($tags as $tag) { 201# preg_match_all('/'.preg_quote($tag).'"([^"|\#]*)"/Uim', $text, $foundtags); 202# we're only handling nicely formatted src="something" and not src=something, ie quotes are requiredAllMessagesTablePager.php https://gitlab.com/link233/bootmw | PHP | 424 lines
1<?php 2/** 76 $this->displayPrefix = $prefix->getDBkey(); 77 $this->prefix = '/^' . preg_quote( $this->displayPrefix, '/' ) . '/i'; 78 } else { 304 $translation = Linker::makeExternalLink( 305 'https://translatewiki.net/w/i.php?' . wfArrayToCgi( [ 306 'title' => 'Special:SearchTranslations',class-vc-grid-item.php https://gitlab.com/furrutia1991/imosa_web | PHP | 357 lines
1<?php 2 25 if ( false === $this->shortcodes ) { 26 $this->shortcodes = include vc_path_dir( 'PARAMS_DIR', 'vc_grid_item/shortcodes.php' ); 27 $this->shortcodes = apply_filters( 'vc_grid_item_shortcodes', $this->shortcodes ); 51 public function addVcIconShortcodesTemplates( $template ) { 52 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_icon.php' ); 53 if ( is_file( $file ) ) { 67 public function addVcButton2ShortcodesTemplates( $template ) { 68 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_button2.php' ); 69 if ( is_file( $file ) ) { 83 public function addVcSingleImageShortcodesTemplates( $template ) { 84 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_single_image.php' ); 85 if ( is_file( $file ) ) { 100 public function addVcCustomHeadingShortcodesTemplates( $template ) { 101 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_custom_heading.php' ); 102 if ( is_file( $file ) ) {referrals.php https://github.com/bernard357/yacs.git | PHP | 441 lines
1<?php 2/** 14 * 15 * This function removes any PHPSESSID data in the query string, if any 16 * 18 * 19 * @see agents/referrals_hook.php 20 */ 32 // only remember viewed pages and index pages 33 if(!preg_match('/\/(index|view).php/', $url)) 34 return; 47 // only remember external referrals 48 if(preg_match('/\b'.preg_quote(str_replace('www.', '', $context['host_name']), '/').'\b/i', $referer)) 49 return; 55 // avoid banned sources 56 include_once $context['path_to_root'].'servers/servers.php'; 57 if(preg_match(Servers::get_banned_pattern(), $referer))Array.php git://github.com/atk4/atk4.git | PHP | 212 lines
1<?php 2/** 180 case 'like': 181 $pattern = '/^' . str_replace('%', '.*', preg_quote($expected, '/')) . '$/i'; 182 return (bool) preg_match($pattern, $value);ShallowParser.php https://bitbucket.org/leiweiqiang/tra-ai-pm.git | PHP | 233 lines
1<?php 2 70 public function quote($token) { 71 return preg_quote($token, '/'); 72 } 91 $result->terminator = $result->state 92 ? '/^(.*?' . preg_quote($this->_pairs[$result->state], '/') . ')/s' 93 : nullAnnotationDriver.php https://gitlab.com/mario.uriarte/doctrine2.5-tutorial | PHP | 256 lines
1<?php 2/* 61 */ 62 protected $fileExtension = '.php'; 63 215 ), 216 '/^.+' . preg_quote($this->fileExtension) . '$/i', 217 \RecursiveRegexIterator::GET_MATCHsystematics.inc.php https://gitlab.com/Gashler/sg | PHP | 141 lines
1<?php 2/** 87 88 if((defined('DOING_CRON') && DOING_CRON) || strcasecmp(PHP_SAPI, 'CLI') === 0) // CLI or CRON job. 89 return ($is_wp_systematic = apply_filters('ws_plugin__s2member_is_wp_systematic_use_page', TRUE, get_defined_vars())); 90 91 if(preg_match('/^\/(?:wp-.+?|xmlrpc)\.php$/'.$ci, c_ws_plugin__s2member_utils_urls::parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) 92 return ($is_wp_systematic = apply_filters('ws_plugin__s2member_is_wp_systematic_use_page', TRUE, get_defined_vars())); 134 135 if($GLOBALS['WS_PLUGIN__']['s2member']['o']['login_redirection_override'] && ($_lro = c_ws_plugin__s2member_login_redirects::login_redirection_uri(NULL, 'root-returns-false')) && preg_match('/^'.preg_quote($_lro, '/').'$/'.$ci, $_SERVER['REQUEST_URI'])) 136 return ($is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_page', TRUE, get_defined_vars()));functions-http.php https://gitlab.com/Slind/YOURLS | PHP | 369 lines
1<?php 2/** 86 * 87 * For a list of all available options, see function request() in /includes/Requests/Requests.php 88 * 157 foreach ( $bypass_hosts as $host ) 158 $wildcard_regex[] = str_replace( '\*', '.+', preg_quote( $host, '/' ) ); 159 $wildcard_regex = '/^(' . implode( '|', $wildcard_regex ) . ')$/i'; 202 if ( !class_exists( 'Requests', false ) ) { 203 require_once dirname( __FILE__ ) . '/Requests/Requests.php'; 204 Requests::register_autoloader(); 253 $conf_loc = str_replace( YOURLS_ABSPATH, '', YOURLS_CONFIGFILE ); 254 $conf_loc = str_replace( '/config.php', '', $conf_loc ); 255 $conf_loc = ( $conf_loc == '/user' ? 'u' : 'i' ); 265 'yourls_version' => defined( 'YOURLS_VERSION' ) ? YOURLS_VERSION : 'unknown', 266 'php_version' => phpversion(), 267 'mysql_version' => $ydb->mysql_version(),Suffix.php https://gitlab.com/crazybutterfly815/magento2 | PHP | 185 lines
1<?php 2/** 21/** 22 * @SuppressWarnings(PHPMD.CouplingBetweenObjects) 23 */ 54 * @param array $data 55 * @SuppressWarnings(PHPMD.ExcessiveParameterList) 56 */ 136 $entities = $this->urlFinder->findAllByData($dataFilter); 137 $oldSuffixPattern = '~' . preg_quote($this->getOldValue()) . '$~'; 138 $suffix = $this->getValue();text.php https://gitlab.com/vince.omega/mcb-nov-build | PHP | 410 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 4 * 5 * $Id: text.php 3769 2008-12-15 00:48:56Z zombor $ 6 * 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 11 */ 189 { 190 $badwords[$key] = str_replace('\*', '\S*?', preg_quote((string) $badword)); 191 } 353 * @see Based on original functions written by: 354 * @see Aidan Lister: http://aidanlister.com/repos/v/function.size_readable.php 355 * @see Quentin Zervaas: http://www.phpriot.com/d/code/strings/filesize-format/functions.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 413 lines
1<?php 2 126 { 127 $dir = nv_preg_quote( $dir ); 128 if ( preg_match( "/^" . $dir . "/", $path ) ) 195 196 include_once ( NV_ROOTDIR . "/includes/class/image.class.php" ); 197 $image = new image( NV_ROOTDIR . '/' . $fileName, NV_MAX_WIDTH, NV_MAX_HEIGHT );404.php https://github.com/frostschutz/MyBB-Google-SEO.git | PHP | 250 lines
1<?php 2/** 36 37if(THIS_SCRIPT == "misc.php" 38 && $mybb->input['google_seo_error'] == "404") 42 // Set the 404 error location 43 $location = 'misc.php?google_seo_error=404'; 44 133 { 134 $pattern = preg_quote($pattern, '#'); 135 $pattern = str_replace('\\*', '.*', $pattern); 240 // Check if this user is on a 404 page. 241 if(strpos($p['user_activity']['location'], "misc.php?google_seo_error=404") === 0) 242 {ModuleAutoloader.php https://gitlab.com/OnBlox/OnBlox-Template | PHP | 442 lines
1<?php 2/** 12// Grab SplAutoloader interface 13require_once __DIR__ . '/SplAutoloader.php'; 14 188 if ($this->pharExtensions) { 189 $pharSuffixPattern = '(' . implode('|', array_map('preg_quote', $this->pharExtensions)) . ')'; 190 } 211 212 // No directory with Module.php, searching for phars 213 if ($pharSuffixPattern) { 244 { 245 $modulePath = $dirPath . '/Module.php'; 246 if (substr($modulePath, 0, 7) === 'phar://') { 252 if (($file->isReadable() && $file->isFile())) { 253 // Found directory with Module.php in it 254 $absModulePath = $this->pharBasePath ? (string) $file : $file->getRealPath();Wildcard.php https://gitlab.com/RonLab1987/YupePlusClear | PHP | 366 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Wildcard.php 24593 2012-01-05 20:35:02Z matthew $ 21 */ 23/** Zend_Search_Lucene_Search_Query */ 24require_once 'Zend/Search/Lucene/Search/Query.php'; 25 141 ['.', '.*'], 142 preg_quote($this->_pattern->text, '/') 143 ) . '$/'; 145 if ($prefixLength < self::$_minPrefixLength) { 146 require_once 'Zend/Search/Lucene/Exception.php'; 147 throw new Zend_Search_Lucene_Exception('At least ' . self::$_minPrefixLength . ' non-wildcard characters are required at the beginning of pattern.'); 160 161 require_once 'Zend/Search/Lucene/Index/Term.php'; 162 if ($prefix != '') {Cache.php https://gitlab.com/staging06/myproject | PHP | 396 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 22* @copyright 2007-2015 PrestaShop SA 23* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24* International Registered Trademark & Property of PrestaShop SA 220 { 221 $pattern = str_replace('\\*', '.*', preg_quote($key)); 222 foreach ($this->keys as $k => $ttl) 358 { 359 // PHP is not efficient at storing array 360 // Better delete the whole cache if there are 386 { 387 $regexp = str_replace('\\*', '.*', preg_quote($key, '#')); 388 foreach (array_keys(Cache::$local) as $key)user_agent.php http://scp-soft.googlecode.com/svn/trunk/ | PHP | 588 lines
1<?php 2/** 10 * @author Rick Ellis 11 * @link http://kohanaphp.com/user_guide/libraries/user_agent.html 12 */ 249 { 250 if (preg_match("|".preg_quote($key)."|i", $this->agent)) 251 { 273 { 274 if (preg_match("|".preg_quote($key).".*?([0-9\.]+)|i", $this->agent, $match)) 275 { 300 { 301 if (preg_match("|".preg_quote($key)."|i", $this->agent)) 302 {ssl-in.inc.php https://gitlab.com/Gashler/sg | PHP | 167 lines
1<?php 2/** 102 if(_ws_plugin__s2member_force_ssl_host && _ws_plugin__s2member_force_ssl_port && _ws_plugin__s2member_force_ssl_host_port) 103 $s = preg_replace('/(?:https?\:)?\/\/'.preg_quote(_ws_plugin__s2member_force_ssl_host, '/').'(?:\:[0-9]+)?/i', 'https://'._ws_plugin__s2member_force_ssl_host_port, $s); 104 $s = (strtolower($m[1]) === 'link' && preg_match('/(["\'])(?:alternate|profile|pingback|EditURI|wlwmanifest|prev|next)\\1/i', $m[0])) ? $m[0] : $s; 112 { 113 $s = preg_replace('/(?:https?\:)?\/\/'.preg_quote(_ws_plugin__s2member_force_ssl_host_port, '/').'/i', 'http://'._ws_plugin__s2member_force_ssl_host, $m[0]); 114 $s = preg_replace('/(?:https?\:)?\/\/'.preg_quote(_ws_plugin__s2member_force_ssl_host, '/').'/i', 'http://'._ws_plugin__s2member_force_ssl_host, $s); 151 152 $buffer = ($ssl_entire_tags) ? preg_replace_callback('/\<('.implode('|', c_ws_plugin__s2member_utils_strings::preg_quote_deep($ssl_entire_tags, '/')).')(?![a-z_0-9\-])[^\>]*?\>.*?\<\/\\1\>/is', '_ws_plugin__s2member_force_ssl_buffer_callback', $buffer) : $buffer; 153 $buffer = ($ssl_attr_only_tags) ? preg_replace_callback('/\<('.implode('|', c_ws_plugin__s2member_utils_strings::preg_quote_deep($ssl_attr_only_tags, '/')).')(?![a-z_0-9\-])[^\>]+?\>/i', '_ws_plugin__s2member_force_ssl_buffer_callback', $buffer) : $buffer; 154 155 $buffer = ($non_ssl_entire_tags) ? preg_replace_callback('/\<('.implode('|', c_ws_plugin__s2member_utils_strings::preg_quote_deep($non_ssl_entire_tags, '/')).')(?![a-z_0-9\-])[^\>]*?\>.*?\<\/\\1\>/is', '_ws_plugin__s2member_force_non_ssl_buffer_callback', $buffer) : $buffer; 156 $buffer = ($non_ssl_attr_only_tags) ? preg_replace_callback('/\<('.implode('|', c_ws_plugin__s2member_utils_strings::preg_quote_deep($non_ssl_attr_only_tags, '/')).')(?![a-z_0-9\-])[^\>]+?\>/i', '_ws_plugin__s2member_force_non_ssl_buffer_callback', $buffer) : $buffer;Date.php https://gitlab.com/r.collas/site_central | PHP | 165 lines
1<?php 2/** 26 27 $format = preg_quote($format, '#'); 28 164 165// Do not clause PHP tags unless it is really necessarypages.inc.php https://gitlab.com/Gashler/sg | PHP | 109 lines
1<?php 2/** 55 56 else if($GLOBALS['WS_PLUGIN__']['s2member']['o']['login_redirection_override'] && ($login_redirection_uri = c_ws_plugin__s2member_login_redirects::login_redirection_uri($user, 'root-returns-false')) && preg_match('/^'.preg_quote($login_redirection_uri, '/').'$/'.$ci, $_SERVER['REQUEST_URI']) && c_ws_plugin__s2member_no_cache::no_cache_constants('restricted') && (!$user || !$user->has_cap('access_s2member_level0')) && $page_id !== (int)$GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page']) 57 c_ws_plugin__s2member_mo_page::wp_redirect_w_mop_vars('page', $page_id, 'level', 0, $_SERVER['REQUEST_URI'], 'sys').exit (); 90 foreach(preg_split('/['."\r\n\t".']+/', c_ws_plugin__s2member_ruris::fill_ruri_level_access_rc_vars($GLOBALS['WS_PLUGIN__']['s2member']['o']['level'.$n.'_ruris'], $user)) as $str) 91 if($str && preg_match('/'.preg_quote($str, '/').'/'.$ci, $_SERVER['REQUEST_URI']) && c_ws_plugin__s2member_no_cache::no_cache_constants('restricted') && (!$user || !$user->has_cap('access_s2member_level'.$n))) 92 c_ws_plugin__s2member_mo_page::wp_redirect_w_mop_vars('page', $page_id, 'level', $n, $_SERVER['REQUEST_URI'], 'ruri').exit ();Inflector.php https://gitlab.com/yousafsyed/easternglamor | PHP | 472 lines
1<?php 2/** 415 416 $pregQuotedTargetReplacementIdentifier = preg_quote($this->targetReplacementIdentifier, '#'); 417 $processedParts = array();text.php https://bitbucket.org/alvinpd/monsterninja.git | PHP | 469 lines
1<?php defined('SYSPATH') or die('No direct access allowed.'); 2/** 8 * @copyright (c) 2007-2008 Kohana Team 9 * @license http://kohanaphp.com/license 10 */ 222 { 223 $badwords[$key] = str_replace('\*', '\S*?', preg_quote((string) $badword)); 224 } 342 // Replace each email with an encoded mailto 343 $text = preg_replace('!\b'.preg_quote($match).'\b!', HTML::mailto($match), $text); 344 } 351 * Automatically applies "p" and "br" markup to text. 352 * Basically [nl2br](http://php.net/nl2br) on steroids. 353 * 408 * Returns human readable sizes. Based on original functions written by 409 * [Aidan Lister](http://aidanlister.com/repos/v/function.size_readable.php) 410 * and [Quentin Zervaas](http://www.phpriot.com/d/code/strings/filesize-format/).text.php https://github.com/craig1709/mis.git | PHP | 410 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 4 * 5 * $Id: text.php 3917 2009-01-21 03:06:22Z zombor $ 6 * 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 11 */ 189 { 190 $badwords[$key] = str_replace('\*', '\S*?', preg_quote((string) $badword)); 191 } 353 * @see Based on original functions written by: 354 * @see Aidan Lister: http://aidanlister.com/repos/v/function.size_readable.php 355 * @see Quentin Zervaas: http://www.phpriot.com/d/code/strings/filesize-format/function_cache.php https://github.com/skdswj/corpms.git | PHP | 230 lines
1<?php 2//2011.2.12 67 $findword = $find; 68 $find = preg_replace("/\\\{(\d+)\\\}/", ".{0,\\1}", preg_quote($find, '/')); 69 switch($replace) { 70 case '{BANNED}': 71 $banwords[] = preg_replace("/\\\{(\d+)\\\}/", "*", preg_quote($findword, '/')); 72 $banned[] = $find; 138function tpl_cache() { 139 //include_once(CORP_ROOT.'./source/function_cp.php'); 140 $dir = CORP_ROOT.'./cache/templates'; 192function cache_write($name, $var, $values) { 193 $cachefile = CORP_ROOT.'./cache/data_'.$name.'.php'; 194 $cachetext = "<?php\r\n". 210 global $CACHE; 211 if(!file_exists(CORP_ROOT."./cache/data_$name.php")){ 212 $cache_name = $name.'_cache';class-oembed.php https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests | PHP | 326 lines
1<?php 2/** 30 // The WP_Embed class disables discovery for non-unfiltered_html users, so only providers in this array will be used for them. 31 // Add to this list using the wp_oembed_add_provider() function (see its PHPDoc for details). 32 $this->providers = apply_filters( 'oembed_providers', array( 86 if ( !$regex ) { 87 $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i'; 88 $matchmask = preg_replace( '|^#http\\\://|', '#https?\://', $matchmask );WindViewTemplate.php https://gitlab.com/wuhang2003/phpwind | PHP | 224 lines
1<?php 2Wind::import('WIND:viewer.AbstractWindViewTemplate'); 28 * @author Qiong Wu <papa0924@gmail.com> 29 * @copyright ©2003-2103 phpwind.com 30 * @license http://www.windframework.com 30 * @license http://www.windframework.com 31 * @version $Id: WindViewTemplate.php 3904 2013-01-08 07:01:26Z yishuo $ 32 * @package viewer 47 48 /* (non-PHPdoc) 49 * @see AbstractWindViewTemplate::doCompile() 60 } 61 $content = preg_replace('/\?>(\s|\n)*?<\?php/i', "\r\n", $content); 62 return $content; 83 if (!$compiler || !$tag) continue; 84 if ($regex === '') $regex = '/<(' . preg_quote($tag) . ')(.*?)(\/>|>(.*?)<\/\1>)/is'; 85 $content = $this->creatTagCompiler($content, $compiler, $regex, $windViewerResolver);Cache.php https://gitlab.com/brunorafael/enosis | PHP | 396 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 22* @copyright 2007-2016 PrestaShop SA 23* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24* International Registered Trademark & Property of PrestaShop SA 220 { 221 $pattern = str_replace('\\*', '.*', preg_quote($key)); 222 foreach ($this->keys as $k => $ttl) 358 { 359 // PHP is not efficient at storing array 360 // Better delete the whole cache if there are 386 { 387 $regexp = str_replace('\\*', '.*', preg_quote($key, '#')); 388 foreach (array_keys(Cache::$local) as $key)smarty_internal_compile_extends.php https://github.com/basdog22/Qool.git | PHP | 128 lines
1<?php 2 51 static $_is_stringy = array('string' => true, 'eval' => true); 52 $this->_rdl = preg_quote($compiler->smarty->right_delimiter); 53 $this->_ldl = preg_quote($compiler->smarty->left_delimiter);FullTransformer.php https://gitlab.com/TouirMohamedMarwen/Symfony2 | PHP | 355 lines
1<?php 2 180 181 $escapedPattern = preg_quote($pattern, '/'); 182ExtensionSet.php https://gitlab.com/dcnf/dcbase.org | PHP | 438 lines
1<?php 2 160 foreach ($this->functions as $pattern => $function) { 161 $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); 162 216 foreach ($this->filters as $pattern => $filter) { 217 $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); 218 341 foreach ($this->tests as $pattern => $test) { 342 $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); 343ReplaceTokens.php https://gitlab.com/Isaki/le331.fr | PHP | 475 lines
1<?php 2 22 23include_once 'phing/filters/BaseParamFilterReader.php'; 24include_once 'phing/types/TokenSource.php'; 24include_once 'phing/types/TokenSource.php'; 25include_once 'phing/filters/ChainableReader.php'; 26 175 $buffer = preg_replace_callback( 176 "/" . preg_quote($this->_beginToken, '/') . "([\w\.\-:]+?)" . preg_quote($this->_endToken, '/') . "/", 177 array($this, 'replaceTokenCallback'),ssl-in.inc.php https://gitlab.com/Gashler/dp | PHP | 169 lines
1<?php 2/** 98 if(_ws_plugin__s2member_force_ssl_host && /* Convert port? */ _ws_plugin__s2member_force_ssl_port && _ws_plugin__s2member_force_ssl_host_port) 99 $s = preg_replace("/(?:https?\:)?\/\/".preg_quote(_ws_plugin__s2member_force_ssl_host, "/")."(?:\:[0-9]+)?/i", "https://"._ws_plugin__s2member_force_ssl_host_port, $s); 100 110 { 111 $s = preg_replace("/(?:https?\:)?\/\/".preg_quote(_ws_plugin__s2member_force_ssl_host_port, "/")."/i", "http://"._ws_plugin__s2member_force_ssl_host, $m[0]); 112 112 113 $s = preg_replace("/(?:https?\:)?\/\/".preg_quote(_ws_plugin__s2member_force_ssl_host, "/")."/i", "http://"._ws_plugin__s2member_force_ssl_host, $s); 114 150 151 $buffer = ($ssl_entire_tags) ? preg_replace_callback("/\<(".implode("|", c_ws_plugin__s2member_utils_strings::preg_quote_deep($ssl_entire_tags, "/")).")(?![a-z_0-9\-])[^\>]*?\>.*?\<\/\\1\>/is", "_ws_plugin__s2member_force_ssl_buffer_callback", $buffer) : $buffer; 152 $buffer = ($ssl_attr_only_tags) ? preg_replace_callback("/\<(".implode("|", c_ws_plugin__s2member_utils_strings::preg_quote_deep($ssl_attr_only_tags, "/")).")(?![a-z_0-9\-])[^\>]+?\>/i", "_ws_plugin__s2member_force_ssl_buffer_callback", $buffer) : $buffer; 153 154 $buffer = ($non_ssl_entire_tags) ? preg_replace_callback("/\<(".implode("|", c_ws_plugin__s2member_utils_strings::preg_quote_deep($non_ssl_entire_tags, "/")).")(?![a-z_0-9\-])[^\>]*?\>.*?\<\/\\1\>/is", "_ws_plugin__s2member_force_non_ssl_buffer_callback", $buffer) : $buffer; 155 $buffer = ($non_ssl_attr_only_tags) ? preg_replace_callback("/\<(".implode("|", c_ws_plugin__s2member_utils_strings::preg_quote_deep($non_ssl_attr_only_tags, "/")).")(?![a-z_0-9\-])[^\>]+?\>/i", "_ws_plugin__s2member_force_non_ssl_buffer_callback", $buffer) : $buffer;utils-conds.inc.php https://gitlab.com/pankajmohale/chef2go | PHP | 245 lines
1<?php 2// @codingStandardsIgnoreFile 63 { 64 $bbpress = 'bbpress/bbpress.php'; // bbPress. 65 95 { 96 $buddypress = 'buddypress/bp-loader.php'; // BuddyPress. 97 109 * Determines whether or not this is a Multisite Farm; 110 * *( i.e., if ``MULTISITE_FARM == true`` inside `/wp-config.php` )*. 111 * 167 if(empty($parse['host']) || strcasecmp($parse['host'], c_ws_plugin__s2member_utils_urls::parse_url(home_url(), PHP_URL_HOST)) === 0) 168 if($parse['path'] === '/' || preg_match('/^'.preg_quote(rtrim($parse['path'], '/'), '/').'$/'.$ci, rtrim(c_ws_plugin__s2member_utils_urls::parse_url(home_url(), PHP_URL_PATH), '/'))) 169 if(get_option('permalink_structure') || (empty($_REQUEST['post_id']) && empty($_REQUEST['page_id']) && empty($_REQUEST['p']) && empty($_REQUEST['s']))) 172 if(empty($parse['host']) || strcasecmp($parse['host'], c_ws_plugin__s2member_utils_urls::parse_url(site_url(), PHP_URL_HOST)) === 0) 173 if($parse['path'] === '/' || preg_match('/^'.preg_quote(rtrim($parse['path'], '/'), '/').'$/'.$ci, rtrim(c_ws_plugin__s2member_utils_urls::parse_url(site_url(), PHP_URL_PATH), '/'))) 174 if(get_option('permalink_structure') || (empty($_REQUEST['post_id']) && empty($_REQUEST['page_id']) && empty($_REQUEST['p']) && empty($_REQUEST['s'])))utils-dirs.inc.php https://gitlab.com/pankajmohale/chef2go | PHP | 207 lines
1<?php 2// @codingStandardsIgnoreFile 84 85 return preg_replace ("/^" . preg_quote ($doc_root, "/") . "/", "", c_ws_plugin__s2member_utils_dirs::n_dir_seps ((string)$path)); 86 } 113 114 if ($use_win_diff_drive_jctn && stripos (PHP_OS, "win") === 0 /* Test for different drives on Windows servers? */) 115 173 { 174 if ($jctn && is_string ($jctn) && $target && is_string ($target) && stripos (PHP_OS, "win") === 0) 175 {shortcodes.php https://gitlab.com/endomorphosis/jeffersonsmithmayor | PHP | 334 lines
1<?php 2/** 176 $tagnames = array_keys($shortcode_tags); 177 $tagregexp = join( '|', array_map('preg_quote', $tagnames) ); 178CacheItemPoolTrait.php https://bitbucket.org/ameeronline/odk-wp-appcontrol.git | PHP | 416 lines
18use phpFastCache\Core\Item\ExtendedCacheItemInterface; 19use phpFastCache\Entities\ItemBatch; 20use phpFastCache\EventManager; 20use phpFastCache\EventManager; 21use phpFastCache\Exceptions\phpFastCacheCoreException; 22use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException; 22use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException; 23use phpFastCache\Exceptions\phpFastCacheLogicException; 24use phpFastCache\Util\ClassNamespaceResolverTrait; 58 * @return \phpFastCache\Core\Item\ExtendedCacheItemInterface 59 * @throws phpFastCacheInvalidArgumentException 60 * @throws phpFastCacheLogicException 72 if (preg_match('~([' . preg_quote(self::$unsupportedKeyChars, '~') . ']+)~', $key, $matches)) { 73 throw new phpFastCacheInvalidArgumentException('Unsupported key character detected: "' . $matches[ 1 ] . '". Please check: https://github.com/PHPSocialNetwork/phpfastcache/wiki/%5BV6%CB%96%5D-Unsupported-characters-in-key-identifiers'); 74 }DbDumpTest.php https://gitlab.com/mohamed_hussein/prodt | PHP | 276 lines
1<?php 2 157 // Tables that are schema-only should not have data exported. 158 $pattern = preg_quote("\$connection->insert('sessions')"); 159 $this->assertDoesNotMatchRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'Tables defined as schema-only do not have data exported to the script.'); 161 // Table data is exported. 162 $pattern = preg_quote("\$connection->insert('config')"); 163 $this->assertMatchesRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'Table data is properly exported to the script.'); 165 // The test data are in the dump (serialized). 166 $pattern = preg_quote(serialize($this->data)); 167 $this->assertMatchesRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'Generated data is found in the exported script.'); 170 // cspell:disable-next-line 171 $pattern = preg_quote('"q\'uote\$dollar@example.com"'); 172 $this->assertMatchesRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'The user account email address was properly escaped in the exported script.'); 172 $this->assertMatchesRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'The user account email address was properly escaped in the exported script.'); 173 $pattern = preg_quote('\'$dollar\''); 174 $this->assertMatchesRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'The user account name was properly escaped in the exported script.');form.php https://gitlab.com/asun89/socianovation-web | PHP | 285 lines
1<?php 2namespace Grav\Plugin; 277 foreach ((array)$haystack as $item) { 278 if (true == preg_match("#^" . strtr(preg_quote($item, '#'), array('\*' => '.*', '\?' => '.')) . "$#i", $needle)) { 279 return true;str.php https://bitbucket.org/codeyash/bootstrap.git | PHP | 416 lines
1<?php 2/** 9 * @copyright 2010 - 2013 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 17 * 18 * PHP needs to be compiled with --enable-mbstring 19 * or a fallback without encoding support is used 99 { 100 return (bool) preg_match('/^'.preg_quote($start, '/').'/m'.($ignore_case ? 'i' : ''), $str); 101 } 112 { 113 return (bool) preg_match('/'.preg_quote($end, '/').'$/m'.($ignore_case ? 'i' : ''), $str); 114 }str.php https://bitbucket.org/sriedel/iccrm-wip.git | PHP | 416 lines
1<?php 2/** 9 * @copyright 2010 - 2012 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 17 * 18 * PHP needs to be compiled with --enable-mbstring 19 * or a fallback without encoding support is used 99 { 100 return (bool) preg_match('/^'.preg_quote($start, '/').'/m'.($ignore_case ? 'i' : ''), $str); 101 } 112 { 113 return (bool) preg_match('/'.preg_quote($end, '/').'$/m'.($ignore_case ? 'i' : ''), $str); 114 }vc_grid_element.php https://gitlab.com/oxidigitaluser/liguelista | PHP | 274 lines
1<?php 2 44 foreach ($attributes as $attr) { 45 $pattern[] = '/\{\{' . preg_quote($attr, '') . '\}\}/'; 46 $replacement[] = $this->attribute($attr, $post);File.php https://github.com/sitengine/sitengine.git | PHP | 465 lines
25 */ 26require_once 'Zend/CodeGenerator/Php/Abstract.php'; 27 86 if ($fileName == '') { 87 require_once 'Zend/CodeGenerator/Php/Exception.php'; 88 throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.'); 293 require_once 'Zend/CodeGenerator/Php/Exception.php'; 294 throw new Zend_CodeGenerator_Php_Exception('Expecting either an array or an instance of Zend_CodeGenerator_Php_Class'); 295 } 391 if (preg_match('#(?:\s*)<\?php#', $this->getBody()) == false) { 392 $output = '<?php' . PHP_EOL; 393 } 457 if ($this->_filename == '' || !is_writable(dirname($this->_filename))) { 458 require_once 'Zend/CodeGenerator/Php/Exception.php'; 459 throw new Zend_CodeGenerator_Php_Exception('This code generator object is not writable.');Io.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 172 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 */ 66 67 if (preg_match('#^' . preg_quote(DS, '#').'#', $this->getVar('path')) || 68 preg_match('#^[a-z]:' . preg_quote(DS, '#') . '#i', $this->getVar('path'))) {url.php https://bitbucket.org/sudak/rating.git | PHP | 194 lines
1<?php defined('SYSPATH') or die('No direct script access.'); 2/** 21 * 22 * // Absolute URL path with host, https protocol and index.php if set 23 * echo URL::base('https', TRUE); 53 // Use the configured default protocol 54 $protocol = parse_url($base_url, PHP_URL_SCHEME); 55 } 64 { 65 if ($port = parse_url($base_url, PHP_URL_PORT)) 66 { 70 71 if ($domain = parse_url($base_url, PHP_URL_HOST)) 72 { 73 // Remove everything but the path from the URL 74 $base_url = parse_url($base_url, PHP_URL_PATH); 75 }smarty_internal_resource_extends.php https://gitlab.com/alvarobacelar/cms-admin-marko | PHP | 162 lines
1<?php 2/** 41 $s = Smarty_Resource::source(null, $source->smarty, $component); 42 if ($s->type == 'php') { 43 throw new SmartyException("Resource type {$s->type} cannot be used with the extends resource type"); 89 $this->mbstring_overload = ini_get('mbstring.func_overload') & 2; 90 $_rdl = preg_quote($source->smarty->right_delimiter); 91 $_ldl = preg_quote($source->smarty->left_delimiter);admin_relogin.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 127 lines
1<?php 2 39 nv_insert_logs( NV_LANG_DATA, "login", "[" . $nv_username . "] " . strtolower( $lang_global['loginsubmit'] ), " Client IP:" . NV_CLIENT_IP, 0 ); 40 require_once ( NV_ROOTDIR . '/' . DIR_FORUM . '/nukeviet/login.php' ); 41 } 77 $nohttp_redirect = preg_replace( array( '/^[a-zA-Z]+\:\/\//e', '/www\./e' ), array( '', '' ), $redirect ); 78 if ( ! preg_match( "/^" . preg_quote( $server_name ) . '\/' . preg_quote( NV_ADMINDIR ) . "/", $nohttp_redirect ) ) 79 { 119 $xtpl->parse( 'main' ); 120 include ( NV_ROOTDIR . "/includes/header.php" ); 121 $xtpl->out( 'main' ); 121 $xtpl->out( 'main' ); 122 include ( NV_ROOTDIR . "/includes/footer.php" ); 123 }ServerTest.php https://gitlab.com/techniconline/kmc | PHP | 279 lines
1<?php namespace League\OAuth1\Client\Tests; 2/** 22use Mockery as m; 23use PHPUnit_Framework_TestCase; 24 24 25class ServerTest extends PHPUnit_Framework_TestCase 26{ 33 { 34 require_once __DIR__.'/stubs/ServerStub.php'; 35 } 90 // We'll validate that here. 91 $pattern = '/OAuth oauth_consumer_key=".*?", oauth_nonce="[a-zA-Z0-9]+", oauth_signature_method="HMAC-SHA1", oauth_timestamp="\d{10}", oauth_version="1.0", oauth_callback="'.preg_quote('http%3A%2F%2Fapp.dev%2F', '/').'", oauth_signature=".*?"/'; 92Io.php https://bitbucket.org/mengqing/magento-mirror.git | PHP | 172 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) 2012 Magento Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 66 67 if (preg_match('#^' . preg_quote(DS, '#').'#', $this->getVar('path')) || 68 preg_match('#^[a-z]:' . preg_quote(DS, '#') . '#i', $this->getVar('path'))) {class-oembed.php https://gitlab.com/puppet-br/puppet-br.org-wordpress | PHP | 295 lines
1<?php 2/** 30 // The WP_Embed class disables discovery for non-unfiltered_html users, so only providers in this array will be used for them. 31 // Add to this list using the wp_oembed_add_provider() function (see its PHPDoc for details). 32 $this->providers = apply_filters( 'oembed_providers', array( 77 if ( !$regex ) 78 $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i'; 79RouteCompiler.php https://gitlab.com/x33n/ampache | PHP | 233 lines
1<?php 2 34 * @throws \LogicException If a variable is referenced more than once 35 * @throws \DomainException If a variable name is numeric because PHP raises an error for such 36 * subpatterns in PCRE and thus would break matching, e.g. "(?P<123>.+)". 127 '[^%s%s]+', 128 preg_quote($defaultSeparator, self::REGEX_DELIMITER), 129 $defaultSeparator !== $nextSeparator && '' !== $nextSeparator ? preg_quote($nextSeparator, self::REGEX_DELIMITER) : '' 149 // find the first optional token 150 $firstOptional = PHP_INT_MAX; 151 if (!$isHost) { 208 // Text tokens 209 return preg_quote($token[1], self::REGEX_DELIMITER); 210 } else { 213 // When the only token is an optional variable token, the separator is required 214 return sprintf('%s(?P<%s>%s)?', preg_quote($token[1], self::REGEX_DELIMITER), $token[3], $token[2]); 215 } else {auth.php https://gitlab.com/michield/dokuwiki | PHP | 358 lines
1<?php 2// must be run within Dokuwiki 194 foreach($users as $user) { 195 if(isset($this->users[$user])) $deleted[] = preg_quote($user, '/'); 196 }Str.php https://gitlab.com/kimting254/wbms | PHP | 392 lines
1<?php namespace Illuminate\Support; 2 101 { 102 $quoted = preg_quote($cap, '/'); 103 117 118 $pattern = preg_quote($pattern, '#'); 119 251 { 252 throw new RuntimeException('OpenSSL extension is required for PHP 5 users.'); 253 } 319 320 $title = preg_replace('!['.preg_quote($flip).']+!u', $separator, $title); 321 322 // Remove all characters that are not the separator, letters, numbers, or whitespace. 323 $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', mb_strtolower($title)); 324FileStorage.php https://gitlab.com/mohamed_hussein/prodt | PHP | 372 lines
1<?php 2 220 221 // glob() directly calls into libc glob(), which is not aware of PHP stream 222 // wrappers. Same for \GlobIterator (which additionally requires an absolute 227 $names = []; 228 $pattern = '/^' . preg_quote($prefix, '/') . '.*' . preg_quote($extension, '/') . '$/'; 229 foreach ($files as $file) { 315 $collections = []; 316 $pattern = '/\.' . preg_quote($this->getFileExtension(), '/') . '$/'; 317 foreach (new \DirectoryIterator($directory) as $fileinfo) {File.php https://gitlab.com/devtoannh/cafe | PHP | 468 lines
25 */ 26require_once 'Zend/CodeGenerator/Php/Abstract.php'; 27 30 */ 31require_once 'Zend/CodeGenerator/Php/Class.php'; 32 38 */ 39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract 40{ 86 if ($fileName == '') { 87 require_once 'Zend/CodeGenerator/Php/Exception.php'; 88 throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.'); 113 if ( ($realpath = Zend_Reflection_file::findRealpathInIncludePath($filePath)) === false) { 114 require_once 'Zend/CodeGenerator/Php/Exception.php'; 115 throw new Zend_CodeGenerator_Php_Exception('No file for ' . $realpath . ' was found.');class-oembed.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 295 lines
1<?php 2/** 30 // The WP_Embed class disables discovery for non-unfiltered_html users, so only providers in this array will be used for them. 31 // Add to this list using the wp_oembed_add_provider() function (see it's PHPDoc for details). 32 $this->providers = apply_filters( 'oembed_providers', array( 77 if ( !$regex ) 78 $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i'; 79CascadingStylesheetsTest.php https://bitbucket.org/aswinvk28/smartpan-stock-drupal.git | PHP | 191 lines
1<?php 2 143 // of a STYLE tag. 144 if (preg_match_all('/(href="|url\(")' . preg_quote($GLOBALS['base_url'] . '/', '/') . '([^?]+)\?/', $styles, $matches)) { 145 $result = $matches[2];ldap.php https://github.com/wrobel/horde-fw3.git | PHP | 268 lines
1<?php 2/** 5 * 6 * $Horde: ingo/lib/Driver/ldap.php,v 1.8.2.4 2007-12-20 14:05:47 jan Exp $ 7 * 8 * See the enclosed file LICENSE for license information (ASL). If you 9 * did not receive this file, see http://www.horde.org/licenses/asl.php. 10 * 173 * specifier. */ 174 $regexp = '/^' . preg_quote($this->_params['script_attribute'], '/') . 175 '(?:;.*)?$/i';s2member-files.php https://gitlab.com/Gashler/dp | PHP | 108 lines
1<?php 2if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"])) 5global /* A Multisite ``$base`` configuration? */ $base; 6$ws_plugin__s2member_temp_s_base = (!empty ($base)) ? $base : c_ws_plugin__s2member_utils_urls::parse_url (network_home_url ("/"), PHP_URL_PATH); 7// This works on Multisite installs too. The function ``network_home_url ()`` defaults to ``home_url ()`` on standard WordPress® installs. 20 RewriteEngine On 21 RewriteBase <?php echo $ws_plugin__s2member_temp_s_base . "\n"; ?> 22 28 RewriteCond %{ENV:s2member_file_download_wp_vdir_check} !^complete$ 29 RewriteCond %{THE_REQUEST} ^(?:GET|HEAD)(?:[\ ]+)(?:<?php echo preg_quote ($ws_plugin__s2member_temp_s_base, " "); ?>)([_0-9a-zA-Z\-]+/)(?:wp-content/) 30 RewriteRule ^(.*)$ - [E=s2member_file_download_wp_vdir:,E=s2member_file_download_wp_vdir:%1,E=s2member_file_download_wp_vdir_check:complete] 107 108<?php unset ($ws_plugin__s2member_temp_s_base); ?>date.php https://bitbucket.org/codeyash/bootstrap.git | PHP | 404 lines
1<?php 2/** 9 * @copyright 2010 - 2013 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 23 * @category Core 24 * @link http://docs.fuelphp.com/classes/date.html 25 * 28 * - create_time() uses strptime and has currently a very bad hack to use strtotime for windows servers 29 * - Uses strftime formatting for dates www.php.net/manual/en/function.strftime.php 30 */ 85 86 $rexep = "#" . strtr(preg_quote($format), $masks) . "#"; 87 112 * @param int UNIX timestamp from current server 113 * @param string valid PHP timezone from www.php.net/timezones 114 * @return Datedate.php https://bitbucket.org/sriedel/iccrm-wip.git | PHP | 404 lines
1<?php 2/** 9 * @copyright 2010 - 2012 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 23 * @category Core 24 * @link http://docs.fuelphp.com/classes/date.html 25 * 28 * - create_time() uses strptime and has currently a very bad hack to use strtotime for windows servers 29 * - Uses strftime formatting for dates www.php.net/manual/en/function.strftime.php 30 */ 85 86 $rexep = "#" . strtr(preg_quote($format), $masks) . "#"; 87 112 * @param int UNIX timestamp from current server 113 * @param string valid PHP timezone from www.php.net/timezones 114 * @return Datefunctions.php https://gitlab.com/florianocomercial/centreon | PHP | 245 lines
1<?php 2/** 21function getTemplate($dir) { 22 require_once '../../../GPL_LIB/Smarty/libs/Smarty.class.php'; 23 $template = new Smarty(); 105 } 106 if (preg_match('~' . preg_quote($delimiter, '~') . '\s*$~iS', end($query)) === 1) { 107 $query = trim(implode('', $query));Config.php https://gitlab.com/yousafsyed/easternglamor | PHP | 240 lines
1<?php 2/** 102 * @param array $data 103 * @SuppressWarnings(PHPMD.ExcessiveParameterList) 104 */ 169 170 $config->setData('directives_url_quoted', preg_quote($config->getData('directives_url'))); 171smarty_internal_resource_extends.php https://github.com/kiang/olc_baker.git | PHP | 178 lines
1<?php 2 20 $this->smarty = $smarty; 21 $this->_rdl = preg_quote($smarty->right_delimiter); 22 $this->_ldl = preg_quote($smarty->left_delimiter); 175 176 return $_compile_dir . $_filepath . '.' . $_template->resource_type . '.' . basename($_files[count($_files)-1]) . $_cache . '.php'; 177 }HistoryCommand.php https://gitlab.com/techniconline/kmc | PHP | 260 lines
1<?php 2 93 if (substr($pattern, 0, 1) !== '/' || substr($pattern, -1) !== '/' || strlen($pattern) < 3) { 94 $pattern = '/' . preg_quote($pattern, '/') . '/'; 95 } 125 $output->writeln(sprintf('Saving history in %s...', $save)); 126 file_put_contents($save, implode(PHP_EOL, $history) . PHP_EOL); 127 $output->writeln('<info>History saved.</info>'); 164 $start = $matches[1] ? intval($matches[1]) : 0; 165 $end = $matches[2] ? intval($matches[2]) + 1 : PHP_INT_MAX; 166pages-sp.inc.php https://gitlab.com/pankajmohale/chef2go | PHP | 113 lines
1<?php 2// @codingStandardsIgnoreFile 59 60 else if($GLOBALS['WS_PLUGIN__']['s2member']['o']['login_redirection_override'] && ($login_redirection_uri = c_ws_plugin__s2member_login_redirects::login_redirection_uri($user, 'root-returns-false')) && preg_match('/^'.preg_quote($login_redirection_uri, '/').'$/'.$ci, $page_uri) && (!$check_user || !$user || !$user->has_cap('access_s2member_level0')) && $page->ID !== (int)$GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page']) 61 return apply_filters('ws_plugin__s2member_check_specific_page_level_access', array('s2member_level_req' => 0), get_defined_vars()); 94 foreach(preg_split('/['."\r\n\t".']+/', c_ws_plugin__s2member_ruris::fill_ruri_level_access_rc_vars($GLOBALS['WS_PLUGIN__']['s2member']['o']['level'.$n.'_ruris'], $user)) as $str) 95 if($str && preg_match('/'.preg_quote($str, '/').'/'.$ci, $page_uri) && (!$check_user || !$user || !$user->has_cap('access_s2member_level'.$n))) 96 return apply_filters('ws_plugin__s2member_check_specific_page_level_access', array('s2member_level_req' => $n), get_defined_vars());User_agent.php https://gitlab.com/ricoru21/py_incidencia | PHP | 549 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 * 86 { 87 if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php')) 88 { 88 { 89 include(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php'); 90 } 90 } 91 elseif (is_file(APPPATH.'config/user_agents.php')) 92 { 92 { 93 include(APPPATH.'config/user_agents.php'); 94 }Config.php https://github.com/sauger/forbes_old.git | PHP | 535 lines
1<?php 2/* 22 */ 23require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/AccessControlConfig.php"; 24/** 26 */ 27require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ResourceTypeConfig.php"; 28/** 30 */ 31require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ThumbnailsConfig.php"; 32/** 34 */ 35require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ImagesConfig.php"; 36 254 $folderRegex = strtr($folderRegex, array("?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__")); 255 $folderRegex = preg_quote($folderRegex, "/"); 256 $folderRegex = strtr($folderRegex, array("__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|"));lib.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 203 lines
1<?php 2 25 */ 26require_once($CFG->dirroot . '/repository/lib.php'); 27require_once($CFG->libdir.'/webdavlib.php'); 124 // Remove the server URL from the path (if present), otherwise links will not work - MDL-37014 125 $server = preg_quote($this->options['webdav_server']); 126 $v['href'] = preg_replace("#https?://{$server}#", '', $v['href']);smarty_internal_compile_private_php.php https://gitlab.com/Shenglian/SmartyProject | PHP | 220 lines
56 if ($_attr[ 'type' ] != 'tag') { 57 if ($compiler->php_handling == Smarty::PHP_REMOVE) { 58 return ''; 77 return ''; 78 } elseif ($compiler->php_handling == Smarty::PHP_ALLOW) { 79 if (!($compiler->smarty instanceof SmartyBC)) { 90 if (!($compiler->smarty instanceof SmartyBC)) { 91 $compiler->trigger_template_error('{php}{/php} tags not allowed. Use SmartyBC to enable them', null, 92 true); 157 if (($lex->phpType == 'php' || $lex->phpType == 'asp') && 158 ($lex->compiler->php_handling == Smarty::PHP_PASSTHRU || $lex->compiler->php_handling == Smarty::PHP_QUOTE) 159 ) { 207 /* 208 * Call back function for $php_handling = PHP_QUOTE 209 *ReleaseController.php https://gitlab.com/brucealdridge/yii2 | PHP | 211 lines
1<?php 2/** 56 { 57 $v = str_replace('\\-', '[\\- ]', preg_quote($version, '/')); 58 $headline = $version . ' ' . date('F d, Y'); 201 "function getVersion()\n {\n return '$version';", 202 YII2_PATH . '/BaseYii.php'); 203 }Main.php https://github.com/diar/foodfood.ru.git | PHP | 309 lines
1<?php 2/** 13 * 14 * @version 1.x $Id: Main.php 168 2007-01-30 21:12:03Z dk $ 15 */ 55 $dr = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']); 56 $file = preg_replace('{^'.preg_quote($dr,'{}').'}is', '~', $file); 57 } 200 } 201 $buf = str_replace("\x00", " ", $buf); // PHP5 private methods contain \x00 in names 202 if ($no_print) return $buf;mdl.tmpimage.php http://phpfor.googlecode.com/svn/trunk/ | PHP | 197 lines
1<?php 2include_once('shopObject.php'); 97 $p = strrpos($sName,'.'); 98 $re = '/^'.preg_quote(substr($sName,0,$p)).'\.bak_([0-9]+)\.'.preg_quote(substr($sName,$p+1)).'$/'; 99subscription.php https://gitlab.com/billyprice1/bdApi | PHP | 357 lines
1<?php 2 166 $wfPostLink = get_permalink($postSyncRecord->sync_id); 167 $postContent = preg_replace('#<a href="' . preg_quote($wfPostLink, '#') . '"[^>]*>[^<]+</a>$#', '', $postContent); 168 340 // request to something else, not our callback, bye bye 341 // we don't check $_REQUEST because PHP parser got confused when 342 // the POST data is JSON and may work unreliably here 345 346 $raw = file_get_contents('php://input'); 347 $json = @json_decode($raw, true);Wildcard.php git://github.com/phpbb/customisation-db.git | PHP | 362 lines
1<?php 2/** 24/** Zend_Search_Lucene_Search_Query */ 25require_once 'Zend/Search/Lucene/Search/Query.php'; 26 140 $prefixLength = strlen($prefix); 141 $matchExpression = '/^' . str_replace(array('\\?', '\\*'), array('.', '.*') , preg_quote($this->_pattern->text, '/')) . '$/'; 142 143 if ($prefixLength < self::$_minPrefixLength) { 144 require_once 'Zend/Search/Lucene/Exception.php'; 145 throw new Zend_Search_Lucene_Exception('At least ' . self::$_minPrefixLength . ' non-wildcard characters are required at the beginning of pattern.'); 158 159 require_once 'Zend/Search/Lucene/Index/Term.php'; 160 if ($prefix != '') { 169 if ($maxTerms != 0 && count($this->_matches) > $maxTerms) { 170 require_once 'Zend/Search/Lucene/Exception.php'; 171 throw new Zend_Search_Lucene_Exception('Terms per query limit is reached.');FileStorage.php https://gitlab.com/reasonat/test8 | PHP | 335 lines
1<?php 2 197 198 // glob() directly calls into libc glob(), which is not aware of PHP stream 199 // wrappers. Same for \GlobIterator (which additionally requires an absolute 204 $names = array(); 205 $pattern = '/^' . preg_quote($prefix, '/') . '.*' . preg_quote($extension, '/') . '$/'; 206 foreach ($files as $file) { 288 $collections = array(); 289 $pattern = '/\.' . preg_quote($this->getFileExtension(), '/') . '$/'; 290 foreach (new \DirectoryIterator($directory) as $fileinfo) {class-rewrite.php https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br | PHP | 245 lines
1<?php 2/** 87 88 return preg_replace( '`' . preg_quote( $category_base, '`' ) . '`u', '', $link, 1 ); 89 } 170 $old_base = trim( $old_base, '/' ); 171 $category_rewrite[ $old_base . '$' ] = 'index.php?wpseo_category_redirect=$matches[1]'; 172 188 189 $rewrites[ $rewrite_name . '/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$' ] = 'index.php?category_name=$matches[1]&feed=$matches[2]'; 190 $rewrites[ $rewrite_name . '/' . $pagination_base . '/?([0-9]{1,})/?$' ] = 'index.php?category_name=$matches[1]&paged=$matches[2]'; 190 $rewrites[ $rewrite_name . '/' . $pagination_base . '/?([0-9]{1,})/?$' ] = 'index.php?category_name=$matches[1]&paged=$matches[2]'; 191 $rewrites[ $rewrite_name . '/?$' ] = 'index.php?category_name=$matches[1]'; 192text_wiki_mediawiki__php8fixes.patch https://gitlab.com/ElvisAns/tiki | Patch | 231 lines
13 if ($in_delim) { 14diff --git a/Text/Wiki/Parse/BBCode/Colortext.php b/Text/Wiki/Parse/BBCode/Colortext.php 15index 5840043..d107eb6 100755 96 $this->_smileys[$variante] = &$this->_smileys[$smiley]; 97- $cur = preg_quote($cur{0}, '#') . '-?' . preg_quote($cur{1}, '#'); 98+ $cur = preg_quote($cur[0], '#') . '-?' . preg_quote($cur[1], '#'); 192 return '<phrase role="' . $this->getConf('role', 'color') . '" ' . 193diff --git a/Text/Wiki/Render/Docbook/Url.php b/Text/Wiki/Render/Docbook/Url.php 194index 1c42f19..2e012c7 100644 205 // and mailto: links. 206diff --git a/Text/Wiki/Render/Xhtml/Colortext.php b/Text/Wiki/Render/Xhtml/Colortext.php 207index d0298ab..e93c4a0 100755 218 219diff --git a/Text/Wiki/Render/Xhtml/Url.php b/Text/Wiki/Render/Xhtml/Url.php 220index 794ba16..576fa51 100755RouteCompiler.php https://github.com/sebio/symfony.git | PHP | 235 lines
1<?php 2 63 64 $this->regex = "#^".implode("", $this->segments)."".preg_quote($separator, '#')."$#x"; 65 202 203 $this->segments[] = preg_quote($separator, '#').preg_quote($text, '#'); 204 } 211 212 $this->segments[] = preg_quote($separator, '#').'(?P<'.$variable.'>'.$requirement.')'; 213 $this->variables[$variable] = $name; 228 // compute some regexes 229 $quoter = function ($a) { return preg_quote($a, '#'); }; 230 $options['segment_separators_regex'] = '(?:'.implode('|', array_map($quoter, $options['segment_separators'])).')';CacheApc.php https://gitlab.com/staging06/myproject | PHP | 165 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 22* @copyright 2007-2015 PrestaShop SA 23* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24* International Registered Trademark & Property of PrestaShop SA 64 { 65 $pattern = str_replace('\\*', '.*', preg_quote($key)); 66config.patchwork.php https://github.com/nicolas-grekas/Patchwork-sandbox.git | PHP | 359 lines
1<?php // vi: set fenc=utf-8 ts=4 sw=4 et: 2 61 $a[$v] = $v; 62 $b[] = preg_quote($v, '#'); 63 } 66 } 67 else $b[] = preg_quote($v, '#'); 68} 88/**/isset($_SERVER['REDIRECT_STATUS']) 89/**/ && false !== strpos(php_sapi_name(), 'apache') 90/**/ && '200' !== $_SERVER['REDIRECT_STATUS'] 213/**/{ 214 // Workaround for http://bugs.php.net/44001 215 243 { 244 $k = '#' . preg_quote($k[0], '#') . $b . '#'; 245 preg_match($k, 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $a, $k)PackageArtifactFilter.php https://gitlab.com/yousafsyed/easternglamor | PHP | 102 lines
1<?php 2/** 4 * 5 * PHP Version 5 6 * 39 * @copyright 2008-2015 Manuel Pichler. All rights reserved. 40 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 41 */ 53 * @copyright 2008-2015 Manuel Pichler. All rights reserved. 54 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 55 */ 73 foreach ($namespaces as $namespace) { 74 $patterns[] = str_replace('\*', '\S*', preg_quote($namespace)); 75 }Finder.php https://gitlab.com/adam.kvita/MI-VMM-SIFT | PHP | 391 lines
1<?php 2 18 * <code> 19 * Finder::findFiles('*.php') 20 * ->size('> 10kB') 162 } 163 $pattern[] = $prefix . strtr(preg_quote($mask, '#'), 164 ['\*\*' => '.*', '\*' => '[^/]*', '\?' => '[^/]', '\[\!' => '[^', '\[' => '[', '\]' => ']', '\-' => '-']); 196 $iterator = new \AppendIterator(); 197 $iterator->append($workaround = new \ArrayIterator(['workaround PHP bugs #49104, #63077'])); 198 foreach ($this->paths as $path) {lessify.inc.php https://gitlab.com/x33n/respond | PHP | 447 lines
1<?php 2/** 4 * Convert a css file into a less file 5 * http://leafo.net/lessphp 6 * Copyright 2010, leaf corcoran <leafot@gmail.com> 8 * WARNING: THIS DOES NOT WORK ANYMORE. NEEDS TO BE UPDATED FOR 9 * LATEST VERSION OF LESSPHP. 10 * 12 13require "lessc.inc.php"; 14 37 38 function preg_quote($what) { 39 return preg_quote($what, '/'); 63 64 return $this->match($this->preg_quote($what), $m, $eatWhitespace); 65 }peoplesearch.php https://gitlab.com/BeS/io.schiessle.org | PHP | 142 lines
1<?php 2/** 4 * 5 * PHP version 5 6 * 34 35require_once INSTALLDIR.'/lib/searchaction.php'; 36require_once INSTALLDIR.'/lib/profilelist.php'; 123 124 $this->terms = array_map('preg_quote', 125 array_map('htmlspecialchars', $terms));class-oembed.php https://gitlab.com/Blueprint-Marketing/WordPress-1 | PHP | 397 lines
1<?php 2/** 96 if ( !$regex ) { 97 $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i'; 98 $matchmask = preg_replace( '|^#http\\\://|', '#https?\://', $matchmask );PageConstraint.php https://gitlab.com/mdabutaleb/bitm-laravel-1 | PHP | 124 lines
1<?php 2 4 5use PHPUnit_Framework_Constraint; 6use Symfony\Component\DomCrawler\Crawler; 7use SebastianBergmann\Comparator\ComparisonFailure; 8use PHPUnit_Framework_ExpectationFailedException as FailedExpection; 9 9 10abstract class PageConstraint extends PHPUnit_Framework_Constraint 11{ 52 { 53 $rawPattern = preg_quote($text, '/'); 54 54 55 $escapedPattern = preg_quote(e($text), '/'); 56ApacheMatcherDumper.php https://gitlab.com/oytunistrator/92five | PHP | 274 lines
1<?php 2 28 * 29 * * script_name: The script name (app.php by default) 30 * * base_uri: The base URI ("" by default) 40 $options = array_merge(array( 41 'script_name' => 'app.php', 42 'base_uri' => '', 121 $regex = $this->regexToApacheRegex($compiledRoute->getRegex()); 122 $regex = '^'.self::escape(preg_quote($options['base_uri']).substr($regex, 1), ' ', '\\'); 123File.php https://github.com/basdog22/Qool.git | PHP | 468 lines
25 */ 26require_once 'Zend/CodeGenerator/Php/Abstract.php'; 27 30 */ 31require_once 'Zend/CodeGenerator/Php/Class.php'; 32 38 */ 39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract 40{ 86 if ($fileName == '') { 87 require_once 'Zend/CodeGenerator/Php/Exception.php'; 88 throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.'); 113 if ( ($realpath = Zend_Reflection_File::findRealpathInIncludePath($filePath)) === false) { 114 require_once 'Zend/CodeGenerator/Php/Exception.php'; 115 throw new Zend_CodeGenerator_Php_Exception('No file for ' . $realpath . ' was found.');sfValidatorDateTest.php https://github.com/bb-dev/OpenPNE3.git | PHP | 246 lines
1<?php 2 10 11require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 12 101 $t->pass('->clean() throws a sfValidatorError if the date does not match the regex'); 102 $t->like($e->getMessage(), '/'.preg_quote(htmlspecialchars($v->getOption('date_format'), ENT_QUOTES, 'UTF-8'), '/').'/', '->clean() returns the expected date format in the error message'); 103 $t->is($e->getCode(), 'bad_format', '->clean() throws a sfValidatorError'); 113{ 114 $t->like($e->getMessage(), '/'.preg_quote('dd/mm/YYYY', '/').'/', '->clean() returns the expected date format error if provided'); 115}IncludePathLoader.php https://gitlab.com/luisrepo/ClienteWS | PHP | 139 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: IncludePathLoader.php 23775 2011-03-01 17:25:24Z ralph $ 21 */ 25 */ 26require_once 'Zend/Tool/Framework/Loader/Abstract.php'; 27 30 */ 31require_once 'Zend/Tool/Framework/Loader/IncludePathLoader/RecursiveFilterIterator.php'; 32 48 { 49 require_once 'Zend/Loader.php'; 50 $paths = Zend_Loader::explodeIncludePath(); 60 $filterDenyDirectoryPattern = '.*(/|\\\\).svn'; 61 $filterAcceptFilePattern = '.*(?:Manifest|Provider)\.php$'; 62Statement.php https://gitlab.com/yousafsyed/easternglamor | PHP | 488 lines
1<?php 2/** 25 */ 26#require_once 'Zend/Db.php'; 27 30 */ 31#require_once 'Zend/Db/Statement/Interface.php'; 32 150 */ 151 #require_once 'Zend/Db/Statement/Exception.php'; 152 throw new Zend_Db_Statement_Exception("Invalid bind-variable position '$val'"); 158 */ 159 #require_once 'Zend/Db/Statement/Exception.php'; 160 throw new Zend_Db_Statement_Exception("Invalid bind-variable name '$val'"); 187 $qe = substr($qe, 1, 2); 188 $qe = preg_quote($qe); 189 $escapeChar = substr($qe,0,1);Lexer.php https://gitlab.com/remyvianne/krowkaramel | PHP | 396 lines
41 \\s* 42 (?:' . \preg_quote($this->options['whitespace_trim'] . $this->options['tag_variable'][1], '#') . '\\s*' . '|' . \preg_quote($this->options['whitespace_line_trim'] . $this->options['tag_variable'][1], '#') . '[' . $this->options['whitespace_line_chars'] . ']*' . '|' . \preg_quote($this->options['tag_variable'][1], '#') . ') 43 }Ax', 46 \\s* 47 (?:' . \preg_quote($this->options['whitespace_trim'] . $this->options['tag_block'][1], '#') . '\\s*\\n?' . '|' . \preg_quote($this->options['whitespace_line_trim'] . $this->options['tag_block'][1], '#') . '[' . $this->options['whitespace_line_chars'] . ']*' . '|' . \preg_quote($this->options['tag_block'][1], '#') . '\\n?' . ') 48 }Ax', 49 // {% endverbatim %} 50 'lex_raw_data' => '{' . \preg_quote($this->options['tag_block'][0], '#') . '(' . $this->options['whitespace_trim'] . '|' . $this->options['whitespace_line_trim'] . ')?\\s*endverbatim\\s*' . '(?:' . \preg_quote($this->options['whitespace_trim'] . $this->options['tag_block'][1], '#') . '\\s*' . '|' . \preg_quote($this->options['whitespace_line_trim'] . $this->options['tag_block'][1], '#') . '[' . $this->options['whitespace_line_chars'] . ']*' . '|' . \preg_quote($this->options['tag_block'][1], '#') . ') 51 }sx', 59 \\s*verbatim\\s* 60 (?:' . \preg_quote($this->options['whitespace_trim'] . $this->options['tag_block'][1], '#') . '\\s*' . '|' . \preg_quote($this->options['whitespace_line_trim'] . $this->options['tag_block'][1], '#') . '[' . $this->options['whitespace_line_chars'] . ']*' . '|' . \preg_quote($this->options['tag_block'][1], '#') . ') 61 }Asx', 64 'lex_tokens_start' => '{ 65 (' . \preg_quote($this->options['tag_variable'][0], '#') . '|' . \preg_quote($this->options['tag_block'][0], '#') . '|' . \preg_quote($this->options['tag_comment'][0], '#') . ')(' . \preg_quote($this->options['whitespace_trim'], '#') . '|' . \preg_quote($this->options['whitespace_line_trim'], '#') . ')? 66 }sx',TextHelper.php https://github.com/bigcalm/urlcatcher.git | PHP | 276 lines
1<?php 2 18 * @author David Heinemeier Hansson 19 * @version SVN: $Id: TextHelper.php 20142 2009-07-13 10:20:44Z FabianLange $ 20 */ 84 { 85 $pattern[] = '/('.preg_quote($word, '/').')/i'; 86 $replacement[] = $highlighter; 90 { 91 $pattern = '/('.preg_quote($phrase, '/').')/i'; 92 $replacement = $highlighter;walkthrough_test.php https://bitbucket.org/moodle/moodle.git | PHP | 90 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 23global $CFG; 24require_once(__DIR__ . '/../../../engine/lib.php'); 25require_once(__DIR__ . '/../../../engine/tests/helpers.php'); 83 $this->check_current_output( 84 new \question_pattern_expectation('/' . preg_quote('Not good enough!', '/') . '/')); 85parser.php https://github.com/patadejaguar/S.A.F.E.-Open-Source-Microfinance-Suite.git | PHP | 290 lines
1<?php 2class H2o_Lexer { 10 $this->pattern = ('/\G(.*?)(?:' . 11 preg_quote($this->options['BLOCK_START']). '(.*?)' .preg_quote($this->options['BLOCK_END']) . $trim . '|' . 12 preg_quote($this->options['VARIABLE_START']). '(.*?)' .preg_quote($this->options['VARIABLE_END']) . '|' . 12 preg_quote($this->options['VARIABLE_START']). '(.*?)' .preg_quote($this->options['VARIABLE_END']) . '|' . 13 preg_quote($this->options['COMMENT_START']). '(.*?)' .preg_quote($this->options['COMMENT_END']) . $trim . ')/sm' 14 );CacheApc.php https://gitlab.com/A.Julien/sendstockbymail-module-prestashop | PHP | 165 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 22* @copyright 2007-2016 PrestaShop SA 23* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24* International Registered Trademark & Property of PrestaShop SA 64 { 65 $pattern = str_replace('\\*', '.*', preg_quote($key)); 66DownloadManager.php https://gitlab.com/imamul68e/137619_PHP31 | PHP | 322 lines
1<?php 2 309 foreach ($this->packagePreferences as $pattern => $preference) { 310 $pattern = '{^'.str_replace('\\*', '.*', preg_quote($pattern)).'$}i'; 311 if (preg_match($pattern, $package->getName())) {lib.php https://gitlab.com/MotoSport/morgue | PHP | 132 lines
1<?php 2 2 3#require_once('Persistence.php'); 4 86 foreach($terms as $term){ 87 $out[] = '\b'.preg_quote($term, '/').'\b'; 88 }cache.php https://github.com/mariuz/firetube.git | PHP | 329 lines
1<?php 2/* SVN FILE: $Id$ */ 5 * 6 * PHP versions 4 and 5 7 * 7 * 8 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 9 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @link http://cakephp.org CakePHP(tm) Project 16 * @package cake 17 * @subpackage cake.cake.libs.view.helpers 18 * @since CakePHP(tm) v 1.0.0.2277 19 * @version $Revision$ 21 * @lastmodified $Date$ 22 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 23 */CiviMailProcessor.php https://github.com/ksecor/civicrm.git | PHP | 218 lines
1<?php 2 68 69 require_once 'CRM/Core/DAO/MailSettings.php'; 70 $dao = new CRM_Core_DAO_MailSettings; 78 $config =& CRM_Core_Config::singleton(); 79 $verpSeperator = preg_quote( $config->verpSeparator ); 80 $twoDigitStringMin = $verpSeperator . '(\d+)' . $verpSeperator . '(\d+)'; 84 // FIXME: legacy regexen to handle CiviCRM 2.1 address patterns, with domain id and possible VERP part 85 $commonRegex = '/^' . preg_quote($dao->localpart) . '(b|bounce|c|confirm|o|optOut|r|reply|re|e|resubscribe|u|unsubscribe)' . $threeDigitString . '([0-9a-f]{16})(-.*)?@' . preg_quote($dao->domain) . '$/'; 86 $subscrRegex = '/^' . preg_quote($dao->localpart) . '(s|subscribe)' . $twoDigitStringMin . '@' . preg_quote($dao->domain) . '$/'; 88 // a common-for-all-actions regex to handle CiviCRM 2.2 address patterns 89 $regex = '/^' . preg_quote($dao->localpart) . '(b|c|e|o|r|u)' . $twoDigitString . '([0-9a-f]{16})@' . preg_quote($dao->domain) . '$/'; 90 91 // retrieve the emails 92 require_once 'CRM/Mailing/MailStore.php'; 93 $store = CRM_Mailing_MailStore::getStore($name);NamePrettifier.php https://gitlab.com/madwanz64/laravel | PHP | 312 lines
1<?php declare(strict_types=1); 2/* 2/* 3 * This file is part of PHPUnit. 4 * 4 * 5 * (c) Sebastian Bergmann <sebastian@phpunit.de> 6 * 9 */ 10namespace PHPUnit\Util\TestDox; 11 29use function ord; 30use function preg_quote; 31use function preg_replace; 40use function trim; 41use PHPUnit\Framework\TestCase; 42use PHPUnit\Util\Color;route.php https://github.com/adammoore/Swiftriver.git | PHP | 352 lines
1<?php defined('SYSPATH') or die('No direct script access.'); 2/** 32 * @copyright (c) 2008-2009 Kohana Team 33 * @license http://kohanaphp.com/license 34 */ 323 // The URI should be considered literal except for keys and optional parts 324 // Escape everything preg_quote would escape except for : ( ) < > 325 $regex = preg_replace('#'.Route::REGEX_ESCAPE.'#', '\\\\$0', $this->_uri);hook-vc-grid.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 255 lines
1<?php 2 7Class Vc_Hooks_Vc_Grid implements Vc_Vendor_Interface { 8 protected $grid_id_unique_name = 'vc_gid'; // if you change this also change in vc-basic-grid.php 9 56 ) ); // return only grid shortcodes 57 $tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) ); 58FiltersMatcher.php https://gitlab.com/johanlindberg/irvato-crm | PHP | 120 lines
1<?php 2/************************************************************************ 112 } 113 $pattern = preg_quote($pattern, '#'); 114 $pattern = str_replace('\*', '.*', $pattern).'\z';zest.php https://github.com/xig/SocialFeed.git | PHP | 272 lines
1<?php defined('SYSPATH') or die('No direct script access.'); 2 31 { 32 if ($type === 'browser' AND preg_match('|'.preg_quote($agent).'[^0-9.]*+([0-9.][0-9.a-z]*)|i', $string, $match)) 33 { 84 return '<div><script type="text/javascript">var addthis_pub="sydlawrence";</script> 85<a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, \'\', \''.$url.'\', \''.$title.'\')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script></div>'; 86 } 151 } 152 else if (file_exists(APPPATH.'/views/'.$filename.'.php')) { 153 $html = ''; 153 $html = ''; 154 $file_handle = fopen(APPPATH.'/views/'.$filename.'.php', "r"); 155 while (!feof($file_handle)) {Common.php https://github.com/visor/nano.git | PHP | 307 lines
1<?php 2 300 } else { 301 $result .= preg_quote($part, '/'); 302 }posts.inc.php https://gitlab.com/Gashler/sg | PHP | 133 lines
1<?php 2/** 52 53 if($GLOBALS['WS_PLUGIN__']['s2member']['o']['login_redirection_override'] && ($login_redirection_uri = c_ws_plugin__s2member_login_redirects::login_redirection_uri($user, 'root-returns-false')) && preg_match('/^'.preg_quote($login_redirection_uri, '/').'$/'.$ci, $_SERVER['REQUEST_URI']) && c_ws_plugin__s2member_no_cache::no_cache_constants('restricted') && (!$user || !$user->has_cap('access_s2member_level0'))) 54 c_ws_plugin__s2member_mo_page::wp_redirect_w_mop_vars('post', $post_id, 'level', 0, $_SERVER['REQUEST_URI'], 'sys').exit (); 107 foreach(preg_split('/['."\r\n\t".']+/', c_ws_plugin__s2member_ruris::fill_ruri_level_access_rc_vars($GLOBALS['WS_PLUGIN__']['s2member']['o']['level'.$n.'_ruris'], $user)) as $str) 108 if($str && preg_match('/'.preg_quote($str, '/').'/'.$ci, $_SERVER['REQUEST_URI']) && c_ws_plugin__s2member_no_cache::no_cache_constants('restricted') && (!$user || !$user->has_cap('access_s2member_level'.$n))) 109 c_ws_plugin__s2member_mo_page::wp_redirect_w_mop_vars('post', $post_id, 'level', $n, $_SERVER['REQUEST_URI'], 'ruri').exit ();view.html.php https://gitlab.com/endomorphosis/OLAAaction | PHP | 178 lines
1<?php 2/** 2/** 3 * @version $Id: view.html.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 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 */ 33 34 require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'search.php' ); 35 115 116 require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php'); 117Links.php https://gitlab.com/remyvianne/krowkaramel | PHP | 301 lines
1<?php 2 116 $content = preg_replace( 117 '/\[(.*?)\](\(' . preg_quote($linkToReplace, '/') . '\))/', 118 '[$1](' . $replacementLink . ')', 230 '/((%s|%s)(?:-\w+)?)/', 231 preg_quote(self::DATA_TAG_CLICK), 232 preg_quote(self::DATA_TAG_OPEN)LogicalNot.php https://gitlab.com/madwanz64/laravel | PHP | 136 lines
1<?php declare(strict_types=1); 2/* 2/* 3 * This file is part of PHPUnit. 4 * 4 * 5 * (c) Sebastian Bergmann <sebastian@phpunit.de> 6 * 9 */ 10namespace PHPUnit\Framework\Constraint; 11 14use function preg_match; 15use function preg_quote; 16use function preg_replace; 91 * 92 * @see https://www.php.net/manual/en/language.operators.precedence.php 93 */