PageRenderTime 305ms queryTime 63ms sortTime 1ms getByIdsTime 49ms findMatchingLines 64ms

100+ results results for 'php preg_match_all repo:miky82/matriculas-bonfire' (305 ms)

Not the results you expected?
AnalyzerClassFileSystemLocator.php http://cintient.googlecode.com/svn/trunk/ | PHP | 197 lines
                    
39 * @category   QualityAssurance
                    
40 * @package    PHP_Depend
                    
41 * @subpackage Metrics
                    
43 * @copyright  2008-2011 Manuel Pichler. All rights reserved.
                    
44 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
45 * @version    SVN: $Id$
                    
50/**
                    
51 * Locator that searches for PHP_Depend analyzers that follow the PHP_Depend
                    
52 * convention and are present the PHP_Depend source tree.
                    
54 * @category   QualityAssurance
                    
55 * @package    PHP_Depend
                    
56 * @subpackage Metrics
                    
58 * @copyright  2008-2011 Manuel Pichler. All rights reserved.
                    
59 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
60 * @version    Release: @package_version@
                    
                
StringParser.php git://github.com/egeniq/adapto.git | PHP | 213 lines
                    
1<?php
                    
2/**
                    
154        $matches = array();
                    
155        preg_match_all("/\[[^\]]*\]|[^[]+/", $this->m_string, $matches);
                    
156        return $matches;
                    
                
Batch.php https://github.com/bertrandom/zf.git | PHP | 249 lines
                    
1<?php
                    
2/**
                    
25 */
                    
26// require_once 'Zend/Service/WindowsAzure/Exception.php';
                    
27
                    
30 */
                    
31// require_once 'Zend/Service/WindowsAzure/Storage/BatchStorageAbstract.php';
                    
32
                    
208        $errors = null;
                    
209        preg_match_all('/<message (.*)>(.*)<\/message>/', $response->getBody(), $errors);
                    
210
                    
                
api.php https://github.com/Dieterbe/cake.git | PHP | 216 lines
                    
7 *
                    
8 * PHP versions 4 and 5
                    
9 *
                    
9 *
                    
10 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
                    
11 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
17 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
                    
18 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
                    
19 * @package       cake
                    
97
                    
98		$parsed = $this->__parseClass($path . $file .'.php');
                    
99
                    
155						"\t\tAvailable values:\n\n".
                    
156						"\t\tbehavior\tLook for class in CakePHP behavior path\n".
                    
157						"\t\tcache\tLook for class in CakePHP cache path\n".
                    
                
parser_wysiwyg.php git://github.com/FSB/Fire-Soft-Board-2.git | PHP | 475 lines
                    
1<?php
                    
2/**
                    
7 * @version $Id$
                    
8 * @license http://opensource.org/licenses/gpl-2.0.php GNU GPL 2
                    
9 */
                    
69		// On recupere l'ensemble des balises HTML de la chaine
                    
70		preg_match_all('#<(/)?([a-zA-Z_][a-zA-Z0-9_]*?)( .*?)?>#s', $str, $tokens, PREG_OFFSET_CAPTURE);
                    
71		$count_tokens = count($tokens[0]);
                    
130
                    
131						preg_match_all('#\s([a-zA-Z_]+?)=\\\"([^"]*?)\\\"#', $tokens[3][$i][0], $m);
                    
132						$count_attr = count($m[0]);
                    
                
part_parser.php http://hppg.googlecode.com/svn/trunk/ | PHP | 262 lines
                    
1<?php
                    
2/**
                    
115            // matches "type/subtype; blahblahblah"
                    
116            preg_match_all( '/^(\S+)\/([^;]+)/',
                    
117                            $headers['Content-Type'], $matches, PREG_SET_ORDER );
                    
211        $matches = array();
                    
212        preg_match_all( "/^([\w-_]*):\s?(.*)/", $line, $matches, PREG_SET_ORDER );
                    
213        if ( count( $matches ) > 0 )
                    
                
Process.php git://github.com/peteboere/css-crush.git | PHP | 1102 lines
                    
1<?php
                    
2/**
                    
168        // Substitute any tags
                    
169        if (preg_match_all('~\{\{([^}]+)\}\}~', $boilerplate, $boilerplateMatches)) {
                    
170
                    
                
date_test.php git://github.com/moodle/moodle.git | PHP | 566 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
36class core_date_testcase extends advanced_testcase {
                    
37    public function test_get_default_php_timezone() {
                    
38        $this->resetAfterTest();
                    
39
                    
40        $origtz = core_date::get_default_php_timezone();
                    
41        $this->assertNotEmpty($origtz);
                    
43        $this->setTimezone('Pacific/Auckland', 'Europe/Prague');
                    
44        $this->assertSame('Europe/Prague', core_date::get_default_php_timezone());
                    
45
                    
46        $this->setTimezone('Pacific/Auckland', 'UTC');
                    
47        $this->assertSame('UTC', core_date::get_default_php_timezone());
                    
48
                    
49        $this->setTimezone('Pacific/Auckland', 'GMT');
                    
50        $this->assertSame('GMT', core_date::get_default_php_timezone());
                    
51    }
                    
                
Api.php git://github.com/forkcms/forkcms.git | PHP | 529 lines
                    
1<?php
                    
2
                    
103            $matches = array();
                    
104            preg_match_all(
                    
105                '/@param[\s\t]+(.*)[\s\t]+\$(.*)[\s\t]+(.*)$/Um',
                    
357    /**
                    
358     * This is called in backend/modules/<module>/engine/api.php to limit certain calls to
                    
359     * a given request method.
                    
                
pdf_parser.php git://github.com/moodle/moodle.git | PHP | 925 lines
                    
1<?php
                    
2/**
                    
188        if (!class_exists('pdf_context')) {
                    
189            require_once('pdf_context.php');
                    
190        }
                    
355        // get Line-Ending
                    
356        $found = preg_match_all("/(\r\n|\n|\r)/", substr($data, 0, 100), $m); // check the first 100 bytes for line breaks
                    
357        if ($found === 0) {
                    
                
Misc.php git://github.com/wordpress/wordpress.git | PHP | 2262 lines
                    
40 * @link http://simplepie.org/ SimplePie
                    
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
                    
42 */
                    
100		$name = preg_quote($realname, '/');
                    
101		if (preg_match_all("/<($name)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$name>|(\/)?>)/siU", $string, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE))
                    
