100+ results results for 'php preg_quote' (338 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);readmes.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 requiredArray.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 : nullsystematics.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/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();AnnotationDriver.php https://gitlab.com/luchoman08/personal_collection_mv | PHP | 256 lines
1<?php 2/* 61 */ 62 protected $fileExtension = '.php'; 63 215 ), 216 '/^.+' . preg_quote($this->fileExtension) . '$/i', 217 \RecursiveRegexIterator::GET_MATCHCache.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();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);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); 343ssl-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;CacheItemPoolTrait.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 }shortcodes.php https://gitlab.com/gregtyka/WordPress-stable | PHP | 334 lines
1<?php 2/** 176 $tagnames = array_keys($shortcode_tags); 177 $tagregexp = join( '|', array_map('preg_quote', $tagnames) ); 178vc_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);Cache.php https://gitlab.com/ivandevp/petshop | 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)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'))) {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=".*?"/'; 92class-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/MineYourMind/BoNeMEAL | 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)); 324File.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.');smarty_internal_resource_extends.php https://gitlab.com/alvarobacelar/sgp | 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);CascadingStylesheetsTest.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];AllMessagesTablePager.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',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); ?>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())); 55functions.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'))); 171HistoryCommand.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; 166User_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 }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 }functions.php http://viet-group.googlecode.com/svn/trunk/ | 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 );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);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-vc-grid-item.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 336 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 ); 50 public function addVcIconShortcodesTemplates( $template ) { 51 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_icon.php' ); 52 if ( is_file( $file ) ) { 66 public function addVcButton2ShortcodesTemplates( $template ) { 67 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_button2.php' ); 68 if ( is_file( $file ) ) { 82 public function addVcSingleImageShortcodesTemplates( $template ) { 83 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_single_image.php' ); 84 if ( is_file( $file ) ) { 98 public function addVcCustomHeadingShortcodesTemplates( $template ) { 99 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_custom_heading.php' ); 100 if ( is_file( $file ) ) {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)); 66PackageArtifactFilter.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 }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 );ApacheMatcherDumper.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), ' ', '\\'); 123IncludePathLoader.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);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 }DownloadManager.php https://gitlab.com/tigefa/composer | 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())) {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 ) ); 58Wildcard.php git://github.com/phpbb/customisation-db.git | PHP | 363 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.');FiltersMatcher.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';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'); 117url.php https://gitlab.com/ken3/bluSky | PHP | 213 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); 60 // Use the configured default protocol 61 $protocol = parse_url($base_url, PHP_URL_SCHEME); 62 } 71 { 72 if ($port = parse_url($base_url, PHP_URL_PORT)) 73 { 77 78 if ($domain = parse_url($base_url, PHP_URL_HOST)) 79 { 80 // Remove everything but the path from the URL 81 $base_url = parse_url($base_url, PHP_URL_PATH); 82 }url.php https://gitlab.com/Bartwillemsen/aurora-framework | PHP | 250 lines
1<?php 2namespace Aurora; 213 // Remove all characters that are not the seperator, letters, numbers, or whitespace. 214 $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', Str::lower($title)); 215 216 // Replace all seperator characters and whitespace by a single seperator 217 $title = preg_replace('!['.preg_quote($separator).'\s]+!u', $separator, $title); 218text_helper.php https://gitlab.com/bipsahu/ptcs | PHP | 535 lines
257 { 258 $str = preg_replace("/({$delim})(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")({$delim})/i", "\\1{$replacement}\\3", $str); 259 } 288 289 // Replace any existing PHP tags to temporary markers so they don't accidentally 290 // break the string out of PHP, and thus, thwart the highlighting. 292 $str = str_replace(array('<?', '?>', '<%', '%>', '\\', '</script>'), 293 array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'), $str); 294 304 305 if (abs(PHP_VERSION) < 5) 306 { 316 // Replace our markers back to PHP tags. 317 $str = str_replace(array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'), 318 array('<?', '?>', '<%', '%>', '\\', '</script>'), $str);interp-builtin.cpp https://gitlab.com/iranjith4/hhvm | C++ | 374 lines
2 +----------------------------------------------------------------------+ 3 | HipHop for PHP | 4 +----------------------------------------------------------------------+ 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 3.01 of the PHP license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.php.net/license/3_01.txt | 11 | If you did not receive a copy of the PHP license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@php.net so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 15*/ 16#include "hphp/hhbbc/interp.h" 17card_presend.tpl.php git://github.com/Dolibarr/dolibarr.git | PHP | 303 lines
1<?php 2/* Copyright (C) 2017-2018 Laurent Destailleur <eldy@users.sourceforge.net> 46 $ref = dol_sanitizeFileName($object->ref); 47 include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; 48 // Special case 49 if ($object->element == 'invoice_supplier') { 50 $fileparams = dol_most_recent_file($diroutput.'/'.get_exdir($object->id, 2, 0, 0, $object, $object->element).$ref, preg_quote($ref, '/').'([^\-])+'); 51 } else { 51 } else { 52 $fileparams = dol_most_recent_file($diroutput.'/'.$ref, preg_quote($ref, '/').'[^\-]+'); 53 } 97 if ($object->element == 'invoice_supplier') { 98 $fileparams = dol_most_recent_file($diroutput.'/'.get_exdir($object->id, 2, 0, 0, $object, $object->element).$ref, preg_quote($ref, '/').'([^\-])+'); 99 } else { 99 } else { 100 $fileparams = dol_most_recent_file($diroutput.'/'.$ref, preg_quote($ref, '/').'[^\-]+'); 101 }File.php https://gitlab.com/grayhamster/open-social-media-monitoring | 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.');smarty_internal_resource_extends.php https://gitlab.com/fangfangchen/xianpipa | PHP | 148 lines
1<?php 2/** 34 $s = Smarty_Resource::source(null, $source->smarty, $component); 35 if ($s->type == 'php') { 36 throw new SmartyException("Resource type {$s->type} cannot be used with the extends resource type"); 81 82 $_rdl = preg_quote($source->smarty->right_delimiter); 83 $_ldl = preg_quote($source->smarty->left_delimiter);SC_Helper_PageLayout.php https://gitlab.com/raku.takayama/eccube-2_13 | PHP | 385 lines
91 } 92 if (is_file($arrBloc['php_path']) 93 || is_file($arrBloc['tpl_path'])) { 97 . 'tpl_path: ' . $arrBloc['tpl_path'] . "\n" 98 . 'php_path: ' . $arrBloc['php_path']; 99 trigger_error($error, E_USER_WARNING); 143 * @param array $arrParams 追加の検索パラメーター 144 * @param boolean $has_realpath php_path, tpl_path の絶対パスを含める場合 true 145 * @return array ブロック情報の配列 245 // phpファイルの削除 246 $del_php = HTML_REALDIR . $filename . '.php'; 247 if (file_exists($del_php)) { 361 $arrBloc =& $arrBlocs[$key]; 362 $arrBloc['php_path'] = SC_Utils_Ex::isBlank($arrBloc['php_path']) ? '' : HTML_REALDIR . $arrBloc['php_path']; 363 $bloc_dir = $this->getTemplatePath($device_type_id) . BLOC_DIR;walkthrough_test.php https://gitlab.com/JrLucena/moodle | PHP | 246 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 30global $CFG; 31require_once(dirname(__FILE__) . '/../../../engine/lib.php'); 32require_once(dirname(__FILE__) . '/../../../engine/tests/helpers.php'); 125 $this->get_contains_partcorrect_expectation(), 126 new question_pattern_expectation('/' . preg_quote('Not good enough!', '/') . '/')); 127 194 $this->get_contains_partcorrect_expectation(), 195 new question_pattern_expectation('/' . preg_quote('Not good enough!', '/') . '/')); 196 }Tokenizer.php http://opac-sbweb.googlecode.com/svn/trunk/ | PHP | 388 lines
1<?php 2/* 18 * and is licensed under the LGPL. For more information, see 19 * <http://www.phpdoctrine.org>. 20 */ 26 * @subpackage Query 27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 28 * @link www.phpdoctrine.org 253 if (is_array($d)) { 254 $d = array_map('preg_quote', $d); 255 338 if (is_array($d)) { 339 $d = array_map('preg_quote', $d); 340SetCookie.php https://gitlab.com/x33n/respond | PHP | 373 lines
1<?php 2namespace GuzzleHttp\Cookie; 325 326 return (bool) preg_match('/\.' . preg_quote($cookieDomain) . '$/i', $domain); 327 }Comment.php https://gitlab.com/x33n/PHP-Parser | PHP | 119 lines
1<?php 2 2 3namespace PhpParser; 4 101 // start of all lines. 102 return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text); 103 } elseif (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) {Config.php https://gitlab.com/endomorphosis/falkenstein | PHP | 557 lines
1<?php 2/* 23 */ 24require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/AccessControlConfig.php"; 25/** 27 */ 28require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ResourceTypeConfig.php"; 29/** 31 */ 32require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ThumbnailsConfig.php"; 33/** 35 */ 36require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ImagesConfig.php"; 37 262 $folderRegex = strtr($folderRegex, array("?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__")); 263 $folderRegex = preg_quote($folderRegex, "/"); 264 $folderRegex = strtr($folderRegex, array("__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|"));Io.php https://gitlab.com/axeltizon/magentoV1.9-demopoweraccess | 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) 2014 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'))) {user.php https://zport.svn.codeplex.com/svn | PHP | 200 lines
1<?php 2 6 7 $Id: user.php 878 2008-12-15 03:27:41Z zhaoxiongfei $ 8*/ 54 $censorusername = $censorusername['censorusername']; 55 $censorexp = '/^('.str_replace(array('\\*', "\r\n", ' '), array('.*', '|', ''), preg_quote(($censorusername = trim($censorusername)), '/')).')$/i'; 56 $usernamereplaced = isset($_CACHE['badwords']['findpattern']) && !empty($_CACHE['badwords']['findpattern']) ? @preg_replace($_CACHE['badwords']['findpattern'], $_CACHE['badwords']['replace'], $username) : $username; 76 $censoremail = $setting['censoremail']; 77 $accessexp = '/('.str_replace("\r\n", '|', preg_quote(trim($accessemail), '/')).')$/i'; 78 $censorexp = '/('.str_replace("\r\n", '|', preg_quote(trim($censoremail), '/')).')$/i';ApcuBackend.php https://gitlab.com/reasonat/test8 | PHP | 271 lines
1<?php 2 5/** 6 * Stores cache items in the Alternative PHP Cache User Cache (APCu). 7 */ 120 protected function getAll($prefix = '') { 121 return $this->getIterator('/^' . preg_quote($this->getApcuKey($prefix), '/') . '/'); 122 } 206 public function deleteAll() { 207 apcu_delete($this->getIterator('/^' . preg_quote($this->binPrefix, '/') . '/')); 208 } 220 public function removeBin() { 221 apcu_delete($this->getIterator('/^' . preg_quote($this->binPrefix, '/') . '/')); 222 }string_helper.php https://gitlab.com/zanderwong/admin | PHP | 284 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 * 117 * 118 * http://www.some-site.com//index.php 119 * 121 * 122 * http://www.some-site.com/index.php 123 * 154 function reduce_multiples($str, $character = ',', $trim = FALSE) { 155 $str = preg_replace('#' . preg_quote($character, '#') . '{2,}#', $character, $str); 156 282 283/* End of file string_helper.php */ 284/* Location: ./system/helpers/string_helper.php */Baseurl.php https://gitlab.com/yousafsyed/easternglamor | PHP | 219 lines
1<?php 2/** 139 { 140 $quoted = array_map('preg_quote', $values, array_fill(0, count($values), '/')); 141 if (!preg_match('/^(' . implode('|', $quoted) . ')(.+\/)?$/', $value) && !$this->_isFullyQualifiedUrl($value)ruris-sp.inc.php https://gitlab.com/Gashler/sg | PHP | 75 lines
1<?php 2/** 54 55 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, $uri) && (!$check_user || !$user || !$user->has_cap('access_s2member_level0'))) 56 return apply_filters('ws_plugin__s2member_check_specific_ruri_level_access', array('s2member_level_req' => 0), get_defined_vars()); 64 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) 65 if($str && preg_match('/'.preg_quote($str, '/').'/'.$ci, $uri) && (!$check_user || !$user || !$user->has_cap('access_s2member_level'.$n))) 66 return apply_filters('ws_plugin__s2member_check_specific_ruri_level_access', array('s2member_level_req' => $n), get_defined_vars());utils-conds.inc.php https://gitlab.com/Gashler/sg | PHP | 244 lines
1<?php 2/** 62 { 63 $bbpress = 'bbpress/bbpress.php'; // bbPress. 64 94 { 95 $buddypress = 'buddypress/bp-loader.php'; // BuddyPress. 96 108 * Determines whether or not this is a Multisite Farm; 109 * *( i.e., if ``MULTISITE_FARM == true`` inside `/wp-config.php` )*. 110 * 166 if(empty($parse['host']) || strcasecmp($parse['host'], c_ws_plugin__s2member_utils_urls::parse_url(home_url(), PHP_URL_HOST)) === 0) 167 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), '/'))) 168 if(get_option('permalink_structure') || (empty($_REQUEST['post_id']) && empty($_REQUEST['page_id']) && empty($_REQUEST['p']) && empty($_REQUEST['s']))) 171 if(empty($parse['host']) || strcasecmp($parse['host'], c_ws_plugin__s2member_utils_urls::parse_url(site_url(), PHP_URL_HOST)) === 0) 172 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), '/'))) 173 if(get_option('permalink_structure') || (empty($_REQUEST['post_id']) && empty($_REQUEST['page_id']) && empty($_REQUEST['p']) && empty($_REQUEST['s'])))Statement.php https://gitlab.com/axeltizon/magentoV1.9-demopoweraccess | PHP | 488 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Statement.php 24790 2012-05-10 12:28:51Z mcleod@spaceweb.nl $ 21 */ 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'");mdb2schemawriter.php https://gitlab.com/Red54/core | PHP | 171 lines
1<?php 2/** 44 if ($config->getSystemValue('dbtype', 'sqlite') === 'oci') { 45 $filterExpression = '/^"' . preg_quote($conn->getPrefix()) . '/'; 46 } else { 46 } else { 47 $filterExpression = '/^' . preg_quote($conn->getPrefix()) . '/'; 48 }Modifier.php https://gitlab.com/axeltizon/magentoV1.9-demopoweraccess | PHP | 349 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) 2014 Magento Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 130 if ($pos === false) { 131 $pattern = '/[`\s]' . preg_quote($column, '/') . '[`\s]/i'; 132 if (!preg_match($pattern, $sql, $matches)) {controller.php git://github.com/concrete5/concrete5.git | PHP | 490 lines
1<?php 2 166 $this->hHighlight = $highlight; 167 $this->hText = @preg_replace('#' . preg_quote($this->hHighlight, '#') . '#ui', '<span style="background-color:' . $this->hColor . ';">$0</span>', $this->hText); 168 194 $result = null; 195 $regex = '([[:alnum:]|\'|\.|_|\s]{0,45})' . preg_quote($highlight, '#') . '([[:alnum:]|\.|_|\s]{0,45})'; 196 preg_match_all("#$regex#ui", $text, $matches);uri.php https://gitlab.com/Ltaimao/wecenter | PHP | 319 lines
1<?php 2/* 69 { 70 $request_main = preg_replace('/^' . preg_quote(dirname($_SERVER['SCRIPT_NAME']), '/') . '/i', '', $request_main); 71 } 95 96 if (strstr($base_script, '.php')) 97 { 206 207 if (file_exists(ROOT_PATH . 'app/' . $__app_dir . '/' . $uri['first']['args'][1] . '.php')) 208 {StringUtilTest.php git://github.com/jyxo/php.git | PHP | 264 lines
1<?php declare(strict_types = 1); 2 3/** 4 * Jyxo PHP Library 5 * 10 * It is also available through the world-wide-web at this URL: 11 * https://github.com/jyxo/php/blob/master/license.txt 12 */ 15 16use PHPUnit\Framework\TestCase; 17use function count; 19use function mb_strlen; 20use function preg_quote; 21use function preg_split; 32 * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o. 33 * @license https://github.com/jyxo/php/blob/master/license.txt 34 * @author Jakub Tománekwalkthrough_test.php https://gitlab.com/JrLucena/moodle | PHP | 309 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 30global $CFG; 31require_once(dirname(__FILE__) . '/../../../engine/lib.php'); 32require_once(dirname(__FILE__) . '/../../../engine/tests/helpers.php'); 55 $this->quba->get_right_answer_summary($this->slot)); 56 $this->assertRegExp('/' . preg_quote($tf->questiontext, '/') . '/', 57 $this->quba->get_question_summary($this->slot)); 101 $this->check_current_output( 102 new question_pattern_expectation('/' . preg_quote('Not good enough!', '/') . '/')); 103admin_relogin.php http://viet-group.googlecode.com/svn/trunk/ | 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 }CacheApc.php https://gitlab.com/ivandevp/petshop | 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)); 66Curl.php https://gitlab.com/crazybutterfly815/magento2 | PHP | 259 lines
1<?php 2/** 253 $curl->close(); 254 preg_match('~\{"value":"(\d+)","label":"' . preg_quote($landingName) . '"\}~', $response, $matches); 255 $id = isset($matches[1]) ? (int)$matches[1] : null;class-wc-shipping-local-pickup.php https://gitlab.com/webkod3r/tripolis | PHP | 201 lines
1<?php 2 143 foreach ( $codes as $c ) { 144 $pattern = '/^' . str_replace( '_', '[0-9a-zA-Z]', preg_quote( $c ) ) . '$/i'; 145 if ( preg_match( $pattern, $postcode ) ) {UnusedUseFixer.php https://gitlab.com/yousafsyed/easternglamor | PHP | 240 lines
1<?php 2 3/* 4 * This file is part of the PHP CS utility. 5 * 75 foreach ($useDeclarations as $shortName => $useDeclaration) { 76 $usages[$shortName] = (bool) preg_match('/(?<![\$\\\\])\b'.preg_quote($shortName).'\b/i', $content); 77 }view.html.php https://gitlab.com/endomorphosis/greenrenaissancejoomla | PHP | 159 lines
1<?php 2/** 2/** 3 * @version $Id: view.html.php 10094 2008-03-02 04:35:10Z instance $ 4 * @package Joomla 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 */ 33 34 require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'search.php' ); 35 96 97 require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php'); 98CacheMemcached.php https://gitlab.com/staging06/myproject | PHP | 242 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 187 { 188 $pattern = str_replace('\\*', '.*', preg_quote($key)); 189 $keys = $this->memcached->getAllKeys();ReplaceTokens.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'),sfValidatorDateTest.php https://gitlab.com/ahsanhamid/mereawaz | 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}get_search.php https://gitlab.com/alexprowars/bitrix | PHP | 160 lines
5define("BX_SEARCH_ADMIN", true); 6require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php"); 7require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_js.php"); 40 41$preg_template = "/(^|[^".$arStemFunc["pcre_letters"]."])(".str_replace("/", "\\/", implode("|", array_map('preg_quote', array_keys($arPhrase)))).")/i".BX_UTF_PCRE_MODIFIER; 42$bFound = false; 158 159require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin_js.php"); 160?>view.php https://gitlab.com/theinfra/equatroLMS | PHP | 220 lines
1<?php 2 75 $panelView = APP_BASE_PATH.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'Panels'.DIRECTORY_SEPARATOR.$PanelId.'.tpl'; 76 $panelLogic = APP_BASE_PATH.DIRECTORY_SEPARATOR.'display'.DIRECTORY_SEPARATOR.'panel.'.$PanelId.'.php'; 77 include_once(APP_BASE_PATH.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'panel.php'); 80 $panelClass = strtoupper('PANEL_'.$PanelId); 81 // Parse the PHP panel if it exists 82 include_once ($panelLogic); 115 116 preg_match_all('/(?siU)(%%'.preg_quote($prefix).'[a-zA-Z0-9_\.]+%%)/', $text, $matches); 117