PageRenderTime 336ms queryTime 50ms sortTime 6ms getByIdsTime 111ms findMatchingLines 116ms

100+ results results for 'php substr_count' (336 ms)

Not the results you expected?
Export.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 267 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright  Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
150                ->export();
                    
151            $countRows = substr_count(trim($result), "\n");
                    
152            if (!$countRows) {
                    
                
pi.splitter.php https://bitbucket.org/tdevonshire/guinness-jazz-festival.git | PHP | 324 lines
                    
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/*
                    
6 Copyright: Oliver Heine
                    
7 http://utilitees.de/ee.php/splitter
                    
8--------------------------------------------------------
                    
12========================================================
                    
13 File: pi.splitter.php
                    
14--------------------------------------------------------
                    
34                        'pi_author'		=> 'Oliver Heine',
                    
35                        'pi_author_url'		=> 'http://utilitees.de/ee.php/splitter',
                    
36                        'pi_description'	=> 'Split any kind of lists into blocks.',
                    
59        // find pagination
                    
60        $pc = substr_count($tagdata, PAGINATION);
                    
61	    
                    
310
                    
311<?php
                    
312$buffer = ob_get_contents();
                    
                
FormCheckboxTest.php https://github.com/MontmereLimited/zf2.git | PHP | 289 lines
                    
1<?php
                    
2/**
                    
39 */
                    
40class FormCheckboxTest extends \PHPUnit_Framework_TestCase
                    
41{
                    
48        }
                    
49        $this->view   = new \Zend\View\Renderer\PhpRenderer();
                    
50        $this->helper = new \Zend\View\Helper\FormCheckbox();
                    
101        $this->assertRegexp('/<input[^>]*?(checked="checked")/', $html);
                    
102        $count = substr_count($html, 'checked');
                    
103        $this->assertEquals(2, $count);
                    
                
Export.php https://bitbucket.org/infinity_git/roofrackcity.git | PHP | 267 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
150                ->export();
                    
151            $countRows = substr_count(trim($result), "\n");
                    
152            if (!$countRows) {
                    
                
ClassCommentSniff.php https://github.com/amumu/modev.git | PHP | 233 lines
                    
47 * @version   Release: 1.2.0a1
                    
48 * @link      http://pear.php.net/package/PHP_CodeSniffer
                    
49 */
                    
144        try {
                    
145            $this->commentParser = new PHP_CodeSniffer_CommentParser_ClassCommentParser($comment, $phpcsFile);
                    
146            $this->commentParser->parse();
                    
169
                    
170        $newlineCount = (substr_count($short, $phpcsFile->eolChar) + 1);
                    
171
                    
175            $between        = $comment->getWhiteSpaceBetween();
                    
176            $newlineBetween = substr_count($between, $phpcsFile->eolChar);
                    
177            if ($newlineBetween !== 2) {
                    
191                if ($long !== '') {
                    
192                    $newlineCount += (substr_count($long, $phpcsFile->eolChar) - $newlineSpan + 1);
                    
193                }
                    
                
Export.php https://github.com/njaeger/magento_github.git | PHP | 267 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
150                ->export();
                    
151            $countRows = substr_count(trim($result), "\n");
                    
152            if (!$countRows) {
                    
                
Propel2Collector.php https://gitlab.com/heruujoko/ilearnman | PHP | 307 lines
                    
1<?php
                    
2/*
                    
164                        if ('time' === $key) {
                    
165                            if (substr_count($value, 'ms')) {
                    
166                                $value = (float)$value / 1000;
                    
285                'icon' => 'bolt',
                    
286                'widget' => 'PhpDebugBar.Widgets.SQLQueriesWidget',
                    
287                'map' => $this->getName(),
                    
                
ClassCommentSniff.php https://github.com/limb-php-framework/limb-tools.git | PHP | 233 lines
                    
47 * @version   Release: 1.2.2
                    
48 * @link      http://pear.php.net/package/PHP_CodeSniffer
                    
49 */
                    
144        try {
                    
145            $this->commentParser = new PHP_CodeSniffer_CommentParser_ClassCommentParser($comment, $phpcsFile);
                    
146            $this->commentParser->parse();
                    
169
                    
170        $newlineCount = (substr_count($short, $phpcsFile->eolChar) + 1);
                    
171
                    
175            $between        = $comment->getWhiteSpaceBetween();
                    
176            $newlineBetween = substr_count($between, $phpcsFile->eolChar);
                    
177            if ($newlineBetween !== 2) {
                    
191                if ($long !== '') {
                    
192                    $newlineCount += (substr_count($long, $phpcsFile->eolChar) - $newlineSpan + 1);
                    
193                }
                    
                
ClassCommentSniff.php https://github.com/wrobel/horde-glue.git | PHP | 233 lines
                    
47 * @version   Release: 1.2.0
                    
48 * @link      http://pear.php.net/package/PHP_CodeSniffer
                    
49 */
                    
144        try {
                    
145            $this->commentParser = new PHP_CodeSniffer_CommentParser_ClassCommentParser($comment, $phpcsFile);
                    
146            $this->commentParser->parse();
                    
169
                    
170        $newlineCount = (substr_count($short, $phpcsFile->eolChar) + 1);
                    
171
                    
175            $between        = $comment->getWhiteSpaceBetween();
                    
176            $newlineBetween = substr_count($between, $phpcsFile->eolChar);
                    
177            if ($newlineBetween !== 2) {
                    
191                if ($long !== '') {
                    
192                    $newlineCount += (substr_count($long, $phpcsFile->eolChar) - $newlineSpan + 1);
                    
193                }
                    
                
Export.php https://github.com/cosmocommerce/magento-mirror.git | PHP | 267 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
150                ->export();
                    
151            $countRows = substr_count(trim($result), "\n");
                    
152            if (!$countRows) {
                    
                
function.substr-count.html https://bitbucket.org/thncr/manuals.git | HTML | 170 lines
                    
11 <div class="up"><a href="ref.strings.html">字符串函数</a></div>
                    
12 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
13</div><hr /><div id="function.substr-count" class="refentry">
                    
15  <h1 class="refname">substr_count</h1>
                    
16  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">substr_count</span> &mdash; <span class="dc-title">计算字串出现的次数</span></p>
                    
17
                    
21  <div class="methodsynopsis dc-description">
                    
22   <span class="type">int</span> <span class="methodname"><strong>substr_count</strong></span>
                    
23    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$haystack</code></span>
                    
29  <p class="para rdfs-comment">
                    
30    <span class="function"><strong>substr_count()</strong></span> 返回子字符串<em><code class="parameter">needle</code></em> 在字符串 <em><code class="parameter">haystack</code></em> 中出现的次数。注意 <em><code class="parameter">needle</code></em> 区分大小写。
                    
31  </p>
                    
142<div class="phpcode"><code><span style="color: #000000">
                    
143<span style="color: #0000BB">&lt;?php<br />$text&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'This&nbsp;is&nbsp;a&nbsp;test'</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">$text</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;14<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$text</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'is'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;2<br /><br />//&nbsp;字符串被简化为&nbsp;'s&nbsp;is&nbsp;a&nbsp;test',因此输出&nbsp;1<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$text</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'is'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;字符串被简化为&nbsp;'s&nbsp;i',所以输出&nbsp;0<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$text</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'is'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;因为&nbsp;5+10&nbsp;&gt;&nbsp;14,所以生成警告<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$text</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'is'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">);<br /><br /><br /></span><span style="color: #FF8000">//&nbsp;输出&nbsp;1,因为该函数不计算重叠字符串<br /></span><span style="color: #0000BB">$text2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'gcdgcdgcd'</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #0000BB">substr_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$text2</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'gcdgcd'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
                    
144</span>
                    
                
RetrieveFXSQLData.class.php git://github.com/yodarunamok/fxphp.git | PHP | 204 lines
                    
1<?php
                    
2
                    
2
                    
3require_once('RetrieveFXData.class.php');
                    
4
                    
4
                    
5#### Part of FX.php #####################################################
                    
6#                                                                       #
                    
32                $currentOrderBy .= "{$field}";
                    
33                if (substr_count(strtolower($sortOrder), 'desc') > 0) {
                    
34                    $currentOrderBy .= ' DESC';
                    
                
SYLK.php https://gitlab.com/thohid44/Complete_Sumitted_Project_Without_Filter_Search | PHP | 450 lines
                    
34	define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
                    
35	require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
                    
36}
                    
44 */
                    
45class PHPExcel_Reader_SYLK extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader
                    
46{
                    
213	/**
                    
214	 * Loads PHPExcel from file into PHPExcel instance
                    
215	 *
                    
216	 * @param 	string 		$pFilename
                    
217	 * @param	PHPExcel	$objPHPExcel
                    
218	 * @return 	PHPExcel
                    
220	 */
                    
221	public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
                    
222	{
                    
                
InstanceTest.php https://gitlab.com/yousafsyed/easternglamor | PHP | 139 lines
                    
1<?php
                    
2/**
                    
7
                    
8class InstanceTest extends \PHPUnit_Framework_TestCase
                    
9{
                    
129        $this->assertContains('<block class="' . $model->getType() . '"', $result);
                    
130        $this->assertEquals(count($params), substr_count($result, '<action method="setData">'));
                    
131        $this->assertContains('<argument name="name" xsi:type="string">display_mode</argument>', $result);
                    
                
imdb_scraper.php https://github.com/aramk/IMDb-Scraper.git | PHP | 185 lines
                    
1<?php
                    
2
                    
9By Aram Kocharyan
                    
10http://ak.net84.net/php/imdb-scraper/
                    
11akarmenia@gmail.com
                    
16// Utility functions
                    
17require_once('util.php');
                    
18
                    
107		// Run a search using the words and see how many matches each search result gets
                    
108		$counts = substr_count_arrays($titles, $query_bits);
                    
109		
                    
                
XMLWriter.php https://gitlab.com/najomie/fit-hippie | PHP | 402 lines
                    
1<?php
                    
2
                    
3// Handle eval errors that cause the script to finish
                    
4$wpaeErrorHandler = new WpaePhpInterpreterErrorHandler();
                    
5register_shutdown_function(array($wpaeErrorHandler, 'handle'));
                    
216            if (strpos($line, $str) !== false) {
                    
217                return substr_count($line, "\t");
                    
218            }
                    
269
                    
270                    $numberOfSingleQuotes = substr_count($filtered, "'");
                    
271                    $numberOfDoubleQuotes = substr_count($filtered, "\"");
                    
                
Lexer.php https://gitlab.com/rocs/Streaming-Safe-for-Kids | PHP | 379 lines
                    
30    public function __construct(array $options = array()) {
                    
31        // map from internal tokens to PhpParser tokens
                    
32        $this->tokenMap = $this->createTokenMap();
                    
102            if ($chr === "\0") {
                    
103                // PHP cuts error message after null byte, so need special case
                    
104                $errorMsg = 'Unexpected null byte';
                    
171                    'startLine' => $line,
                    
172                    'endLine' => $line + substr_count($comment, "\n"),
                    
173                    'startFilePos' => $filePos,
                    
176
                    
177                // Emulate the PHP behavior
                    
178                $isDocComment = isset($comment[3]) && $comment[3] === '*';
                    
205     *
                    
206     *  * 'comments'      => Array of PhpParser\Comment or PhpParser\Comment\Doc instances,
                    
207     *                       representing all comments that occurred between the previous
                    
                
po.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 384 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * @version $Id: po.php 718 2012-10-31 00:32:02Z nbachiyski $
                    
6 * @package pomo
                    
9
                    
10require_once dirname(__FILE__) . '/translations.php';
                    
11
                    
115		if (false !== strpos($string, $newline) &&
                    
116				(substr_count($string, $newline) > 1 || !($newline === substr($string, -strlen($newline))))) {
                    
117			$po = "$quote$quote$newline$po";
                    
163	function prepend_each_line($string, $with) {
                    
164		$php_with = var_export($with, true);
                    
165		$lines = explode("\n", $string);
                    
167		if ("\n" == substr($string, -1)) unset($lines[count($lines) - 1]);
                    
168		$res = implode("\n", array_map(create_function('$x', "return $php_with.\$x;"), $lines));
                    
169		// give back the empty line, we ignored above
                    
                
LexerNeedle.php https://github.com/bshaffer/ChartDown.git | PHP | 238 lines
                    
1<?php
                    
2
                    
169        $this->cursor += strlen($text);
                    
170        $this->lineno += substr_count($text, "\n");
                    
171    }
                    
195    {
                    
196        return substr_count(substr($this->text, $this->cursor), "\n") + 1;
                    
197    }
                    
                
styles.php https://github.com/mackensen/moodle.git | PHP | 312 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
29define('ABORT_AFTER_CONFIG', true);
                    
30require('../config.php');
                    
31require_once($CFG->dirroot.'/lib/csslib.php');
                    
34    $slashargument = ltrim($slashargument, '/');
                    
35    if (substr_count($slashargument, '/') < 2) {
                    
36        css_send_css_not_found();
                    
73
                    
74if (file_exists("$CFG->dirroot/theme/$themename/config.php")) {
                    
75    // The theme exists in standard location - ok.
                    
75    // The theme exists in standard location - ok.
                    
76} else if (!empty($CFG->themedir) and file_exists("$CFG->themedir/$themename/config.php")) {
                    
77    // Alternative theme location contains this theme - ok.
                    
101
                    
102require("$CFG->dirroot/lib/setup.php");
                    
103
                    
                
Parser.php https://gitlab.com/campus-academy/krowkaramel | PHP | 520 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * A PHP-Based RSS and Atom Feed Framework.
                    
6 * Takes the hard work out of managing a complete RSS/Atom solution.
                    
40 * @link http://simplepie.org/ SimplePie
                    
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
                    
42 */
                    
200			$this->position += 5 + $len;
                    
201			if (substr_count($this->http_version, '.') <= 1)
                    
202			{
                    
                
po.php https://bitbucket.org/moodsdesign-ondemand/reglot.git | PHP | 384 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * @version $Id: po.php 686 2012-04-16 16:33:30Z nbachiyski $
                    
6 * @package pomo
                    
9
                    
10require_once dirname(__FILE__) . '/translations.php';
                    
11
                    
115		if (false !== strpos($string, $newline) &&
                    
116				(substr_count($string, $newline) > 1 || !($newline === substr($string, -strlen($newline))))) {
                    
117			$po = "$quote$quote$newline$po";
                    
163	function prepend_each_line($string, $with) {
                    
164		$php_with = var_export($with, true);
                    
165		$lines = explode("\n", $string);
                    
167		if ("\n" == substr($string, -1)) unset($lines[count($lines) - 1]);
                    
168		$res = implode("\n", array_map(create_function('$x', "return $php_with.\$x;"), $lines));
                    
169		// give back the empty line, we ignored above
                    
                
php.js https://gitlab.com/Blueprint-Marketing/cdnjs | JavaScript | 129 lines
                    
23    atoms: keywords("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__"),
                    
24    builtin: keywords("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport echo print global static exit array empty eval isset unset die include require include_once require_once"),
                    
25    multiLineStrings: true,
                    
54    var htmlMode = CodeMirror.getMode(config, "text/html");
                    
55    var phpMode = CodeMirror.getMode(config, phpConfig);
                    
56
                    
82        return style;
                    
83      } else if (isPHP && state.php.tokenize == null && stream.match("?>")) {
                    
84        state.curMode = htmlMode;
                    
103        var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),
                    
104            php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur;
                    
105        if (state.curMode == htmlMode) cur = htmlNew;
                    
127  CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});
                    
128  CodeMirror.defineMIME("text/x-php", phpConfig);
                    
129})();
                    
                
RadioTest.php https://bitbucket.org/Dal-Papa/is-340-publish-base.git | PHP | 270 lines
                    
23// Call Zend_Form_Element_RadioTest::main() if this source file is executed directly.
                    
24if (!defined("PHPUnit_MAIN_METHOD")) {
                    
25    define("PHPUnit_MAIN_METHOD", "Zend_Form_Element_RadioTest::main");
                    
27
                    
28require_once 'Zend/Form/Element/Radio.php';
                    
29
                    
39 */
                    
40class Zend_Form_Element_RadioTest extends PHPUnit_Framework_TestCase
                    
41{
                    
48    {
                    
49        $suite  = new PHPUnit_Framework_TestSuite("Zend_Form_Element_RadioTest");
                    
50        $result = PHPUnit_TextUI_TestRunner::run($suite);
                    
249    {
                    
250        if (strtolower(substr(PHP_OS, 0, 3)) == 'win' && version_compare(PHP_VERSION, '5.1.4', '=')) {
                    
251            $this->markTestIncomplete('Error occurs for PHP 5.1.4 on Windows');
                    
                
image.php https://bitbucket.org/ngmares/moodle.git | PHP | 243 lines
                    
1<?php
                    
2
                    
30
                    
31// we need just the values from config.php and minlib.php
                    
32define('ABORT_AFTER_CONFIG', true);
                    
32define('ABORT_AFTER_CONFIG', true);
                    
33require('../config.php'); // this stops immediately at the beginning of lib/setup.php
                    
34
                    
36    $slashargument = ltrim($slashargument, '/');
                    
37    if (substr_count($slashargument, '/') < 3) {
                    
38        image_not_found();
                    
61
                    
62if (file_exists("$CFG->dirroot/theme/$themename/config.php")) {
                    
63    // exists
                    
63    // exists
                    
64} else if (!empty($CFG->themedir) and file_exists("$CFG->themedir/$themename/config.php")) {
                    
65    // exists
                    
                
Lexer.php https://gitlab.com/Laolballs/cbtapp | PHP | 285 lines
                    
1<?php
                    
2
                    
2
                    
3namespace PhpParser;
                    
4
                    
27    public function __construct(array $options = array()) {
                    
28        // map from internal tokens to PhpParser tokens
                    
29        $this->tokenMap = $this->createTokenMap();
                    
91
                    
92        // PHP cuts error message after null byte, so need special case
                    
93        if (preg_match('~^Unexpected character in input:  \'$~', $error['message'])) {
                    
103     *
                    
104     *  * 'comments'      => Array of PhpParser\Comment or PhpParser\Comment\Doc instances,
                    
105     *                       representing all comments that occurred between the previous
                    
160            } else {
                    
161                $this->line += substr_count($token[1], "\n");
                    
162                $this->filePos += strlen($token[1]);
                    
                
search.inc.php https://github.com/harriswong/ATutor.git | PHP | 344 lines
                    
1<?php
                    
2/************************************************************************/
                    
114		for ($i=0; $i<$num_words; $i++) {
                    
115			$score += 8 * substr_count($lower_keywords, $lower_words[$i]); /* keywords are weighed more */
                    
116			$score += 4 * substr_count($lower_title,    $lower_words[$i]);    /* titles are weighed more */
                    
116			$score += 4 * substr_count($lower_title,    $lower_words[$i]);    /* titles are weighed more */
                    
117			$score += 1 * substr_count($lower_text,     $lower_words[$i]);
                    
118
                    
220		for ($i=0; $i<$num_words; $i++) {
                    
221			$score += 8 * substr_count($lower_forum_title,	$lower_words[$i]);		/* forum's title are weighed more */
                    
222			$score += 4 * substr_count($lower_subject,		$lower_words[$i]);		/* thread subject are weighed more */
                    
302			if ($_SESSION['course_id'] != $items['course_id']) {
                    
303				echo '<a href="bounce.php?course='.$items['course_id'].SEP.'p='.urlencode('forum/view.php?fid='.$items['forum_id'].SEP.'pid='.$items['post_id'].SEP.'words='.$_GET['words']).'">'.$items['forum_title'].' - '.$items['subject'].'</a> ';
                    
304			} else {
                    
312			if ($_SESSION['course_id'] != $items['course_id']) {
                    
313				echo '<a href="bounce.php?course='.$items['course_id'].SEP.'p='.urlencode('content.php?cid='.$items['content_id'].SEP.'words='.$_GET['words']).'">'.$items['title'].'</a> ';
                    
314			} else {
                    
                
File.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 432 lines
                    
29 */
                    
30#require_once 'Zend/Reflection/Function.php';
                    
31
                    
92            // realpath() doesn't return false if Suhosin is included
                    
93            // see http://uk3.php.net/manual/en/function.realpath.php#82770
                    
94            if (!file_exists($fileRealpath)) {
                    
103        if (!$fileRealpath || !in_array($fileRealpath, get_included_files())) {
                    
104            #require_once 'Zend/Reflection/Exception.php';
                    
105            throw new Zend_Reflection_Exception('File ' . $file . ' must be required before it can be reflected');
                    
196        if (!$instance instanceof Zend_Reflection_Docblock) {
                    
197            #require_once 'Zend/Reflection/Exception.php';
                    
198            throw new Zend_Reflection_Exception('Invalid reflection class specified; must extend Zend_Reflection_Docblock');
                    
329             * Token ID's are explained here:
                    
330             * http://www.php.net/manual/en/tokens.php.
                    
331             */
                    
                
RouteBuilderTest.php https://gitlab.com/reasonat/test8 | PHP | 325 lines
                    
1<?php
                    
2
                    
34   *
                    
35   * @var \Drupal\Core\Routing\MatcherDumperInterface|\PHPUnit_Framework_MockObject_MockObject
                    
36   */
                    
41   *
                    
42   * @var \Drupal\Core\Lock\LockBackendInterface|\PHPUnit_Framework_MockObject_MockObject
                    
43   */
                    
48   *
                    
49   * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject
                    
50   */
                    
55   *
                    
56   * @var \Drupal\Component\Discovery\YamlDiscovery|\PHPUnit_Framework_MockObject_MockObject
                    
57   */
                    
69   *
                    
70   * @var \Drupal\Core\Controller\ControllerResolverInterface|\PHPUnit_Framework_MockObject_MockObject
                    
71   */
                    
                
po.php https://gitlab.com/morganestes/wordpress-develop | PHP | 508 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * @version $Id: po.php 1158 2015-11-20 04:31:23Z dd32 $
                    
6 * @package pomo
                    
9
                    
10require_once dirname( __FILE__ ) . '/translations.php';
                    
11
                    
121			if ( false !== strpos( $string, $newline ) &&
                    
122				( substr_count( $string, $newline ) > 1 || ! ( $newline === substr( $string, -strlen( $newline ) ) ) ) ) {
                    
123				$po = "$quote$quote$newline$po";
                    
                
FormSelectTest.php https://bitbucket.org/Dal-Papa/is-340-publish-base.git | PHP | 384 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: FormSelectTest.php 25187 2013-01-08 08:21:00Z frosch $
                    
21 */
                    
23// Call Zend_View_Helper_FormSelectTest::main() if this source file is executed directly.
                    
24if (!defined("PHPUnit_MAIN_METHOD")) {
                    
25    define("PHPUnit_MAIN_METHOD", "Zend_View_Helper_FormSelectTest::main");
                    
27
                    
28require_once 'Zend/View/Helper/FormSelect.php';
                    
29require_once 'Zend/View.php';
                    
41 */
                    
42class Zend_View_Helper_FormSelectTest extends PHPUnit_Framework_TestCase
                    
43{
                    
50    {
                    
51        $suite  = new PHPUnit_Framework_TestSuite("Zend_View_Helper_FormSelectTest");
                    
52        $result = PHPUnit_TextUI_TestRunner::run($suite);
                    
                
ProfilePicture.php https://gitlab.com/Afsana/Afsana_148423_B35_Session_30 | PHP | 308 lines
                    
1<?php
                    
2
                    
62
                    
63        Utility::redirect('create.php'); // redirect korte hobe create.php te tai utility.php use korechi //
                    
64
                    
72        $fetchMode = strtoupper($fetchMode);
                    
73        if(substr_count($fetchMode,'OBJ') > 0)
                    
74            $STH->setFetchMode(PDO::FETCH_OBJ);
                    
89        $fetchMode = strtoupper($fetchMode);
                    
90        if(substr_count($fetchMode,'OBJ') > 0)
                    
91            $STH->setFetchMode(PDO::FETCH_OBJ);
                    
125
                    
126        Utility::redirect('index.php');
                    
127
                    
138
                    
139        Utility::redirect('index.php');
                    
140
                    
                
File.php https://bitbucket.org/acidel/buykoala.git | PHP | 412 lines
                    
29 */
                    
30#require_once 'Zend/Reflection/Function.php';
                    
31
                    
94        if (!$fileRealpath || !in_array($fileRealpath, get_included_files())) {
                    
95            #require_once 'Zend/Reflection/Exception.php';
                    
96            throw new Zend_Reflection_Exception('File ' . $file . ' must be required before it can be reflected');
                    
187        if (!$instance instanceof Zend_Reflection_Docblock) {
                    
188            #require_once 'Zend/Reflection/Exception.php';
                    
189            throw new Zend_Reflection_Exception('Invalid reflection class specified; must extend Zend_Reflection_Docblock');
                    
225            if (!$instance instanceof Zend_Reflection_Function) {
                    
226                #require_once 'Zend/Reflection/Exception.php';
                    
227                throw new Zend_Reflection_Exception('Invalid reflection class provided; must extend Zend_Reflection_Function');
                    
319             * Token ID's are explained here:
                    
320             * http://www.php.net/manual/en/tokens.php.
                    
321             */
                    
                
bans.php https://gitlab.com/potion/librechan | PHP | 366 lines
                    
1<?php
                    
2
                    
2
                    
3require 'inc/lib/IP/Lifo/IP/IP.php';
                    
4require 'inc/lib/IP/Lifo/IP/BC.php';
                    
4require 'inc/lib/IP/Lifo/IP/BC.php';
                    
5require 'inc/lib/IP/Lifo/IP/CIDR.php';
                    
6
                    
83		
                    
84		if (preg_match('@^(\d{1,3}\.){1,3}([\d*]{1,3})?$@', $mask) && substr_count($mask, '*') == 1) {
                    
85			// IPv4 wildcard mask
                    
89				if ($part == '*') {
                    
90					$ipstart = inet_pton($ipv4 . '0' . str_repeat('.0', 3 - substr_count($ipv4, '.')));
                    
91					$ipend = inet_pton($ipv4 . '255' . str_repeat('.255', 3 - substr_count($ipv4, '.')));
                    
93				} elseif(($wc = strpos($part, '*')) !== false) {
                    
94					$ipstart = inet_pton($ipv4 . substr($part, 0, $wc) . '0' . str_repeat('.0', 3 - substr_count($ipv4, '.')));
                    
95					$ipend = inet_pton($ipv4 . substr($part, 0, $wc) . '9' . str_repeat('.255', 3 - substr_count($ipv4, '.')));
                    
                
ajaxSearchLog.class.inc.php https://github.com/gunf/novo-isaak.local.git | PHP | 174 lines
                    
1<?php
                    
2/* -----------------------------------------------------------------------------
                    
157    $logid = intval($_POST['logid']);
                    
158    $safeCmt = (strlen($ascmt) < CMT_MAX_LENGTH) && (substr_count($ascmt, 'http') < CMT_MAX_LINKS);
                    
159    if (($ascmt != '') && ($logid > 0) && $safeCmt) {
                    
162
                    
163        include_once (MODX_MANAGER_PATH . '/includes/document.parser.class.inc.php');
                    
164        $modx = new DocumentParser;
                    
                
File.php https://bitbucket.org/Ebozavrik/test-application.git | PHP | 446 lines
                    
24 */
                    
25require_once 'Zend/Reflection/Class.php';
                    
26
                    
93            // realpath() doesn't return false if Suhosin is included
                    
94            // see http://uk3.php.net/manual/en/function.realpath.php#82770
                    
95            if (!file_exists($fileRealpath)) {
                    
219            if (!$instance instanceof Zend_Reflection_Class) {
                    
220                require_once 'Zend/Reflection/Exception.php';
                    
221                throw new Zend_Reflection_Exception( 'Invalid reflection class provided; must extend Zend_Reflection_Class' );
                    
241            if (!$instance instanceof Zend_Reflection_Function) {
                    
242                require_once 'Zend/Reflection/Exception.php';
                    
243                throw new Zend_Reflection_Exception( 'Invalid reflection class provided; must extend Zend_Reflection_Function' );
                    
340             * Token ID's are explained here:
                    
341             * http://www.php.net/manual/en/tokens.php.
                    
342             */
                    
                
BBParser.php https://github.com/Canop/braldahim.git | PHP | 245 lines
                    
1<?php
                    
2
                    
19//                This code uses portions of the bbcode script from
                    
20//                phpBB (C) 2001 The phpBB Group
                    
21// *******************************************************************
                    
51
                    
52		while (substr_count($string,"<span") > substr_count($string,"</span>")) {
                    
53			$string.="</span>";
                    
55
                    
56		while (substr_count($string,"<span") < substr_count($string,"</span>")) {
                    
57			$string="<span>".$string;
                    
60		// http, https, ftp, mailto
                    
61		$string = str_replace("[url=index.php", "#*#LINKINDEX=#*#", $string);
                    
62		$string = str_replace("[url=http://", "#*#LINKHTTP=#*#", $string);
                    
66
                    
67		$string = str_replace("[url]index.php", "#*#LINKINDEX]#*#", $string);
                    
68		$string = str_replace("[url]http://", "#*#LINKHTTP]#*#", $string);
                    
                
basic.php https://github.com/ciudadanointeligente/legacy-legislativo.git | PHP | 247 lines
                    
1<?php
                    
2require('simple_html_dom.php');
                    
2require('simple_html_dom.php');
                    
3require("class/cnx.php");
                    
4require("class/controlador.php");
                    
90            {
                    
91                if (substr_count($leytext, "?idLey=")==1)   // Ley
                    
92                {
                    
97                }
                    
98                else if(substr_count($leytext, "?idNorma=")) // Decreto
                    
99                {
                    
                
DocBlockReflection.php https://gitlab.com/yousafsyed/easternglamor | PHP | 296 lines
                    
1<?php
                    
2/**
                    
100            // determine line numbers
                    
101            $lineCount       = substr_count($this->docComment, "\n");
                    
102            $this->startLine = $this->reflector->getStartLine() - $lineCount - 1;
                    
271    {
                    
272        $str = "DocBlock [ /* DocBlock */ ] {" . PHP_EOL . PHP_EOL;
                    
273        $str .= "  - Tags [" . count($this->tags) . "] {" . PHP_EOL;
                    
278
                    
279        $str .= "  }" . PHP_EOL;
                    
280        $str .= "}" . PHP_EOL;
                    
                
view.php https://github.com/sarriaroman/PuntoUBP.git | PHP | 153 lines
                    
1<?php
                    
2
                    
26            
                    
27<?php
                    
28    		
                    
126				$urladdition = 'offset='.$newoffset;
                    
127				if (substr_count($baseurl,'?')) $nexturl=$baseurl . '&' . $urladdition; else $nexturl=$baseurl . '?' . $urladdition;
                    
128				
                    
135				$urladdition = 'offset='.$newoffset;
                    
136				if (substr_count($baseurl,'?')) $prevurl=$baseurl . '&' . $urladdition; else $prevurl=$baseurl . '?' . $urladdition;
                    
137				
                    
                
SYLK.php https://github.com/vivid-planet/library.git | PHP | 415 lines
                    
34	define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
                    
35	require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
                    
36}
                    
131		// Create new PHPExcel
                    
132		$objPHPExcel = new PHPExcel();
                    
133
                    
178	/**
                    
179	 * Loads PHPExcel from file into PHPExcel instance
                    
180	 *
                    
181	 * @param 	string 		$pFilename
                    
182	 * @param	PHPExcel	$objPHPExcel
                    
183	 * @return 	PHPExcel
                    
185	 */
                    
186	public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
                    
187	{
                    
                
Birthday.php https://gitlab.com/Soikot/AtomicProject_AmirulIslam_152207 | PHP | 400 lines
                    
1<?php
                    
2namespace App\BITM\SEIP152207\Birthday;
                    
24        $sth->execute();
                    
25        if(substr_count($fetchMode,'OBJ') > 0)
                    
26            $sth->setFetchMode(PDO::FETCH_OBJ);
                    
71            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Updated !</h3></div>");
                    
72        Utility::redirect('index.php');
                    
73
                    
87            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Inserted !</h3></div>");
                    
88        Utility::redirect('index.php');
                    
89
                    
120            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Inserted !</h3></div>");
                    
121        Utility::redirect('create.php');
                    
122
                    
144            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been trashed !</h3></div>");
                    
145        Utility::redirect('index.php');
                    
146
                    
                
Gender.php https://gitlab.com/Princy008/Princy_143467_B37_Atomic_project | PHP | 405 lines
                    
1<?php
                    
2namespace App\BITM\SEIP143467\Gender;
                    
23            $sth->execute();
                    
24            if(substr_count($fetchMode,'OBJ') > 0)
                    
25                $sth->setFetchMode(PDO::FETCH_OBJ);
                    
79
                    
80        Utility::redirect('create.php');
                    
81
                    
108            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Updated !</h3></div>");
                    
109        Utility::redirect('index.php');
                    
110
                    
124            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Inserted !</h3></div>");
                    
125        Utility::redirect('index.php');
                    
126
                    
146            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been trashed !</h3></div>");
                    
147        Utility::redirect('index.php');
                    
148
                    
                
Birthday.php https://gitlab.com/Princy008/Princy_143467_B37_Atomic_project | PHP | 399 lines
                    
1<?php
                    
2namespace App\BITM\SEIP143467\Birthday;
                    
24        $sth->execute();
                    
25        if(substr_count($fetchMode,'OBJ') > 0)
                    
26            $sth->setFetchMode(PDO::FETCH_OBJ);
                    
71            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Updated !</h3></div>");
                    
72        Utility::redirect('index.php');
                    
73
                    
87            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Inserted !</h3></div>");
                    
88        Utility::redirect('index.php');
                    
89
                    
120            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Inserted !</h3></div>");
                    
121        Utility::redirect('index.php');
                    
122
                    
143            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been trashed !</h3></div>");
                    
144        Utility::redirect('index.php');
                    
145
                    
                
MethodScanner.php https://bitbucket.org/alexandretaz/maniac_divers.git | PHP | 537 lines
                    
1<?php
                    
2/**
                    
389                $tokenContent = $token;
                    
390                $tokenLine    = $tokenLine + substr_count($lastTokenArray[1],
                    
391                                                          "\n"); // adjust token line by last known newline count
                    
                
default.php https://github.com/carleton/reason_package.git | PHP | 439 lines
                    
1<?php
                    
2/**
                    
10	 */
                    
11	include_once( 'reason_header.php' );
                    
12	reason_include_once( '/content_listers/tree.php3' );
                    
137					// also ignore ip addressed hosts
                    
138					if ( substr_count(REASON_HOST, '.') > 1
                    
139						&& !preg_match('/\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/', REASON_HOST) )
                    
                
FormSelectTest.php https://github.com/Exercise/zf2.git | PHP | 302 lines
                    
1<?php
                    
2/**
                    
38 */
                    
39class FormSelectTest extends \PHPUnit_Framework_TestCase
                    
40{
                    
80        $this->assertRegExp('#<option[^>]+value="baz".*?>Bazbat</option>#', $html);
                    
81        $this->assertEquals(2, substr_count($html, '<option'));
                    
82    }
                    
                
start.php https://github.com/bpmn/bpmn.git | PHP | 334 lines
                    
1<?php
                    
2
                    
135    // group usernames
                    
136    if (substr_count($page[0], 'group:')) {
                    
137        preg_match('/group\:([0-9]+)/i', $page[0], $matches);
                    
152            set_input('guid', $page[1]);
                    
153            require(dirname(dirname(dirname(__FILE__))) . "/entities/index.php");
                    
154            break;
                    
156            set_input('username', $page[1]);
                    
157            require($CONFIG->pluginspath . "file/index.php");
                    
158            break;
                    
160            set_input('username', $page[1]);
                    
161            require($CONFIG->pluginspath . "file/friends.php");
                    
162            break;
                    
163        case "all":
                    
164            require($CONFIG->pluginspath . "file/world.php");
                    
165            break;
                    
                
File.php https://github.com/grandison/budo16.git | PHP | 364 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHPUnit
                    
4 *
                    
37 * @category   Testing
                    
38 * @package    PHPUnit
                    
39 * @author     Sebastian Bergmann <sb@sebastian-bergmann.de>
                    
40 * @copyright  2002-2010 Sebastian Bergmann <sb@sebastian-bergmann.de>
                    
41 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
                    
42 * @link       http://www.phpunit.de/
                    
49
                    
50require_once 'PHPUnit/Util/Filter.php';
                    
51
                    
51
                    
52PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
                    
53
                    
                
ControllerResolver.php https://github.com/brainfg/symfony.git | PHP | 216 lines
                    
1<?php
                    
2
                    
54     *
                    
55     * @return mixed A PHP callable
                    
56     */
                    
59        if (false === strpos($controller, '::')) {
                    
60            $count = substr_count($controller, ':');
                    
61            if (2 == $count) {
                    
                
class.json-api.php https://bitbucket.org/mshmsh5000/wp-demo.git | PHP | 447 lines
                    
1<?php
                    
2
                    
82			if ( is_null( $post_body ) ) {
                    
83				$this->post_body = file_get_contents( 'php://input' );
                    
84
                    
142			// How deep to truncate each endpoint's path to see if it matches this help request
                    
143			$depth = substr_count( $this->path, '/' ) + 1;
                    
144			if ( false !== stripos( $this->accept, 'javascript' ) || false !== stripos( $this->accept, 'json' ) ) {
                    
396
                    
397		// If API called via PHP, bail: don't do our custom wp_die().  Do the normal wp_die().
                    
398		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
                    
                
File.php https://bitbucket.org/netglue/zf-1.12-release.git | PHP | 432 lines
                    
29 */
                    
30require_once 'Zend/Reflection/Function.php';
                    
31
                    
92            // realpath() doesn't return false if Suhosin is included
                    
93            // see http://uk3.php.net/manual/en/function.realpath.php#82770
                    
94            if (!file_exists($fileRealpath)) {
                    
103        if (!$fileRealpath || !in_array($fileRealpath, get_included_files())) {
                    
104            require_once 'Zend/Reflection/Exception.php';
                    
105            throw new Zend_Reflection_Exception('File ' . $file . ' must be required before it can be reflected');
                    
196        if (!$instance instanceof Zend_Reflection_Docblock) {
                    
197            require_once 'Zend/Reflection/Exception.php';
                    
198            throw new Zend_Reflection_Exception('Invalid reflection class specified; must extend Zend_Reflection_Docblock');
                    
329             * Token ID's are explained here:
                    
330             * http://www.php.net/manual/en/tokens.php.
                    
331             */
                    
                
bootstrap.php https://gitlab.com/remyvianne/krowkaramel | PHP | 244 lines
                    
1<?php
                    
2if (!defined('ABSPATH')) exit;
                    
183}
                    
184if (!\function_exists('mb_substr_count')) {
                    
185 function mb_substr_count($haystack, $needle, $enc = null)
                    
186 {
                    
187 return p\Mbstring::mb_substr_count($haystack, $needle, $enc);
                    
188 }
                    
                
ContainerTest.php https://github.com/EvanDotPro/zf1-mirror.git | PHP | 450 lines
                    
1<?php
                    
2/**
                    
23// Call Zend_View_Helper_Placeholder_Container_AbstractTest::main() if this source file is executed directly.
                    
24if (!defined("PHPUnit_MAIN_METHOD")) {
                    
25    define("PHPUnit_MAIN_METHOD", "Zend_View_Helper_Placeholder_ContainerTest::main");
                    
28/** Zend_View_Helper_Placeholder_Container */
                    
29require_once 'Zend/View/Helper/Placeholder/Container.php';
                    
30
                    
41 */
                    
42class Zend_View_Helper_Placeholder_ContainerTest extends PHPUnit_Framework_TestCase
                    
43{
                    
56
                    
57        $suite  = new PHPUnit_Framework_TestSuite("Zend_View_Helper_Placeholder_ContainerTest");
                    
58        $result = PHPUnit_TextUI_TestRunner::run($suite);
                    
396        $value = $this->container->toString();
                    
397        $expectedValue = '    <ul><li>foo</li>' . PHP_EOL . '    <li>bar</li>' . PHP_EOL . '    <li>baz</li></ul>';
                    
398        $this->assertEquals($expectedValue, $value);
                    
                
user_group.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 496 lines
                    
1<?php if (substr_count($_SERVER['PHP_SELF'],'/user_group.php')>0) die ("You can't access this file directly..."); ?>
                    
2<?php
                    
28		{
                    
29		if (confirm('<?php echo $strDelete; ?> ?!!'))
                    
30			{
                    
30			{
                    
31			if (confirm("<?php echo $strConfirm.' '.$strAgain; ?> !!!"))
                    
32				{
                    
66		<td height="40" colspan="3" align="center" valign="middle">
                    
67		<?php
                    
68		//Get list of available user group
                    
110			<form name="viewgroup" style="margin: 0;" method="post" action="">
                    
111			<p class="buttontext"><?php echo $strSelect.' '.$strGroup; ?>
                    
112			<select name="group" style="margin: 0 0 0 0">
                    
112			<select name="group" style="margin: 0 0 0 0">
                    
113			<?php
                    
114			$j=0;
                    
                
function.html_select_date.php https://gitlab.com/zohaibsaleem/shipcliq | PHP | 119 lines
                    
1<?php //0046a
                    
2if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
                    
3?>
                    
42VmfUqAxo14JDPruMU/Zkn6z/nqdo/q/QxKDJgMQ5+ts83xs+QVUkuCse5tMXrNrINWcjqGfrIE8d
                    
43mRYVdMIuCZDFwOWdp3LrjCoWeTc7NS0bNwGli4CA1jf5PHPniyWYyMcDH+r5CyOpXPFxhn3ypv+m
                    
44IF4qvBFKNJZPAfHboaNQLG5FT6KlBvWb2ONGbRURURURs5aS4n7Uj2BY9bXcMF1+ZDINsxpWf9Sx
                    
                
BaseChunk.php https://gitlab.com/koutyan777/Genisys | PHP | 267 lines
                    
1<?php
                    
2
                    
206	public function setSection($fY, ChunkSection $section){
                    
207		if(substr_count($section->getIdArray(), "\x00") === 4096 and substr_count($section->getDataArray(), "\x00") === 2048){
                    
208			$this->sections[(int) $fY] = new EmptyChunkSection($fY);
                    
                
File.php https://github.com/positivesum/site-plugin-core.git | PHP | 420 lines
                    
25 * @copyright Copyright (c) phpRack.com
                    
26 * @version $Id: File.php 588 2010-05-25 15:11:56Z yegor256@yahoo.com $
                    
27 * @category phpRack
                    
32 */
                    
33require_once PHPRACK_PATH . '/Package.php';
                    
34
                    
37 */
                    
38require_once PHPRACK_PATH . '/Adapters/File.php';
                    
39
                    
44 */
                    
45class phpRack_Package_Disc_File extends phpRack_Package
                    
46{
                    
83    {
                    
84        $fileName = phpRack_Adapters_File::factory($fileName)->getFileName();
                    
85
                    
                
Profile_Picture.php https://gitlab.com/rahad777/atomic_project_Rahad_143368_B36 | PHP | 273 lines
                    
1<?php
                    
2namespace App\Profile_Picture;
                    
46            Message::message("Failed! DATA HAS not BEEN INSERTED SUCCESSFULLY");
                    
47        Utility::redirect('create.php');
                    
48    }
                    
54        $fetchMode = strtoupper($fetchMode);
                    
55        if(substr_count($fetchMode, "OBJ")>0)
                    
56            $STH->setFetchMode(PDO::FETCH_OBJ);
                    
68        $fetchMode = strtoupper($fetchMode);
                    
69        if(substr_count($fetchMode, "OBJ")>0)
                    
70            $STH->setFetchMode(PDO::FETCH_OBJ);
                    
91
                    
92        Utility::redirect('create.php');
                    
93
                    
102
                    
103        Utility::redirect('create.php');
                    
104
                    
                
Lexer.php https://github.com/chotchki/symfony-sandbox.git | PHP | 317 lines
                    
1<?php
                    
2
                    
194            $result[] = new Twig_Token(Twig_Token::TEXT_TYPE, $text, $lineno);
                    
195            $lineno += substr_count($text, "\n");
                    
196        }
                    
308    {
                    
309        $this->lineno += substr_count($text, "\n");
                    
310    }
                    
                
Docblock.php https://github.com/kervin/kyzstudio.git | PHP | 294 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Docblock.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
20 */
                    
24 */
                    
25#require_once 'Zend/Reflection/Docblock/Tag.php';
                    
26
                    
94    {
                    
95        $str = "Docblock [ /* Docblock */ ] {".PHP_EOL.PHP_EOL;
                    
96        $str .= "  - Tags [".count($this->_tags)."] {".PHP_EOL;
                    
101
                    
102        $str .= "  }".PHP_EOL;
                    
103        $str .= "}".PHP_EOL;
                    
117            if (!method_exists($commentOrReflector, 'getDocComment')) {
                    
118                #require_once 'Zend/Reflection/Exception.php';
                    
119                throw new Zend_Reflection_Exception('Reflector must contain method "getDocComment"');
                    
                
ReflectionFile.php https://github.com/Exercise/zf2.git | PHP | 486 lines
                    
1<?php
                    
2/**
                    
315     *
                    
316     * Uses PHP's tokenizer to perform file reflection.
                    
317     *
                    
345             * Token ID's are explained here:
                    
346             * http://www.php.net/manual/en/tokens.php.
                    
347             */
                    
477                $this->_docComment = $value;
                    
478                $this->_startLine  = $lineNum + substr_count($value, "\n") + 1;
                    
479                return;
                    
                
File.php https://github.com/lanmediaservice/lms-tplib.git | PHP | 411 lines
                    
24 */
                    
25//*** require_once 'Zend/Reflection/Class.php';
                    
26
                    
29 */
                    
30//*** require_once 'Zend/Reflection/Function.php';
                    
31
                    
94        if (!$fileRealpath || !in_array($fileRealpath, get_included_files())) {
                    
95            //*** require_once 'Zend/Reflection/Exception.php';
                    
96            throw new Zend_Reflection_Exception('File ' . $file . ' must be required before it can be reflected');
                    
204            if (!$instance instanceof Zend_Reflection_Class) {
                    
205                //*** require_once 'Zend/Reflection/Exception.php';
                    
206                throw new Zend_Reflection_Exception('Invalid reflection class provided; must extend Zend_Reflection_Class');
                    
318             * Token ID's are explained here: 
                    
319             * http://www.php.net/manual/en/tokens.php.
                    
320             */
                    
                
LinkPreview.php https://gitlab.com/alidzapp/Link-Preview | PHP | 238 lines
                    
1<?php
                    
2/**
                    
3 * Copyright (c) 2015 Leonardo Cardoso (http://leocardz.com)
                    
4 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
                    
5 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
                    
9
                    
10/** Important php5-curl must be installed and enabled */
                    
11
                    
11
                    
12include_once "Media.php";
                    
13include_once "Regex.php";
                    
13include_once "Regex.php";
                    
14include_once "SetUp.php";
                    
15include_once "Url.php";
                    
15include_once "Url.php";
                    
16include_once "Content.php";
                    
17include_once "Json.php";
                    
                
Docblock.php https://gitlab.com/devtoannh/cafe | PHP | 294 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Docblock.php 23775 2011-03-01 17:25:24Z ralph $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Reflection/Docblock/Tag.php';
                    
26
                    
94    {
                    
95        $str = "Docblock [ /* Docblock */ ] {".PHP_EOL.PHP_EOL;
                    
96        $str .= "  - Tags [".count($this->_tags)."] {".PHP_EOL;
                    
101
                    
102        $str .= "  }".PHP_EOL;
                    
103        $str .= "}".PHP_EOL;
                    
117            if (!method_exists($commentOrReflector, 'getDocComment')) {
                    
118                require_once 'Zend/Reflection/Exception.php';
                    
119                throw new Zend_Reflection_Exception('Reflector must contain method "getDocComment"');
                    
                
baseufcomponent.php https://gitlab.com/neuser/bitrix-core | PHP | 541 lines
                    
1<?php
                    
2
                    
434
                    
435		if($this->userField['MULTIPLE'] === 'Y' && !mb_substr_count($fieldName, '[]'))
                    
436		{
                    
                
Util.php https://gitlab.com/karora/awl | PHP | 272 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHP_CodeCoverage
                    
4 *
                    
4 *
                    
5 * Copyright (c) 2009-2013, Sebastian Bergmann <sebastian@phpunit.de>.
                    
6 * All rights reserved.
                    
36 *
                    
37 * @category   PHP
                    
38 * @package    CodeCoverage
                    
38 * @package    CodeCoverage
                    
39 * @author     Sebastian Bergmann <sebastian@phpunit.de>
                    
40 * @copyright  2009-2013 Sebastian Bergmann <sebastian@phpunit.de>
                    
41 * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
                    
42 * @link       http://github.com/sebastianbergmann/php-code-coverage
                    
43 * @since      File available since Release 1.0.0
                    
                
ParserState.php https://github.com/mackensen/moodle.git | PHP | 310 lines
                    
1<?php
                    
2namespace Sabberworm\CSS\Parsing;
                    
150		if (is_string($mValue)) {
                    
151			$iLineCount = substr_count($mValue, "\n");
                    
152			$iLength = $this->strlen($mValue);
                    
163			$sResult = $this->substr($this->iCurrentPosition, $mValue);
                    
164			$iLineCount = substr_count($sResult, "\n");
                    
165			$this->iLineNo += $iLineCount;
                    
                
class-wp-customize-date-time-control.php https://gitlab.com/campus-academy/krowkaramel | PHP | 289 lines
                    
107		// Fallback to ISO date format if year, month, or day are missing from the date format.
                    
108		if ( 1 !== substr_count( $date_format, '%1$s' ) || 1 !== substr_count( $date_format, '%2$s' ) || 1 !== substr_count( $date_format, '%3$s' ) ) {
                    
109			$date_format = '%1$s-%2$s-%3$s';
                    
129					<?php ob_start(); ?>
                    
130					<label for="{{ idPrefix }}date-time-month" class="screen-reader-text"><?php esc_html_e( 'Month' ); ?></label>
                    
131					<select id="{{ idPrefix }}date-time-month" class="date-input month" data-component="month">
                    
149
                    
150					<?php ob_start(); ?>
                    
151					<label for="{{ idPrefix }}date-time-year" class="screen-reader-text"><?php esc_html_e( 'Year' ); ?></label>
                    
152					<input id="{{ idPrefix }}date-time-year" type="number" size="4" autocomplete="off" class="date-input year" data-component="year" min="{{ data.minYear }}" max="{{ data.maxYear }}">
                    
153					<?php $year_field = trim( ob_get_clean() ); ?>
                    
154
                    
154
                    
155					<?php printf( $date_format, $year_field, $month_field, $day_field ); ?>
                    
156				</div>
                    
                
php.js https://gitlab.com/alidz1982/cdnjs | JavaScript | 132 lines
                    
23    atoms: keywords("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"),
                    
24    builtin: keywords("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once"),
                    
25    multiLineStrings: true,
                    
54    var htmlMode = CodeMirror.getMode(config, "text/html");
                    
55    var phpMode = CodeMirror.getMode(config, phpConfig);
                    
56
                    
82        return style;
                    
83      } else if (isPHP && state.php.tokenize == null && stream.match("?>")) {
                    
84        state.curMode = htmlMode;
                    
103        var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),
                    
104            php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur;
                    
105        if (state.curMode == htmlMode) cur = htmlNew;
                    
130  CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});
                    
131  CodeMirror.defineMIME("text/x-php", phpConfig);
                    
132})();
                    
                
tokenizer.php https://github.com/Yannix/zetacomponents.git | PHP | 277 lines
                    
1<?php
                    
2/**
                    
221                        // lead to a false position value.
                    
222                        if ( ( $newLines = substr_count( $match, "\n" ) ) > 0 )
                    
223                        {
                    
                
StringUtils.php https://github.com/testlinkjp/testlink-japanese-localization.git | PHP | 406 lines
                    
1<?php
                    
2/**
                    
175    static function explode( $separator, $subject ) {
                    
176        if ( substr_count( $subject, $separator ) > 1000 ) {
                    
177            return new ExplodeIterator( $separator, $subject );
                    
                
IPv6.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 275 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * A PHP-Based RSS and Atom Feed Framework.
                    
6 * Takes the hard work out of managing a complete RSS/Atom solution.
                    
40 * @link http://simplepie.org/ SimplePie
                    
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
                    
42 */
                    
49 * @subpackage HTTP
                    
50 * @copyright 2003-2005 The PHP Group
                    
51 * @license http://www.opensource.org/licenses/bsd-license.php
                    
51 * @license http://www.opensource.org/licenses/bsd-license.php
                    
52 * @link http://pear.php.net/package/Net_IPv6
                    
53 * @author Alexander Merz <alexander.merz@web.de>
                    
72	 * @author Josh Peck <jmp at joshpeck dot org>
                    
73	 * @copyright 2003-2005 The PHP Group
                    
74	 * @license http://www.opensource.org/licenses/bsd-license.php
                    
                
edit.php https://github.com/laanlabs/snackfeed.com.git | PHP | 192 lines
                    
113			<? for ( $i = 0; $i <= 6; $i ++) { ?>
                    
114				<input type="checkbox" name="_show_process_days[]" <? if (substr_count($_show_process_days, $i) > 0) echo 'CHECKED'  ?> value="<?= $i ?>" ><?= $days[$i] ?>&nbsp;&nbsp;
                    
115			<? } ?>
                    
171			<select name="_status" >
                    
172				<option value="1" <?php if ($_status==1) {echo 'SELECTED';} ?>  >Active</option>
                    
173				<option value="2" <?php if ($_status==2) {echo 'SELECTED';} ?>>Pending</option>			
                    
173				<option value="2" <?php if ($_status==2) {echo 'SELECTED';} ?>>Pending</option>			
                    
174				<option value="0" <?php if ($_status==0) {echo 'SELECTED';} ?>>Inactive</option>						
                    
175			</select>
                    
                
wpseo-functions.php https://bitbucket.org/antonyravel/cape-resorts.git | PHP | 367 lines
                    
1<?php
                    
2/**
                    
142		$pagenum       = get_query_var( 'page' );
                    
143		$max_num_pages = ( isset( $post->post_content ) ) ? substr_count( $post->post_content, '<!--nextpage-->' ) : 1;
                    
144		if ( $max_num_pages >= 1 )
                    
327	$GLOBALS['wp']->add_query_var( 'sitemap_n' );
                    
328	add_rewrite_rule( 'sitemap_index\.xml$', 'index.php?sitemap=1', 'top' );
                    
329	add_rewrite_rule( '([^/]+?)-sitemap([0-9]+)?\.xml$', 'index.php?sitemap=$matches[1]&sitemap_n=$matches[2]', 'top' );
                    
338	$options    = get_option( 'wpseo_xml' );
                    
339	$base       = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : '';
                    
340	if ( $sitemapurl  == null )
                    
                
FormCheckboxTest.php https://github.com/mrbanzai/zf2.git | PHP | 289 lines
                    
1<?php
                    
2/**
                    
39 */
                    
40class FormCheckboxTest extends \PHPUnit_Framework_TestCase
                    
41{
                    
48        }
                    
49        $this->view   = new \Zend\View\PhpRenderer();
                    
50        $this->helper = new \Zend\View\Helper\FormCheckbox();
                    
101        $this->assertRegexp('/<input[^>]*?(checked="checked")/', $html);
                    
102        $count = substr_count($html, 'checked');
                    
103        $this->assertEquals(2, $count);
                    
                
MockMethod.php https://gitlab.com/madwanz64/laravel | PHP | 434 lines
                    
1<?php declare(strict_types=1);
                    
2/*
                    
2/*
                    
3 * This file is part of PHPUnit.
                    
4 *
                    
4 *
                    
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
                    
6 *
                    
9 */
                    
10namespace PHPUnit\Framework\MockObject;
                    
11
                    
22use function substr;
                    
23use function substr_count;
                    
24use function trim;
                    
37/**
                    
38 * @internal This class is not covered by the backward compatibility promise for PHPUnit
                    
39 */
                    
                
function.substr-compare.html https://bitbucket.org/thncr/manuals.git | HTML | 167 lines
                    
9 <div class="prev" style="text-align: left; float: left;"><a href="function.strtr.html">strtr</a></div>
                    
10 <div class="next" style="text-align: right; float: right;"><a href="function.substr-count.html">substr_count</a></div>
                    
11 <div class="up"><a href="ref.strings.html">字符串函数</a></div>
                    
11 <div class="up"><a href="ref.strings.html">字符串函数</a></div>
                    
12 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
13</div><hr /><div id="function.substr-compare" class="refentry">
                    
15  <h1 class="refname">substr_compare</h1>
                    
16  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">substr_compare</span> &mdash; <span class="dc-title">二进制安全比较字符串(从偏移位置比较指定长度)</span></p>
                    
17
                    
150    <div class="example-contents">
                    
151<div class="phpcode"><code><span style="color: #000000">
                    
152<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_compare</span><span style="color: #007700">(</span><span style="color: #DD0000">"abcde"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"bc"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;0<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_compare</span><span style="color: #007700">(</span><span style="color: #DD0000">"abcde"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"de"</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;0<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_compare</span><span style="color: #007700">(</span><span style="color: #DD0000">"abcde"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"bcg"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;0<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_compare</span><span style="color: #007700">(</span><span style="color: #DD0000">"abcde"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"BC"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;0<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_compare</span><span style="color: #007700">(</span><span style="color: #DD0000">"abcde"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"bc"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;1<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_compare</span><span style="color: #007700">(</span><span style="color: #DD0000">"abcde"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"cd"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;-1<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">substr_compare</span><span style="color: #007700">(</span><span style="color: #DD0000">"abcde"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"abc"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;warning<br /></span><span style="color: #0000BB">?&gt;</span>
                    
163 <div class="prev" style="text-align: left; float: left;"><a href="function.strtr.html">strtr</a></div>
                    
164 <div class="next" style="text-align: right; float: right;"><a href="function.substr-count.html">substr_count</a></div>
                    
165 <div class="up"><a href="ref.strings.html">字符串函数</a></div>
                    
                
Util.php https://bitbucket.org/rybadour/todo_list_site.git | PHP | 268 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHP_CodeCoverage
                    
4 *
                    
36 *
                    
37 * @category   PHP
                    
38 * @package    CodeCoverage
                    
41 * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
                    
42 * @link       http://github.com/sebastianbergmann/php-code-coverage
                    
43 * @since      File available since Release 1.0.0
                    
48 *
                    
49 * @category   PHP
                    
50 * @package    CodeCoverage
                    
53 * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
                    
54 * @link       http://github.com/sebastianbergmann/php-code-coverage
                    
55 * @since      Class available since Release 1.0.0
                    
                
directw.php https://gitlab.com/B.D.B/Trabalho_PHP_ADSZoo_DJ | PHP | 412 lines
                    
1<?php
                    
2
                    
93						$nb_carac = mb_strlen( $tmp , $this->mpdf->mb_enc ) ;  
                    
94						$nb_spaces = mb_substr_count( $tmp ,' ', $this->mpdf->mb_enc ) ;  
                    
95						$inclCursive=false;
                    
175						$nb_carac = strlen( $tmp ) ;  
                    
176						$nb_spaces = substr_count( $tmp ,' ' ) ;  
                    
177						list($charspacing,$ws) = $this->mpdf->GetJspacing($nb_carac,$nb_spaces,((($w-2) - $len_ligne) * _MPDFK),$false);
                    
                
Docblock.php https://bitbucket.org/haichau59/manga.git | PHP | 294 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Docblock.php 24594 2012-01-05 21:27:01Z matthew $
                    
20 */
                    
24 */
                    
25//require_once 'Zend/Reflection/Docblock/Tag.php';
                    
26
                    
94    {
                    
95        $str = "Docblock [ /* Docblock */ ] {".PHP_EOL.PHP_EOL;
                    
96        $str .= "  - Tags [".count($this->_tags)."] {".PHP_EOL;
                    
101
                    
102        $str .= "  }".PHP_EOL;
                    
103        $str .= "}".PHP_EOL;
                    
117            if (!method_exists($commentOrReflector, 'getDocComment')) {
                    
118                //require_once 'Zend/Reflection/Exception.php';
                    
119                throw new Zend_Reflection_Exception('Reflector must contain method "getDocComment"');
                    
                
Cookie.php https://bitbucket.org/cesarmedrano/cesarmedrano.git | PHP | 525 lines
                    
1<?php
                    
2
                    
440            // Root domains don't match except for .local.
                    
441            if (!substr_count($realDomain, '.') && strcasecmp($realDomain, 'local')) {
                    
442                return false;
                    
447                return !strcasecmp($domain, $realDomain) ||
                    
448                    substr_count(substr($domain, 0, -strlen($realDomain)), '.') === 1;
                    
449            }
                    
                
Message.php https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br | PHP | 197 lines
                    
1<?php
                    
2
                    
124        // If these aren't the same, then one line didn't match and there's an invalid header.
                    
125        if ($count !== \substr_count($rawHeaders, "\n")) {
                    
126            // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
                    
                
file.php https://gitlab.com/ricardosanchez/prueba | PHP | 428 lines
                    
1<?php
                    
2/**
                    
124
                    
125			// Search for suffixed versions. Example: tags.j31.php
                    
126			if (!empty($suffixes))
                    
131				{
                    
132					$rawPath  = str_replace('.', '/', $this->layoutId) . '.' . $suffix . '.php';
                    
133					$this->addDebugMessage('<strong>Searching layout for:</strong> ' . $rawPath);
                    
144			// Standard version
                    
145			$rawPath  = str_replace('.', '/', $this->layoutId) . '.php';
                    
146			$this->addDebugMessage('<strong>Searching layout for:</strong> ' . $rawPath);
                    
246			// Valid option format
                    
247			if (substr_count($component, 'com_'))
                    
248			{
                    
                
CustomLocaleHandler.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 221 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * @file CustomLocaleHandler.inc.php
                    
5 *
                    
17
                    
18require_once('CustomLocalePlugin.inc.php');
                    
19require_once('CustomLocaleAction.inc.php');
                    
171		if (!FileManager::fileExists($customFilePath)) {
                    
172			$numParentDirs = substr_count($customFilePath, DIRECTORY_SEPARATOR); 
                    
173			$parentDirs = '';
                    
                
Hobbies.php https://gitlab.com/sumonaliza12/ATOMIC_PROJECT_SEIP143203_SUMONA_SEIP143203 | PHP | 391 lines
                    
1<?php
                    
2namespace App\BITM\SEIP143203\Hobbies;
                    
24            $sth->execute();
                    
25            if(substr_count($fetchMode,'OBJ') > 0)
                    
26                $sth->setFetchMode(PDO::FETCH_OBJ);
                    
77            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Updated !</h3></div>");
                    
78        Utility::redirect('index.php');
                    
79
                    
93            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Inserted !</h3></div>");
                    
94        Utility::redirect('index.php');
                    
95
                    
127
                    
128        Utility::redirect('create.php');
                    
129
                    
152            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been trashed !</h3></div>");
                    
153        Utility::redirect('index.php');
                    
154
                    
                
ContainerTest.php https://github.com/tanduy/zf.git | PHP | 455 lines
                    
1<?php
                    
2/**
                    
28require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/TestHelper.php';
                    
29require_once "PHPUnit/Framework/TestCase.php";
                    
30require_once "PHPUnit/Framework/TestSuite.php";
                    
32/** Zend_View_Helper_Placeholder_Container */
                    
33require_once 'Zend/View/Helper/Placeholder/Container.php';
                    
34
                    
45 */
                    
46class Zend_View_Helper_Placeholder_ContainerTest extends PHPUnit_Framework_TestCase
                    
47{
                    
59    {
                    
60        require_once "PHPUnit/TextUI/TestRunner.php";
                    
61
                    
401        $value = $this->container->toString();
                    
402        $expectedValue = '    <ul><li>foo</li>' . PHP_EOL . '    <li>bar</li>' . PHP_EOL . '    <li>baz</li></ul>';
                    
403        $this->assertEquals($expectedValue, $value);
                    
                
BookTitle.php https://gitlab.com/naznin/NazninAkter_151485_B35_Session30 | PHP | 287 lines
                    
1<?php
                    
2namespace App\BookTitle;
                    
49
                    
50        Utility::redirect('create.php');
                    
51
                    
61        $fetchMode = strtoupper($fetchMode);
                    
62        if(substr_count($fetchMode,'OBJ') > 0)
                    
63            $STH->setFetchMode(PDO::FETCH_OBJ);
                    
83        $fetchMode = strtoupper($fetchMode);
                    
84        if(substr_count($fetchMode,'OBJ') > 0)
                    
85            $STH->setFetchMode(PDO::FETCH_OBJ);
                    
103
                    
104        Utility::redirect('index.php');
                    
105
                    
116
                    
117        Utility::redirect('index.php');
                    
118
                    
                
Docblock.php https://github.com/gryzz/crystal_magento.git | PHP | 294 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Docblock.php 18951 2009-11-12 16:26:19Z alexander $
                    
20 */
                    
24 */
                    
25#require_once 'Zend/Reflection/Docblock/Tag.php';
                    
26
                    
94    {
                    
95        $str = "Docblock [ /* Docblock */ ] {".PHP_EOL.PHP_EOL;
                    
96        $str .= "  - Tags [".count($this->_tags)."] {".PHP_EOL;
                    
101
                    
102        $str .= "  }".PHP_EOL;
                    
103        $str .= "}".PHP_EOL;
                    
117            if (!method_exists($commentOrReflector, 'getDocComment')) {
                    
118                #require_once 'Zend/Reflection/Exception.php';
                    
119                throw new Zend_Reflection_Exception('Reflector must contain method "getDocComment"');
                    
                
BookTitle.php https://gitlab.com/Mishu_ctg69/Princy_143467_B37_Atomic_project | PHP | 395 lines
                    
1<?php
                    
2namespace App\BITM\SEIP143467\BookTitle;
                    
24        $sth->execute();
                    
25        if(substr_count($fetchMode,'OBJ') > 0)
                    
26            $sth->setFetchMode(PDO::FETCH_OBJ);
                    
74            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Inserted !</h3></div>");
                    
75        Utility::redirect('index.php');
                    
76
                    
97            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Inserted !</h3></div>");
                    
98        Utility::redirect('index.php');
                    
99
                    
113            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been Inserted !</h3></div>");
                    
114        Utility::redirect('index.php');
                    
115
                    
136            Message::message("<div id='msg'></div><h3 align='center'> <br> Data Hasn't Been trashed !</h3></div>");
                    
137        Utility::redirect('index.php');
                    
138
                    
                
inc-html.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 393 lines
                    
1<?php
                    
2/**
                    
5 * @param string $label : Titre du label pour le champ select
                    
6 * @param string $name : nom de la variable PHP/HTML
                    
7 * @param string $html : code HTML facultatif
                    
125 * @param string $label : <td>libelle (premiere cellule)</td>
                    
126 * @param string $name  : nom de la variable PHP/HTML
                    
127 * @param string $value : valeur par defaut
                    
134	if($password) $type='password'; else $type='text';
                    
135	//if(substr_count($html,'class')==0) $html.=" class='forml'";
                    
136	$tr = "\t<tr>\n\t\t<td align='left'><label for='$name'>$label</label></td>\n\t\t<td align='left'><input type='$type' name='$name' id='$name' value=\"$value\" $html/></td>\n\t\t$fin_ligne\n\t</tr>\n";
                    
143 * @param string $label : <td>libelle (premiere cellule)</td>
                    
144 * @param string $name  : nom de la variable PHP/HTML
                    
145 * @param string $value : valeur par defaut
                    
307 *
                    
308 * @see http://www.php.net/manual/en/function.strtr.php#51862
                    
309 * @param string $sString : chaine a traiter
                    
                
File.php https://bitbucket.org/haichau59/manga.git | PHP | 412 lines
                    
29 */
                    
30//require_once 'Zend/Reflection/Function.php';
                    
31
                    
94        if (!$fileRealpath || !in_array($fileRealpath, get_included_files())) {
                    
95            //require_once 'Zend/Reflection/Exception.php';
                    
96            throw new Zend_Reflection_Exception('File ' . $file . ' must be required before it can be reflected');
                    
187        if (!$instance instanceof Zend_Reflection_Docblock) {
                    
188            //require_once 'Zend/Reflection/Exception.php';
                    
189            throw new Zend_Reflection_Exception('Invalid reflection class specified; must extend Zend_Reflection_Docblock');
                    
225            if (!$instance instanceof Zend_Reflection_Function) {
                    
226                //require_once 'Zend/Reflection/Exception.php';
                    
227                throw new Zend_Reflection_Exception('Invalid reflection class provided; must extend Zend_Reflection_Function');
                    
319             * Token ID's are explained here:
                    
320             * http://www.php.net/manual/en/tokens.php.
                    
321             */
                    
                
CSV.class.php https://github.com/lievenjanssen/The-DataTank.git | PHP | 131 lines
                    
1<?php
                    
2/**
                    
9 */
                    
10include_once ("model/resources/strategies/ATabularData.class.php");
                    
11class CSV extends ATabularData {
                    
61            // find the delimiter
                    
62            $commas = substr_count($csv, ",", 0, strlen($csv)>127?127:strlen($csv));
                    
63            $semicolons = substr_count($csv, ";", 0, strlen($csv)>127?127:strlen($csv));
                    
                
ContainerTest.php https://github.com/Thinkscape/zf2.git | PHP | 434 lines
                    
1<?php
                    
2/**
                    
18 */
                    
19class ContainerTest extends \PHPUnit_Framework_TestCase
                    
20{
                    
381        $this->container->setPrefix('<ul><li>')
                    
382                        ->setSeparator('</li>' . PHP_EOL . '<li>')
                    
383                        ->setPostfix('</li></ul>')
                    
385        $value = $this->container->toString();
                    
386        $expectedValue = '    <ul><li>foo</li>' . PHP_EOL . '    <li>bar</li>' . PHP_EOL . '    <li>baz</li></ul>';
                    
387        $this->assertEquals($expectedValue, $value);
                    
428
                    
429        $lis = substr_count($string, "\n        <li>");
                    
430        $this->assertEquals(3, $lis);
                    
                
upload.php https://github.com/andrerezende/CENSO.git | PHP | 245 lines
                    
1<?php
                    
2include 'Pessoa.php';
                    
25        $msg = 'o rato roeu a roupa do rei';
                    
26        //$qtd = substr_count($msg, 'roeu a roupa');
                    
27        $msg2 = str_replace("rato roeu", "cachorro", $msg);
                    
34            $ln = fgets($fp); // pega por linha
                    
35            if(Substr_count($ln, 'INDEX') == 0) {   // se nao achar esta string dentro de ln faça
                    
36               
                    
166                    //var_dump($registro_arq1[$i]['siape'], $registro_arq2[$j]['siape']); echo '<BR><BR>';
                    
167                    if(Substr_count($registro_arq1[$i]['siape'], $registro_arq2[$j]['siape']) != 0) { // procurando a string do registro_arq1 em registro_arq2
                    
168                        //echo '1';
                    
240             <script>alert(\"Não acesse este arquivo diretamente!\");  
                    
241               location.href = \"../formAutenticado.php\";      
                    
242                </script>";
                    
                
Compiler.php https://gitlab.com/ShizuoLamperouge/Dashboard | PHP | 277 lines
                    
1<?php
                    
2
                    
13/**
                    
14 * Compiles a node to PHP code.
                    
15 *
                    
54    /**
                    
55     * Gets the current PHP code after compilation.
                    
56     *
                    
56     *
                    
57     * @return string The PHP code
                    
58     */
                    
132    /**
                    
133     * Appends an indentation to the current PHP code after compilation.
                    
134     *
                    
213            // when mbstring.func_overload is set to 2
                    
214            // mb_substr_count() replaces substr_count()
                    
215            // but they have different signatures!
                    
                
header_php.php https://github.com/yama/zencart13x-ja.git | PHP | 186 lines
                    
1<?php
                    
2/**
                    
8 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
                    
9 * @version $Id: header_php.php 4825 2006-10-23 22:25:11Z drbyte $
                    
10 */
                    
18
                    
19require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
                    
20if (isset($_POST['action']) && ($_POST['action'] == 'process')) {
                    
50    if (ENTRY_DOB_MIN_LENGTH > 0 or !empty($_POST['dob'])) {
                    
51      if (substr_count($dob,'/') > 2 || checkdate((int)substr(zen_date_raw($dob), 4, 2), (int)substr(zen_date_raw($dob), 6, 2), (int)substr(zen_date_raw($dob), 0, 4)) == false) {
                    
52        $error = true;
                    
81    // check phpBB for duplicate email address
                    
82    if ($phpBB->phpbb_check_for_duplicate_email(zen_db_input($email_address)) == 'already_exists' ) {
                    
83      $error = true;
                    
91    $old_addr_check=$db->Execute("select customers_email_address from ".TABLE_CUSTOMERS." where customers_id='".(int)$_SESSION['customer_id']."'");
                    
92    $phpBB->phpbb_change_email(zen_db_input($old_addr_check->fields['customers_email_address']),zen_db_input($email_address));
                    
93
                    
                
Emulative.php https://gitlab.com/madwanz64/laravel | PHP | 248 lines
                    
11use PhpParser\Lexer\TokenEmulator\ExplicitOctalEmulator;
                    
12use PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator;
                    
13use PhpParser\Lexer\TokenEmulator\FnTokenEmulator;
                    
43    {
                    
44        $this->targetPhpVersion = $options['phpVersion'] ?? Emulative::PHP_8_1;
                    
45        unset($options['phpVersion']);
                    
64        foreach ($emulators as $emulator) {
                    
65            $emulatorPhpVersion = $emulator->getPhpVersion();
                    
66            if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) {
                    
109        return version_compare(\PHP_VERSION, $emulatorPhpVersion, '<')
                    
110            && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '>=');
                    
111    }
                    
114        return version_compare(\PHP_VERSION, $emulatorPhpVersion, '>=')
                    
115            && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '<');
                    
116    }
                    
                
install.php https://gitlab.com/dali99/shimmie2-Material-Theme | PHP | 471 lines
                    
35			<h1>Install Error</h1>
                    
36			<p>Shimmie needs to be run via a web server with PHP support -- you
                    
37			appear to be either opening the file from your hard disk, or your
                    
37			appear to be either opening the file from your hard disk, or your
                    
38			web server is mis-configured and doesn't know how to handle PHP files.</p>
                    
39			<p>If you've installed a web server on your desktop PC, you probably
                    
117function do_install() { // {{{
                    
118	if(file_exists("data/config/auto_install.conf.php")) {
                    
119		require_once "data/config/auto_install.conf.php";
                    
235				Drivers can generally be downloaded with your OS package manager;
                    
236				for Debian / Ubuntu you want php5-pgsql, php5-mysql, or php5-sqlite.
                    
237			</p>
                    
455		    The web server isn't allowed to write to the config file; please copy
                    
456		    the text below, save it as 'data/config/shimmie.conf.php', and upload it into the shimmie
                    
457		    folder manually. Make sure that when you save it, there is no whitespace
                    
                
ViewScriptTest.php https://bitbucket.org/Dal-Papa/is-340-publish-base.git | PHP | 245 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: ViewScriptTest.php 24979 2012-06-19 19:15:52Z rob $
                    
21 */
                    
23// Call Zend_Form_Decorator_ViewScriptTest::main() if this source file is executed directly.
                    
24if (!defined("PHPUnit_MAIN_METHOD")) {
                    
25    define("PHPUnit_MAIN_METHOD", "Zend_Form_Decorator_ViewScriptTest::main");
                    
27
                    
28require_once 'Zend/Form/Decorator/ViewScript.php';
                    
29
                    
29
                    
30require_once 'Zend/Form/Element.php';
                    
31require_once 'Zend/Form/Element/Text.php';
                    
31require_once 'Zend/Form/Element/Text.php';
                    
32require_once 'Zend/View.php';
                    
33
                    
                
smarty_internal_compile_section.php https://gitlab.com/zohaibsaleem/shipcliq | PHP | 87 lines
                    
1<?php //0046a
                    
2if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
                    
3?>
                    
15PAh0J4pMB+k0mZj0ccTOrLuFTnzIDTgq4wxqoNYlBxEkBAbsHitMfUtY2IXjktgqR/bNeWQgeBCt
                    
16ZakXT1sgJLsH2ovU4B156bCLwuPhPKJpkVsofOZj6tXYoRdB5c4liGtRaXs32femACRSN5i/r1W9
                    
17aYSLiqMQNvrvZqWqIi+6kGZ82FIwpZAKVWiKZHOrgqYPFPMaYOpTb6dcx8enQXXSiYM/LlA9UuAe
                    
                
util.php https://github.com/aramk/IMDb-Scraper.git | PHP | 179 lines
                    
1<?php
                    
2
                    
25// Count how many times the $needles occur in the $haystack
                    
26function substr_count_array( $haystack, $needles, $insensitive = TRUE ) {
                    
27	$count = 0;
                    
29		if ($insensitive) {
                    
30			$count += substr_count_i( $haystack, $substring);
                    
31		} else {
                    
31		} else {
                    
32			$count += substr_count( $haystack, $substring);
                    
33		}
                    
37
                    
38// Case insensitive substr_count
                    
39function substr_count_i( $haystack, $substring ) {
                    
41	$substring = strtolower($substring);
                    
42	return substr_count( $haystack, $substring );
                    
43}
                    
                
class.dbquery.php https://gitlab.com/zohaibsaleem/shipcliq | PHP | 140 lines
                    
1<?php //0046a
                    
2if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
                    
3?>
                    
16+sazcbalLRFTdLSCoS2ytfN4XPpJ4Bc6QrthyeE8TM4wm+JOQeN6KlmUBttUri3+BSAM324hrrd/
                    
17KGOOYBhHFNU2DgU2Z/rmlJvkw72GMI/F94Yh/A39Mvdddsz9/bi69gPhPhESZqPUUCqVu9db5UDi
                    
180h45KP8dfjbWYWTfPJxTY9kEJv3fYdG+Vh+STekWyAMRR2wwL2akPUOZHIE5zFBMfdoK9Le1TmHy
                    
125z/UTuSsvLf4QJgiAUQ1AJx1U3buUe5nJ9M4EHBoTKqvjCyp+SDqi+XLXYTwOduhsA52eC+19XFXR
                    
126J3VZEnh8iVqJkv0FjR8EcIbYWZ4LKd1jD4ausggz8veotP9m+4LxdJOPHp6NtRFQgzJIJyqwApQ7
                    
127Ps49LtJf/BQB7/dEZclNk8ZjOalBjMHNADau13dzGDss2cS5ZIgEt75PnwdGouJrAUy++BYqBfNQ
                    
                
Docblock.php https://github.com/sas05/zf-1.11.x-doctrine-2.x.git | PHP | 294 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Docblock.php 23775 2011-03-01 17:25:24Z ralph $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Reflection/Docblock/Tag.php';
                    
26
                    
94    {
                    
95        $str = "Docblock [ /* Docblock */ ] {" . PHP_EOL . PHP_EOL;
                    
96        $str .= "  - Tags [" . count($this->_tags) . "] {" . PHP_EOL;
                    
101
                    
102        $str .= "  }" . PHP_EOL;
                    
103        $str .= "}" . PHP_EOL;
                    
117            if (!method_exists($commentOrReflector, 'getDocComment')) {
                    
118                require_once 'Zend/Reflection/Exception.php';
                    
119                throw new Zend_Reflection_Exception('Reflector must contain method "getDocComment"');
                    
                
 

Source

Language