102		{
                    
117				$return[$i]['attribs'] = array();
                    
118				if (isset($matches[$i][2][0]) && preg_match_all('/[\x09\x0A\x0B\x0C\x0D\x20]+([^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*)(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"([^"]*)"|\'([^\']*)\'|([^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?/', ' ' . $matches[$i][2][0] . ' ', $attribs, PREG_SET_ORDER))
                    
119				{
                    
162				case E_USER_WARNING:
                    
163					$note = 'PHP Warning';
                    
164					break;
                    
405	 *
                    
406	 * To generate it, run `php create.php` on the command line, and copy the
                    
407	 * output to replace this function.
                    
                
HtmlToTextTest.php git://github.com/drupal/drupal.git | PHP | 388 lines
                    
1<?php
                    
2
                    
17  /**
                    
18   * Converts a string to its PHP source equivalent for display in test messages.
                    
19   *
                    
24   *   An HTML representation of the text string that, when displayed in a
                    
25   *   browser, represents the PHP source code equivalent of $text.
                    
26   */
                    
50  protected function assertHtmlToText($html, $text, $message, $allowed_tags = NULL) {
                    
51    preg_match_all('/<([a-z0-6]+)/', Unicode::strtolower($html), $matches);
                    
52    $tested_tags = implode(', ', array_unique($matches[1]));
                    
                
Parser.php git://github.com/ci-bonfire/Bonfire.git | PHP | 741 lines
                    
13{
                    
14    protected $allowPhp = false;
                    
15    protected $regexSetup = false;
                    
55        $this->setupRegex();
                    
56        $this->allowPhp = $allowPhp;
                    
57
                    
72
                    
73        // The parseConditionals method executes any PHP in the text, so clean it up.
                    
74        if (! $allowPhp) {
                    
260        $this->setupRegex();
                    
261        preg_match_all($this->conditionalRegex, $text, $matches, PREG_SET_ORDER);
                    
262
                    
275            // Extract all literal string in the conditional to make it easier
                    
276            if (preg_match_all('/(["\']).*?(?<!\\\\)\1/', $condition, $str_matches)) {
                    
277                foreach ($str_matches[0] as $m) {
                    
                
comment.php git://github.com/wordpress/wordpress.git | PHP | 3726 lines
                    
1<?php
                    
2/**
                    
46
                    
47	/** This filter is documented in wp-includes/comment-template.php */
                    
48	$comment = apply_filters( 'comment_text', $comment, null, array() );
                    
52	if ( $max_links ) {
                    
53		$num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
                    
54
                    
                
shortcodes.php git://github.com/wordpress/wordpress.git | PHP | 671 lines
                    
1<?php
                    
2/**
                    
145	if ( shortcode_exists( $tag ) ) {
                    
146		preg_match_all( '/' . get_shortcode_regex() . '/', $content, $matches, PREG_SET_ORDER );
                    
147		if ( empty( $matches ) ) {
                    
207	// Find all registered tag names in $content.
                    
208	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
                    
209	$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
                    
259
                    
260	// phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation
                    
261	return '\\['                             // Opening bracket.
                    
288		. '(\\]?)';                          // 6: Optional second closing brocket for escaping shortcodes: [[tag]].
                    
289	// phpcs:enable
                    
290}
                    
                
utf_tools.php git://github.com/phpbb/phpbb.git | PHP | 1469 lines
                    
5*
                    
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
                    
7* @license GNU General Public License, version 2 (GPL-2.0)
                    
350		{
                    
351			if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx))
                    
352			{
                    
354			}
                    
355			include($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx);
                    
356		}
                    
364		{
                    
365			if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx))
                    
366			{
                    
392		{
                    
393			if (!file_exists($phpbb_root_path . 'includes/utf/data/recode_cjk.' . $phpEx))
                    
394			{
                    
                
class-wp-press-this.php git://github.com/wordpress/wordpress.git | PHP | 1526 lines
                    
1<?php
                    
2/**
                    
67
                    
68		if ( preg_match_all( '/<img [^>]+>/', $content, $matches ) && current_user_can( 'upload_files' ) ) {
                    
69			foreach ( (array) $matches[0] as $image ) {
                    
481		} else {
                    
482			require_once( ABSPATH . WPINC . '/class-oembed.php' );
                    
483			$oembed = _wp_oembed_get_object();
                    
                
fulltext_postgres.php git://github.com/phpbb/phpbb.git | PHP | 1192 lines
                    
5*
                    
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
                    
7* @license GNU General Public License, version 2 (GPL-2.0)
                    
94	 * @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false
                    
95	 * @param string $phpbb_root_path Relative path to phpBB root
                    
96	 * @param string $phpEx PHP file extension
                    
100	 * @param \phpbb\user $user User object
                    
101	 * @param \phpbb\event\dispatcher_interface	$phpbb_dispatcher	Event dispatcher object
                    
102	 */
                    
102	 */
                    
103	public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher)
                    
104	{
                    
116		{
                    
117			include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
                    
118		}
                    
                
oracle.php git://github.com/phpbb/phpbb.git | PHP | 821 lines
                    
1<?php
                    
2/**
                    
3*
                    
4* This file is part of the phpBB Forum Software package.
                    
5*
                    
5*
                    
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
                    
7* @license GNU General Public License, version 2 (GPL-2.0)
                    
13
                    
14namespace phpbb\db\driver;
                    
15
                    
18*/
                    
19class oracle extends \phpbb\db\driver\driver
                    
20{
                    
162	{
                    
163		preg_match_all('/\s*(AND|OR)?\s*([\w_.()]++)\s*(?:(=|<[=>]?|>=?|LIKE)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.()]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
                    
164		$out = '';
                    
                
SearchQuery.php git://github.com/drupal/drupal.git | PHP | 647 lines
                    
1<?php
                    
2
                    
226    // something between two spaces, optionally quoted.
                    
227    preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->searchExpression, $keywords, PREG_SET_ORDER);
                    
228
                    
                
puzzler.php http://pgn4web.googlecode.com/svn/trunk/ | PHP | 492 lines
                    
1<?php
                    
2
                    
16
                    
17$referrerHost = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
                    
18if ($referrerHost) {
                    
66
                    
67$numGames = preg_match_all("/(\s*\[\s*(\w+)\s*\"([^\"]*)\"\s*\]\s*)+[^\[]*/", $pgnText, $games );
                    
68
                    
                
optimizer.class.php http://viet-group.googlecode.com/svn/trunk/ | PHP | 520 lines
                    
1<?php
                    
2
                    
54        $this->siteRoot = preg_replace( "/[\/]+$/", '', str_replace( '\\', '/', realpath( dirname( __file__ ) . '/../../' ) ) );
                    
55        $base_siteurl = pathinfo( $_SERVER['PHP_SELF'], PATHINFO_DIRNAME );
                    
56        if ( $base_siteurl == '\\' or $base_siteurl == '/' ) $base_siteurl = '';
                    
65        {
                    
66           $base_siteurl = preg_replace( "#/index\.php(.*)$#", '', $base_siteurl );
                    
67        }
                    
79        $conditionRegex = "/<\!--\[if([^\]]+)\].*?\[endif\]-->/is";
                    
80        preg_match_all( $conditionRegex, $this->_content, $conditonMatches );
                    
81        if ( $conditonMatches )
                    
89        $jsRegex = "/<script[^>]*>[^\<]*<\/script>/is";
                    
90        preg_match_all( $jsRegex, $this->_content, $jsMatches );
                    
91        if ( $jsMatches )
                    
100        $regex = "!<meta[^>]+>|<title>[^<]+<\/title>|<link[^>]+>|<style[^>]*>[^\<]*</style>!is";
                    
101        preg_match_all( $regex, $this->_content, $matches );
                    
102        if ( $matches )
                    
                
index.php http://phpvideotoolkit.googlecode.com/svn/trunk/ | PHP | 228 lines
                    
125?><br />
                    
126<br /><strong class="alert">Your current version of PHPVideoToolkit is old. The newer version, "<?php echo $release_version; ?>" was released on <?php echo $release_date; ?>. Please <a href="<?php echo $release_link; ?>">click here</a> to download the newer version.</strong><br />
                    
127<?php	
                    
136?>	<br />
                    
137	<strong class="alert">Please note, it has been detected that you are running PHP4 and the examples will be automatically configured to use the phpvideotoolbox.php4.php class and the php4 examples instead of the php5 versions. Please note that whilst every effort has been made to unsure all the php5 development work is backported to the php4 class, I don't actually use php4 anymore so if something doesn't work as expected please let me know. <br />
                    
138		<br />
                    
138		<br />
                    
139		Please also note that as php4 is now <a href="http://www.php.net/archive/2008.php#id2008-08-07-1">officially dead</a> I won't support php4 from version 0.2.0 of PHPVideoToolkit onwards.</strong><br /><?php
                    
140	}
                    
142?><br />
                    
143	This class is a wrapper around the FFmpeg, FLVTools2 and Mencoder programs to allow PHP developers to manipulate and convert video files in any easy to use object oriented way. It also currently provides FFmpeg-PHP emulation in pure PHP so you wouldn't need to compile and install the module. Note, it isn't intended as a FFmpeg-PHP replacement, only an alternative solution and it is recommended that if you make heavy use of the FFmpeg-PHP functionality you should install the module as it is more efficient.<br />
                    
144	<br />
                    
196	}
                    
197?>This example utilizes the PHPVideoToolkit 'FFmpeg-PHP' adapters. It will demonstrate that it is possible to run an application/script without having to install the FFMmpeg-PHP module as the adapter classes provide a pure PHP based emulation of the module. Please note that these adapter classes require other libraries, <a href="http://code.google.com/p/php-reader/" target="_blank">php-reader</a> and <a href="http://www.phpclasses.org/browse/package/3163.html" target="_blank">GifEncoder</a>, which for convenience, have both been bundled (only with the SourceForge downloads, PHPClasses users will still have to download these packages or <a href="http://sourceforge.net/project/showfiles.php?group_id=222844">download the main package here</a>) with the PHPVideoToolkit package. Note, both of the required libraries are subject to different licenses than that of PHPVideoToolkit. However both licenses are compatible with commercial distribution (as of 24.09.2008)<br /></li>
                    
198		<li><a href="<?php echo $use_version; ?>/example12.php"><strong>Example 12</strong></a>, Shows you how you can simply and easily manipulate timecode strings to get them into whatever format you desire.<br /></li>
                    
                
comment.php http://cartonbank.googlecode.com/svn/trunk/ | PHP | 1934 lines
                    
1<?php
                    
2/**
                    
49	if ( $max_links = get_option( 'comment_max_links' ) ) {
                    
50		$num_links = preg_match_all( '/<a [^>]*href/i', apply_filters( 'comment_text', $comment ), $out );
                    
51		$num_links = apply_filters( 'comment_max_links_url', $num_links, $url ); // provide for counting of $url as a link
                    
                
base.class.php http://vanphongphamdm.googlecode.com/svn/trunk/ | PHP | 586 lines
                    
1<?php
                    
2/*
                    
75								if ($matches[1] == 'colxw') {
                    
76						    		if (preg_match_all ('/([^\s]+)=([^\s]+)/', $mega_value, $colwmatches)) {
                    
77										for ($i=0;$i<count($colwmatches[0]);$i++) {
                    
127						case 'url' :
                    
128							if ((strpos($v->link, 'index.php?') !== false) && (strpos($v->link, 'Itemid=') === false)) {
                    
129								$v->url = $v->link.'&amp;Itemid='.$v->id;
                    
136							$router = JSite::getRouter();
                    
137							$v->url = $router->getMode() == JROUTER_MODE_SEF ? 'index.php?Itemid='.$v->id : $v->link.'&Itemid='.$v->id;
                    
138							break;
                    
145						$v->url = JURI::base();
                    
146					} elseif (strcasecmp(substr($v->url, 0, 4), 'http') && (strpos($v->link, 'index.php?') !== false)) {
                    
147						$v->url = JRoute::_($v->url, true, $iSecure);
                    
377								// hrm...this is a bit dickey
                    
378								$link = str_replace('index.php', 'index2.php', $tmp->url);
                    
379								$data = '<a href="'.$link.'" onclick="window.open(this.href,\'targetWindow\',\''.$attribs.'\');return false;" '.$active.' '.$id.' '.$title.'>'.$txt.'</a>';
                    
                
Probe.inc.php http://dyhb-frame.googlecode.com/svn/trunk/ | PHP | 561 lines
                    
16	define("NO","<span class='resNo'>NO</span>");
                    
17	$sPhpSelf=$_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
                    
18	define("PHPSELF",preg_replace("/(.{0,}?\/+)/","",$sPhpSelf));
                    
165<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                    
166<title>DoYouHaoBaby - <?php echo G::L('PHP??','prodeDyhb');?></title>
                    
167<style type="text/css">
                    
205		 <!-- ?? -->
                    
206		<h1>DoYouHaoBaby <?php echo G::L('PHP??','prodeDyhb');?></h1>
                    
207		<a name="top"></a>
                    
210				<td><a href="#sec1"><?php echo G::L('?????','prodeDyhb');?></a></td>
                    
211				<td><a href="#sec2"><?php echo G::L('PHP????','prodeDyhb');?></a></td>
                    
212				<td><a href="#sec3"><?php echo G::L('PHP??????','prodeDyhb');?></a></td>
                    
212				<td><a href="#sec3"><?php echo G::L('PHP??????','prodeDyhb');?></a></td>
                    
213				<td><a href="<?php echo PHPSELF; ?>" class="t211"><?php echo G::L('??','prodeDyhb');?></a></td>
                    
214				<td><a href="<?php echo __APP__; ?>" class="t211"><?php echo G::L('????','prodeDyhb');?></a></td>
                    
                
func.php http://swan.googlecode.com/svn/trunk/ | PHP | 823 lines
                    
1<?php
                    
2
                    
75		#put all opened tags into an array
                    
76		preg_match_all("#<([a-z]+)( .*[^/])?(?!/)>#iU", $html, $result);
                    
77		$openedtags = $result[1];
                    
78		#put all closed tags into an array
                    
79		preg_match_all("#</([a-z]+)>#iU", $html, $result);
                    
80		$closedtags = $result[1];
                    
207			$pa = "/[\x01-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xef][\x80-\xbf][\x80-\xbf]|\xf0[\x90-\xbf][\x80-\xbf][\x80-\xbf]|[\xf1-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf]/";
                    
208			preg_match_all($pa, $string, $t_string);
                    
209			if(count($t_string[0]) - $start > $sublen) return join('', array_slice($t_string[0], $start, $sublen)).$plus;
                    
373	* ???????????url?????
                    
374	* ??/var/www/site/a.php ?? /site/a.php
                    
375	* ???$path??????????
                    
388	* ??????????
                    
389	* type???????????php??
                    
390	* ??????/??
                    
                
QEmailServer.class.php http://logisticsouth.googlecode.com/svn/trunk/ | PHP | 595 lines
                    
1<?php
                    
2	/**
                    
28		 * used for the EHLO command in the SMTP protocol.  Defaults to the
                    
29		 * QApplication::$ServerAddress variable, which uses the PHP $_SERVER
                    
30		 * constants to determine the correct IP address.
                    
104
                    
105			preg_match_all ("/[a-zA-Z0-9_.'%+-]+[@][\-a-zA-Z0-9_.]+/", $strAddresses, $strAddressArray);
                    
106			if ((is_array($strAddressArray)) &&
                    
139
                    
140			preg_match_all( '/.{1,73}([^=]{0,2})?/', $strText, $arrMatch );
                    
141			$strText = implode( '=' . "\r\n", $arrMatch[0] );
                    
                
extend.php http://thinksns-2.googlecode.com/svn/trunk/ | PHP | 2071 lines
                    
201    // Replace any existing PHP tags to temporary markers so they don't accidentally
                    
202    // break the string out of PHP, and thus, thwart the highlighting.
                    
203
                    
203
                    
204    $str = str_replace(array('&lt;?php', '?&gt;',  '\\'), array('phptagopen', 'phptagclose', 'backslashtmp'), $str);
                    
205
                    
206    // The highlight_string function requires that the text be surrounded
                    
207    // by PHP tags.  Since we don't know if A) the submitted text has PHP tags,
                    
208    // or B) whether the PHP tags enclose the entire string, we will add our
                    
210
                    
211    $str = '<?php //tempstart'."\n".$str.'//tempend ?>'; // <?
                    
212
                    
229    // Replace our markers back to PHP tags.
                    
230    $str = str_replace(array('phptagopen', 'phptagclose', 'backslashtmp'), array('&lt;?php', '?&gt;', '\\'), $str); //<?
                    
231    $line   =   explode("<br />", rtrim(ltrim($str,'<code>'),'</code>'));
                    
                
View.class.php http://thinksns-2.googlecode.com/svn/trunk/ | PHP | 476 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------
                    
2// +----------------------------------------------------------------------
                    
3// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
                    
4// +----------------------------------------------------------------------
                    
4// +----------------------------------------------------------------------
                    
5// | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
                    
6// +----------------------------------------------------------------------
                    
14 +------------------------------------------------------------------------------
                    
15 * ThinkPHP ????
                    
16 * ?????????
                    
121            // ?????????
                    
122            $find = preg_match_all('/<!-- layout::(.+?)::(.+?) -->/is',$content,$matches);
                    
123            if($find) {
                    
185        $engine  = strtolower(C('TMPL_ENGINE_TYPE'));
                    
186        if('php'==$engine) {
                    
187            // ??????????????
                    
                
sfModelGeneratorConfiguration.class.php http://opac-sbweb.googlecode.com/svn/trunk/ | PHP | 442 lines
                    
1<?php
                    
2
                    
8 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
                    
9 * @version    SVN: $Id: sfModelGeneratorConfiguration.class.php 13653 2008-12-03 08:51:34Z fabien $
                    
10 */
                    
128    $this->configuration['list']['params'] = $this->getListParams();
                    
129    preg_match_all('/%%([^%]+)%%/', $this->getListParams(), $matches, PREG_PATTERN_ORDER);
                    
130    foreach ($matches[1] as $name)
                    
                
sfDomCssSelector.class.php http://opac-sbweb.googlecode.com/svn/trunk/ | PHP | 574 lines
                    
1<?php
                    
2
                    
21 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
                    
22 * @version    SVN: $Id: sfDomCssSelector.class.php 14516 2009-01-06 20:07:40Z FabianLange $
                    
23 */
                    
175          $tagName = $matches[1] ? $matches[1] : '*';
                    
176          preg_match_all('/
                    
177            \[
                    
517  {
                    
518    if (!preg_match_all('/
                    
519      :
                    
                
viewCache.php http://tpblog.googlecode.com/svn/ | PHP | 247 lines
                    
1<?php
                    
2/*
                    
3Plugin Name: viewCache
                    
4Plugin URI: http://thinkphp.cn/
                    
5Description: ????????????????????
                    
102                // ???????? ???????? ???? <cache id="" expire=""></cache>
                    
103                $find = preg_match_all('/<cache\s(.+?)>(.+?)<\/cache>/is',$content,$matches,PREG_SET_ORDER);
                    
104                if($find) {
                    
128                //??????? ??????<nocache id=""></nocache> ??
                    
129                $find = preg_match_all('/<nocache\s(.+?)>(.+?)<\/nocache>/is',$content,$matches,PREG_SET_ORDER);
                    
130                if($find) {
                    
                
uploading_com.php http://rapidleech36b.googlecode.com/svn/trunk/ | PHP | 274 lines
                    
1<?php
                    
2if (!defined('RAPIDLEECH')) {
                    
57            $Url = trim($fl[1]);
                    
58            if (!preg_match_all('@<input type="hidden" name="([^"]+)" value="([^"]+)" \/>@', $form, $c)) html_error('Error [Post Data 1 FREE not found!]');
                    
59            $match = array_combine($c[1], $c[2]);
                    
99                    $dlink = str_replace('\\', '', $match[3]);
                    
100                    $filename = basename(parse_url($dlink, PHP_URL_PATH));
                    
101                    $this->RedirectDownload($dlink, $filename, $cookie, 0, $Url);
                    
157                    $this->cookie = GetCookiesArr($check, $this->cookie);
                    
158                    // GET YOUR PREMIUM COOKIE IF YOU WANT TO USE THAT AS LOGIN...DO REMEMBER DO NOT USE COOKIE OR ACCOUNT(USER & PASS) IN THE SAME ACCOUNT.PHP, USE ONLY ONE!
                    
159                    // UNCOMMENT THIS LINE BELOW
                    
188                $dlink = trim($dl[1]);
                    
189                $filename = basename(parse_url($dlink, PHP_URL_PATH));
                    
190                $this->RedirectDownload($dlink, $filename, $this->cookie, 0, $this->link);
                    
222                    $dlink = str_replace('\\', '', $match[3]);
                    
223                    $filename = basename(parse_url($dlink, PHP_URL_PATH));
                    
224                    $this->RedirectDownload($dlink, $filename, $this->cookie, 0, $Url);
                    
                
alls.php http://zhxiaojm.googlecode.com/svn/trunk/ | PHP | 338 lines
                    
1<?php
                    
2eval('$__file__=__FILE__;');
                    
4//ËÑË÷ÒýÇæ·´ÏòÁ´½Ó¼°ÊÕ¼
                    
5include '../robot.php';
                    
6require '../global.php';
                    
9$domain = $domain?$domain:'chinaccnet.com';
                    
10is_domain($domain) or exit( "<script language=javascript>alert('ÇëÊäÈëÕýÈ·µÄÓòÃû£¡');location.href='alls.php';</script>");
                    
11//METAÐÅÏ¢¼ì²â½á¹û
                    
89}
                    
90writeover("../cache/seo.php","<?php\r\n\$urls=".vvar_export($urls).";\r\n?>");
                    
91?>
                    
186	<a href="http://www.cnzzsq.com/" target="_blank">ÖйúÕ¾³¤ÉçÇø</a> |
                    
187	<a href="http://www.cnzzsq.com/phpcode" target="_blank">PHPÔ´ÂëÏÂÔØ</a> | 
                    
188	<a href="http://www.yundns.com" target="_blank"><font color="red">20È˺Ï×âµÚ¶þÆÚÈÈÏúÖÐ.. </font></a>
                    
294<span id="a6"><table border=1 width=100% bordercolordark=#FFFFFF cellspacing=0 cellpadding=0 bordercolorlight=#BBD7E6>
                    
295<tr bgcolor=#D8F0FC><td colspan="9">ÍøÖ·<a href="<?php echo "http://".$domain;?>"><?php echo "http://".$domain;?></a>ÔÚ¸÷´óËÑË÷ÒýÇæµÄÊÕ¼²éѯ½á¹û</td></tr>
                    
296<tr><td>ËÑË÷ÒýÇæ</td><td>¹È¸è</td><td>°Ù¶È</td><td>ÑÅ»¢</td><td>Ëѹ·</td><td>±ØÓ¦</td><td>ÓеÀ</td><td>ËÑËÑ</td></tr>
                    
                
index.php http://student-test.googlecode.com/svn/trunk/ | PHP | 880 lines
                    
1<?php
                    
2/*
                    
5 * To change the template for this generated file go to
                    
6 * Window - Preferences - PHPeclipse - PHP - Code Templates
                    
7 */
                    
7 */
                    
8include "Snoopy.class.php";
                    
9
                    
12$snoopy->agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.2; Alexa Toolbar)"; //?????   
                    
13$action = 'http://login.sina.com.cn/sso/login.php?client=ssologin.js(v1.3.9)';
                    
14$formvars['client'] = 'ssologin.js(v1.3.9)';
                    
21$formvars['service'] = 'miniblog';
                    
22$formvars['url'] = 'http://t.sina.com.cn/ajaxlogin.php?framelogin=1&callback=parent.sinaSSOController.feedBackUrlCallBack';
                    
23//$formvars['username'] = 'aoweibo_3@sina.com';
                    
63	$content_arr = array();
                    
64	if (!preg_match_all("/<div class=\"MIB_feed_c\">(.*)<div id=\"_comment_list/Us",$temp,$tt) )
                    
65	{ 
                    
                
swoutput.php http://mcmis.googlecode.com/svn/trunk/ | PHP | 2767 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 Reportico - PHP Reporting Tool
                    
4 Copyright (C) 2010-2011 Peter Deed
                    
19
                    
20 * File:        reportico.php
                    
21 *
                    
30 * @package Reportico
                    
31 * @version $Id: swoutput.php,v 1.7 2011-10-14 10:49:17 root Exp $
                    
32 */
                    
76
                    
77	function reportico_string_to_php($in_string)
                    
78	{
                    
81
                    
82		if ( preg_match_all( "/{([^}]*)/", $out_string, $matches ) )
                    
83		{
                    
                
index.php http://netfoil.googlecode.com/svn/trunk/ | PHP | 1057 lines
                    
1<?php
                    
2	error_reporting(E_ERROR);
                    
39			for ($nRelacao = 0; $nRelacao < sizeof($strTesteSeparada); $nRelacao++) {
                    
40				$exemplos	=	preg_match_all("/(\+|\-)/", $strTesteSeparada[$nRelacao], $vetorExemplosTeste);
                    
41				if ($exemplos) {
                    
183			/*Pegando resposta do Teste para calcular medidas de Performance*/
                    
184			$testeRealizado = preg_match_all("/Test relation.*Summary: [0-9]* (errors|error) in [0-9]* (trials|trial)/", $output_FOIL, $vetorResultadoTestes);
                    
185			if ($testeRealizado) {
                    
191					/*Calculando a Acurрcia*/
                    
192					preg_match_all("/Summary: ([0-9]*) (errors|error) in ([0-9]*) (trials|trial)/", $testeRelacao, $vetorAcuracia);
                    
193					$acertos		=	$vetorAcuracia[3][0] - $vetorAcuracia[1][0];
                    
197					/*Pegando o numero de erros por classe (+ e -)*/
                    
198					$falhas	=	preg_match_all("/(\+|\-)/", $testeRelacao, $vetorErrosTeste);
                    
199					if ($falhas) {
                    
299			<p>
                    
300				<?php echo $erro;?>
                    
301			</p>
                    
                
search-everything.php http://pumpmyvote.googlecode.com/svn/trunk/ | PHP | 804 lines
                    
1<?php
                    
2/*
                    
21{
                    
22	if (strpos(php_uname('s'), 'Win') !== false )
                    
23	define('DIRECTORY_SEPARATOR', '\\');
                    
47		if (is_admin()) {
                    
48			include ( SE_ABSPATH  . 'views/options.php' );
                    
49			$SEAdmin = new se_admin();
                    
160			} else {
                    
161				preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches);
                    
162				$search_terms = array_map(create_function('$a', 'return trim($a, "\\"\'\\n\\r ");'), $matches[0]);
                    
                
exec_cmd.inc http://magnolia-network-emulator.googlecode.com/svn/trunk/ | PHP | 591 lines
                    
1<?php
                    
2require_once("find_int.inc");
                    
2require_once("find_int.inc");
                    
3require_once 'Net/IPv4.php';
                    
4
                    
115	if (isset($ethspeedmatch)) { unset($ethspeedmatch); }
                    
116	preg_match_all('/Speed: (.*)Mb\/s/i', $ethspeedinfo, $ethspeedmatch);
                    
117	if (isset($ethspeedmatch[1][0])) {	
                    
277		if (strstr($tcclassinfo, ("class htb 1:".$y." root leaf ".$y.":"))!=FALSE) {
                    
278			preg_match_all(("/class htb 1:".$y."(.*) rate (.*)bit ceil/U"), $tcclassinfo, $tcclassmatch);
                    
279			if (isset($tcclassmatch[2][0])) {
                    
303			$tcqdiscinfonetem = strstr($tcqdiscinfo, ("netem ".$y.": parent 1:".$y));
                    
304			preg_match_all(("/delay\s(([\d][\w\.%]*\s+)*)/"), $tcqdiscinfonetem, $tcqdiscmatchdelay);
                    
305			if (isset($tcqdiscmatchdelay[1][0])) {
                    
349			$emurointprint[$emurointconfig]['delaydist'] = "";
                    
350			preg_match_all(("/loss\s(([\d][\w\.%]*\s+)*)/"), $tcqdiscinfonetem, $tcqdiscmatchloss);
                    
351			if (isset($tcqdiscmatchloss[1][0])) {
                    
                
theme.class.php http://xklog.googlecode.com/svn/ | PHP | 709 lines
                    
1<?php
                    
2
                    
34	// ????
                    
35	public function load( $tpl, $ext = 'php' ) {
                    
36		global $db,$request,$cache;
                    
56		if( !file_exists( APP_THEME . $each_dir . '/info.xml' ) ) return false;
                    
57		if( !file_exists( APP_THEME . $each_dir . '/index.php' ) ) return false;
                    
58		if( !file_exists( APP_THEME . $each_dir . '/page.php' ) ) return false;
                    
65		$content = fread($fp, filesize($xml_file));
                    
66		preg_match_all('/<name>(.+?)<\/name>/is',$content, $name);
                    
67		preg_match_all('/<author>(.*?)<\/author>/is',$content, $author);
                    
67		preg_match_all('/<author>(.*?)<\/author>/is',$content, $author);
                    
68		preg_match_all('/<version>(.*?)<\/version>/is',$content, $version);
                    
69		preg_match_all('/<pubdate>(.*?)<\/pubdate>/is',$content, $pubdate);
                    
69		preg_match_all('/<pubdate>(.*?)<\/pubdate>/is',$content, $pubdate);
                    
70		preg_match_all('/<homepage>(.*?)<\/homepage>/is',$content, $homepage);
                    
71		preg_match_all('/<thumb>(.*?)<\/thumb>/is',$content, $thumb);
                    
                
PHPLIB.php git://pkgs.fedoraproject.org/php-pear-HTML_Template_PHPLIB | PHP | 790 lines
                    
9 * @category HTML
                    
10 * @package  HTML_Template_PHPLIB
                    
11 * @author   Kristian Koehntopp <kris@koehntopp.de>
                    
14 * @license  http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
                    
15 * @version  CVS: $Id: PHPLIB.php,v 1.9 2008/03/03 18:33:54 cweiske Exp $
                    
16 * @link     http://pear.php.net/package/HTML_Template_PHPLIB
                    
21 *
                    
22 * For those who want to use PHPLIB's fine template class,
                    
23 * here's a PEAR conforming class with the original PHPLIB
                    
23 * here's a PEAR conforming class with the original PHPLIB
                    
24 * template code from phplib-stable CVS. Original author
                    
25 * was Kristian Koehntopp <kris@koehntopp.de>
                    
31 * @license  http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
                    
32 * @link     http://pear.php.net/package/HTML_Template_PHPLIB
                    
33 */
                    
                
locale.inc git://pkgs.fedoraproject.org/drupal7 | Pascal | 2434 lines
                    
1<?php
                    
2
                    
143  $browser_langcodes = array();
                    
144  if (preg_match_all('@(?<=[, ]|^)([a-zA-Z-]+|\*)(?:;q=([0-9.]+))?(?:$|\s*,\s*)@', trim($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches, PREG_SET_ORDER)) {
                    
145    foreach ($matches as $match) {
                    
287          $host = 'http://' . str_replace(array('http://', 'https://'), '', $language->domain);
                    
288          $host = parse_url($host, PHP_URL_HOST);
                    
289          if ($_SERVER['HTTP_HOST'] == $host) {
                    
441          $host = 'http://' . str_replace(array('http://', 'https://'), '', $options['language']->domain);
                    
442          $host = parse_url($host, PHP_URL_HOST);
                    
443
                    
                
Test.php http://iiccms.googlecode.com/svn/trunk/ | PHP | 349 lines
                    
46
                    
47require_once 'PHPUnit/Util/Filter.php';
                    
48require_once 'PHPUnit/Util/Template.php';
                    
48require_once 'PHPUnit/Util/Template.php';
                    
49require_once 'PHPUnit/Util/Skeleton.php';
                    
50
                    
50
                    
51PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
                    
52
                    
64 */
                    
65class PHPUnit_Util_Skeleton_Test extends PHPUnit_Util_Skeleton
                    
66{
                    
100              sprintf(
                    
101                'Neither "%s.php" nor "%s.php" could be opened.',
                    
102                $inClassName,
                    
                
bulletupload_com.php http://rapidleech36b.googlecode.com/svn/trunk/ | PHP | 127 lines
                    
1<?php
                    
2if (!defined('RAPIDLEECH')) {
                    
38            $form = cut_str($this->page, '<Form method="POST" action=\'\'>', "</Form>");
                    
39            if (!preg_match_all('@<input type="hidden" name="([^"]+)" value="([^"]+)?">@', $form, $one) || !preg_match_all('@<input type="submit" name="(\w+_free)" value="([^"]+)" >@', $form, $two)) html_error("Error: Post Data 1 [FREE] not found!");
                    
40            $match = array_merge(array_combine($one[1], $one[2]), array_combine($two[1], $two[2]));
                    
51            $this->CountDown($wait[1]);
                    
52            if (!preg_match_all('@<input type="hidden" name="([^"]+)" value="([^"]+)?">@', $form, $match)) html_error("Error: Post Data 2 [FREE] not found!");
                    
53            if (!preg_match('@\/api\/challenge\?k=([^"]+)">@', $form, $cap)) html_error("Error: Captcha Key found!");
                    
70        $dlink = trim($dl[0]);
                    
71        $filename = basename(parse_url($dlink, PHP_URL_PATH));
                    
72        $this->RedirectDownload($dlink, $filename, 0, 0, $link);
                    
82            is_present($form, 'Password', 'This file is password protected!');
                    
83            if (!preg_match_all('%<input type="hidden" name="([^"]+)" value="([^"]+)?">%', $form, $ck)) html_error('Error [Post Data PREMIUM not found!]');
                    
84            $match = array_combine($ck[1], $ck[2]);
                    
92        $dlink = trim($dl[0]);
                    
93        $filename = basename(parse_url($dlink, PHP_URL_PATH));
                    
94        $this->RedirectDownload($dlink, $filename, $cookie, 0, $link);
                    
                
server.php http://scalr.googlecode.com/svn/ | PHP | 423 lines
                    
1<?
                    
2    require("../src/prepend.inc.php");
                    
3    
                    
16	        {
                    
17	        	preg_match_all("/\%([^\%]+)\%/si", $version["script"], $matches);
                    
18	        	$vars = $matches[1];
                    
                
controller.php git://github.com/concrete5/concrete5.git | PHP | 490 lines
                    
1<?php
                    
2
                    
195            $regex = '([[:alnum:]|\'|\.|_|\s]{0,45})' . preg_quote($highlight, '#') . '([[:alnum:]|\.|_|\s]{0,45})';
                    
196            preg_match_all("#$regex#ui", $text, $matches);
                    
197
                    
                
model.jfusionadmin.php http://jfusion.googlecode.com/svn/trunk/ | PHP | 397 lines
                    
1<?php
                    
2
                    
122    /**
                    
123	* Parses phpinfo into an array
                    
124	* @return array
                    
125	*/
                    
126    function phpinfo_array()
                    
127    {
                    
130        phpinfo();
                    
131        $phpinfo = array('phpinfo' => array());
                    
132        if (preg_match_all('#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s', ob_get_clean(), $matches, PREG_SET_ORDER)) {
                    
136                } else if (isset($match[3])) {
                    
137                    $phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
                    
138                } else {
                    
138                } else {
                    
139                    $phpinfo[end(array_keys($phpinfo))][] = $match[2];
                    
140                }
                    
                
findi18n.ctrl.php git://github.com/alombarte/SIFO.git | PHP | 220 lines
                    
1<?php
                    
2namespace Common;
                    
7	{
                    
8		// Parse .php files:
                    
9		$literals = array();
                    
12		{
                    
13			exec( "find * $path |grep .php$", $file_list );
                    
14
                    
27				// $this->translate functions
                    
28				preg_match_all( "/translate\s*\(\s*\'([^\']+)\'[^\)]*\)/", $tpl_text, $translate_single_quotes );
                    
29				preg_match_all( "/translate\s*\(\s*\"([^\"]+)\"[^\)]*\)/", $tpl_text, $translate_double_quotes );
                    
31				// \Sifo\\Sifo\\Sifo\I18N::getTranslation functions
                    
32				preg_match_all( "/getTranslation\s*\(\s*\'([^\']+)\'[^\)]*\)/", $tpl_text, $i18n_translate_single_quotes );
                    
33				preg_match_all( "/getTranslation\s*\(\s*\"([^\"]+)\"[^\)]*\)/", $tpl_text, $i18n_translate_double_quotes );
                    
35				// \Sifo\FlashMessages
                    
36				preg_match_all( "/FlasMessages::set\s*\(\s*\'([^\']+)\'[^\)]*\)/", $tpl_text, $flash_translate_single_quotes );
                    
37				preg_match_all( "/FlasMessages::set\s*\(\s*\"([^\"]+)\"[^\)]*\)/", $tpl_text, $flash_translate_double_quotes );
                    
                
videozer_com.php http://rapidleech36b.googlecode.com/svn/trunk/ | PHP | 252 lines
                    
1<?php
                    
2
                    
13
                    
14		$page = $this->GetPage(str_replace('videozer.com/video/', 'videozer.com/player_control/settings.php?v=', $link));
                    
15		is_notpresent ($page, "you still have quota left", "Error: Still have quota left?");
                    
17		if (!preg_match('/"video":\{"title":"([^"]+)"/i', $page, $tl)) html_error('Video title not found.');
                    
18		if (!preg_match_all('/\{"d":(false|true),"l":"([^"]+)","u":"([^"]+)"/i', $page, $st)) html_error('Video stream(s) not found.'); //Get streams
                    
19
                    
42			} else {
                    
43				global $PHP_SELF;
                    
44
                    
45				echo "\n<br /><br /><h3 style='text-align: center;'>This video have more than 1 stream, please select one for download.</h4>";
                    
46				echo "\n<br /><center><form name='dl' action='$PHP_SELF' method='post'>\n";
                    
47				echo "<select name='vzr_qs' id='vzr_qs'>\n";
                    
79	private function Get_Reply($page) {
                    
80		if (!function_exists('json_decode')) html_error("Error: Please enable JSON in php.");
                    
81		$json = substr($page, strpos($page,"\r\n\r\n") + 4);
                    
                
Common.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 519 lines
                    
1<?php
                    
2/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
                    
6 *
                    
7 * PHP versions 4 and 5
                    
8 *
                    
8 *
                    
9 * LICENSE: This source file is subject to version 3.01 of the PHP license
                    
10 * that is available through the world-wide-web at the following URI:
                    
10 * that is available through the world-wide-web at the following URI:
                    
11 * http://www.php.net/license/3_01.txt If you did not receive a copy of
                    
12 * the PHP License and are unable to obtain it through the web, please
                    
12 * the PHP License and are unable to obtain it through the web, please
                    
13 * send a note to license@php.net so we can mail you a copy immediately.
                    
14 * 
                    
18 * @copyright   2001-2009 The PHP Group
                    
19 * @license     http://www.php.net/license/3_01.txt PHP License 3.01
                    
20 * @version     CVS: $Id: Common.php 137 2009-11-09 13:24:37Z vanpouckesven $
                    
                
php.php http://mapn.googlecode.com/svn/trunk/ | PHP | 1891 lines
                    
49
                    
50//??PHP????
                    
51
                    
91
                    
92	phpinfo();
                    
93
                    
138	$mailRe = "???????????";
                    
139	$mailRe .= (false !== @mail($_POST["mailAdd"], "http://".$_SERVER['SERVER_NAME'].($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']), "This is a test mail!")) ? "??":"??";
                    
140
                    
286
                    
287    @preg_match_all("/model\s+name\s{0,}\:+\s{0,}([\w\s\)\(\@.-]+)([\r\n]+)/s", $str, $model);
                    
288
                    
288
                    
289    @preg_match_all("/cpu\s+MHz\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $mhz);
                    
290
                    
                
server.php http://scalr.googlecode.com/svn/ | PHP | 454 lines
                    
1<?
                    
2    require("../src/prepend.inc.php");
                    
3    
                    
16	        {
                    
17	        	preg_match_all("/\%([^\%\s]+)\%/si", $version["script"], $matches);
                    
18	        	$vars = $matches[1];
                    
                
Scripts.php http://scalr.googlecode.com/svn/ | PHP | 657 lines
                    
1<?php
                    
2
                    
25		$text = preg_replace('/(\\\%)/si', '$$scalr$$', $template);
                    
26		preg_match_all("/\%([^\%\s]+)\%/si", $text, $matches);
                    
27		return $matches[1];
                    
                
mysql_meta_module.inc http://scalr.googlecode.com/svn/ | PHP | 623 lines
                    
1<?php
                    
2/**
                    
23	{
                    
24		include_once(ADODB_DIR."/adodb-error.inc.php");
                    
25		if ($err === false)
                    
32	{
                    
33		include_once(ADODB_DIR."/adodb-error.inc.php");
                    
34		return adodb_errormsg($errno);
                    
71
                    
72	    if (!preg_match_all("/FOREIGN KEY \(`(.*?)`\) REFERENCES `(.*?)` \(`(.*?)`\)/", $create_sql, $matches)) return false;
                    
73		$foreign_keys = array();	 	 
                    
260				$fld->enums = $arr;
                    
261				$zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6
                    
262				$fld->max_length = ($zlen > 0) ? $zlen : 1;
                    
485			
                    
486		// php_mysql extension always returns 'blob' even if 'text'
                    
487		// so we have to check whether binary...
                    
                
mysqli_meta_module.inc http://scalr.googlecode.com/svn/ | PHP | 624 lines
                    
1<?php
                    
2/**
                    
23	{
                    
24		include_once(ADODB_DIR . "/adodb-error.inc.php");
                    
25		if ($err === false)
                    
32	{
                    
33		include_once(ADODB_DIR . "/adodb-error.inc.php");
                    
34		return adodb_errormsg($errno);
                    
71
                    
72         if (!preg_match_all("/FOREIGN KEY \(`(.*?)`\) REFERENCES `(.*?)` \(`(.*?)`\)/", $create_sql, $matches)) return false;
                    
73	     $foreign_keys = array();	 	 
                    
260				$fld->enums = $arr;
                    
261				$zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6
                    
262				$fld->max_length = ($zlen > 0) ? $zlen : 1;
                    
485			
                    
486		// php_mysql extension always returns 'blob' even if 'text'
                    
487		// so we have to check whether binary...
                    
                
mysqlt_meta_module.inc http://scalr.googlecode.com/svn/ | PHP | 624 lines
                    
1<?php
                    
2/**
                    
23	{
                    
24		include_once(ADODB_DIR."/adodb-error.inc.php");
                    
25		if ($err === false)
                    
32	{
                    
33		include_once(ADODB_DIR."/adodb-error.inc.php");
                    
34		return adodb_errormsg($errno);
                    
71
                    
72         if (!preg_match_all("/FOREIGN KEY \(`(.*?)`\) REFERENCES `(.*?)` \(`(.*?)`\)/", $create_sql, $matches)) return false;
                    
73	     $foreign_keys = array();	 	 
                    
260				$fld->enums = $arr;
                    
261				$zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6
                    
262				$fld->max_length = ($zlen > 0) ? $zlen : 1;
                    
485			
                    
486		// php_mysql extension always returns 'blob' even if 'text'
                    
487		// so we have to check whether binary...
                    
                
template_enc.php http://wowroster.googlecode.com/svn/trunk/ | PHP | 520 lines
                    
39		// if they wish to display < and >
                    
40		$match_php_tags = array('#\<\?php .*?\?\>#is', '#\<\script language="php"\>.*?\<\/script\>#is', '#\<\?.*?\?\>#s', '#\<%.*?%\>#s');
                    
41		$code = preg_replace($match_php_tags, '', $code);
                    
43		// Pull out all block/statement level elements and seperate plain text
                    
44		preg_match_all('#<!-- PHP -->(.*?)<!-- ENDPHP -->#s', $code, $matches);
                    
45		$php_blocks = $matches[1];
                    
45		$php_blocks = $matches[1];
                    
46		$code = preg_replace('#<!-- PHP -->(.*?)<!-- ENDPHP -->#s', '<!-- PHP -->', $code);
                    
47
                    
51
                    
52		preg_match_all('#<!-- INCLUDEPHP ([a-zA-Z0-9\_\-\+\.\\\\\/]+?) -->#', $code, $matches);
                    
53		$includephp_blocks = $matches[1];
                    
178		// we'll strip out such occurences, minimising such switching
                    
179		$template_php = str_replace(' ?><?php ', '', $template_php);
                    
180		return  (!$no_echo) ? $template_php : "\$$echo_var .= '" . $template_php . "'";
                    
                
htmLawed.php https://code.google.com/p/ipsumframeworks/ | PHP | 715 lines
                    
1<?php
                    
2 // Filtre le code html
                    
6GPL v3 license
                    
7A PHP Labware internal utility; www.bioinformatics.org/phplabware/internal_utilities/htmLawed
                    
8
                    
28 if(isset($x[1])){
                    
29  preg_match_all('`(?:^|-|\+)[^\-+]+?(?=-|\+|$)`', $x, $m, PREG_SET_ORDER);
                    
30  for($i=count($m); --$i>=0;){$m[$i] = $m[$i][0];}
                    
                
arg_types.php https://code.google.com/p/oscats/ | PHP | 1175 lines
                    
180                   "    if (php_retval) {\n"                        .
                    
181                   "        cp_ret = phpg_from_utf8(php_retval, strlen(php_retval), &cp_len, &free_result TSRMLS_CC);\n" .
                    
182                   "        if (cp_ret) {\n"                        .
                    
198                   "    if (php_retval) {\n"                           .
                    
199                   "        cp_ret = phpg_from_utf8(php_retval, strlen(php_retval), &cp_len, &free_result TSRMLS_CC);\n" .
                    
200                   "        if (cp_ret) {\n"                        .
                    
343class Enum_Arg extends Arg_Type {
                    
344    static $enum_tpl  = "\n\tif (php_%(name) && phpg_gvalue_get_enum(%(typecode), php_%(name), (gint *)&%(name)) == FAILURE) {\n\t\t%(on_error);\n\t}\n";
                    
345    var $enum_name = null;
                    
378class Flags_Arg extends Arg_Type {
                    
379    static $flag_tpl = "\n\tif (php_%(name) && phpg_gvalue_get_flags(%(typecode), php_%(name), (gint *)&%(name)) == FAILURE) {\n\t\t%(on_error);\n\t}\n";
                    
380    var $flag_name = null;
                    
420                               "    }\n\n";
                    
421        $this->struct_def_tpl   =   "   if (php_%s && !php_%s_get(php_%s, &%s)) {\n" .
                    
422                                    "       %sreturn;\n" .
                    
                
compressor.php http://scp-soft.googlecode.com/svn/trunk/ | PHP | 1244 lines
                    
1<?php
                    
2/**
                    
35	/**
                    
36	* Options are read from config.php
                    
37	**/
                    
210	//Get links
                    
211	preg_match_all("!<link[^>]+text/css[^>]+>!is",$head,$matches);	
                    
212	if(count($matches[0]) == 0) {
                    
218		
                    
219		preg_match_all("@(rel)=[\"'](.*?)[\"']@",$link,$variants,PREG_SET_ORDER); //|media
                    
220						
                    
408		if(!empty($options['gzip']) || !empty($options['far_future_expires'])) {
                    
409		$options['ext'] = "php";	
                    
410		}
                    
479			//Allow for minification of javascript
                    
480			if($options['header'] == "javascript" && $options['minify'] && substr(phpversion(),0,1) == 5) { //Only minify on php5+
                    
481			$contents = $this->jsmin->minify($contents);			
                    
                
svg.php http://scp-soft.googlecode.com/svn/trunk/ | PHP | 1536 lines
                    
1<?php
                    
2//	svg class modified for mPDF by Ian Back: based on -
                    
109		else if ($element=='path') {
                    
110			preg_match_all('/([a-z]|[A-Z])([ ,\-.\d]+)*/', $attribs['d'], $commands, PREG_SET_ORDER);
                    
111			$maxr=$maxb=0;
                    
315		if (isset($critere_style['transform'])){
                    
316			preg_match_all('/(matrix|translate|scale|rotate|skewX|skewY)\((.*?)\)/is',$critere_style['transform'],$m);
                    
317			if (count($m[0])) {
                    
                
Router.php http://shozu.googlecode.com/svn/trunk/ | PHP | 2292 lines
                    
1<?php
                    
2namespace shozu;
                    
292        $param_names = array();
                    
293        preg_match_all('/<([a-z0-9]+)>/i', $route, $param_names);
                    
294        if(count($param_names) === 2)
                    
298        $param_values = array();
                    
299        preg_match_all($regex, $requested_url, $param_values, \PREG_SET_ORDER);
                    
300        if(count($param_values))
                    
343        }
                    
344        $classFile = str_replace(array('_', '\\'), array(\DIRECTORY_SEPARATOR, \DIRECTORY_SEPARATOR), $class) . '.php';
                    
345        $old = ini_set('error_reporting', 0);
                    
                
search_back.php http://collectgame.googlecode.com/svn/trunk/ | PHP | 435 lines
                    
112					?>
                    
113								<li class="fenleileftfloat NOxuanzhong"><a href="<?php echo $selfPageLink."?s=".$oldKeyword."&cat=".$v->name;?>"><?php echo $v->name; ?></a></li>
                    
114					<?php 			
                    
223						<div class="list">
                    
224							<span class="list_img"><a href="<?php echo $postLink; ?>"><img src="<?php echo $gamePic ?>" width="104" height="79" alt="<?php echo $titleHtml; ?>" title="<?php echo $titleHtml; ?>" /></a></span>
                    
225							<h3 class="list_title"><a href="<?php echo $postLink; ?>"><?php echo $titleHtml;//$mypost->post_title; ?></a></h3>
                    
328					?>
                    
329										<a href="<?php echo $pagedLink."&paged=".(intval($i)); ?>" class="linkstyle03"><?php echo ($i +1);?></a>
                    
330					<?php 
                    
343					?>
                    
344									<a href="<?php echo $pagedLink."&paged=".(intval($i)); ?>" class="linkstyle03"><?php echo ($i +1);?></a>
                    
345					<?php				
                    
370					?>
                    
371									<a href="<?php echo $pagedLink."&paged=1"; ?>" class="linkstyle03"><?php echo 3;?></a>
                    
372					<?php				
                    
                
sphinxtest.php http://collectgame.googlecode.com/svn/trunk/ | PHP | 466 lines
                    
133					?>
                    
134								<li id="xuanzhong" class="fenleileftfloat"><a href="<?php echo $selfPageLink."?s=".$oldKeyword."&cat=".$v->name;?>" ><?php echo $v->name; ?></a></li>
                    
135					<?php 	
                    
255						<div class="list">
                    
256							<span class="list_img"><a href="<?php echo $postLink; ?>"><img src="<?php echo $gamePic ?>" width="104" height="79" alt="<?php echo $titleHtml; ?>" title="<?php echo $titleHtml; ?>" /></a></span>
                    
257							<h3 class="list_title"><a href="<?php echo $postLink; ?>"><?php echo $titleHtml;//$mypost->post_title; ?></a></h3>
                    
346					?>
                    
347										<a href="<?php echo $pagedLink."&paged=".(intval($i)); ?>" class="linkstyle03"><?php echo ($i +1);?></a>
                    
348					<?php 
                    
376					?>
                    
377									<a href="<?php echo $pagedLink."&paged=".(intval($i)); ?>" class="linkstyle03"><?php echo ($i +1);?></a>
                    
378					<?php				
                    
389					?>
                    
390										<a href="<?php echo $pagedLink."&paged=".(intval($i)); ?>" class="linkstyle03"><?php echo ($i +1);?></a>
                    
391					<?php 
                    
                
public.php http://jfusion.googlecode.com/svn/trunk/ | PHP | 1041 lines
                    
1<?php
                    
2
                    
14 * JFusion Public Class for SMF 1.1.x
                    
15 * For detailed descriptions on these functions please check the model.abstractpublic.php
                    
16 * @package JFusion_SMF
                    
29	{
                    
30		return 'index.php?action=register';
                    
31	}
                    
34	{
                    
35		return 'index.php?action=reminder';
                    
36	}
                    
39	{
                    
40		return 'index.php?action=reminder';
                    
41	}
                    
44    {
                    
45        return  'index.php?action=profile&u='.$uid;
                    
46    }
                    
                
doku_search.php http://jfusion.googlecode.com/svn/trunk/ | PHP | 590 lines
                    
1<?php
                    
2/**
                    
107    if (!count($docs)) return $result;
                    
108    require_once DOKU_INC . 'inc/parserutils.php';
                    
109    // check metadata for matching links
                    
148        $ns = getNS($doc);
                    
149        preg_match_all('/\{\{([^|}]*' . $pcre . '[^|}]*)(|[^}]+)?\}\}/i', rawWiki($doc), $matches);
                    
150        foreach ($matches[1] as $img) {
                    
270 *
                    
271 * based upon PEAR's PHP_Compat function for array_intersect_key()
                    
272 *
                    
332            // asian "words" need to be searched as phrases
                    
333            if (@preg_match_all('/((' . IDX_ASIAN . ')+)/u', $w, $matches)) {
                    
334                $q['phrases'] = array_merge($q['phrases'], $matches[1]);
                    
348    if (preg_match('/[^0-9A-Za-z]/u', $string)) {
                    
349        // handle asian chars as single words (may fail on older PHP version)
                    
350        $asia = @preg_replace('/(' . IDX_ASIAN . ')/u', ' \1 ', $string);
                    
                
public.php http://jfusion.googlecode.com/svn/trunk/ | PHP | 1437 lines
                    
1<?php
                    
2
                    
15 * JFusion Public Class for vBulletin
                    
16 * For detailed descriptions on these functions please check the model.abstractpublic.php
                    
17 * @package JFusion_vBulletin
                    
37	{
                    
38		return 'register.php';
                    
39	}
                    
42	{
                    
43		return 'login.php?do=lostpw';
                    
44	}
                    
47	{
                    
48		return 'login.php?do=lostpw';
                    
49	}
                    
52    {
                    
53        return $this->helper->getVbURL('member.php?u=' . $uid, 'members');
                    
54    }
                    
                
public.php http://jfusion.googlecode.com/svn/trunk/ | PHP | 1225 lines
                    
1<?php
                    
2
                    
14 * JFusion Public Class for SMF 1.1.x
                    
15 * For detailed descriptions on these functions please check the model.abstractpublic.php
                    
16 * @package JFusion_SMF
                    
29	{
                    
30		return 'index.php?action=register';
                    
31	}
                    
34	{
                    
35		return 'index.php?action=reminder';
                    
36	}
                    
39	{
                    
40		return 'index.php?action=reminder';
                    
41	}
                    
44    {
                    
45        return 'index.php?action=unread';
                    
46    }
                    
                
public.php http://jfusion.googlecode.com/svn/trunk/ | PHP | 742 lines
                    
23    function getRegistrationURL() {
                    
24        return 'ucp.php?mode=register';
                    
25    }
                    
35    function getViewNewMessagesURL() {
                    
36        return 'search.php?search_id=newposts';
                    
37    }
                    
211        /* set scope for variables required later */
                    
212        global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template, $phpbb_hook, $module, $mode;
                    
213
                    
230        //we need to hijack $_SERVER['PHP_SELF'] so that phpBB correctly utilizes it such as correctly noted the page a user is browsing
                    
231        $php_self = $_SERVER['PHP_SELF'];
                    
232        $juri = new JURI($source_url);
                    
246        //restore $_SERVER['PHP_SELF']
                    
247        $_SERVER['PHP_SELF'] = $php_self;
                    
248
                    
                
model.curl.php http://jfusion.googlecode.com/svn/trunk/ | PHP | 1524 lines
                    
1<?php
                    
2
                    
5 *
                    
6 * PHP version 5
                    
7 *
                    
66	{
                    
67		if (preg_match_all("/<form.*>.+<\/form>/isU", $this->html_data, $forms)) {
                    
68			foreach ($forms[0] as $form) {
                    
93				// form elements: input type = hidden
                    
94				if (preg_match_all("/<input[^<>]+type=[\"']hidden[\"'][^<>]*>/iU", $form, $hiddens)) {
                    
95					foreach ($hiddens[0] as $hidden) {
                    
103				// form elements: input type = text
                    
104				if (preg_match_all("/<input[^<>]+type=[\"']text[\"'][^<>]*>/iU", $form, $texts)) {
                    
105					foreach ($texts[0] as $text) {
                    
115				// form elements: input type = password
                    
116				if (preg_match_all("/<input[^<>]+type=[\"']password[\"'][^<>]*>/iU", $form, $passwords)) {
                    
117					foreach ($passwords[0] as $password) {
                    
                
model.abstractpublic.php http://jfusion.googlecode.com/svn/trunk/ | PHP | 985 lines
                    
1<?php
                    
2
                    
134            //first thing is to remove all joomla plugins
                    
135            preg_match_all('/\{(.*)\}/U', $text, $matches);
                    
136            //find each thread by the id
                    
266            case 'nobbc':
                    
267            case 'php':
                    
268                $return = $content;
                    
                
revision3.php http://umspx.googlecode.com/svn/trunk/ | PHP | 399 lines
                    
1<?php
                    
2
                    
26		// It has no parameters and will run 'PluginCreateFeedlist' that returns an array with feeds.
                    
27		// If run with a feed (/revision3.php?feed=animetv) it will run the function _pluginFeedResolution
                    
28		// and if run with both present, it will return a list of items in the respective feed.
                    
58		$html = file_get_contents($url);
                    
59		preg_match_all('/<h3><a href="\/(?P<show>.*?)">(?P<title>.*?)<\/a><\/h3>/',$html,$shows);
                    
60		preg_match_all('/" class="thumbnail"><img src="(?P<thumb>.*?)" \/><\/a>/',$html,$image_url);
                    
118				$html = file_get_contents('http://revision3.com/search/page?type=video&q='.urlencode($searchterm[2]).'&limit=10&page='.$page);
                    
119				if(preg_match_all(
                    
120					'/&client_id=revision3"><img src="(?P<thumb>.*?)" \/><div class="playLine">Play Video<\/div><\/a><a class="title" href='
                    
120					'/&client_id=revision3"><img src="(?P<thumb>.*?)" \/><div class="playLine">Play Video<\/div><\/a><a class="title" href='
                    
121					.'"http:\/\/www.videosurf.com\/webui\/inc\/go.php\?redirect=(?P<episode>.*?)&client_id=revision3">'
                    
122					.'(?P<title>.*?)<\/a><div class="description"><b>(?P<added>.*?)<\/b>/',$html,$episodes))
                    
183		$html = file_get_contents($queryData['episode']);
                    
184		if(preg_match_all('/<a class="sizename" href="(?P<show>.*?).mp4">(?P<title>.*?)<\/a>/',$html,$playable))
                    
185		{
                    
                
DrupalComponentTest.php git://github.com/drupal/drupal.git | PHP | 156 lines
                    
1<?php
                    
2
                    
5use org\bovigo\vfs\vfsStream;
                    
6use PHPUnit\Framework\AssertionFailedError;
                    
7use PHPUnit\Framework\TestCase;
                    
20    $component_path = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__))) . '/lib/Drupal/Component';
                    
21    foreach ($this->findPhpClasses($component_path) as $class) {
                    
22      $this->assertNoCoreUsage($class);
                    
30    $component_path = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__))) . '/tests/Drupal/Tests/Component';
                    
31    foreach ($this->findPhpClasses($component_path) as $class) {
                    
32      $this->assertNoCoreUsage($class);
                    
64  /**
                    
65   * Searches a directory recursively for PHP classes.
                    
66   *
                    
72   */
                    
73  protected function findPhpClasses($dir) {
                    
74    $classes = [];
                    
                
add_log.php http://mycaptain.googlecode.com/svn/ | PHP | 148 lines
                    
1<?php
                    
2/**
                    
7
                    
8require_once('./globals.php');
                    
9
                    
39		$ok_msg = '???????';
                    
40		$ok_url = 'admin_log.php?pid=draft';
                    
41	}else
                    
44		$ok_msg = '???????';
                    
45		$ok_url = 'admin_log.php';
                    
46	}
                    
56	{
                    
57		formMsg('???????','./add_log.php',0);
                    
58	}
                    
76	//???????????id ????
                    
77	//preg_match_all("/ematt:([0-9]+)/i",$content, $matches );
                    
78	//$cont_attid = serialize($matches[1]);
                    
                
tpl.php http://hppg.googlecode.com/svn/trunk/ | PHP | 335 lines
                    
103		// Need space some templates
                    
104		$return=str_replace('<?php','<?php ',$return);
                    
105				
                    
137	        $Matches = array();
                    
138			preg_match_all('/<\?php(.*?)include_once\(erLhcoreClassDesign::designtpl\(\'([a-zA-Z0-9-\.-\/\_]+)\'\)\)(.*?)\?\>/i',$contentFile,$Matches);       		
                    
139			foreach ($Matches[2] as $key => $Match)
                    
145	        $Matches = array();
                    
146			preg_match_all('/<\?php(.*?)include\(erLhcoreClassDesign::designtpl\(\'([a-zA-Z0-9-\.-\/\_]+)\'\)\)(.*?)\?\>/i',$contentFile,$Matches);       		
                    
147			foreach ($Matches[2] as $key => $Match)
                    
170			$Matches = array();
                    
171			preg_match_all('/erTranslationClassLhTranslation::getInstance\(\)->getTranslation\(\'(.*?)\',\'(.*?)\'\)/i',$contentFile,$Matches);
                    
172					
                    
187			$Matches = array();
                    
188			preg_match_all('/<\?=erLhcoreClassDesign::baseurldirect\((.*?)\)(.*?)\?\>/i',$contentFile,$Matches); 
                    
189			foreach ($Matches[1] as $key => $UrlAddress)
                    
                
fulltext_native.php http://pbb-png1.googlecode.com/svn/trunk/ | PHP | 1690 lines
                    
1<?php
                    
2/**
                    
4* @package search
                    
5* @version $Id: fulltext_native.php 9173 2008-12-04 17:01:39Z naderman $
                    
6* @copyright (c) 2005 phpBB Group
                    
6* @copyright (c) 2005 phpBB Group
                    
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
8*
                    
21*/
                    
22include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
                    
23
                    
48	{
                    
49		global $phpbb_root_path, $phpEx, $config;
                    
50
                    
57		{
                    
58			include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
                    
59		}
                    
                
XMLStream.php http://pichi.googlecode.com/svn/trunk/ | PHP | 769 lines
                    
2/**
                    
3 * XMPPHP: The PHP XMPP Library
                    
4 * Copyright (C) 2008  Nathanael C. Fritz
                    
11 * 
                    
12 * XMPPHP is distributed in the hope that it will be useful,
                    
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
                    
17 * You should have received a copy of the GNU General Public License
                    
18 * along with XMPPHP; if not, write to the Free Software
                    
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
                    
50 */
                    
51class XMPPHP_XMLStream {
                    
52	/**
                    
572							if($handler[2] === null) $handler[2] = $this;
                    
573							$this->log->log("Calling {$handler[1]}",  XMPPHP_Log::LEVEL_DEBUG);
                    
574							$handler[2]->$handler[1]($this->xmlobj[2]);
                    
                
View.class.php http://tpblog.googlecode.com/svn/ | PHP | 486 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------
                    
2// +----------------------------------------------------------------------
                    
3// | ThinkPHP
                    
4// +----------------------------------------------------------------------
                    
4// +----------------------------------------------------------------------
                    
5// | Copyright (c) 2008 http://thinkphp.cn All rights reserved.
                    
6// +----------------------------------------------------------------------
                    
14 +------------------------------------------------------------------------------
                    
15 * ThinkPHP ????
                    
16 * ?????????
                    
231        // ?????????
                    
232        $find = preg_match_all('/<!-- layout::(.+?)::(.+?) -->/is',$content,$matches);
                    
233        if($find) {
                    
379        //????????????
                    
380        if('PHP'==$this->type || empty($this->type)) {
                    
381            // ??????????????
                    
                
class_mailparse.php http://trellis-desk-translate-russian.googlecode.com/svn/trunk/ | PHP | 1261 lines
                    
1<?php
                    
2
                    
29	{
                    
30		require_once('Mail/mimeDecode.php');
                    
31
                    
375		
                    
376		if ( preg_match_all( $this->ifthd->convert_html( $this->ifthd->core->cache['config']['email_subject_regex'] ), $email['subject'], $matches, PREG_PATTERN_ORDER ) )
                    
377		{
                    
                
tags.php http://goodgirl.googlecode.com/svn/ | PHP | 641 lines
                    
1<?php                                                      /* `,
                    
2                                                           ,\, #
                    
94
                    
95        if (preg_match_all('/(#|\$|\$\w+){([^}]*)}/U', $output, $match))
                    
96            for ($i = 0, $c = count($match[0]); $i < $c; $i++)
                    
                
filter.function.php http://php-ppcms.googlecode.com/svn/trunk/ | PHP | 560 lines
                    
1<?php
                    
2/***************************************************************
                    
62	$attachments_ids = array();
                    
63	if( preg_match_all("/\{\{attach\}\}(\d+)\{\{\/attach\}\}/i", $content, $matches) ) {
                    
64		//$attachments_pattern = $matches['0'];
                    
77	//<img height="401" border="0" width="400" id="attach_8" alt=" " src="../../images/resources/200812/894a25068c8c3606_vQbE6B8t.jpg" /> 
                    
78	if( preg_match_all("/\<img(.+?)\>/i", $content, $matches) ) {
                    
79		$c = 0;
                    
91				$patternb = "/$patternb/i";
                    
92				if( preg_match_all($patternb, $contentb, $matchesb) ) {
                    
93					$c++;
                    
112	}
                    
113	if( preg_match_all("/\{\{attach\}\}(\d+)\{\{\/attach\}\}/i", $content, $matches) ) {
                    
114		$ids = $matches['1'];
                    
126		global $adb;
                    
127		include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'core.resource.class.php');
                    
128		$resObj = new CoreResourceBase();
                    
                
lib.email.class.php http://php-ppcms.googlecode.com/svn/trunk/ | PHP | 557 lines
                    
1<?php
                    
2/***************************************************************
                    
116		
                    
117		preg_match_all('/"([^"]+\.(' . implode('|', $extensions).'))"/Ui', $this->html, $images);
                    
118		
                    
188	
                    
189	/* HPDL PHP3 */
                    
190	//function &add_text_part(&$obj, $text) {
                    
206	
                    
207	/* HPDL PHP3 */
                    
208	//function &add_html_part(&$obj) {
                    
224	
                    
225	/* HPDL PHP3 */
                    
226	//function &add_mixed_part() {
                    
236	
                    
237	/* HPDL PHP3 */
                    
238	//function &add_alternative_part(&$obj) {
                    
                
xtemplate.lib.php http://pef.googlecode.com/svn/trunk/ | PHP | 802 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3    ./lib/xtemplate.lib.php
                    
4
                    
150		$var_array = array();
                    
151		preg_match_all("/" . $this->tag_start_delim . "([A-Za-z0-9\._]+? ?#?.*?)" . $this->tag_end_delim. "/", $copy, $var_array);
                    
152		$var_array = $var_array[1];
                    
279		}
                    
280		$this->assign('PHP', $GLOB);
                    
281	}
                    
309			$res = array();
                    
310			if (preg_match_all("/$patt/ims", $v, $res, PREG_SET_ORDER)) {
                    
311				$block_word	= $res[0][1];
                    
348					$res = array();
                    
349					preg_match_all($this->filevar_delim, $copy, $res, PREG_SET_ORDER);
                    
350					if (is_array($res) && isset($res[0])) {
                    
                
MTUtil.php git://github.com/openmelody/melody.git | PHP | 1687 lines
                    
1<?php
                    
2# Movable Type (r) Open Source (C) 2001-2010 Six Apart, Ltd.
                    
161function substr_wref($str, $start, $length) {
                    
162    if (preg_match_all('/(&[^;]*;|.)/', $str, $character_entities)) {
                    
163        return implode('', array_slice($character_entities[0], $start, $length));
                    
                
Core.php https://bitbucket.org/haloweb/halogy-1.0/ | PHP | 1376 lines
                    
1<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * A user friendly, modular content management system for PHP 5.0
                    
6 * Built on CodeIgniter - http://codeigniter.com
                    
151		// parse for blocks
                    
152		preg_match_all('/block([a-z0-9\-_]+)/i', $page['body'], $blocks);
                    
153		if ($blocks)
                    
                
rs-data.php https://bitbucket.org/wragge/rswrapper | PHP | 450 lines
                    
1<?php
                    
2include 'XmlDomConstruct.php';
                    
104			preg_match('/<B>Agency \/ person recording<\/B><BR><TABLE width=100\% >(.*?)<\/TABLE>/', $result, $matches);
                    
105			preg_match_all('/<td width=30\% VALIGN=TOP >(.+?)<\/td><td width=70\% ><A HREF="AgencyDetail.asp\?M=1\&B=CA\+(\d+)">CA \d+<\/a>, (.+?)<\/td>/', $matches[1], $agencies, PREG_SET_ORDER);
                    
106			foreach ($agencies as $agency) {
                    
114			preg_match('/<B>Agency \/ person controlling<\/B><BR><TABLE width=100\% >(.*?)<\/TABLE>/', $result, $matches);
                    
115			preg_match_all('/<td width=30\% VALIGN=TOP >(.+?)<\/td><td width=70\% ><A HREF="AgencyDetail.asp\?M=1\&B=CA\+(\d+)">CA \d+<\/a>, (.+?)<\/td>/', $matches[1], $agencies, PREG_SET_ORDER);
                    
116			foreach ($agencies as $agency) {
                    
142				preg_match('/<B>Previous series<\/B><BR><TABLE width=100% >(.+?)<\/TABLE>/', $links, $matches);
                    
143				preg_match_all('/<TR><td width=15% VALIGN=TOP >(.*?)<\/td><td width=85% ><A HREF="SeriesDetail.asp\?M=1\&B=.+?">(.+?)<\/a>, (.+?)<\/td><\/TR>/', $matches[1], $pseries, PREG_SET_ORDER);
                    
144				foreach ($pseries as $ps) {
                    
156				preg_match('/<B>Subsequent series<\/B><BR><TABLE width=100% >(.+?)<\/TABLE>/i', $links, $matches);
                    
157				preg_match_all('/<TR><td width=15% VALIGN=TOP >(.*?)<\/td><td width=85% ><A HREF="SeriesDetail.asp\?M=1\&B=.+?">(.+?)<\/a>, (.+?)<\/td><\/TR>/i', $matches[1], $sseries, PREG_SET_ORDER);
                    
158				foreach ($sseries as $ss) {
                    
170				preg_match('/<B>Controlling series<\/B><BR><TABLE width=100% >(.+?)<\/TABLE>/i', $links, $matches);
                    
171				preg_match_all('/<TR><td width=30% VALIGN=TOP >(.*?)<\/td><td width=70% ><A HREF="SeriesDetail.asp\?M=1\&B=.+?">(.+?)<\/a>, (.+?)<\/td><\/TR>/i', $matches[1], $cseries, PREG_SET_ORDER);
                    
172				foreach ($cseries as $cs) {
                    
                
ext_preg.ext_hhvm.cpp git://github.com/facebook/hiphop-php.git | C++ | 969 lines
                    
93/*
                    
94HPHP::Variant HPHP::f_preg_match(HPHP::String const&, HPHP::String const&, HPHP::VRefParamValue const&, int, int)
                    
95_ZN4HPHP12f_preg_matchERKNS_6StringES2_RKNS_14VRefParamValueEii
                    
168/*
                    
169HPHP::Variant HPHP::f_preg_match_all(HPHP::String const&, HPHP::String const&, HPHP::VRefParamValue const&, int, int)
                    
170_ZN4HPHP16f_preg_match_allERKNS_6StringES2_RKNS_14VRefParamValueEii
                    
240/*
                    
241HPHP::Variant HPHP::f_preg_replace(HPHP::Variant const&, HPHP::Variant const&, HPHP::Variant const&, int, HPHP::VRefParamValue const&)
                    
242_ZN4HPHP14f_preg_replaceERKNS_7VariantES2_S2_iRKNS_14VRefParamValueE
                    
297/*
                    
298HPHP::Variant HPHP::f_preg_replace_callback(HPHP::Variant const&, HPHP::Variant const&, HPHP::Variant const&, int, HPHP::VRefParamValue const&)
                    
299_ZN4HPHP23f_preg_replace_callbackERKNS_7VariantES2_S2_iRKNS_14VRefParamValueE
                    
354/*
                    
355HPHP::Variant HPHP::f_preg_split(HPHP::Variant const&, HPHP::Variant const&, int, int)
                    
356_ZN4HPHP12f_preg_splitERKNS_7VariantES2_ii
                    
                
tcpdf_parser.php git://github.com/Dolibarr/dolibarr.git | PHP | 502 lines
                    
1<?php
                    
2//============================================================+
                    
2//============================================================+
                    
3// File name   : tcpdf_parser.php
                    
4// Version     : 1.0.000
                    
30//
                    
31// Description : This is a PHP class for parsing PDF documents.
                    
32//
                    
36 * @file
                    
37 * This is a PHP class for parsing PDF documents.<br>
                    
38 * @package com.tecnick.tcpdf
                    
43// include class for decoding filters
                    
44require_once(dirname(__FILE__).'/tcpdf_filters.php');
                    
45
                    
47 * @class TCPDF_PARSER
                    
48 * This is a PHP class for parsing PDF documents.<br>
                    
49 * @package com.tecnick.tcpdf
                    
                
Form_validation.php git://github.com/prashants/webzash.git | PHP | 1278 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 4.3.2 or newer
                    
6 *
                    
116		// into its components so that we can fetch the corresponding POST data later		
                    
117		if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
                    
118		{	
                    
119			// Note: Due to a bug in current() that affects some versions
                    
120			// of PHP we can not pass function call directly into it
                    
121			$x = explode('[', $field);
                    
610				{
                    
611					// If our own wrapper function doesn't exist we see if a native PHP function does. 
                    
612					// Users can use any native PHP function call that has one param.
                    
                
Sender.php git://github.com/jyxo/php.git | PHP | 944 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 */
                    
35use function preg_match;
                    
36use function preg_match_all;
                    
37use function preg_replace;
                    
46 * Class for sending emails.
                    
47 * Based on PhpMailer class (C) Copyright 2001-2003 Brent R. Matzelle
                    
48 *
                    
49 * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o.
                    
50 * @license https://github.com/jyxo/php/blob/master/license.txt
                    
51 * @author Jaroslav Hanslík
                    
                
Parser.php git://github.com/jyxo/php.git | PHP | 1354 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 */
                    
38use function preg_match;
                    
39use function preg_match_all;
                    
40use function quoted_printable_decode;
                    
75 * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o.
                    
76 * @license https://github.com/jyxo/php/blob/master/license.txt
                    
77 * @author Jaroslav Hanslík
                    
297		// Adds X-headers
                    
298		if (preg_match_all("~(X(?:[\-]\\w+)+):(.+?)(?=\r?\n(?:\\S|\r?\n))~is", $rawHeaders, $matches) > 0) {
                    
299			for ($i = 0; $i < count($matches[0]); $i++) {
                    
                
Css.php git://github.com/jyxo/php.git | PHP | 685 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 */
                    
27use function preg_match;
                    
28use function preg_match_all;
                    
29use function preg_replace;
                    
45 * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o.
                    
46 * @license https://github.com/jyxo/php/blob/master/license.txt
                    
47 * @author Jaroslav Hanslík
                    
183		// Parse the HTML source
                    
184		preg_match_all(
                    
185			'~(?:<\\w+[^>]*(?:\\s*/)?>)|(?:</\\w+>)|(?:<!--)|(?:<!\[endif\]-->)|(?:<!\[CDATA\[.+?\]\]>)|(?:<!DOCTYPE[^>]+>)|(?:[^<]+)~s',
                    
                
Html.php git://github.com/jyxo/php.git | PHP | 796 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 */
                    
26use function preg_match;
                    
27use function preg_match_all;
                    
28use function preg_replace;
                    
48 * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o.
                    
49 * @license https://github.com/jyxo/php/blob/master/license.txt
                    
50 * @author Jaroslav Hanslík
                    
78	 * Fixes an invalid HTML source, unifies quotes and removes unnecessary whitespace.
                    
79	 * Required the Tidy PHP extension.
                    
80	 *
                    
                
typing.php git://github.com/fuel/orm.git | PHP | 748 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Fuel is a fast, lightweight, community driven PHP 5.4+ framework.
                    
4 *
                    
9 * @copyright  2010 - 2019 Fuel Development Team
                    
10 * @link       https://fuelphp.com
                    
11 */
                    
226					{
                    
227						if (preg_match_all($match, $data_type, $matches) > 0)
                    
228						{
                    
470	/**
                    
471	 * Converts DB bool values to PHP bool value
                    
472	 *
                    
                
waRouting.class.php git://github.com/webasyst/webasyst-framework.git | PHP | 783 lines
                    
1<?php
                    
2
                    
225            $u = $r['url'];
                    
226            if (preg_match_all('/<([a-z_]+):?([^>]*)?>/ui', $u, $match, PREG_OFFSET_CAPTURE|PREG_SET_ORDER)) {
                    
227                $offset = 0;
                    
339            $pattern = preg_replace('/(^|[^\.])\*/ui', '$1.*?', $pattern);
                    
340            if (preg_match_all('/<([a-z_]+):?([^>]*)?>/ui', $pattern, $match, PREG_OFFSET_CAPTURE|PREG_SET_ORDER)) {
                    
341                $offset = 0;
                    
372            $pattern = preg_replace('/(^|[^\.])\*/ui', '$1.*?', $pattern);
                    
373            if (preg_match_all('/<([a-z_]+):?([^>]*)?>/ui', $pattern, $match, PREG_OFFSET_CAPTURE|PREG_SET_ORDER)) {
                    
374                $offset = 0;
                    
                
Lexer.php git://github.com/jeromeschneider/Baikal.git | PHP | 407 lines
                    
1<?php
                    
2
                    
99        // find all token starts in one go
                    
100        preg_match_all($this->regexes['lex_tokens_start'], $this->code, $matches, PREG_OFFSET_CAPTURE);
                    
101        $this->positions = $matches;
                    
242            $number = (float) $match[0];  // floats
                    
243            if (ctype_digit($match[0]) && $number <= PHP_INT_MAX) {
                    
244                $number = (int) $match[0]; // integers lower than the maximum
                    
                
PersonalizationForm.php http://magento-w2p.googlecode.com/svn/trunk/ | PHP | 1196 lines
                    
1<?php
                    
2
                    
49
                    
50        preg_match_all('/"(.*?)","(.*?)"(:?\r|\n|$)/', $locale, $array, PREG_PATTERN_ORDER);
                    
51
                    
222</script>
                    
223<?php
                    
224    return true;
                    
251<span class="zetaprints-share-link empty">
                    
252  <a href="javascript:void(0)"><?php echo $this->__('Share preview'); ?></a>
                    
253  <input id="zetaprints-share-link-input" type="text" value="" />
                    
258  var place_preview_image_sharing_link = true;
                    
259  var preview_image_sharing_link_template = '<?php echo $url; ?>';
                    
260
                    
298
                    
299<?php
                    
300  }
                    
                
lucene.php https://bitbucket.org/wez/mtrack/ | PHP | 705 lines
                    
1<?php # vim:ts=2:sw=2:et:
                    
2/* For licensing and copyright terms, see the file named LICENSE */
                    
3
                    
4require_once 'Zend/Search/Lucene.php';
                    
5require_once 'Zend/Search/Lucene/Search/Highlighter/Interface.php';
                    
7/**
                    
8 * Copyright (c) 2005 Richard Heyes (http://www.phpguru.org/)
                    
9 * PHP5 Implementation of the Porter Stemmer algorithm. Certain elements
                    
352
                    
353    preg_match_all("#($v+$c+)#", $str, $matches);
                    
354
                    
                
report.php https://bitbucket.org/wez/mtrack/ | PHP | 812 lines
                    
1<?php # vim:ts=2:sw=2:et:
                    
2/* For licensing and copyright terms, see the file named LICENSE */
                    
105    $params = array();
                    
106    $n = preg_match_all("/\\$([A-Z]+)/m", $repstring, $matches);
                    
107    for ($i = 0; $i < $n; $i++) {
                    
188
                    
189    $t = fopen("php://temp", 'r+');
                    
190    $c = array();
                    
360      if (isset($row['ticket'])) {
                    
361        $href = $ABSWEB . "ticket.php/$row[ticket]";
                    
362      }
                    
407              $v .= "<span class='milestone'>" .
                    
408                    "<a href=\"{$ABSWEB}milestone.php/" .
                    
409                    urlencode($m) . "\">" .
                    
                
datamodel.php http://three-cms.googlecode.com/svn/trunk/ | PHP | 729 lines
                    
1<?php
                    
2
                    
65		// Caching:
                    
66		// Caching is done by checking if there is a datafile: cache/data.idcontent.idlanguage.php
                    
67		// The datafile is nothing more than the options-array and some other variables. If the file
                    
70		// If the content gets edited, the datafile gets deleted
                    
71		$cacheFile = 'system/cache/data.'.$idContent.'.'.$idLanguage.'.php';
                    
72		if(file_exists($cacheFile)) {
                    
123					$value = $result->value;
                    
124					preg_match_all('/href="id:(.*)"/', $value, $matches);
                    
125					for($i=0; $i<count($matches[0]); $i++) {
                    
145			// Save the cache file:
                    
146			$cacheStr = '<?php'."\n";
                    
147			// The options:
                    
                
search.php https://code.google.com/p/osclass/ | PHP | 442 lines
                    
1<?php if ( ! defined('ABS_PATH')) exit('ABS_PATH is not loaded. Direct access is not allowed.');
                    
2
                    
97                $p_sParams = "/".Params::getParam('sParams', false, false);
                    
98                if(preg_match_all('|\/([^,]+),([^\/]*)|', $p_sParams, $m)) {
                    
99                    $l = count($m[0]);
                    
                
sparql_read5.php https://code.google.com/p/s3db/ | PHP | 1853 lines
                    
1<?php
                    
2/**
                    
21	#global $timer;
                    
22	if(is_file(S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php')){
                    
23	require_once S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php';
                    
32	ini_set("include_path", S3DB_SERVER_ROOT."/pearlib/arc". PATH_SEPARATOR. ini_get("include_path"));
                    
33	include_once("ARC2.php");
                    
34
                    
44	$bq .= "WHERE ".$query['where'][0]."\n ";
                    
45	preg_match_all('(\?[A-Za-z0-9_]+) ', $bq, $vars);
                    
46	if($vars[0]) {
                    
77	
                    
78	#$queryModel = rdf2php($rdf);
                    
79	#$data = $queryModel->sparqlQuery($sparql);
                    
178					// Set options 
                    
179					curl_setopt($ch[$k], CURLOPT_URL, $qURL.'&format=php');
                    
180					curl_setopt($ch[$k], CURLOPT_RETURNTRANSFER, 1);
                    
                
sparql_read4.php https://code.google.com/p/s3db/ | PHP | 1826 lines
                    
1<?php
                    
2/**
                    
21	#global $timer;
                    
22	if(is_file(S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php')){
                    
23	require_once S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php';
                    
32	ini_set("include_path", S3DB_SERVER_ROOT."/pearlib/arc". PATH_SEPARATOR. ini_get("include_path"));
                    
33	include_once("ARC2.php");
                    
34
                    
44	$bq .= "WHERE ".$query['where'][0]."\n ";
                    
45	preg_match_all('(\?[A-Za-z0-9]+) ', $bq, $vars);
                    
46	if($vars[0]) {
                    
77	
                    
78	#$queryModel = rdf2php($rdf);
                    
79	#$data = $queryModel->sparqlQuery($sparql);
                    
173					// Set options 
                    
174					curl_setopt($ch[$k], CURLOPT_URL, $qURL.'&format=php');
                    
175					curl_setopt($ch[$k], CURLOPT_RETURNTRANSFER, 1);
                    
                
sparql_read.php https://code.google.com/p/s3db/ | PHP | 1786 lines
                    
1<?php
                    
2/**
                    
21	#global $timer;
                    
22	if(is_file(S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php')){
                    
23	require_once S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php';
                    
32	ini_set("include_path", S3DB_SERVER_ROOT."/pearlib/arc". PATH_SEPARATOR. ini_get("include_path"));
                    
33	include_once("ARC2.php");
                    
34
                    
44	$bq .= "WHERE ".$query['where'][0]."\n ";
                    
45	preg_match_all('(\?[A-Za-z0-9]+) ', $bq, $vars);
                    
46	if($vars[0]) {
                    
71
                    
72	#$queryModel = rdf2php($rdf);
                    
73	#$data = $queryModel->sparqlQuery($sparql);
                    
164					// Set options 
                    
165					curl_setopt($ch[$k], CURLOPT_URL, $qURL.'&format=php');
                    
166					curl_setopt($ch[$k], CURLOPT_RETURNTRANSFER, 1);
                    
                
ARC2_StoreEndpoint.php https://code.google.com/p/s3db/ | PHP | 717 lines
                    
1<?php
                    
2/*
                    
36    if (!$mthd || ($mthd == 'post')) {
                    
37      $r = @file_get_contents('php://input');
                    
38    }
                    
46      $qs = $this->getQueryString($mthd);
                    
47      if (preg_match_all('/\&' . $name . '=([^\&]*)/', $qs, $m)){
                    
48        foreach ($m[1] as $i => $val) {
                    
282      'json' => 'SPARQLJSON', 'sparql-results+json' => 'SPARQLJSON',
                    
283      'php_ser' => 'PHPSER', 'sql' => 'xxSQL', 'plain' => 'Plain', 'htmltab' => 'HTMLTable',
                    
284    );
                    
406  
                    
407  function getPHPSERSelectResultDoc($r) {
                    
408    $this->setHeader('content-type', 'Content-Type: text/plain');
                    
                
sparql_read6.php https://code.google.com/p/s3db/ | PHP | 2061 lines
                    
1<?php
                    
2/**
                    
21	#global $timer;
                    
22	if(is_file(S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php')){
                    
23	require_once S3DB_SERVER_ROOT.'/pearlib/Benchmark/Timer.php';
                    
32	ini_set("include_path", S3DB_SERVER_ROOT."/pearlib/arc". PATH_SEPARATOR. ini_get("include_path"));
                    
33	include_once("ARC2.php");
                    
34
                    
58	*/
                    
59	preg_match_all('(\?[A-Za-z0-9_]+) ', $bq, $vars);
                    
60	if($vars[0]) {
                    
72	#Validate the query first
                    
73	include_once(RDFAPI_INCLUDE_DIR."sparql/SparqlParser.php");
                    
74	
                    
103	
                    
104	#$queryModel = rdf2php($rdf);
                    
105	#$data = $queryModel->sparqlQuery($sparql);
                    
                
SypexDumpLib.php https://code.google.com/p/dcloner/ | PHP | 1344 lines
                    
20        define('V_SXD', 20006);
                    
21        define('V_PHP', sxd_ver2int(phpversion()));
                    
22        $this->name = 'Sypex Dumper 2.0.6 Beta';
                    
37        }
                    
38        if(file_exists("lang/lng_{$lng_name}.php")) include("lang/lng_{$lng_name}.php");
                    
39        else include("lang/lng_en.php");
                    
118                                        break;
                    
119                        default:        $file = 'auth_' . $a . '.php';
                    
120                                        if(!file_exists($file)) continue;
                    
188        // ??????
                    
189        $this->VAR['toolbar'] = sxd_php2json(
                    
190            array(
                    
307            $this->SES[$_COOKIE['sxd']] = array('cfg' => $this->CFG, 'time' => time(), 'lng' => $this->LNG['name']);
                    
308            $this->saveToFile('ses.php', "<?php\n\$SES = " . var_export($this->SES, true) . ";\n" . "?>");
                    
309        }
                    
                
index.php https://code.google.com/p/dcloner/ | PHP | 1957 lines
                    
33		define('V_SXD', 20007);
                    
34		define('V_PHP', sxd_ver2int(phpversion()));
                    
35		$this->name = 'Sypex Dumper 2.0.7 RC';
                    
38		if($lng_name == 'auto'){
                    
39			include('lang/list.php');
                    
40			$this->langs = &$langs;
                    
50		}
                    
51		if(file_exists("lang/lng_{$lng_name}.php")) include("lang/lng_{$lng_name}.php");
                    
52		else include("lang/lng_en.php");
                    
129										break;
                    
130						default:		$file = 'auth_' . $a . '.php';
                    
131										if(!file_exists($file)) continue;
                    
155				$this->lng_list = '<option value="auto">- auto -</opinion>';
                    
156				if(!isset($this->langs)) {include('lang/list.php');$this->langs = &$langs;}
                    
157				foreach($this->langs AS $k => $v){
                    
                
admin_libs.php http://kv-webme.googlecode.com/svn/trunk/ | PHP | 655 lines
                    
1<?php
                    
2/**
                    
4	*
                    
5	* PHP version 5.2
                    
6	*
                    
61	//   and redirects those images to pre-resized versions held elsewhere
                    
62	preg_match_all('/<img [^>]*>/im', $src, $matches);
                    
63	if (!count($matches)) {
                    
142	// replace resized images with their originals
                    
143	$count=preg_match_all(
                    
144		'#/f/.files/image_resizes/(@_@[^"]*)(/[^"]*)"#',
                    
250	return $external
                    
251		.'<script src="/ww.admin/js.php/'.$md5.'"></script>'
                    
252		.$inline;
                    
                
mysql.engine.php http://snowcms.googlecode.com/svn/trunk/ | PHP | 555 lines
                    
1<?php
                    
2////////////////////////////////////////////////////////////////////////////
                    
222			// Find all the variables.
                    
223			preg_match_all('~{[\w-]+:\w+}~', $db_query, $matches);
                    
224
                    
                
SSTemplateParser.php.inc git://github.com/silverstripe/sapphire.git | PHP | 1237 lines
                    
14
                    
15	php ../thirdparty/php-peg/cli.php SSTemplateParser.php.inc > SSTemplateParser.php
                    
16
                    
36	$base = dirname(__FILE__);
                    
37	require_once($base.'/../thirdparty/php-peg/Parser.php');
                    
38}
                    
229	function Template_STR(&$res, $sub) {
                    
230		$res['php'] .= $sub['php'] . PHP_EOL ;
                    
231	}
                    
334	function Translate_InjectionVariables(&$res, $sub) {
                    
335		$res['php'] .= ",$sub[php]";
                    
336	}
                    
354	function InjectionVariables__finalise(&$res) {
                    
355		if (substr($res['php'], -1) == ',') $res['php'] = substr($res['php'], 0, -1); //remove last comma in the array
                    
356		$res['php'] .= ')';
                    
                
SSTemplateParser.php git://github.com/silverstripe/sapphire.git | PHP | 4794 lines
                    
1<?php
                    
2
                    
11if (defined(THIRDPARTY_PATH)) {
                    
12	require_once(THIRDPARTY_PATH . '/php-peg/Parser.php');
                    
13}
                    
15	$base = dirname(__FILE__);
                    
16	require_once($base.'/../thirdparty/php-peg/Parser.php');
                    
17}
                    
31
                    
32		preg_match_all('/\r\n|\r|\n/', $prior, $matches);
                    
33		$line = count($matches[0])+1;
                    
45  * The $result array that is built up as part of the parsing (see thirdparty/php-peg/README.md for more on how
                    
46  * parsers build results) has one special member, 'php', which contains the php equivalent of that part of the
                    
47  * template tree.
                    
116		$res = parent::construct($matchrule, $name, $arguments);
                    
117		if (!isset($res['php'])) $res['php'] = '';
                    
118		return $res;
                    
                
compiler.php git://github.com/forkcms/forkcms.git | PHP | 1046 lines
                    
188
                    
189			// strip php code
                    
190			$this->content = $this->stripCode($this->content);
                    
363					{
                    
364						?><form accept-charset="UTF-8" action="<?php echo $this->forms[\'' . $name . '\']->getAction(); ?>" method="<?php echo $this->forms[\'' . $name . '\']->getMethod(); ?>"<?php echo $this->forms[\'' . $name . '\']->getParametersHTML(); ?>>
                    
365						<?php echo $this->forms[\'' . $name . '\']->getField(\'form\')->parse();
                    
367						{
                    
368							?><input type="hidden" name="form_token" id="<?php echo $this->forms[\'' . $name . '\']->getField(\'form_token\')->getAttribute(\'id\'); ?>" value="<?php echo $this->forms[\'' . $name . '\']->getField(\'form_token\')->getValue(); ?>" />
                    
369						<?php } ?>';
                    
377					{
                    
378						?><form action="<?php echo $this->forms[\'' . $name . '\']->getAction(); ?>" method="<?php echo $this->forms[\'' . $name . '\']->getMethod(); ?>"<?php echo $this->forms[\'' . $name . '\']->getParametersHTML(); ?>>
                    
379						<?php echo $this->forms[\'' . $name . '\']->getField(\'form\')->parse();
                    
381						{
                    
382							?><input type="hidden" name="form_token" id="<?php echo $this->forms[\'' . $name . '\']->getField(\'form_token\')->getAttribute(\'id\'); ?>" value="<?php echo $this->forms[\'' . $name . '\']->getField(\'form_token\')->getValue(); ?>" />
                    
383						<?php } ?>';
                    
                
common.php http://kwestion.googlecode.com/svn/trunk/ | PHP | 447 lines
                    
1<?php
                    
2
                    
2
                    
3require_once 'config.php';
                    
4
                    
5function user_oauth() {
                    
6	require_once 'OAuth.php';
                    
7	session_start();
                    
30function user_oauth_sign(&$url, &$args = false) {
                    
31	require_once 'OAuth.php';
                    
32	$method = $args !== false ? 'POST' : 'GET';
                    
33
                    
34	if (preg_match_all('#[?&]([^=]+)=([^&]+)#', $url, $matches, PREG_SET_ORDER)) {
                    
35		foreach ($matches as $match){$args[$match[1]] = $match[2];}
                    
160function oAuthRequest($url, $method, $parameters , $multi = false) {
                    
161	require_once 'OAuth.php';
                    
162
                    
                
gw_search.php http://glossword.googlecode.com/svn/trunk/ | PHP | 396 lines
                    
1<?php
                    
2/**
                    
64	/* */
                    
65	preg_match_all( "/./u", $s, $ar );
                    
66	$ar = $ar[0];
                    
71		/* Use values as key */
                    
72		/* PHP-bug: sometimes a string keys becomes interger */
                    
73		$ar_c_crc[$v] = sprintf( "%u", crc32( $v ) );
                    
130
                    
131	#require_once( JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php' );
                    
132	
                    
159	
                    
160	require_once( $ar_cfg['path_core_abs'].'/gw_config.php' );
                    
161	
                    
175	/* */
                    
176	include_once( ${$o}->V->path_includes.'/class.case.php' );
                    
177	${$o}->oCase = new gwv_casemap;
                    
                
inc_archives_functions.php http://jqbird.googlecode.com/svn/trunk/ | PHP | 451 lines
                    
1<?php
                    
2if(!defined('DEDEMEMBER')) exit('dedecms');
                    
2if(!defined('DEDEMEMBER')) exit('dedecms');
                    
3require_once(DEDEINC.'/image.func.php');
                    
4require_once(DEDEINC.'/archives.func.php');
                    
4require_once(DEDEINC.'/archives.func.php');
                    
5require_once(DEDEINC."/userlogin.class.php");
                    
6
                    
14	global $cfg_multi_site,$cfg_basehost,$ddmaxwidth,$cfg_basedir,$pagestyle,$cfg_mb_rmdown,$title,$cfg_ml,$cfg_user_dir;
                    
15	include_once(DEDEINC."/dedecollection.func.php");
                    
16	if(empty($ddmaxwidth)) $ddmaxwidth = 240;
                    
19	$img_array = array();
                    
20	preg_match_all("/(src|SRC)=[\"|'| ]{0,}(http:\/\/([^>]*)\.(gif|jpg|png))/isU",$body,$img_array);
                    
21	$img_array = array_unique($img_array[2]);
                    
222	global $cfg_makeindex,$cfg_basedir,$cfg_templets_dir,$cfg_df_style;
                    
223	include_once(DEDEINC.'/arc.archives.class.php');
                    
224	if($ismakesign)
                    
                
inc_archives_functions.php http://jqbird.googlecode.com/svn/trunk/ | PHP | 760 lines
                    
1<?php
                    
2require_once(DEDEINC.'/dedehttpdown.class.php');
                    
2require_once(DEDEINC.'/dedehttpdown.class.php');
                    
3require_once(DEDEINC.'/image.func.php');
                    
4require_once(DEDEINC.'/archives.func.php');
                    
4require_once(DEDEINC.'/archives.func.php');
                    
5require_once(DEDEINC.'/arc.partview.class.php');
                    
6$backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '';
                    
9{
                    
10	require_once(DEDEINC.'/customfields.func.php');
                    
11}
                    
16	global $cfg_basedir,$pagestyle,$cuserLogin,$cfg_addon_savetype;
                    
17	require_once(DEDEINC.'/dedecollection.func.php');
                    
18	if(empty($cfg_ddimg_width))	$cfg_ddimg_width = 320;
                    
23	$img_array = array();
                    
24	preg_match_all("/(src)=[\"|'| ]{0,}(http:\/\/([^>]*)\.(gif|jpg|png))/isU",$body,$img_array);
                    
25	$img_array = array_unique($img_array[2]);
                    
                
jacked_markovGenerator.php http://poordecisions.googlecode.com/svn/web/PoorDecisions/trunk/ | PHP | 558 lines
                    
1<?php
                    
2
                    
29	 * @copyright	2008 Rob Tinsley
                    
30	 * @license	http://www.opensource.org/licenses/mit-license.php	MIT License
                    
31	 * @link	http://www.bitari.com/
                    
291				$stuff = mb_strtolower( $stuff, 'UTF-8' );
                    
292				preg_match_all( "/(?<=[^'\p{L}_\p{N}.]|\s')[\p{L}]+(?=[^'\p{L}_\p{N}.]|\.[^\p{L}_\p{N}])/iu", " $stuff ", $words );
                    
293			} else {
                    
297				$stuff = strtolower( $stuff );
                    
298				preg_match_all( "/(?<=[^'a-z_0-9.]|\s')[a-z]+(?=[^'a-z_0-9.]|\.[^a-z_0-9])/i", " $stuff ", $words );
                    
299			}
                    
                
common.inc.php http://nblog-thinkphp.googlecode.com/svn/trunk/ | PHP | 939 lines
                    
188function get_config($rewrite = false) {
                    
189	$php_self = addslashes(htmlspecialchars($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']));
                    
190	$path = ROOT_PATH.STATIC_CACHES_DIR;
                    
283            if(!is_dir($dir))  mkdir($dir);
                    
284            return file_put_contents($filename,"<?php\n//nblog cache file\n//Created on " . date('Y-m-d H:i:s',time()) . "\n\nif (!defined('IN_BLOG')) exit('Hacking attempt');\n\n\$data = ".var_export($value,true)."\n?>");
                    
285        }
                    
319
                    
320    $str = str_replace(array('&lt;?php', '?&gt;',  '\\'), array('phptagopen', 'phptagclose', 'backslashtmp'), $str);
                    
321
                    
322    // The highlight_string function requires that the text be surrounded
                    
323    // by PHP tags.  Since we don't know if A) the submitted text has PHP tags,
                    
324    // or B) whether the PHP tags enclose the entire string, we will add our
                    
344    // Replace our markers back to PHP tags.
                    
345    $str = str_replace(array('phptagopen', 'phptagclose', 'backslashtmp'), array('&lt;?php', '?&gt;', '\\'), $str); //<?
                    
346    $line   =   explode("<br />", rtrim(ltrim($str,'<code>'),'</code>'));
                    
                
CssMin.php http://cssmin.googlecode.com/svn/trunk/ | PHP | 35 lines
                    
1<?php
                    
2/**
                    
30 * @copyright	2008 - 2011 Joe Scylla <joe.scylla@gmail.com>
                    
31 * @license		http://opensource.org/licenses/mit-license.php MIT License
                    
32 * @version		3.0.1
                    
33 */
                    
34 abstract class aCssToken { abstract public function __toString(); } abstract class aCssRulesetStartToken extends aCssToken { } abstract class aCssRulesetEndToken extends aCssToken { public function __toString() { return "}"; } } abstract class aCssParserPlugin { protected $configuration = array(); protected $parser = null; protected $buffer = ""; public function __construct(CssParser $parser, array $configuration = null) { $this->configuration = $configuration; $this->parser = $parser; } abstract public function getTriggerChars(); abstract public function getTriggerStates(); abstract public function parse($index, $char, $previousChar, $state); } abstract class aCssMinifierPlugin { protected $configuration = array(); protected $minifier = null; public function __construct(CssMinifier $minifier, array $configuration = array()) { $this->configuration = $configuration; $this->minifier = $minifier; } abstract public function apply(aCssToken &$token); abstract public function getTriggerTokens(); } abstract class aCssMinifierFilter { protected $configuration = array(); protected $minifier = null; public function __construct(CssMinifier $minifier, array $configuration = array()) { $this->configuration = $configuration; $this->minifier = $minifier; } abstract public function apply(array &$tokens); } abstract class aCssFormatter { protected $indent = "    "; protected $padding = 0; protected $tokens = array(); public function __construct(array $tokens, $indent = null, $padding = null) { $this->tokens = $tokens; $this->indent = !is_null($indent) ? $indent : $this->indent; $this->padding = !is_null($padding) ? $padding : $this->padding; } abstract public function __toString(); } abstract class aCssDeclarationToken extends aCssToken { public $IsImportant = false; public $IsLast = false; public $Property = ""; public $Value = ""; public function __construct($property, $value, $isImportant = false, $isLast = false) { $this->Property = $property; $this->Value = $value; $this->IsImportant = $isImportant; $this->IsLast = $isLast; } public function __toString() { return $this->Property . ":" . $this->Value . ($this->IsImportant ? " !important" : "") . ($this->IsLast ? "" : ";"); } } abstract class aCssAtBlockStartToken extends aCssToken { } abstract class aCssAtBlockEndToken extends aCssToken { public function __toString() { return "}"; } } class CssWhitesmithsFormatter extends aCssFormatter { public function __toString() { $r = array(); $level = 0; for ($i = 0, $l = count($this->tokens); $i < $l; $i++) { $token = $this->tokens[$i]; $class = get_class($token); $indent = str_repeat($this->indent, $level); if ($class === "CssCommentToken") { $lines = array_map("trim", explode("\n", $token->Comment)); for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++) { $r[] = $indent . (substr($lines[$ii], 0, 1) == "*" ? " " : "") . $lines[$ii]; } } elseif ($class === "CssAtCharsetToken") { $r[] = $indent . "@charset " . $token->Charset . ";"; } elseif ($class === "CssAtFontFaceStartToken") { $r[] = $indent . "@font-face"; $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class === "CssAtImportToken") { $r[] = $indent . "@import " . $token->Import . " " . implode(", ", $token->MediaTypes) . ";"; } elseif ($class === "CssAtKeyframesStartToken") { $r[] = $indent . "@keyframes \"" . $token->Name . "\""; $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class === "CssAtMediaStartToken") { $r[] = $indent . "@media " . implode(", ", $token->MediaTypes); $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class === "CssAtPageStartToken") { $r[] = $indent . "@page"; $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class === "CssAtVariablesStartToken") { $r[] = $indent . "@variables " . implode(", ", $token->MediaTypes); $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class === "CssRulesetStartToken" || $class === "CssAtKeyframesRulesetStartToken") { $r[] = $indent . implode(", ", $token->Selectors); $r[] = $this->indent . $indent . "{"; $level++; } elseif ($class == "CssAtFontFaceDeclarationToken" || $class === "CssAtKeyframesRulesetDeclarationToken" || $class === "CssAtPageDeclarationToken" || $class == "CssAtVariablesDeclarationToken" || $class === "CssRulesetDeclarationToken" ) { $declaration = $indent . $token->Property . ": "; if ($this->padding) { $declaration = str_pad($declaration, $this->padding, " ", STR_PAD_RIGHT); } $r[] = $declaration . $token->Value . ($token->IsImportant ? " !important" : "") . ";"; } elseif ($class === "CssAtFontFaceEndToken" || $class === "CssAtMediaEndToken" || $class === "CssAtKeyframesEndToken" || $class === "CssAtKeyframesRulesetEndToken" || $class === "CssAtPageEndToken" || $class === "CssAtVariablesEndToken" || $class === "CssRulesetEndToken" ) { $r[] = $indent . "}"; $level--; } } return implode("\n", $r); } } class CssVariablesMinifierPlugin extends aCssMinifierPlugin { private $reMatch = "/var\((.+)\)/iSU"; private $variables = null; public function getVariables() { return $this->variables; } public function apply(aCssToken &$token) { if (stripos($token->Value, "var") !== false && preg_match_all($this->reMatch, $token->Value, $m)) { $mediaTypes = $token->MediaTypes; if (!in_array("all", $mediaTypes)) { $mediaTypes[] = "all"; } for ($i = 0, $l = count($m[0]); $i < $l; $i++) { $variable = trim($m[1][$i]); foreach ($mediaTypes as $mediaType) { if (isset($this->variables[$mediaType], $this->variables[$mediaType][$variable])) { $token->Value = str_replace($m[0][$i], $this->variables[$mediaType][$variable], $token->Value); continue 2; } } CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": No value found for variable <code>" . $variable . "</code> in media types <code>" . implode(", ", $mediaTypes) . "</code>", (string) $token)); $token = new CssNullToken(); return true; } } return false; } public function getTriggerTokens() { return array ( "CssAtFontFaceDeclarationToken", "CssAtPageDeclarationToken", "CssRulesetDeclarationToken" ); } public function setVariables(array $variables) { $this->variables = $variables; } } class CssVariablesMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $variables = array(); $defaultMediaTypes = array("all"); $mediaTypes = array(); $remove = array(); for($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) === "CssAtVariablesStartToken") { $remove[] = $i; $mediaTypes = (count($tokens[$i]->MediaTypes) == 0 ? $defaultMediaTypes : $tokens[$i]->MediaTypes); foreach ($mediaTypes as $mediaType) { if (!isset($variables[$mediaType])) { $variables[$mediaType] = array(); } } for($i = $i; $i < $l; $i++) { if (get_class($tokens[$i]) === "CssAtVariablesDeclarationToken") { foreach ($mediaTypes as $mediaType) { $variables[$mediaType][$tokens[$i]->Property] = $tokens[$i]->Value; } $remove[] = $i; } elseif (get_class($tokens[$i]) === "CssAtVariablesEndToken") { $remove[] = $i; break; } } } } foreach($variables as $mediaType => $null) { foreach($variables[$mediaType] as $variable => $value) { if (stripos($value, "var") !== false && preg_match_all("/var\((.+)\)/iSU", $value, $m)) { for ($i = 0, $l = count($m[0]); $i < $l; $i++) { $variables[$mediaType][$variable] = str_replace($m[0][$i], (isset($variables[$mediaType][$m[1][$i]]) ? $variables[$mediaType][$m[1][$i]] : ""), $variables[$mediaType][$variable]); } } } } foreach ($remove as $i) { $tokens[$i] = null; } if (!($plugin = $this->minifier->getPlugin("CssVariablesMinifierPlugin"))) { CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin <code>CssVariablesMinifierPlugin</code> was not found but is required for <code>" . __CLASS__ . "</code>")); } else { $plugin->setVariables($variables); } return count($remove); } } class CssUrlParserPlugin extends aCssParserPlugin { public function getTriggerChars() { return array("(", ")"); } public function getTriggerStates() { return false; } public function parse($index, $char, $previousChar, $state) { if ($char === "(" && strtolower(substr($this->parser->getSource(), $index - 3, 4)) === "url(" && $state !== "T_URL") { $this->parser->pushState("T_URL"); $this->parser->setExclusive(__CLASS__); } elseif ($char === "\n" && $previousChar === "\\" && $state === "T_URL") { $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2)); } elseif ($char === "\n" && $previousChar !== "\\" && $state === "T_URL") { $line = $this->parser->getBuffer(); $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . ")"); $this->parser->popState(); $this->parser->unsetExclusive(); CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated string literal", $line . "_")); } elseif ($char === ")" && $state === "T_URL") { $this->parser->popState(); $this->parser->unsetExclusive(); } else { return false; } return true; } } class CssStringParserPlugin extends aCssParserPlugin { private $delimiterChar = null; public function getTriggerChars() { return array("\"", "'", "\n"); } public function getTriggerStates() { return false; } public function parse($index, $char, $previousChar, $state) { if (($char === "\"" || $char === "'") && $state !== "T_STRING") { $this->delimiterChar = $char; $this->parser->pushState("T_STRING"); $this->parser->setExclusive(__CLASS__); } elseif ($char === "\n" && $previousChar === "\\" && $state === "T_STRING") { $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2)); } elseif ($char === "\n" && $previousChar !== "\\" && $state === "T_STRING") { $line = $this->parser->getBuffer(); $this->parser->popState(); $this->parser->unsetExclusive(); $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . $this->delimiterChar); CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated string literal", $line . "_")); $this->delimiterChar = null; } elseif ($char === $this->delimiterChar && $state === "T_STRING") { if ($previousChar == "\\") { $source = $this->parser->getSource(); $c = 1; $i = $index - 2; while (substr($source, $i, 1) === "\\") { $c++; $i--; } if ($c % 2) { return false; } } $this->parser->popState(); $this->parser->unsetExclusive(); $this->delimiterChar = null; } else { return false; } return true; } } class CssSortRulesetPropertiesMinifierFilter extends aCssMinifierFilter { public function apply(array &$tokens) { $r = 0; for ($i = 0, $l = count($tokens); $i < $l; $i++) { if (get_class($tokens[$i]) !== "CssRulesetStartToken") { continue; } $endIndex = false; for ($ii = $i + 1; $ii < $l; $ii++) { if (get_class($tokens[$ii]) !== "CssRulesetEndToken") { continue; } $endIndex = $ii; break; } if (!$endIndex) { break; } $startIndex = $i; $i = $endIndex; if ($endIndex - $startIndex <= 2) { continue; } for ($ii = $startIndex + 1; $ii < $endIndex; $ii++) { if (get_class($tokens[$ii]) !== "CssRulesetDeclarationToken") { continue(2); } } $declarations = array_slice($tokens, $startIndex + 1, $endIndex - $startIndex - 1); $sortRequired = $lastPropertyName = false; foreach ($declarations as $declaration) { if ($lastPropertyName) { if (strcmp($lastPropertyName, $declaration->Property) > 0) { $sortRequired = true; break; } } $lastPropertyName = $declaration->Property; } if (!$sortRequired) { continue; } usort($declarations, array(__CLASS__, "userDefinedSort1")); for ($ii = 0, $ll = count($declarations) - 1; $ii <= $ll; $ii++) { if ($ii == $ll) { $declarations[$ii]->IsLast = true; } else { $declarations[$ii]->IsLast = false; } } array_splice($tokens, $startIndex + 1, $endIndex - $startIndex - 1, $declarations); $r += $endIndex - $startIndex - 1; } return $r; } public static function userDefinedSort1($a, $b) { return strcmp($a->Property, $b->Property); } } class CssRulesetStartToken extends aCssRulesetStartToken { public $Selectors = array(); public function __construct(array $selectors = array()) { $this->Selectors = $selectors; } public function __toString() { return implode(",", $this->Selectors) . "{"; } } class CssRulesetParserPlugin extends aCssParserPlugin { public function getTriggerChars() { return array(",", "{", "}", ":", ";"); } public function getTriggerStates() { return array("T_DOCUMENT", "T_AT_MEDIA", "T_RULESET::SELECTORS", "T_RULESET", "T_RULESET_DECLARATION"); } private $selectors = array(); public function parse($index, $char, $previousChar, $state) { if ($char === "," && ($state === "T_DOCUMENT" || $state === "T_AT_MEDIA" || $state === "T_RULESET::SELECTORS")) { if ($state !== "T_RULESET::SELECTORS") { $this->parser->pushState("T_RULESET::SELECTORS"); } $this->selectors[] = $this->parser->getAndClearBuffer(",{"); } elseif ($char === "{" && ($state === "T_DOCUMENT" || $state === "T_AT_MEDIA" || $state === "T_RULESET::SELECTORS")) { if ($this->parser->getBuffer() !== "") { $this->selectors[] = $this->parser->getAndClearBuffer(",{"); if ($state == "T_RULESET::SELECTORS") { $this->parser->popState(); } $this->parser->pushState("T_RULESET"); $this->parser->appendToken(new CssRulesetStartToken($this->selectors)); $this->selectors = array(); } } elseif ($char === ":" && $state === "T_RULESET") { $this->parser->pushState("T_RULESET_DECLARATION"); $this->buffer = $this->parser->getAndClearBuffer(":;", true); } elseif ($char === ":" && $state === "T_RULESET_DECLARATION") { if ($this->buffer === "filter") { return false; } CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_")); } elseif (($char === ";" || $char 
                    
                
MTUtil.php https://code.google.com/p/movabletype/ | PHP | 1690 lines
                    
1<?php
                    
2# Movable Type (r) Open Source (C) 2001-2010 Six Apart, Ltd.
                    
5#
                    
6# $Id: MTUtil.php 5151 2010-01-06 07:51:27Z takayama $
                    
7
                    
167function substr_wref($str, $start, $length) {
                    
168    if (preg_match_all('/(&[^;]*;|.)/', $str, $character_entities)) {
                    
169        return implode('', array_slice($character_entities[0], $start, $length));
                    
                
keywordRank.class.php http://viet-group.googlecode.com/svn/trunk/ | PHP | 209 lines
                    
1<?php
                    
2
                    
31    {
                    
32        include ( NV_ROOTDIR . "/includes/class/geturl.class.php" );
                    
33    }
                    
110            unset( $links );
                    
111            preg_match_all( '/\<h3\s+class\=\"?r[^\>]*\>[^\<]*\<a\s+href\s?\=\s?\"([^\"]+)\"[^\>]*>/', $content, $links );
                    
112            if ( ! empty( $links[1] ) ) $result['top10MyPages'] = $links[1];
                    
132            unset( $links );
                    
133            preg_match_all( '/\<h3\s+class\=\"?r[^\>]*\>[^\<]*\<a\s+href\s?\=\s?\"((http(s?))[^\"]+)\"[^\>]*>/', $content, $links );
                    
134            if ( ! empty( $links[1] ) ) $result['top50AllPages'] = array_merge( $result['top50AllPages'], $links[1] );
                    
                
namespacify.php git://github.com/phpbb/phpbb.git | PHP | 194 lines
                    
1<?php
                    
2/**
                    
3*
                    
4* This file is part of the phpBB Forum Software package.
                    
5*
                    
5*
                    
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
                    
7* @license GNU General Public License, version 2 (GPL-2.0)
                    
22
                    
23$namespace_dir = realpath(__DIR__ . '/../phpbb/');
                    
24$code_dir = realpath(__DIR__ . '/../');
                    
124
                    
125		if (preg_match_all('#[^a-z0-9_$](phpbb_[a-z0-9_]+)#', $code, $matches))
                    
126		{
                    
178
                    
179		if (preg_match_all('#\s*class:\s*(phpbb_[a-z0-9_]+)\s+#', $code, $matches))
                    
180		{
                    
                
check_parameters.php git://github.com/infusion/PHP.git | PHP | 373 lines
                    
7  +----------------------------------------------------------------------+
                    
8  | This source file is subject to version 3.01 of the PHP license,      |
                    
9  | that is bundled with this package in the file LICENSE, and is        |
                    
10  | available through the world-wide-web at the following url:           |
                    
11  | http://www.php.net/license/3_01.txt                                  |
                    
12  | If you did not receive a copy of the PHP license and are unable to   |
                    
27
                    
28// be sure you have enough memory and stack for PHP. pcre will push the limits!
                    
29ini_set('pcre.backtrack_limit', 10000000);
                    
311
                    
312		$split = preg_split('/PHP_(?:NAMED_)?(?:FUNCTION|METHOD)\s*\((\w+(?:,\s*\w+)?)\)/S', $txt, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE);
                    
313
                    
346Synopsis:
                    
347    php check_parameters.php [directories]
                    
348
                    
                
meta.php http://zhxiaojm.googlecode.com/svn/trunk/ | PHP | 100 lines
                    
1<?php
                    
2$hu = 'meta';
                    
24	$pat4  = "/meta name=\"keywords\" content=\"(.+)\"/Ui";
                    
25	preg_match_all($pat2, $content, $array2);
                    
26	preg_match_all($pat4, $content, $array4);	
                    
41	}
                    
42	writeover("cache/cache.php","<?php\r\n\$urls=".vvar_export($urls).";\r\n?>");
                    
43}
                    
66<tr><td width="20%">??</td><td width="15%">????</td><td width="45%">??</td><td width="20%">????</td></tr>
                    
67<tr><td>???Title?</td><td><?php echo $t;?>???</td><td>&nbsp;<?php echo $title;?></td><td>?????80???</td></tr>
                    
68<tr><td>????KeyWords?</td><td><?php echo $k;?>???</td><td>&nbsp;<?php echo $keywords;?></td><td>?????100???</td></tr>
                    
68<tr><td>????KeyWords?</td><td><?php echo $k;?>???</td><td>&nbsp;<?php echo $keywords;?></td><td>?????100???</td></tr>
                    
69<tr><td>???Description?</td><td><?php echo $d;?>???</td><td>&nbsp;<?php echo $description;?></td><td>?????200???</td></tr>
                    
70</table><br />
                    
99</div>
                    
100<?php @require_once('foot.php');?>
                    
                
sfWebController.class.php http://opac-sbweb.googlecode.com/svn/trunk/ | PHP | 193 lines
                    
1<?php
                    
2
                    
18 * @author     Sean Kerr <sean@code-box.org>
                    
19 * @version    SVN: $Id: sfWebController.class.php 13026 2008-11-16 16:50:51Z fabien $
                    
20 */
                    
143    {
                    
144      $matched = preg_match_all('/
                    
145        ([^&=]+)            # key
                    
                
ezyfile.net_member.php http://rapidleech36b.googlecode.com/svn/trunk/ | PHP | 105 lines
                    
26</form>
                    
27<?php
                    
28}
                    
37<div id=login width=100% align=center>Login to ezyfile.net</div>
                    
38<?php
                    
39			$post['op'] = "login" ;
                    
47			is_notpresent($page, 'HTTP/1.1 302 Moved', 'Error logging in - are your logins correct? First');
                    
48			preg_match_all('/Set-Cookie: (.*);/U',$page,$temp);
                    
49			$cookie = $temp[1];
                    
57<div id=info width=100% align=center>Retrive upload ID</div>
                    
58<?php
                    
59	$ref='http://ezyfile.net/';
                    
                
class.s3.php git://github.com/jylinman/kohana-aws.git | PHP | 331 lines
                    
1<?PHP
                    
2    // This is a fresh rewrite of the previous S3 class using PHP 5.
                    
2    // This is a fresh rewrite of the previous S3 class using PHP 5.
                    
3    // All transfers are done using PHP's native curl extension rather
                    
4    // than piping everything to the command line as before. (That was
                    
6    // as well. If you'd like to access the previous version, you may do
                    
7    // so here: http://code.google.com/p/php-aws/source/browse/branches/original-stable/
                    
8
                    
171
                    
172            preg_match_all('/^(\S*?): (.*?)$/ms', $result, $matches);
                    
173            $info = array();
                    
282
                    
283        // Algorithm adapted (stolen) from http://pear.php.net/package/Crypt_HMAC/)
                    
284        private function hasher($data)
                    
                
qa-htmLawed.php git://github.com/q2a/question2answer.git | PHP | 711 lines
                    
1<?php
                    
2
                    
6LGPL v3 license
                    
7A PHP Labware internal utility; www.bioinformatics.org/phplabware/internal_utilities/htmLawed
                    
8
                    
28 if(isset($x[1])){
                    
29  preg_match_all('`(?:^|-|\+)[^\-+]+?(?=-|\+|$)`', $x, $m, PREG_SET_ORDER);
                    
30  for($i=count($m); --$i>=0;){$m[$i] = $m[$i][0];}
                    
                
Form_validation.php git://github.com/imagecms/ImageCMS.git | PHP | 1383 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 *
                    
115		// into its components so that we can fetch the corresponding POST data later
                    
116		if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
                    
117		{
                    
118			// Note: Due to a bug in current() that affects some versions
                    
119			// of PHP we can not pass function call directly into it
                    
120			$x = explode('[', $field);
                    
615				{
                    
616					// If our own wrapper function doesn't exist we see if a native PHP function does.
                    
617					// Users can use any native PHP function call that has one param.
                    
                
lang.bg.php git://pkgs.fedoraproject.org/php-pear-Numbers-Words | PHP | 521 lines
                    
11 * available at through the world-wide-web at
                    
12 * http://www.php.net/license/3_01.txt
                    
13 * If you did not receive a copy of the PHP license and are unable to
                    
14 * obtain it through the world-wide-web, please send a note to
                    
15 * license@php.net so we can mail you a copy immediately.
                    
16 *
                    
19 * @author   Kouber Saparev <kouber@php.net>
                    
20 * @license  PHP 3.01 http://www.php.net/license/3_01.txt
                    
21 * @version  SVN: $Id$
                    
27 */
                    
28require_once "Numbers/Words.php";
                    
29
                    
35 * @author   Kouber Saparev <kouber@php.net>
                    
36 * @license  PHP 3.01 http://www.php.net/license/3_01.txt
                    
37 * @link     http://pear.php.net/package/Numbers_Words
                    
                
bibtex.php git://git.savannah.nongnu.org/biborb.git | PHP | 797 lines
                    
1<?php
                    
2/**
                    
22/**
                    
23 * File: bibtex.php
                    
24 *
                    
34
                    
35class_exists('PARSEENTRIES')   || include('./php/third_party/bibtexParse/PARSEENTRIES.php');
                    
36class_exists('PARSECREATORS')  || include('./php/third_party/bibtexParse/PARSECREATORS.php');
                    
143        // match all bibtex entries
                    
144        preg_match_all("/<bibtex:entry id=['|\"](.*)['|\"]>(.*)<\/bibtex:entry>/U", $aXml, $aEntries, PREG_PATTERN_ORDER);
                    
145
                    
162            {
                    
163                preg_match_all("/<bibtex:group>(.*)<\/bibtex:group>/U", $aGroups[1], $aGroup);
                    
164                $aBibtexData['groups'] = implode(',',$aGroup[1]);
                    
168            // analyse all remaining fields
                    
169            preg_match_all("/<bibtex:(.[^>]*)>(.*)<\/bibtex:(.[^>]*)>/U", $aBibtexFields, $aFields);
                    
170            // analyse each fields
                    
                
AbstractControllerTestCase.php git://github.com/zendframework/zf2.git | PHP | 712 lines
                    
1<?php
                    
2/**
                    
8 */
                    
9namespace Zend\Test\PHPUnit\Controller;
                    
10
                    
10
                    
11use PHPUnit_Framework_TestCase;
                    
12use PHPUnit_Framework_ExpectationFailedException;
                    
22
                    
23abstract class AbstractControllerTestCase extends PHPUnit_Framework_TestCase
                    
24{
                    
210        if ($this->useConsoleRequest) {
                    
211            preg_match_all('/(--\S+[= ]"[^\s"]*\s*[^\s"]*")|(--\S+=\S+|--\S+\s\S+|\S+)/', $url, $matches);
                    
212            $params = str_replace(array(' "', '"'), array('=', ''), $matches[0]);
                    
350        if ($list) {
                    
351            throw new PHPUnit_Framework_ExpectationFailedException(
                    
352                sprintf('Several modules are not loaded "%s"', implode(', ', $list))
                    
                
MysqlMetadata.php git://github.com/zendframework/zf2.git | PHP | 494 lines
                    
1<?php
                    
2/**
                    
143                $permittedValues = $matches[1];
                    
144                if (preg_match_all("/\\s*'((?:[^']++|'')*+)'\\s*(?:,|\$)/", $permittedValues, $matches, PREG_PATTERN_ORDER)) {
                    
145                    $permittedValues = str_replace("''", "'", $matches[1]);
                    
                
friendlink.php http://zhxiaojm.googlecode.com/svn/trunk/ | PHP | 169 lines
                    
51include_once('qqwry.php');
                    
52@include_once('../ip/ip.php');
                    
53@require_once('../header.php');
                    
61	}
                    
62	writeover("../cache/cache.php","<?php\r\n\$urls=".vvar_export($urls).";\r\n?>");
                    
63}
                    
117          <table border="1" width="100%" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0" bordercolorlight="#BBD7E6">
                    
118<tr bgcolor="#ECF5FB"><td align="left">???????:<?php echo "http://".$domain?>&nbsp;&nbsp;&nbsp;<?php echo $wip;?></td></tr>
                    
119</table>
                    
126<tr>
                    
127<td><span id="j<?php echo $j+1;?>"><?php echo $j+1;?></span></td>
                    
128<td><span id="ati<?php echo $j+1;?>"><?php echo $ati[$j];?></span></td>
                    
128<td><span id="ati<?php echo $j+1;?>"><?php echo $ati[$j];?></span></td>
                    
129<td><span id="lin<?php echo $j+1;?>"><a href="<?php echo 'http://'.$ulink[$j];?>" target="_blank"><span id="lurl<?php echo $j+1;?>"><?php echo $ulink[$j];?></span></a></span></td>
                    
130<td><span id="ips<?php echo $j+1;?>"><img src="../images/loading2.gif"></span></td>
                    
168</div>
                    
169<?php @require_once('../foot.php');?>
                    
                
advanced_search_results.php http://prohits.googlecode.com/svn/trunk/ | PHP | 970 lines
                    
75
                    
76require("../common/site_permission.inc.php");
                    
77include("common_functions.inc.php");
                    
77include("common_functions.inc.php");
                    
78require("../common/common_fun.inc.php");
                    
79
                    
86
                    
87require("site_header.php");
                    
88
                    
117  //$SQL_exp and $SQL_exp_group will be used in get_exp_bait_arr()
                    
118  preg_match_all("/[0-9]+[_]([0-9]+),,/", $frm_expDetail_str, $matches);
                    
119  if($matches){
                    
                
File.php git://github.com/phpwax/phpwax.git | PHP | 747 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * @package PHP-Wax
                    
6 */
                    
167            $chunk = fread($fh, 1024 * 100); //read 100kb at a time
                    
168            $count += preg_match_all('#\x00\x21\xF9\x04.{4}\x00\x2C#s', $chunk, $matches);
                    
169        }
                    
                
cssp.php git://github.com/TurbineCSS/Turbine.git | PHP | 809 lines
                    
1<?php
                    
2
                    
83				case 'and':
                    
84					if(preg_match_all('@(\s+)(\&.|&#|&\:)@', $token, $matches)){
                    
85						$new_selector = preg_replace('@( \&)@', '', $selector); // Remove the &
                    
90				case 'numbered':
                    
91					if(preg_match_all('@(.*?)\((\d{1,})-(\d{1,})\)@', $token, $matches)){
                    
92						// Check if starting value is smaller than ending value - "div.foo(3-1)" i.e. will be ignored
                    
109				case 'generated':
                    
110					if(preg_match_all('@(.*?)\((.*?)\)($|.*?$)@', $token, $matches)){
                    
111						$exploded_selectors = explode(',', $matches[2][0]);
                    
                
response.php git://github.com/samwilson/kohana_webdb.git | PHP | 933 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
10 * @copyright  (c) 2008-2011 Kohana Team
                    
11 * @license    http://kohanaphp.com/license
                    
12 * @since      3.1.0
                    
86		// If no Cache-Control parts are detected
                    
87		if ( (bool) preg_match_all('/(?<key>[a-z\-]+)=?(?<value>\w+)?/', $cache_control, $matches))
                    
88		{
                    
                
vCard.php git://github.com/nuovo/vCard-parser.git | PHP | 689 lines
                    
1<?php
                    
2/**
                    
110			$Matches = array();
                    
111			$vCardBeginCount = preg_match_all('{^BEGIN\:VCARD}miS', $this -> RawData, $Matches);
                    
112			$vCardEndCount = preg_match_all('{^END\:VCARD}miS', $this -> RawData, $Matches);
                    
                
theme.parser.class.php http://litepublisher.googlecode.com/svn/trunk/ | PHP | 1318 lines
                    
1<?php
                    
2/**
                    
28    $this->data['replacelang'] = false;
                    
29    $this->data['removephp'] = true;
                    
30    $this->data['stylebefore'] = true;
                    
114  
                    
115  public function callback_replace_php($m) {
                    
116    return strtr($m[0], array(
                    
127  
                    
128  public function callback_restore_php($m) {
                    
129    return strtr($m[0], array(
                    
181    //replace $about.*
                    
182    if (preg_match_all('/\$about\.(\w\w*+)/', $s, $m, PREG_SET_ORDER)) {
                    
183      $a = array();
                    
294    $this->callevent('beforeparse', array($theme, &$s));
                    
295    if ($this->removephp) {
                    
296      $s = preg_replace('/\<\?.*?\?\>/ims', '', $s);
                    
                
htmlresource.class.php http://litepublisher.googlecode.com/svn/trunk/ | PHP | 873 lines
                    
1<?php
                    
2/**
                    
91    
                    
92    if (preg_match_all('/\[(editor|checkbox|text|password|combo|hidden|submit|button|calendar|upload)(:|=)(\w*+)\]/i', $s, $m, PREG_SET_ORDER)) {
                    
93      foreach ($m as $item) {
                    
                
classes.php http://gwtphp-derpc.googlecode.com/svn/trunk/ | PHP | 1488 lines
                    
391		if (!class_exists($name) && !interface_exists($name))
                    
392			throw new ClassException('php class "' . $name . '" does not exists');
                    
393		parent::__construct($name);
                    
395		if ($this->reflect->getName() !== $name)
                    
396			throw new ClassException('php class "' . $name . '" does not exists');
                    
397		$this->init();
                    
402		$doc = $this->reflect->getDocComment();
                    
403		$found = preg_match_all('/@gwtname[\s]([\w]+([.$_][\w]+)*)/', $doc, $matches, PREG_SET_ORDER);
                    
404		if ($found ==1) {
                    
422			else {
                    
423				$field = new PhpField($this, $prop);
                    
424				$decl[$prop->getName()] = $field;
                    
609
                    
610class PhpEnumClazz extends PhpClazz {
                    
611	
                    
                
render.php https://code.google.com/p/enanocms/ | PHP | 1407 lines
                    
173	/**
                    
174 	* Renders a glob of text. Note that this is PHP-safe, so if returned text (or rather, "?>" . $returned) has PHP it can be eval'ed.
                    
175 	* @param string Text to render
                    
225		// Strip out embedded PHP
                    
226		self::php_strip($text, $php_stripped);
                    
227		
                    
297		self::nowiki_unstrip($text, $nowiki_stripped);
                    
298		self::php_unstrip($text, $php_stripped);
                    
299		
                    
417	/**
                    
418 	* Strip out PHP code (to prevent it from being sent through the parser). Private because it does not do what you think it does. (The method you are looking for is strip_php.)
                    
419 	* @access private
                    
425		
                    
426		preg_match_all('#<\?(?:php)?[\s=].+?\?>#is', $text, $blocks);
                    
427		
                    
                
LangManager.php https://code.google.com/p/enanocms/ | PHP | 633 lines
                    
160								<td class="row1">
                    
161									<input type="text" name="lang_name_english" value="<?php echo htmlspecialchars($name_english); ?>" />
                    
162								</td>
                    
178								<th class="subhead" colspan="2">
                    
179									<button name="action" value="modify_language;finish=1;lang_id=<?php echo $lang_id; ?>"><?php echo $lang->get('etc_save_changes'); ?></button>
                    
180								</th>
                    
190				<h3><?php echo $lang->get('acplm_heading_edit_strings_portal'); ?></h3>
                    
191				<p><?php echo $lang->get('acplm_msg_edit_strings_portal_intro'); ?></p>
                    
192				
                    
235				<p>
                    
236					<button name="action" value="reimport;iso639=<?php echo $lang_code; ?>;lang_id=<?php echo $lang_id; ?>">
                    
237						<?php echo $lang->get('acplm_btn_reimport'); ?>
                    
373				</div>
                    
374				<?php
                    
375				echo '</form>';
                    
                
input.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 1382 lines
                    
1<?php
                    
2/**
                    
60 * {
                    
61 * $optionHandler->process( array( 'example_input.php', '-h' ) );
                    
62 * }
                    
327        }
                    
328        if (preg_match_all("/$regex/", $optionDef, $matches))
                    
329        {
                    
                
utilities.class.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 968 lines
                    
1<?php
                    
2
                    
44        $matches = array();
                    
45        preg_match_all('/(?:"([^"]+)"|""|(\S+))/', $pattern, $matches);
                    
46        $parts = array();
                    
                
phpbb2_template.class.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 477 lines
                    
1<?php
                    
2/***************************************************************************
                    
2/***************************************************************************
                    
3 * template.php
                    
4 * -------------------
                    
5 * begin                : Saturday, Feb 13, 2001
                    
6 * copyright            : (C) 2001 The phpBB Group
                    
7 * email                : support@phpbb.com
                    
8 *
                    
9 * $Id: template.php 5142 2005-05-06 20:50:13Z acydburn $
                    
10 *
                    
23/**
                    
24 * Template class. By Nathan Codding of the phpBB group.
                    
25 * The interface was originally inspired by PHPLib templates,
                    
29
                    
30class Phpbb2Template
                    
31{
                    
                
flexisearch.php http://flexicontent.googlecode.com/svn/trunk/ | PHP | 395 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version 1.0 $Id: flexisearch.php 1781 2013-10-03 02:29:51Z ggppdk $
                    
4 * @package Joomla
                    
23
                    
24require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'defineconstants.php');
                    
25
                    
25
                    
26require_once(JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');
                    
27require_once(JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'helpers'.DS.'route.php');
                    
27require_once(JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'helpers'.DS.'route.php');
                    
28require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_search'.DS.'helpers'.DS.'search.php');
                    
29
                    
29
                    
30require_once(JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'classes'.DS.'flexicontent.fields.php');
                    
31require_once(JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'classes'.DS.'flexicontent.helper.php');
                    
                
text_helper.php https://bitbucket.org/codeigniter_jp/ci-ja/ | PHP | 535 lines
                    
181	{
                    
182		if (preg_match_all('/\&#(\d+)\;/', $str, $matches))
                    
183		{
                    
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.
                    
291
                    
292		$str = str_replace(array('<?', '?>', '<%', '%>', '\\', '</script>'),
                    
293							array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'), $str);
                    
294
                    
310
                    
311		// Remove our artificially added PHP, and the syntax highlighting that came with it
                    
312		$str = preg_replace('/<span style="color: #([A-Z0-9]+)">&lt;\?php(&nbsp;| )/i', '<span style="color: #$1">', $str);
                    
316		// Replace our markers back to PHP tags.
                    
317		$str = str_replace(array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),
                    
318							array('&lt;?', '?&gt;', '&lt;%', '%&gt;', '\\', '&lt;/script&gt;'), $str);
                    
                
Blockquote.php git://github.com/s9y/Serendipity.git | PHP | 163 lines
                    
1<?php
                    
2
                    
11* 
                    
12* $Id: Blockquote.php,v 1.1 2005/01/31 15:46:52 pmjones Exp $
                    
13* 
                    
70        // matches for the various list-item elements.
                    
71        preg_match_all(
                    
72            '=^(\>+) (.*\n)=Ums',
                    
                
Session_memcached_driver.php git://github.com/ci-bonfire/Bonfire.git | PHP | 397 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
115
                    
116		if ( ! preg_match_all('#,?([^,:]+)\:(\d{1,5})(?:\:(\d+))?#', $this->_config['save_path'], $matches, PREG_SET_ORDER))
                    
117		{
                    
147
                    
148		$this->php5_validate_id();
                    
149
                    
323	{
                    
324		// PHP 7 reuses the SessionHandler object on regeneration,
                    
325		// so we need to check here if the lock key is for the
                    
                
mysqli.php git://github.com/jakubkulhan/shopaholic.git | PHP | 528 lines
                    
1<?php
                    
2
                    
11 *
                    
12 * For more information please see http://dibiphp.com
                    
13 *
                    
14 * @copyright  Copyright (c) 2005, 2009 David Grudl
                    
15 * @license    http://dibiphp.com/license  dibi license
                    
16 * @link       http://dibiphp.com
                    
17 * @package    dibi
                    
18 * @version    $Id: mysqli.php 209 2009-03-19 12:18:16Z david@grudl.com $
                    
19 */
                    
62		if (!extension_loaded('mysqli')) {
                    
63			throw new DibiDriverException("PHP extension 'mysqli' is not loaded.");
                    
64		}
                    
112			if (version_compare(PHP_VERSION , '5.1.5', '>=')) {
                    
113				// affects the character set used by mysql_real_escape_string() (was added in MySQL 5.0.7 and PHP 5.0.5, fixed in PHP 5.1.5)
                    
114				$ok = @mysqli_set_charset($this->connection, $config['charset']); // intentionally @
                    
                
Test.php git://pkgs.fedoraproject.org/php-phpunit-PHPUnit | PHP | 567 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHPUnit
                    
4 *
                    
4 *
                    
5 * Copyright (c) 2001-2012, Sebastian Bergmann <sebastian@phpunit.de>.
                    
6 * All rights reserved.
                    
36 *
                    
37 * @package    PHPUnit
                    
38 * @subpackage Util
                    
38 * @subpackage Util
                    
39 * @author     Sebastian Bergmann <sebastian@phpunit.de>
                    
40 * @copyright  2001-2012 Sebastian Bergmann <sebastian@phpunit.de>
                    
40 * @copyright  2001-2012 Sebastian Bergmann <sebastian@phpunit.de>
                    
41 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
42 * @link       http://www.phpunit.de/
                    
                
farm_builder_roles_list.php http://scalr.googlecode.com/svn/ | PHP | 247 lines
                    
6		$text = preg_replace('/(\\\%)/si', '$$scalr$$', $template);
                    
7		preg_match_all("/\%([^\%\s]+)\%/si", $text, $matches);
                    
8		return $matches[1];
                    
12    {
                    
13		require(dirname(__FILE__)."/../src/prepend.inc.php");
                    
14
                    
                
ArrayUtil.php http://rhaco.googlecode.com/svn/rhaco_1_x/trunk/ | PHP | 380 lines
                    
1<?php
                    
2Rhaco::import("lang.Variable");
                    
67		}else{
                    
68			if(preg_match_all("/.+?[^\\\],|.+?$/",$dict,$match)){
                    
69				foreach($match[0] as $arg){
                    
                
trans.php http://miranda-dev.googlecode.com/svn/trunk/ | PHP | 336 lines
                    
1<?php
                    
2
                    
153    // "Translate('...'),Translate('...')"
                    
154    if (preg_match_all('/Translate(W|WideW|AnsiW|String|WideString)?\s*\(\'(.*)\'\)/i',$line,$matches)) {
                    
155      foreach($matches[2] as $match) { add_str($match,$i); }
                    
157    // capture Translate(var)
                    
158    if (preg_match_all('/Translate(W|WideW|AnsiW|String|WideString)?\s*\((.*)\)/i',$line,$matches)) {
                    
159      foreach($matches[2] as $match) { add_prop($match,$i); }
                    
                
SmartyInternalCompilePrivatePrintExpression.class.php https://bitbucket.org/ronaldobrandini/framework.git | PHP | 157 lines
                    
1<?php
                    
2namespace core\tools\smarty\sysplugins;
                    
59            // assign output to variable
                    
60            $output = "<?php \$_smarty_tpl->assign({$_attr['assign']},{$parameter['value']});?>";
                    
61        } else {
                    
73                        foreach ($compiler->smarty->default_modifiers as $key => $single_default_modifier) {
                    
74                            preg_match_all('/(\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|:|[^:]+)/', $single_default_modifier, $mod_array);
                    
75                            for ($i = 0, $count = count($mod_array[0]);$i < $count;$i++) {
                    
124            $compiler->has_output = true;
                    
125            $output = "<?php echo {$output};?>";
                    
126        }
                    
                
GlobalFunctions.php https://code.google.com/p/alfresco-php-sdk/ | PHP | 2139 lines
                    
1<?php
                    
2
                    
21
                    
22require_once( 'LogPage.php' );
                    
23require_once( 'normal/UtfNormalUtil.php' );
                    
23require_once( 'normal/UtfNormalUtil.php' );
                    
24require_once( 'XmlFunctions.php' );
                    
25
                    
28 *
                    
29 * We more or less support PHP 5.0.x and up.
                    
30 * Re-implementations of newer functions or functions in non-standard
                    
30 * Re-implementations of newer functions or functions in non-standard
                    
31 * PHP extensions may be included here.
                    
32 */
                    
44
                    
45# UTF-8 substr function based on a PHP manual comment
                    
46if ( !function_exists( 'mb_substr' ) ) {
                    
                
installExtension.php https://code.google.com/p/alfresco-php-sdk/ | PHP | 643 lines
                    
1<?php
                    
2/**
                    
121			
                    
122			$ok = preg_match_all( '!<a\s[^>]*href\s*=\s*['."'".'"]([^/'."'".'"]+)\.tgz['."'".'"][^>]*>.*?</a>!si', $txt, $m, PREG_SET_ORDER ); 
                    
123			if ( !$ok ) {
                    
306		#TODO: allow a subdir different from "extensions"
                    
307		#TODO: allow a config file different from "LocalSettings.php"
                    
308	}
                    
326		else {
                    
327			if ( !@$this->stdin ) $this->stdin = fopen( 'php://stdin', 'r' );
                    
328			if ( !$this->stdin ) die( "Failed to open stdin for user interaction!\n" );
                    
454		$f = $this->dir . '/install.settings';
                    
455		$t = $this->target . '/LocalSettings.php';
                    
456		
                    
461			$this->warn( "No install.settings file provided!" );
                    
462			$this->tasks[] = "Please read the instructions and edit LocalSettings.php manually to activate the extension.";
                    
463			return '?';
                    
                
configgraph.class.php http://puelia-php.googlecode.com/svn/trunk/ | PHP | 981 lines
                    
1<?php
                    
2require_once 'exceptions.inc.php';
                    
2require_once 'exceptions.inc.php';
                    
3require_once 'lda.inc.php';
                    
4require_once 'lib/moriarty/moriarty.inc.php';
                    
4require_once 'lib/moriarty/moriarty.inc.php';
                    
5require_once 'graphs/pueliagraph.class.php';
                    
6require_once 'lib/moriarty/httprequestfactory.class.php';
                    
152    function add_rdf($rdf=false, $base=''){
                    
153        preg_match_all('/@prefix\s+(.+?):\s+<(.+?)>/', $rdf, $m);
                    
154        foreach($m[1] as $n => $prefix){
                    
289	}
                    
290        preg_match_all(uriTemplateVariableRegex, $template, $ms);
                    
291        $templateVariables = array();
                    
314    function getParameterTemplates($template){
                    
315        $query = parse_url($template, PHP_URL_QUERY);
                    
316        $params = queryStringToParams($query);
                    
                
TemplateParser.php http://rhaco.googlecode.com/svn/rhaco_1_x/trunk/ | PHP | 438 lines
                    
1<?php
                    
2Rhaco::import("tag.model.SimpleTag");
                    
54	function _syntaxCheck($src){
                    
55		if(preg_match_all("/(Notice|Fatal).+/",$src,$match)){
                    
56			foreach($match[0] as $key => $m) Logger::error($m);
                    
57		}
                    
58		if(preg_match_all("/({\\$|".preg_quote(TemplateParser::withNamespace("")).").+/m",$src,$match)){
                    
59			foreach($match[0] as $key => $m) Logger::warning($m);
                    
180	function _exec1006_ReplaceContent($src){
                    
181		if(preg_match_all("/<([\w:_-]+)[\s][^>]*?content[s]{0,1}=([\"\'])[^\\2]*?\\2[^>]*?>/i",$src,$tagList)){
                    
182			foreach($tagList[0] as $id => $plain){
                    
                
htmLawed.php git://pkgs.fedoraproject.org/php-htmLawed | PHP | 711 lines
                    
1<?php
                    
2
                    
6Dual licensed with LGPL 3 and GPL 2+
                    
7A PHP Labware internal utility; www.bioinformatics.org/phplabware/internal_utilities/htmLawed
                    
8
                    
28 if(isset($x[1])){
                    
29  preg_match_all('`(?:^|-|\+)[^\-+]+?(?=-|\+|$)`', $x, $m, PREG_SET_ORDER);
                    
30  for($i=count($m); --$i>=0;){$m[$i] = $m[$i][0];}
                    
                
MTUtil.php http://movable-type-zh-project.googlecode.com/svn/trunk/ | PHP | 1690 lines
                    
1<?php
                    
2# Movable Type (r) Open Source (C) 2001-2011 Six Apart, Ltd.
                    
167function substr_wref($str, $start, $length) {
                    
168    if (preg_match_all('/(&[^;]*;|.)/', $str, $character_entities)) {
                    
169        return implode('', array_slice($character_entities[0], $start, $length));
                    
                
common.func.php http://pj-photohost.googlecode.com/svn/trunk/ | PHP | 1082 lines
                    
1<?php
                    
2if(!defined('DEDEINC')) exit('dedecms');
                    
32
                    
33//??php4
                    
34if(!function_exists('file_put_contents'))
                    
81	{
                    
82		require_once(DEDEINC."/inc/inc_fun_funString.php");
                    
83	}
                    
186	}
                    
187	preg_match_all("/./su", $str, $ar);
                    
188	$str = '';
                    
361{
                    
362	include_once(DEDEINC."/inc/inc_stat.php");
                    
363	return SpUpdateStat();
                    
373{
                    
374	if(empty($GLOBALS['cfg_phpurl'])) $GLOBALS['cfg_phpurl'] = '..';
                    
375
                    
                
minify.php git://github.com/forkcms/forkcms.git | PHP | 937 lines
                    
1<?php
                    
2
                    
22 * @author Matthias Mullie <minify@mullie.eu>
                    
23 * @author Tijs Verkoyen <php-css-to-inline-styles@verkoyen.eu>
                    
24 * @version 1.0.0
                    
97		// find all relative imports in css (for now we don't support imports with media, and imports should use url(xxx))
                    
98		if(preg_match_all($importRegex, $content, $matches, PREG_SET_ORDER))
                    
99		{
                    
288
                    
289		if(preg_match_all('/url\((["\']?)((?!["\']?data:).*?\.(gif|png|jpg|jpeg|tiff|svg))\\1\)/i', $content, $matches, PREG_SET_ORDER))
                    
290		{
                    
446		// find all relative urls in css
                    
447		if(preg_match_all($pathsRegex, $content, $matches, PREG_SET_ORDER))
                    
448		{
                    
                
str.php git://github.com/fuel/core.git | PHP | 653 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Fuel is a fast, lightweight, community driven PHP 5.4+ framework.
                    
4 *
                    
9 * @copyright  2010 - 2019 Fuel Development Team
                    
10 * @link       https://fuelphp.com
                    
11 */
                    
17 *
                    
18 * PHP needs to be compiled with --enable-mbstring
                    
19 * or a fallback without encoding support is used
                    
45			// Handle special characters.
                    
46			preg_match_all('/&[a-z]+;/i', strip_tags($string), $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
                    
47			// fix preg_match_all broken multibyte support
                    
66			// Handle all the html tags.
                    
67			preg_match_all('/<[^>]+>([^<]*)/', $string, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
                    
68			// fix preg_match_all broken multibyte support
                    
                
 

Source

Language