PageRenderTime 2033ms queryTime 330ms sortTime 37ms getByIdsTime 1090ms findMatchingLines 432ms

100+ results results for 'php strtr repo:nunomorgadinho/AMMPro' (2033 ms)

Not the results you expected?
Url.php https://gitlab.com/x33n/respond | PHP | 548 lines
                    
1<?php
                    
2
                    
275
                    
276        $this->path = strtr($path, $pathReplace);
                    
277
                    
                
language.php https://gitlab.com/Rad1calDreamer/honey | PHP | 569 lines
                    
27				//First try to load customized class
                    
28				$strDirName = $_SERVER["DOCUMENT_ROOT"].BX_PERSONAL_ROOT."/php_interface/".$sLang."/search";
                    
29				$strFileName = $strDirName."/language.php";
                    
38						$strDirName = $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/search/tools/".$sLang;
                    
39						$strFileName = $strDirName."/language.php";
                    
40						if(file_exists($strFileName))
                    
72				$cache_id = filemtime($file_name).",".$file_name;
                    
73				$obCache = new CPHPCache;
                    
74				if($obCache->StartDataCache(360000, $cache_id, "search"))
                    
223		if(isset($keyboards[$combo]))
                    
224			return strtr($text, $keyboards[$combo]);
                    
225		else
                    
                
csv.php https://github.com/edmondscommerce/XAMPP-Magento-Demo-Site.git | PHP | 323 lines
                    
1<?php
                    
2/* vim: set expandtab sw=4 ts=4 sts=4: */
                    
3/**
                    
4 * CSV import plugin for phpMyAdmin
                    
5 *
                    
6 * @todo    add an option for handling NULL values
                    
7 * @version $Id: csv.php 11336 2008-06-21 15:01:27Z lem9 $
                    
8 */
                    
8 */
                    
9if (! defined('PHPMYADMIN')) {
                    
10    exit;
                    
43    );
                    
44$csv_terminated = strtr($csv_terminated, $replacements);
                    
45$csv_enclosed = strtr($csv_enclosed,  $replacements);
                    
45$csv_enclosed = strtr($csv_enclosed,  $replacements);
                    
46$csv_escaped = strtr($csv_escaped, $replacements);
                    
47$csv_new_line = strtr($csv_new_line, $replacements);
                    
                
BaseVarDumper.php https://gitlab.com/makkooz/nikestreetbeat | PHP | 271 lines
                    
1<?php
                    
2/**
                    
55        if ($highlight) {
                    
56            $result = highlight_string("<?php\n" . self::$_output, true);
                    
57            self::$_output = preg_replace('/&lt;\\?php<br \\/>/', '', $result, 1);
                    
127                    foreach ($dumpValues as $key => $value) {
                    
128                        $keyDisplay = strtr(trim($key), "\0", ':');
                    
129                        self::$_output .= "\n" . $spaces . "    [$keyDisplay] => ";
                    
140     *
                    
141     * The string is a valid PHP expression that can be evaluated by PHP parser
                    
142     * and the evaluation result will give back the variable value.
                    
146     *
                    
147     * It also handles objects by using the PHP functions serialize() and unserialize().
                    
148     *
                    
148     *
                    
149     * PHP 5.4 or above is required to parse the exported value.
                    
150     *
                    
                
Debug.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 204 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 */
                    
195            }
                    
196            $arg = strtr($arg, array("\t" => '\t', "\r" => '\r', "\n" => '\n', "'" => '\\\''));
                    
197            $out .= "'" . $arg . "'";
                    
                
date.php https://github.com/mzkrelx/milm-search-ui-php.git | PHP | 404 lines
                    
1<?php
                    
2/**
                    
9 * @copyright  2010 - 2012 Fuel Development Team
                    
10 * @link       http://fuelphp.com
                    
11 */
                    
23 * @category    Core
                    
24 * @link        http://docs.fuelphp.com/classes/date.html
                    
25 *
                    
28 * - create_time() uses strptime and has currently a very bad hack to use strtotime for windows servers
                    
29 * - Uses strftime formatting for dates www.php.net/manual/en/function.strftime.php
                    
30 */
                    
85
                    
86					$rexep = "#" . strtr(preg_quote($format), $masks) . "#";
                    
87
                    
112	 * @param   int     UNIX timestamp from current server
                    
113	 * @param   string  valid PHP timezone from www.php.net/timezones
                    
114	 * @return  Date
                    
                
Helpers.php https://gitlab.com/paveltizek/shop | PHP | 221 lines
                    
1<?php
                    
2
                    
23		if ($editor = self::editorUri($file, $line)) {
                    
24			$file = strtr($file, '\\', '/');
                    
25			if (preg_match('#(^[a-z]:)?/.{1,50}$#i', $file, $m) && strlen($file) > strlen($m[0])) {
                    
27			}
                    
28			$file = strtr($file, '/', DIRECTORY_SEPARATOR);
                    
29			return self::formatHtml('<a href="%" title="%">%<b>%</b>%</a>',
                    
48		if (Debugger::$editor && $file && is_file($file)) {
                    
49			return strtr(Debugger::$editor, array('%file' => rawurlencode($file), '%line' => $line ? (int) $line : 1));
                    
50		}
                    
115	{
                    
116		if (PHP_VERSION_ID < 50400) {
                    
117			return @iconv('UTF-16', 'UTF-8//IGNORE', iconv('UTF-8', 'UTF-16//IGNORE', $s)); // intentionally @
                    
                
Token.php https://github.com/tmccormi/openemr.git | PHP | 273 lines
                    
1<?php
                    
2/**
                    
260            $stringVal  = (string) $value;
                    
261            $changedVal = strtr($stringVal, $this->map);
                    
262
                    
270
                    
271        return strtr((string) $value, $this->map);
                    
272    }
                    
                
JWT.php https://gitlab.com/sschand/WeatherShouldIGo | PHP | 164 lines
                    
1<?php
                    
2
                    
17     *
                    
18     * @return object The JWT's payload as a PHP object
                    
19     */
                    
47    /**
                    
48     * @param object|array $payload           PHP object or array
                    
49     * @param string       $key               The secret key
                    
108    /**
                    
109     * @param object|array $input A PHP object or array
                    
110     *
                    
110     *
                    
111     * @return string JSON representation of the PHP object or array
                    
112     */
                    
133        $input .= str_repeat('=', $padlen);
                    
134        return base64_decode(strtr($input, '-_', '+/'));
                    
135    }
                    
                
reserved.pl https://github.com/motok5/gtags.git | Perl | 259 lines
                    
34#
                    
35# 1001 - 2000: Reserved variable (PHP)
                    
36# 2001 -; Reserved word (wide sense)
                    
239		print "\t/* Delete blanks. Ex. ' # define ' => '#define' */\n";
                    
240		print "\tstr = strtrim(str, TRIM_ALL, &len);\n";
                    
241		print "\n";
                    
                
CNumberValidator.php https://gitlab.com/muthuvel.ns/imp-file | PHP | 175 lines
                    
1<?php
                    
2/**
                    
122			$message=$this->integerOnly ? Yii::t('yii','{attribute} must be an integer.') : Yii::t('yii','{attribute} must be a number.');
                    
123		$message=strtr($message, array(
                    
124			'{attribute}'=>$label,
                    
128			$tooBig=Yii::t('yii','{attribute} is too big (maximum is {max}).');
                    
129		$tooBig=strtr($tooBig, array(
                    
130			'{attribute}'=>$label,
                    
135			$tooSmall=Yii::t('yii','{attribute} is too small (minimum is {min}).');
                    
136		$tooSmall=strtr($tooSmall, array(
                    
137			'{attribute}'=>$label,
                    
                
DefaultTranslator.php https://gitlab.com/mohamedchiheb.bida/workshopFOS | PHP | 167 lines
                    
1<?php
                    
2
                    
53     * Parameters are replaced in the message in the same manner that
                    
54     * {@link strtr()} uses.
                    
55     *
                    
75    {
                    
76        return strtr($id, $parameters);
                    
77    }
                    
135        if (1 == $number) {
                    
136            return strtr($ids[0], $parameters);
                    
137        }
                    
142
                    
143        return strtr($ids[1], $parameters);
                    
144    }
                    
                
Headers.php https://gitlab.com/leon0399/damnit-engine | PHP | 198 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * @link      https://github.com/slimphp/Slim
                    
6 * @copyright Copyright (c) 2011-2015 Josh Lockhart
                    
6 * @copyright Copyright (c) 2011-2015 Josh Lockhart
                    
7 * @license   https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)
                    
8 */
                    
37        'CONTENT_LENGTH' => 1,
                    
38        'PHP_AUTH_USER' => 1,
                    
39        'PHP_AUTH_PW' => 1,
                    
39        'PHP_AUTH_PW' => 1,
                    
40        'PHP_AUTH_DIGEST' => 1,
                    
41        'AUTH_TYPE' => 1,
                    
190    {
                    
191        $key = strtr(strtolower($key), '_', '-');
                    
192        if (strpos($key, 'http-') === 0) {
                    
                
csv.php https://github.com/2bj/Skolkovo--i-gorod.com-.git | PHP | 323 lines
                    
1<?php
                    
2/* vim: set expandtab sw=4 ts=4 sts=4: */
                    
3/**
                    
4 * CSV import plugin for phpMyAdmin
                    
5 *
                    
6 * @todo    add an option for handling NULL values
                    
7 * @version $Id: csv.php 11335 2008-06-21 14:01:54Z lem9 $
                    
8 */
                    
8 */
                    
9if (! defined('PHPMYADMIN')) {
                    
10    exit;
                    
43    );
                    
44$csv_terminated = strtr($csv_terminated, $replacements);
                    
45$csv_enclosed = strtr($csv_enclosed,  $replacements);
                    
45$csv_enclosed = strtr($csv_enclosed,  $replacements);
                    
46$csv_escaped = strtr($csv_escaped, $replacements);
                    
47$csv_new_line = strtr($csv_new_line, $replacements);
                    
                
BaseVarDumper.php https://gitlab.com/afzalpotenza/YII_salon | PHP | 272 lines
                    
1<?php
                    
2/**
                    
56        if ($highlight) {
                    
57            $result = highlight_string("<?php\n" . self::$_output, true);
                    
58            self::$_output = preg_replace('/&lt;\\?php<br \\/>/', '', $result, 1);
                    
119                    self::$_output .= "$className#$id\n" . $spaces . '(';
                    
120                    if ('__PHP_Incomplete_Class' !== get_class($var) && method_exists($var, '__debugInfo')) {
                    
121                        $dumpValues = $var->__debugInfo();
                    
128                    foreach ($dumpValues as $key => $value) {
                    
129                        $keyDisplay = strtr(trim($key), "\0", ':');
                    
130                        self::$_output .= "\n" . $spaces . "    [$keyDisplay] => ";
                    
141     *
                    
142     * The string is a valid PHP expression that can be evaluated by PHP parser
                    
143     * and the evaluation result will give back the variable value.
                    
147     *
                    
148     * It also handles objects by using the PHP functions serialize() and unserialize().
                    
149     *
                    
                
Config.php https://bitbucket.org/webpolis/liiv.git | PHP | 514 lines
                    
1<?php
                    
2/*
                    
22 */
                    
23require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/AccessControlConfig.php";
                    
24/**
                    
26 */
                    
27require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ResourceTypeConfig.php";
                    
28/**
                    
30 */
                    
31require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ThumbnailsConfig.php";
                    
32/**
                    
34 */
                    
35require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ImagesConfig.php";
                    
36
                    
235                $folderRegex = join("|", $this->_hideFolders);
                    
236                $folderRegex = strtr($folderRegex, array("?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__"));
                    
237                $folderRegex = preg_quote($folderRegex, "/");
                    
                
QuickArrayReader.php https://gitlab.com/link233/bootmw | PHP | 215 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * Quickie parser class that can happily read the subset of PHP we need
                    
5 * for our localization arrays safely.
                    
153	/**
                    
154	 * Parse a scalar value in PHP
                    
155	 *
                    
170			// extra quote on the end!
                    
171			return strtr( substr( trim( $str ), 1, -1 ),
                    
172				array( '\\\'' => '\'', '\\\\' => '\\' ) );
                    
197
                    
198		// Must be some kind of numeric value, so let PHP's weak typing
                    
199		// be useful for a change
                    
                
date.php https://bitbucket.org/codeyash/bootstrap.git | PHP | 404 lines
                    
1<?php
                    
2/**
                    
9 * @copyright  2010 - 2013 Fuel Development Team
                    
10 * @link       http://fuelphp.com
                    
11 */
                    
23 * @category    Core
                    
24 * @link        http://docs.fuelphp.com/classes/date.html
                    
25 *
                    
28 * - create_time() uses strptime and has currently a very bad hack to use strtotime for windows servers
                    
29 * - Uses strftime formatting for dates www.php.net/manual/en/function.strftime.php
                    
30 */
                    
85
                    
86					$rexep = "#" . strtr(preg_quote($format), $masks) . "#";
                    
87
                    
112	 * @param   int     UNIX timestamp from current server
                    
113	 * @param   string  valid PHP timezone from www.php.net/timezones
                    
114	 * @return  Date
                    
                
SecretsSetCommand.php https://github.com/FabienD/symfony.git | PHP | 147 lines
                    
1<?php
                    
2
                    
64
                    
65    <info>php %command.full_name% <name> filename</info>
                    
66
                    
68
                    
69    <info>cat filename | php %command.full_name% <name> -</info>
                    
70
                    
96        if (0 < $random = $input->getOption('random') ?? 16) {
                    
97            $value = strtr(substr(base64_encode(random_bytes($random)), 0, $random), '+/', '-_');
                    
98        } elseif (!$file = $input->getArgument('file')) {
                    
105        } elseif ('-' === $file) {
                    
106            $value = file_get_contents('php://stdin');
                    
107        } elseif (is_file($file) && is_readable($file)) {
                    
                
format.php https://github.com/nadavkav/Moodle-RTL--Shenkar-Translation-Team-.git | PHP | 151 lines
                    
1<?php    // $Id: format.php,v 1.4.4.1 2007/11/02 16:21:06 tjhunt Exp $ 
                    
2// Alton College, Hampshire, UK - Tom Flannaghan, Andrew Walker
                    
6// answer by the total number of options
                    
7// Based on format.php, included by ../../import.php
                    
8/**
                    
145        $transtable = array_flip($transtable);
                    
146        return strtr($string, $transtable);
                    
147    } 
                    
                
view.php https://github.com/PM2D/G3.git | PHP | 168 lines
                    
1<?php
                    
2// This file is a part of GIII (g3.steelwap.org)
                    
2// This file is a part of GIII (g3.steelwap.org)
                    
3require($_SERVER['DOCUMENT_ROOT'].'/etc/main.php');
                    
4
                    
37  if (strpos($data, 'g="windows-1251"')) {
                    
38    $data = strtr($data, array('g="windows-1251"'=>'g="UTF-8"'));
                    
39    $data = iconv('Windows-1251', 'UTF-8', $data);
                    
47  if(!strpos($data, 'CDATA'))
                    
48    $data = strtr($data, array(
                    
49		'<description>'=>'<description><![CDATA[',
                    
57  // target нет в спецификации wml и xhtml-mobile
                    
58  $data = strtr($data, array('target=_blank'=>NULL));
                    
59  // подправляем некоторые теги и ссылки
                    
66  // для картинок отправляем на ресайзер
                    
67  $data = strtr($data, array('src="/go.php?'=>'src="img.php?'));
                    
68  // мега костыль для тех лент, которые не используют нормальные &amp;
                    
                
CodeFile.php https://gitlab.com/isdzulqor/Slis-Dev | PHP | 194 lines
                    
1<?php
                    
2/**
                    
19 * read-only.
                    
20 * @property string $type The code file extension (e.g. php, txt). This property is read-only.
                    
21 *
                    
64    {
                    
65        $this->path = strtr($path, '/\\', DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR);
                    
66        $this->content = $content;
                    
116    /**
                    
117     * @return string the code file extension (e.g. php, txt)
                    
118     */
                    
140
                    
141        if ($type === 'php') {
                    
142            return highlight_string($this->content, true);
                    
                
Language.php https://github.com/kennethjiang/Wolke.git | PHP | 163 lines
                    
1<?php
                    
2
                    
79     * Retrieves a localised error name.
                    
80     * @param $int integer error number, corresponding to PHP's error
                    
81     *             reporting
                    
157        }
                    
158        return strtr($raw, $subst);
                    
159    }
                    
                
rewrite.php https://gitlab.com/r.collas/site_central | PHP | 137 lines
                    
1<?php
                    
2
                    
22 * we could change that. The "R" flag may be used to cause a <var>header</var> status to be sent. However, we do not redirect
                    
23 * back to index.php, so the "R" flag is only useful if the target is a different script.
                    
24 *
                    
43					// it is a rewrite rule, see if it is applicable
                    
44					$rule = strtr($rule, $definitions);
                    
45					preg_match('~^rewriterule\s+(.*?)\s+(.*?)\s*\[(.*)\]$~i', $rule, $matches);
                    
72								//	process the rules replacements
                    
73								$query = strtr($action[2], $params);
                    
74								parse_str($query, $gets);
                    
77							}
                    
78							//	we will execute the index.php script in due course. But if the rule
                    
79							//	action takes us elsewhere we will have to re-direct to that script.
                    
79							//	action takes us elsewhere we will have to re-direct to that script.
                    
80							if (isset($action[1]) && $action[1] != 'index.php') {
                    
81								$qs = http_build_query($_GET);
                    
                
text.php https://gitlab.com/oxidigitaluser/liguelista | PHP | 307 lines
                    
240	<tr>
                    
241	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?></label></th>
                    
242	<td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /></td>
                    
245	<tr>
                    
246	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><?php echo esc_html( __( 'Default value', 'contact-form-7' ) ); ?></label></th>
                    
247	<td><input type="text" name="values" class="oneline" id="<?php echo esc_attr( $args['content'] . '-values' ); ?>" /><br />
                    
280	<tr>
                    
281	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'contact-form-7' ) ); ?></label></th>
                    
282	<td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" /></td>
                    
285	<tr>
                    
286	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'contact-form-7' ) ); ?></label></th>
                    
287	<td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" /></td>
                    
303
                    
304	<p class="description mail-tag"><label for="<?php echo esc_attr( $args['content'] . '-mailtag' ); ?>"><?php echo sprintf( esc_html( __( "To use the value input through this field in a mail field, you need to insert the corresponding mail-tag (%s) into the field on the Mail tab.", 'contact-form-7' ) ), '<strong><span class="mail-tag"></span></strong>' ); ?><input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr( $args['content'] . '-mailtag' ); ?>" /></label></p>
                    
305</div>
                    
                
Container.php https://github.com/leochaves/magento-pt_br.git | PHP | 206 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) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
175    {
                    
176        return 'head-' . strtr($this->_controller, '_', '-');
                    
177    }
                    
                
String.php https://github.com/almonk/Deadweight-CMS-1.git | PHP | 497 lines
                    
1<?php
                    
2
                    
110		if ($compileId !== null) {
                    
111			$this->compileId = str_replace('../', '__', strtr($compileId, '\\%?=!:;'.PATH_SEPARATOR, '/-------'));
                    
112		}
                    
114		if ($cacheId !== null) {
                    
115			$this->cacheId = str_replace('../', '__', strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------'));
                    
116		}
                    
355					if (class_exists('Dwoo_Compiler', false) === false) {
                    
356						include DWOO_DIRECTORY . 'Dwoo/Compiler.php';
                    
357					}
                    
424		}
                    
425		return $dwoo->getCompileDir() . $this->compileId.'.d'.Dwoo::RELEASE_TAG.'.php';
                    
426	}
                    
448
                    
449			$this->cacheId = str_replace('../', '__', $this->compileId . strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------'));
                    
450		}
                    
                
format.php https://github.com/nicolasconnault/moodle2.0.git | PHP | 151 lines
                    
1<?php    // $Id: format.php,v 1.4 2007/03/20 02:23:12 pichetp Exp $ 
                    
2// Alton College, Hampshire, UK - Tom Flannaghan, Andrew Walker
                    
6// answer by the total number of options
                    
7// Based on format.php, included by ../../import.php
                    
8/**
                    
145        $transtable = array_flip($transtable);
                    
146        return strtr($string, $transtable);
                    
147    } 
                    
                
nt.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 204 lines
                    
1<?php
                    
2
                    
17if (!$id || !$user_id || isset($ban['1']) || isset($ban['11']) || (!core::$user_rights && $set['mod_forum'] == 3)) {
                    
18    require('../incfiles/head.php');
                    
19    echo functions::display_error($lng['access_forbidden']);
                    
19    echo functions::display_error($lng['access_forbidden']);
                    
20    require('../incfiles/end.php');
                    
21    exit;
                    
40                $res = mysql_fetch_array($req);
                    
41                $name = strtr($res['text'], array(
                    
42                                                 '&quot;' => '',
                    
63if ($flood) {
                    
64    require('../incfiles/head.php');
                    
65    echo functions::display_error($lng['error_flood'] . ' ' . $flood . $lng['sec'] . ', <a href="../soo/?mod=forum&amp;id=' . $id . '&amp;start=' . $start . '">' . $lng['back'] . '</a>');
                    
65    echo functions::display_error($lng['error_flood'] . ' ' . $flood . $lng['sec'] . ', <a href="../soo/?mod=forum&amp;id=' . $id . '&amp;start=' . $start . '">' . $lng['back'] . '</a>');
                    
66    require('../incfiles/end.php');
                    
67    exit;
                    
                
ClassLoader.php https://bitbucket.org/alessandro-aglietti/itis-leonardo-da-vinci.git | PHP | 246 lines
                    
1<?php
                    
2
                    
17 *
                    
18 * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
                    
19 *
                    
199    {
                    
200        // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
                    
201        if ('\\' == $class[0]) {
                    
210            // namespaced class name
                    
211            $classPath = strtr(substr($class, 0, $pos), '\\', DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
                    
212            $className = substr($class, $pos + 1);
                    
218
                    
219        $classPath .= strtr($className, '_', DIRECTORY_SEPARATOR) . '.php';
                    
220
                    
                
Images.php https://gitlab.com/yousafsyed/easternglamor | PHP | 274 lines
                    
1<?php
                    
2/**
                    
244    {
                    
245        return strtr(base64_encode($string), '+/=', ':_-');
                    
246    }
                    
255    {
                    
256        $string = strtr($string, ':_-', '+/=');
                    
257        return base64_decode($string);
                    
                
ClassNotFoundFatalErrorHandler.php https://gitlab.com/ealexis.t/trends | PHP | 206 lines
                    
1<?php
                    
2
                    
135    {
                    
136        if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) {
                    
137            return array();
                    
140        $classes = array();
                    
141        $filename = $class.'.php';
                    
142        foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
                    
161            // namespaced class
                    
162            $namespacedClass = str_replace(array($path.DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file),
                    
163            // namespaced class (with target dir)
                    
                
loader.php https://gitlab.com/Rad1calDreamer/honey | PHP | 383 lines
                    
1<?php
                    
2namespace Bitrix\Main;
                    
62
                    
63		$moduleName = strtr($moduleName, static::ALPHA_UPPER, static::ALPHA_LOWER);
                    
64
                    
83		$moduleHolder = self::LOCAL_HOLDER;
                    
84		$pathToInclude = $documentRoot."/".$moduleHolder."/modules/".$moduleName."/include.php";
                    
85		if (!file_exists($pathToInclude))
                    
87			$moduleHolder = self::BITRIX_HOLDER;
                    
88			$pathToInclude = $documentRoot."/".$moduleHolder."/modules/".$moduleName."/include.php";
                    
89			if (!file_exists($pathToInclude))
                    
106	{
                    
107		/** @noinspection PhpUnusedLocalVariableInspection */
                    
108		global $DB, $MESS;
                    
113	 * Includes shareware module by its name.
                    
114	 * Module must initialize constant <module name>_DEMO = Y in include.php to define demo mode.
                    
115	 * include.php must return false to define trial period expiration.
                    
                
ext_string.h https://gitlab.com/Blueprint-Marketing/hhvm | C Header | 346 lines
                    
11   | http://www.php.net/license/3_01.txt                                  |
                    
12   | If you did not receive a copy of the PHP license and are unable to   |
                    
13   | obtain it through the world-wide-web, please send a note to          |
                    
13   | obtain it through the world-wide-web, please send a note to          |
                    
14   | license@php.net so we can mail you a copy immediately.               |
                    
15   +----------------------------------------------------------------------+
                    
22#include "hphp/runtime/ext/extension.h"
                    
23#include "hphp/runtime/base/zend-string.h"
                    
24#include "hphp/runtime/base/zend-printf.h"
                    
31
                    
32extern const HPHP::StaticString k_HPHP_TRIM_CHARLIST;
                    
33extern const int64_t k_STR_PAD_RIGHT;
                    
172                     bool raw_output = false);
                    
173Variant HHVM_FUNCTION(strtr,
                    
174                      const String& str,
                    
                
ArchiveClassLoader.class.php https://github.com/ghiata/xp-framework.git | PHP | 226 lines
                    
1<?php
                    
2/* This class is part of the XP framework
                    
54    public function loadClassBytes($name) {
                    
55      return file_get_contents($this->archive.strtr($name, '.', '/').xp::CLASS_FILE_EXT);
                    
56    }
                    
64    protected function classUri($class) {
                    
65      return $this->archive.strtr($class, '.', '/').xp::CLASS_FILE_EXT;
                    
66    }
                    
76
                    
77      // Absolute URIs have the form "xar://containing.xar?the/classes/Name.class.php"
                    
78      if ((DIRECTORY_SEPARATOR === $uri{0} || (':' === $uri{1} && '\\' === $uri{2}))) {
                    
90      $path= '';
                    
91      foreach (explode('/', strtr($uri, DIRECTORY_SEPARATOR, '/')) as $element) {
                    
92        if ('' === $element || '.' === $element) {
                    
101      return is_file($archive.substr($path, 1))
                    
102        ? strtr(substr($path, 1, -strlen(xp::CLASS_FILE_EXT)), '/', '.')
                    
103        : NULL
                    
                
Dumper.php https://gitlab.com/kubinos/writeoff | PHP | 365 lines
                    
109	/**
                    
110	 * Dumps variable in PHP format.
                    
111	 * @param  mixed  variable to dump
                    
113	 */
                    
114	public static function toPhp($var)
                    
115	{
                    
122	 */
                    
123	private static function _toPhp(&$var, & $list = array(), $level = 0, & $line = 1)
                    
124	{
                    
168					if ($k !== $marker) {
                    
169						$item = ($k === $counter ? '' : self::_toPhp($k, $list, $level + 1, $line) . ' => ') . self::_toPhp($v, $list, $level + 1, $line);
                    
170						$counter = is_int($k) ? max($k + 1, $counter) : $counter;
                    
213					}
                    
214					$out .= "$space\t" . self::_toPhp($k, $list, $level + 1, $line) . ' => ' . self::_toPhp($v, $list, $level + 1, $line) . ",\n";
                    
215					$line++;
                    
                
new_normalizer.php https://github.com/VSEphpbb/phpbb.git | PHP | 197 lines
                    
86		{
                    
87			global $phpbb_root_path, $phpEx;
                    
88			include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
                    
92		{
                    
93			global $phpbb_root_path, $phpEx;
                    
94			include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
                    
126		{
                    
127			global $phpbb_root_path, $phpEx;
                    
128			include($phpbb_root_path . 'includes/utf/data/utf_nfc_qc.' . $phpEx);
                    
133			global $phpbb_root_path, $phpEx;
                    
134			include($phpbb_root_path . 'includes/utf/data/utf_canonical_decomp.' . $phpEx);
                    
135		}
                    
191			global $phpbb_root_path, $phpEx;
                    
192			include($phpbb_root_path . 'includes/utf/data/utf_canonical_comp.' . $phpEx);
                    
193		}
                    
                
calendar.php https://gitlab.com/x33n/ProjectPier-Core | PHP | 178 lines
                    
19<div class="calendar">
                    
20  <h2><?php echo clean(lang(sprintf('month %u', $month))); ?> <?php echo $year; ?></h2>
                    
21<?php
                    
77?>
                    
78      <th class="<?php echo $dow_class; ?>"><?php echo clean(lang(sprintf('weekday short %u', $dow ))); ?></th>
                    
79<?php
                    
120        <ul class="entries">
                    
121<?php
                    
122          foreach ($calendar[$dom] as $obj) {
                    
124              printf('<li class="%s"><a href="%s">%s</a></li>'."\n",
                    
125                strtr(lc($obj->getObjectTypeName()), ' ', '_'),
                    
126                $obj->getViewUrl(),
                    
175    <div class="prev-month"><a href="<?php echo get_url('milestone', 'calendar', gmdate('Ym', $prevMonth)); ?>"><?php echo clean(lang(sprintf('month %u', gmdate('m', $prevMonth)))); ?> <?php echo gmdate('Y', $prevMonth); ?></a></div>
                    
176    <div class="next-month"><a href="<?php echo get_url('milestone', 'calendar', gmdate('Ym', $nextMonth)); ?>"><?php echo clean(lang(sprintf('month %u', gmdate('m', $nextMonth)))); ?> <?php echo gmdate('Y', $nextMonth); ?></a></div>
                    
177  </div>
                    
                
WinFsStreamWrapper.php https://gitlab.com/oytunistrator/92five | PHP | 400 lines
                    
1<?php // vi: set fenc=utf-8 ts=4 sw=4 et:
                    
2/*
                    
18 *
                    
19 * See also https://code.google.com/p/php-wfio/ for a PHP extension
                    
20 * and comments on http://www.rooftopsolutions.nl/blog/filesystem-encoding-and-php
                    
44        $path = $path[(int) isset($path[1])];
                    
45        $path = strtr($path, '/', '\\');
                    
46        $pre = '';
                    
                
ezptestrunner.php https://github.com/zerustech/ezpublish.git | PHP | 469 lines
                    
157            {
                    
158                $file = eZDir::path( array( $file, "suite.php" ) );
                    
159            }
                    
192            echo "\nThe eZTestSuite class isn't defined. Are the tests autoloads generated ?\n";
                    
193            echo "You can generate them using php bin/php/ezpgenerateautoloads.php -s\n\n";
                    
194            exit( PHPUnit_TextUI_TestRunner::FAILURE_EXIT );
                    
339        {
                    
340            PHPUnit_TextUI_TestRunner::showError( 'The parameter --dsn is required' );
                    
341        }
                    
455        {
                    
456            PHPUnit_TextUI_TestRunner::showError(
                    
457                "Please generate the extension autoloads first.\n"
                    
457                "Please generate the extension autoloads first.\n"
                    
458                ."You can generate them using php bin/php/ezpgenerateautoloads.php -e"
                    
459            );
                    
                
Request.php https://github.com/papousek/zimodej-utils.git | PHP | 358 lines
                    
1<?php
                    
2
                    
337		$s = strtolower($header);  // case insensitive
                    
338		$s = strtr($s, '_', '-');  // cs_CZ means cs-CZ
                    
339		rsort($langs);             // first more specific
                    
                
csv.php https://bitbucket.org/kucing2k/ediassoc.git | PHP | 428 lines
                    
1<?php
                    
2/* vim: set expandtab sw=4 ts=4 sts=4: */
                    
3/**
                    
4 * CSV import plugin for phpMyAdmin
                    
5 *
                    
7 * @version $Id$
                    
8 * @package phpMyAdmin-Import
                    
9 */
                    
9 */
                    
10if (! defined('PHPMYADMIN')) {
                    
11    exit;
                    
51    );
                    
52$csv_terminated = strtr($csv_terminated, $replacements);
                    
53$csv_enclosed = strtr($csv_enclosed,  $replacements);
                    
53$csv_enclosed = strtr($csv_enclosed,  $replacements);
                    
54$csv_escaped = strtr($csv_escaped, $replacements);
                    
55$csv_new_line = strtr($csv_new_line, $replacements);
                    
                
AnalyzerClassFileSystemLocator.php https://github.com/JohnMurray/VulnScan.git | PHP | 200 lines
                    
49
                    
50require_once 'PHP/Depend/Metrics/AnalyzerClassLocator.php';
                    
51
                    
52/**
                    
53 * Locator that searches for PHP_Depend analyzers that follow the PHP_Depend
                    
54 * convention and are present the PHP_Depend source tree.
                    
56 * @category   QualityAssurance
                    
57 * @package    PHP_Depend
                    
58 * @subpackage Metrics
                    
65 */
                    
66class PHP_Depend_Metrics_AnalyzerClassFileSystemLocator
                    
67    implements PHP_Depend_Metrics_AnalyzerClassLocator
                    
172        $localPath = substr($path, strlen($classPath), -4);
                    
173        return 'PHP_Depend_Metrics_' . strtr($localPath, DIRECTORY_SEPARATOR, '_');
                    
174    }
                    
                
AbstractFtpAdapter.php https://gitlab.com/susmitha.plts/photographer_portfolio | PHP | 631 lines
                    
1<?php
                    
2
                    
503        $map = ['-' => '0', 'r' => '4', 'w' => '2', 'x' => '1'];
                    
504        $permissions = strtr($permissions, $map);
                    
505
                    
                
Updater.php https://gitlab.com/reasonat/test8 | PHP | 411 lines
                    
1<?php
                    
2
                    
251    catch (FileTransferException $e) {
                    
252      throw new UpdaterFileTransferException(t('File Transfer failed, reason: @reason', array('@reason' => strtr($e->getMessage(), $e->arguments))));
                    
253    }
                    
289    catch (FileTransferException $e) {
                    
290      throw new UpdaterFileTransferException(t('File Transfer failed, reason: @reason', array('@reason' => strtr($e->getMessage(), $e->arguments))));
                    
291    }
                    
                
Exception.php https://github.com/ratbird/hope.git | PHP | 382 lines
                    
1<?php
                    
2
                    
305        // when in cli or not accessible via filesystem, don't generate links
                    
306        if (PHP_SAPI == 'cli' || !Util::isPathAbsolute($path)) {
                    
307            return $path;
                    
309
                    
310        return sprintf('<a href="%s" class="file-edit">%s</a>', htmlspecialchars(strtr(self::$fileEditUrlFormat, [
                    
311            // allow more formats
                    
325    {
                    
326        return $this->toString(true, php_sapi_name() !== 'cli');
                    
327    }
                    
                
Commandline.php https://github.com/vinnivinsachi/Vincent-DR.git | PHP | 467 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 *  $Id: Commandline.php,v 1.11 2005/05/26 13:10:53 mrook Exp $
                    
4 *
                    
100        $this->executable = $executable;
                    
101        $this->executable = strtr($this->executable, '/', DIRECTORY_SEPARATOR);
                    
102        $this->executable = strtr($this->executable, '\\', DIRECTORY_SEPARATOR);
                    
                
php-brief.php https://gitlab.com/billyprice1/php-pastebin-v3 | PHP | 161 lines
                    
1<?php
                    
2/*************************************************************************************
                    
2/*************************************************************************************
                    
3 * php-brief.php
                    
4 * -------------
                    
9 *
                    
10 * PHP language file for GeSHi (brief version).
                    
11 *
                    
48$language_data = array (
                    
49	'LANG_NAME' => 'PHP',
                    
50	'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
                    
62			'null', '__LINE__', '__FILE__',
                    
63			'false', '&lt;?php', '?&gt;',
                    
64			'true', 'var', 'default',
                    
70			'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
                    
71			'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',
                    
72			'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',
                    
                
String.php https://github.com/joshbhamilton/todophp.git | PHP | 440 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Lithium: the most rad php framework
                    
4 *
                    
5 * @copyright     Copyright 2011, Union of RAD (http://union-of-rad.org)
                    
6 * @license       http://opensource.org/licenses/mit-license.php The MIT License
                    
7 */
                    
106		}
                    
107		return strtr(rtrim(base64_encode($result), '='), '+', '.');
                    
108	}
                    
154	 *
                    
155	 * @link http://php.net/manual/en/function.hash.php PHP Manual: `hash()`
                    
156	 * @link http://php.net/manual/en/function.hash-hmac.php PHP Manual: `hash_hmac()`
                    
156	 * @link http://php.net/manual/en/function.hash-hmac.php PHP Manual: `hash_hmac()`
                    
157	 * @link http://php.net/manual/en/function.hash-algos.php PHP Manual: `hash_algos()`
                    
158	 * @param string $string The string to hash.
                    
                
Ftp.php https://bitbucket.org/mengqing/magento-mirror.git | PHP | 533 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 */
                    
423        $trans = array('-' => '0', 'r' => '4', 'w' => '2', 'x' => '1');
                    
424        $chmod = substr(strtr($chmod, $trans), 1);
                    
425        $array = str_split($chmod, 3);
                    
455    /**
                    
456     * Get directory contents in PHP array
                    
457     *
                    
                
developer_task.php https://github.com/mihalyf/gallery3-contrib.git | PHP | 335 lines
                    
1<?php defined("SYSPATH") or die("No direct script access.");
                    
2/**
                    
29    if (empty($context["module"])) {
                    
30      $context["class_name"] = strtr($context["name"], " ", "_");
                    
31      $context["module"] = strtolower($context["class_name"]);
                    
60    case 5:               // Generate admin controller
                    
61      $file = "{$context['module_path']}/controllers/admin_{$context['module']}.php";
                    
62      ob_start();
                    
71    case 6:               // Generate admin form
                    
72      $file = "{$context['module_path']}/views/admin_{$context['module']}.html.php";
                    
73      ob_start();
                    
82    case 7:               // Generate controller
                    
83      $file = "{$context['module_path']}/controllers/{$context['module']}.php";
                    
84      ob_start();
                    
94    case 8:               // Generate sidebar block view
                    
95      $file = "{$context['module_path']}/views/{$context['module']}_block.html.php";
                    
96      ob_start();
                    
                
codebase.php https://github.com/cpg-contrib/coppermine.git | PHP | 354 lines
                    
13  Coppermine version: 1.5.0
                    
14  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/plugins/usergal_alphatabs/codebase.php $
                    
15  $Revision: 5129 $
                    
70			$theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $aid == 'lastalb' ? $lang_album_list['album_on_page'] : $lang_thumb_view['pic_on_page']));
                    
71			$theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&amp;page=%d'));
                    
72			$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&amp;page=%d'));
                    
72			$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&amp;page=%d'));
                    
73			$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&amp;page=%d'));
                    
74		} else {
                    
77			$theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page']));
                    
78			$theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&amp;page=%d' . $pl));
                    
79			$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&amp;page=%d' . $pl));
                    
79			$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&amp;page=%d' . $pl));
                    
80			$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&amp;page=%d' . $pl));
                    
81			// end of modified section
                    
                
invocation.lang.php https://github.com/yabba/openx.git | PHP | 141 lines
                    
1<?php
                    
2
                    
113$GLOBALS['strRightMargin']				= "Margen Derecho";
                    
114$GLOBALS['strTransparentBackground']	= "Fondo trasparente";
                    
115
                    
                
String.php https://github.com/ad2joe/php-framework-benchmarks.git | PHP | 374 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Lithium: the most rad php framework
                    
4 *
                    
6 *                Copyright 2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
7 * @license       http://opensource.org/licenses/mit-license.php The MIT License
                    
8 */
                    
138			}
                    
139			$str = strtr($str, $replace);
                    
140			return $options['clean'] ? static::clean($str, $options) : $str;
                    
                
Translator.php https://github.com/yethee/symfony.git | PHP | 458 lines
                    
1<?php
                    
2
                    
210
                    
211        return strtr($this->getCatalogue($locale)->get((string) $id, $domain), $parameters);
                    
212    }
                    
236
                    
237        return strtr($this->selector->choose($catalogue->get($id, $domain), (int) $number, $locale), $parameters);
                    
238    }
                    
328        $content = sprintf(<<<EOF
                    
329<?php
                    
330
                    
379    {
                    
380        return $this->cacheDir.'/catalogue.'.$locale.'.'.sha1(serialize($this->fallbackLocales)).'.php';
                    
381    }
                    
                
WebAuth.php https://gitlab.com/mattswann/launch-housing | PHP | 278 lines
                    
1<?php
                    
2namespace Dropbox;
                    
83     * A object that lets us save CSRF token string to the user's session.  If you're using the
                    
84     * standard PHP <code>$_SESSION</code>, you can pass in something like
                    
85     * <code>new ArrayEntryStore($_SESSION, 'dropbox-auth-csrf-token')</code>.
                    
165    {
                    
166        return strtr(base64_encode($string), '+/', '-_');
                    
167    }
                    
                
ufpdf.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 483 lines
                    
1<?php
                    
2/*******************************************************************************
                    
17
                    
18include_once './libraries/fpdf/fpdf.php';
                    
19
                    
56  if($file=='')
                    
57    $file=str_replace(' ','',$family).strtolower($style).'.php';
                    
58  if(defined('FPDF_FONTPATH'))
                    
252  //Escape necessary characters
                    
253  return '('. strtr($s, array(')' => '\\)', '(' => '\\(', '\\' => '\\\\')) .')';
                    
254}
                    
265  //Escape necessary characters
                    
266  return '('. strtr($s, array(')' => '\\)', '(' => '\\(', '\\' => '\\\\')) .')';
                    
267}
                    
                
Container.php git://github.com/eryx/php-framework-benchmark.git | PHP | 459 lines
                    
1<?php
                    
2
                    
214
                    
215        return isset($this->services[$id]) || method_exists($this, 'get'.strtr($id, array('_' => '', '.' => '_')).'Service');
                    
216    }
                    
246
                    
247        if (method_exists($this, $method = 'get'.strtr($id, array('_' => '', '.' => '_')).'Service')) {
                    
248            $this->loading[$id] = true;
                    
456    {
                    
457        return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($id, '_', '.')));
                    
458    }
                    
                
File.php https://gitlab.com/szlongshu/manaphp | PHP | 79 lines
                    
1<?php
                    
2namespace ManaPHP\Log\Adapter {
                    
3
                    
4    use ManaPHP\Log\AdapterInterface;
                    
5
                    
24        /**
                    
25         * \ManaPHP\Log\Adapter\File constructor.
                    
26         *
                    
69
                    
70            $replaced['%message%'] = $message . PHP_EOL;
                    
71
                    
71
                    
72            $log = strtr($this->_options['format'], $replaced);
                    
73
                    
                
general.php https://github.com/Jon86/oscommerce.git | PHP | 520 lines
                    
1<?php
                    
2/*
                    
50
                    
51    return strtr(trim($string), $translate);
                    
52  }
                    
316    if (!isset($seeded)) {
                    
317      if (version_compare(PHP_VERSION, '4.2', '<')) {
                    
318        mt_srand((double)microtime()*1000000);
                    
503  function osc_setlocale($category, $locale) {
                    
504    if (version_compare(PHP_VERSION, '4.3', '<')) {
                    
505      if (is_array($locale)) {
                    
                
Html.php https://gitlab.com/leoplanxxi/dr7-web-buap-2016 | PHP | 379 lines
                    
1<?php
                    
2
                    
85  )) {
                    
86    $identifier = strtr($identifier, $filter);
                    
87    // Valid characters in a CSS identifier are:
                    
217  public static function getId($id) {
                    
218    $id = strtr(Unicode::strtolower($id), array(' ' => '-', '_' => '-', '[' => '-', ']' => ''));
                    
219
                    
280EOD;
                    
281    // PHP's \DOMDocument serialization adds straw whitespace in case the markup
                    
282    // of the wrapping document contains newlines, so ensure to remove all
                    
283    // newlines before injecting the actual HTML body to process.
                    
284    $document = strtr($document, array("\n" => '', '!html' => $html));
                    
285
                    
                
sanitize.inc.php http://myrpm.googlecode.com/svn/trunk/ | PHP | 160 lines
                    
1<?php
                    
2///////////////////////////////////////
                    
2///////////////////////////////////////
                    
3// sanitize.inc.php
                    
4// Sanitization functions for PHP
                    
37// internal function for utf8 decoding
                    
38// thanks to Jamie Pratt for noticing that PHP's function is a little 
                    
39// screwy
                    
41{
                    
42return strtr($string, 
                    
43  "??????????ÁÂ?Ä??Ç?É?Ë?ÍÎ????ÓÔ?Ö??Ú?ÜÝß?áâ?ä??ç?é?ë?íî????óô?ö??ú?üý?", 
                    
                
Container.php https://gitlab.com/pr0055/symfonypizza | PHP | 362 lines
                    
1<?php
                    
2
                    
199            } else {
                    
200                return method_exists($this, 'get'.strtr($id, $this->underscoreMap).'Service');
                    
201            }
                    
248                continue;
                    
249            } elseif (method_exists($this, $method = 'get'.strtr($id, $this->underscoreMap).'Service')) {
                    
250                // $method is set to the right value, proceed
                    
343    {
                    
344        return strtr(ucwords(strtr($id, array('_' => ' ', '.' => '_ ', '\\' => '_ '))), array(' ' => ''));
                    
345    }
                    
                
Misc.php https://gitlab.com/endomorphosis/falkenstein | PHP | 399 lines
                    
1<?php
                    
2/*
                    
30        if (!empty($_GET['langCode']) && preg_match("/^[a-z\-]+$/", $_GET['langCode'])) {
                    
31            if (file_exists(CKFINDER_CONNECTOR_LANG_PATH . "/" . $_GET['langCode'] . ".php"))
                    
32                $langCode = $_GET['langCode'];
                    
33        }
                    
34        include CKFINDER_CONNECTOR_LANG_PATH . "/" . $langCode . ".php";
                    
35        if ($number) {
                    
75    /**
                    
76     * @link http://pl.php.net/manual/en/function.imagecopyresampled.php
                    
77     * replacement to imagecopyresampled that will deliver results that are almost identical except MUCH faster (very typically 30 times faster)
                    
121    /**
                    
122     * @link http://pl.php.net/manual/pl/function.imagecreatefromjpeg.php
                    
123     * function posted by e dot a dot schultz at gmail dot com
                    
182    /**
                    
183     * convert shorthand php.ini notation into bytes, much like how the PHP source does it
                    
184     * @link http://pl.php.net/manual/en/function.ini-get.php
                    
                
php.js https://gitlab.com/manuvelasco/agostoliquida | JavaScript | 140 lines
                    
32    atoms: keywords("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"),
                    
33    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"),
                    
34    multiLineStrings: true,
                    
63    var htmlMode = CodeMirror.getMode(config, "text/html");
                    
64    var phpMode = CodeMirror.getMode(config, phpConfig);
                    
65
                    
91        return style;
                    
92      } else if (isPHP && state.php.tokenize == null && stream.match("?>")) {
                    
93        state.curMode = htmlMode;
                    
112        var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),
                    
113            php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur;
                    
114        if (state.curMode == htmlMode) cur = htmlNew;
                    
138  CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});
                    
139  CodeMirror.defineMIME("text/x-php", phpConfig);
                    
140});
                    
                
table.php https://github.com/PorteroGCooper/zoop-helios.git | PHP | 643 lines
                    
1<?php
                    
2/**
                    
232				$this->fields[$fieldname]->length = $field["len"];
                    
233				$this->fields[$fieldname]->label = ucwords(strtolower(strtr($this->fields[$fieldname]->name,"_", " ")));
                    
234
                    
                
CodeExtension.php https://gitlab.com/martinstti/silex-microframework-rest | PHP | 241 lines
                    
1<?php
                    
2
                    
14/**
                    
15 * Twig extension relate to PHP code and used by the profiler and the default exception templates.
                    
16 *
                    
136            // highlight_file could throw warnings
                    
137            // see https://bugs.php.net/bug.php?id=25725
                    
138            $code = @highlight_file($file, true);
                    
176        if (false !== $link = $this->getFileLink($file, $line)) {
                    
177            if (PHP_VERSION_ID >= 50400) {
                    
178                $flags = ENT_QUOTES | ENT_SUBSTITUTE;
                    
199        if ($this->fileLinkFormat && is_file($file)) {
                    
200            return strtr($this->fileLinkFormat, array('%f' => $file, '%l' => $line));
                    
201        }
                    
                
tbl_operations.js https://gitlab.com/luyxtran264/myproject | JavaScript | 304 lines
                    
15/**
                    
16 * jQuery coding for 'Table operations'.  Used on tbl_operations.php
                    
17 * Attach Ajax Event handlers for Table operations
                    
191        } else if ($('#partition_operation_TRUNCATE').is(':checked')) {
                    
192            var question = PMA_messages.strTruncatePartitionWarning;
                    
193            $form.PMA_confirm(question, $form.attr('action'), function (url) {
                    
274         */
                    
275        var question = PMA_messages.strTruncateTableStrongWarning + ' ';
                    
276        question += PMA_sprintf(
                    
                
fckeditor_php5.php https://github.com/viglesiasce/testlink.git | PHP | 257 lines
                    
1<?php

                    
2/*

                    
21 *

                    
22 * This is the integration file for PHP 5.

                    
23 *

                    
24 * It defines the FCKeditor class that can be used to create editor

                    
25 * instances in PHP pages on server side.

                    
26 */

                    
125	 * Main Constructor.

                    
126	 * Refer to the _samples/php directory for examples.

                    
127	 *

                    
254

                    
255		return strtr( $valueToEncode,  $chars ) ;

                    
256	}

                    
                
gravatar.php https://github.com/mintbridge/kohana-gravatar.git | PHP | 282 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
12 * @copyright  (c) 2009-2010 Kohana Team
                    
13 * @license    http://kohanaphp.com/license
                    
14 */
                    
203	 *
                    
204	 * @param   string       view  [Optional] a kohana PHP
                    
205	 * @param   string       email  [Optional] the valid email of a Gravatar user
                    
251		{
                    
252			$alt = strtr($this->_config['alt'], $keys);
                    
253		}
                    
                
PhoneNumber.php https://gitlab.com/madwanz64/laravel | PHP | 324 lines
                    
1<?php
                    
2
                    
6 * @see https://en.wikipedia.org/wiki/Telephone_numbers_in_Greece
                    
7 * @see https://github.com/giggsey/libphonenumber-for-php/blob/master/src/data/PhoneNumberMetadata_GR.php
                    
8 */
                    
223        return static::numerify(
                    
224            strtr(static::randomElement(static::$mobileFormats), [
                    
225                '{{internationalCodePrefix}}' => static::internationalCodePrefix(),
                    
260        return ltrim(static::numerify(
                    
261            strtr(static::randomElement(static::$tollFreeFormats), [
                    
262                '{{internationalCodePrefix}}' => static::internationalCodePrefix(),
                    
                
Translator.php https://gitlab.com/techniconline/kmc | PHP | 440 lines
                    
1<?php
                    
2
                    
209
                    
210        return strtr($this->getCatalogue($locale)->get((string)$id, $domain), $parameters);
                    
211    }
                    
235
                    
236        return strtr($this->selector->choose($catalogue->get($id, $domain), (int)$number, $locale), $parameters);
                    
237    }
                    
351            $content = sprintf(<<<EOF
                    
352<?php
                    
353
                    
377    {
                    
378        return $this->cacheDir . '/catalogue.' . $locale . '.' . sha1(serialize($this->fallbackLocales)) . '.php';
                    
379    }
                    
                
ErrorCollector.php https://github.com/mihalyf/gallery3-contrib.git | PHP | 209 lines
                    
1<?php defined("SYSPATH") or die("No direct script access.");
                    
2
                    
36     * Sends an error message to the collector for later use
                    
37     * @param $severity int Error severity, PHP error style (don't use E_USER_)
                    
38     * @param $msg string Error message text
                    
71
                    
72        if (!empty($subst)) $msg = strtr($msg, $subst);
                    
73
                    
                
index.php git://github.com/php/web-php.git | PHP | 147 lines
                    
23 <ul>
                    
24  <li><a href="https://www.php.net/manual/security">PHP manual on security</a></li>
                    
25  <li><a href="http://www.suhosin.org">Suhosin</a></li>
                    
25  <li><a href="http://www.suhosin.org">Suhosin</a></li>
                    
26  <li><a href="http://phpsec.org/projects/guide/">PHP Security Consortium</a></li>
                    
27 </ul>
                    
71<p>This page contains information about PHP-related security threats, patches and known workarounds.</p>
                    
72<p>If you believe you have discovered a security problem in PHP please inform the<br>PHP Security Response Team in confidence by mailing <a href="mailto:security@php.net">security@php.net</a></p>
                    
73<br>
                    
111<div class="record <?php echo strtolower($record["severity"]) ?>">
                    
112    <div class="id"><a href="/security/advisories/PHPSA-<?php echo $record["id"] ?>.php">PHPSA-<?php printf("%04d", $record["id"]) ?></a></div>
                    
113    <div class="date"><?php echo date("Y-m-d", strtotime($record["published"]))?></div>
                    
113    <div class="date"><?php echo date("Y-m-d", strtotime($record["published"]))?></div>
                    
114    <div class="range <?php echo strtolower($record["range"]) ?>"><?php echo $record["range"] ?></div>
                    
115    <div class="affects"><?php echo $record["affects"] ?></div>
                    
                
xpdogenerator.class.php https://github.com/esche/revolution.git | PHP | 216 lines
                    
1<?php
                    
2/*
                    
30 */
                    
31include_once (strtr(realpath(dirname(__FILE__)), '\\', '/') . '/../xpdogenerator.class.php');
                    
32
                    
139                        }
                    
140                        $PhpType= $this->manager->getPhpType($dbType);
                    
141                        $Null= ' null="' . (($Null === 'NO') ? 'false' : 'true') . '"';
                    
156                        }
                    
157                        $xmlFields[] = "\t\t<field key=\"{$Field}\" dbtype=\"{$dbType}\"{$Precision}{$attributes} phptype=\"{$PhpType}\"{$Null}{$Default}{$Key}{$Extra} />";
                    
158                    }
                    
                
TAP.php https://gitlab.com/virtualrealms/d7civicrm | PHP | 256 lines
                    
28
                    
29class TAP extends \PHPUnit\Util\Printer implements \PHPUnit\Framework\TestListener {
                    
30
                    
79   */
                    
80  public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, $time) {
                    
81    $this
                    
154   */
                    
155  public function addSkippedTest(\PHPUnit\Framework\Test $test, \Exception $e, $time) {
                    
156    $this
                    
171   */
                    
172  public function addWarning(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Warning $e, $time) {
                    
173    $this
                    
238  /**
                    
239   * @param \PHPUnit\Framework\Test $test
                    
240   */
                    
                
Helper.php https://github.com/soitun/minify.git | PHP | 250 lines
                    
1<?php
                    
2/**
                    
104            }
                    
105            $file = strtr($file, '\\', '/');
                    
106            $files[$k] = $file;
                    
174        if ($cached === null) {
                    
175            $cached = (require __DIR__ . '/../../../bootstrap.php');
                    
176        }
                    
                
bootstrap.php https://github.com/schinzi/symfony.git | PHP | 189 lines
                    
1<?php
                    
2namespace Symfony\Framework\Bundle;
                    
34        $finder = new Finder();
                    
35        $finder->files()->name('*Extension.php')->in($dir);
                    
36        $prefix = $this->namespacePrefix.'\\'.$this->name.'\\DependencyInjection';
                    
37        foreach ($finder as $file) {
                    
38            $class = $prefix.strtr($file->getPath(), array($dir => '', '/' => '\\')).'\\'.basename($file, '.php');
                    
39            if ('Extension' === substr($class, -9)) {
                    
44        $finder = new Finder();
                    
45        $finder->files()->name('*Command.php')->in($dir);
                    
46        $prefix = $this->namespacePrefix.'\\'.$this->name.'\\Command';
                    
47        foreach ($finder as $file) {
                    
48            $r = new \ReflectionClass($prefix.strtr($file->getPath(), array($dir => '', '/' => '\\')).'\\'.basename($file, '.php'));
                    
49            if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract()) {
                    
144                        $name = $name.'-'.substr(md5(implode('|', $classes)), 0, 5); }
                    
145        $cache = $cacheDir.'/'.$name.'.php';
                    
146                $reload = false;
                    
                
drupal.php https://gitlab.com/ptisky/API_prestashop | PHP | 134 lines
                    
1<?php

                    
2/**

                    
113                global $user;

                    
114                $_SESSION['KCFINDER']['uploadURL'] = strtr(variable_get('kcfinder_upload_url', 'sites/default/files/kcfinder'), array('%u' => $user->uid, '%n' => $user->name));

                    
115                $_SESSION['KCFINDER']['uploadDir'] = strtr(variable_get('kcfinder_upload_dir', ''), array('%u' => $user->uid, '%n' => $user->name));

                    
                
ColumnSchemaBuilder.php https://gitlab.com/isdzulqor/Slis-Dev | PHP | 451 lines
                    
1<?php
                    
2/**
                    
13/**
                    
14 * ColumnSchemaBuilder helps to define database schema types using a PHP interface.
                    
15 *
                    
448        ];
                    
449        return strtr($format, $placeholderValues);
                    
450    }
                    
                
fckeditor_php5.php https://github.com/Jonay/proyectinix.git | PHP | 211 lines
                    
1<?php
                    
2/*
                    
21 *
                    
22 * This is the integration file for PHP 5.
                    
23 *
                    
24 * It defines the FCKeditor class that can be used to create editor
                    
25 * instances in PHP pages on server side.
                    
26 */
                    
79	 * Main Constructor.
                    
80	 * Refer to the _samples/php directory for examples.
                    
81	 *
                    
208
                    
209		return strtr( $valueToEncode,  $chars ) ;
                    
210	}
                    
                
CBreadcrumbs.php https://gitlab.com/muthuvel.ns/imp-file | PHP | 132 lines
                    
1<?php
                    
2/**
                    
74	 * The following example will generate breadcrumbs as "Home > Sample post > Edit", where "Home" points to the homepage,
                    
75	 * "Sample post" points to the "index.php?r=post/view&id=12" page, and "Edit" is a label. Note that the "Home" link
                    
76	 * is specified via {@link homeLink} separately.
                    
121			if(is_string($label) || is_array($url))
                    
122				$links[]=strtr($this->activeLinkTemplate,array(
                    
123					'{url}'=>CHtml::normalizeUrl($url),
                    
                
DumpDataCollector.php https://gitlab.com/kimting254/wbms | PHP | 298 lines
                    
1<?php
                    
2
                    
43        $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
                    
44        $this->charset = $charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8';
                    
45        $this->requestStack = $requestStack;
                    
71
                    
72        $trace = PHP_VERSION_ID >= 50306 ? DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS : true;
                    
73        if (PHP_VERSION_ID >= 50400) {
                    
122        if (false === $name) {
                    
123            $name = strtr($file, '\\', '/');
                    
124            $name = substr($name, strrpos($name, '/') + 1);
                    
154            if ($response->headers->has('Content-Type') && false !== strpos($response->headers->get('Content-Type'), 'html')) {
                    
155                $this->dumper = new HtmlDumper('php://output', $this->charset);
                    
156            } else {
                    
156            } else {
                    
157                $this->dumper = new CliDumper('php://output', $this->charset);
                    
158            }
                    
                
CEmailValidator.php https://gitlab.com/dwi.nurhadi17/uns-log | PHP | 204 lines
                    
1<?php
                    
2/**
                    
37	 * @var boolean whether to check the MX record for the email address.
                    
38	 * Defaults to false. To enable it, you need to make sure the PHP function 'checkdnsrr'
                    
39	 * exists in your PHP installation.
                    
44	 * @var boolean whether to check port 25 for the email address.
                    
45	 * Defaults to false. To enable it, ensure that the PHP functions 'dns_get_record' and
                    
46	 * 'fsockopen' are available in your PHP installation.
                    
126		$message=$this->message!==null ? $this->message : Yii::t('yii','{attribute} is not a valid email address.');
                    
127		$message=strtr($message, array(
                    
128			'{attribute}'=>$object->getAttributeLabel($attribute),
                    
196			{
                    
197				require_once(Yii::getPathOfAlias('system.vendors.Net_IDNA2.Net').DIRECTORY_SEPARATOR.'IDNA2.php');
                    
198				$idna=new Net_IDNA2();
                    
                
ClassLoader.php https://gitlab.com/treighton/wpgit | PHP | 413 lines
                    
1<?php
                    
2
                    
17 *
                    
18 * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
                    
19 *
                    
315    {
                    
316        // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
                    
317        if ('\\' == $class[0]) {
                    
328
                    
329        $file = $this->findFileWithExtension($class, '.php');
                    
330
                    
346        // PSR-4 lookup
                    
347        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
                    
348
                    
372            $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
                    
373                . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
                    
374        } else {
                    
                
ClassDoc.class.php https://github.com/Gamepay/xp-framework.git | PHP | 215 lines
                    
1<?php
                    
2/* This class is part of the XP framework
                    
72      return $this->loader
                    
73        ? $this->loader->getResourceAsStream(strtr($this->qualifiedName, '.', '/').xp::CLASS_FILE_EXT)
                    
74        : NULL
                    
                
php.js https://gitlab.com/Mirros/jsdelivr | 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})();
                    
                
sanitizing.lib.php https://gitlab.com/jmcdowall/transactions | PHP | 195 lines
                    
1<?php
                    
2/* vim: set expandtab sw=4 ts=4 sts=4: */
                    
5 *
                    
6 * @package PhpMyAdmin
                    
7 */
                    
19        'https://',
                    
20        './url.php?url=https%3A%2F%2F',
                    
21        './doc/html/',
                    
106 *
                    
107 * <p><?php echo PMA_sanitize($foo); ?></p>
                    
108 *
                    
108 *
                    
109 * <a title="<?php echo PMA_sanitize($foo, true); ?>">bar</a>
                    
110 *
                    
119    if (!$safe) {
                    
120        $message = strtr($message, array('<' => '&lt;', '>' => '&gt;'));
                    
121    }
                    
                
admin_themeroller.php https://github.com/tbleher/gallery3-contrib.git | PHP | 193 lines
                    
1<?php defined("SYSPATH") or die("No direct script access.");/**
                    
2 * Gallery - a web based photo album viewer and editor
                    
61
                    
62      $theme_name = strtolower(strtr($theme_name_generated, " ", "_"));
                    
63      $session->set("theme_name", $theme_name);
                    
124  static function _is_theme_defined($name) {
                    
125    $theme_name = strtolower(strtr($name->value, " ", "_"));
                    
126    if (file_exists(THEMEPATH . "$theme_name/theme.info")) {
                    
                
modifiercompiler.escape.php https://github.com/usualoma/movabletype.git | PHP | 112 lines
                    
1<?php
                    
2/**
                    
30                'function' => 'smarty_literal_compiler_param',
                    
31                'file'     => SMARTY_PLUGINS_DIR . 'shared.literal_compiler_param.php'
                    
32            )
                    
35    if ($_double_encode === null) {
                    
36        $_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');
                    
37    }
                    
52                } else {
                    
53                    // fall back to modifier.escape.php
                    
54                }
                    
58                    if ($_double_encode) {
                    
59                        // php >=5.2.3 - go native
                    
60                        return 'mb_convert_encoding(htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' .
                    
63                    } elseif ($double_encode) {
                    
64                        // php <5.2.3 - only handle double encoding
                    
65                        return 'mb_convert_encoding(htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' .
                    
                
AliasCleaner.php https://gitlab.com/Drulenium-bot/pathauto | PHP | 351 lines
                    
1<?php
                    
2
                    
172
                    
173      // Generate and cache the punctuation replacements for strtr().
                    
174      $punctuation = $this->getPunctuationCharacters();
                    
239    // Replace or drop punctuation based on user settings.
                    
240    $output = strtr($output, $this->cleanStringCache['punctuation']);
                    
241
                    
                
Crypt.php https://gitlab.com/leoplanxxi/dr7-web-buap-2016 | PHP | 143 lines
                    
1<?php
                    
2
                    
20   * This function is better than simply calling mt_rand() or any other built-in
                    
21   * PHP function because it can return a long string of bytes (compared to < 4
                    
22   * bytes normally from mt_rand()) and uses the best available pseudo-random
                    
46      elseif ($fh = @fopen('/dev/urandom', 'rb')) {
                    
47        // PHP only performs buffered reads, so in reality it will always read
                    
48        // at least 4096 bytes. Thus, it costs nothing extra to read and store
                    
68          if (function_exists('getmypid')) {
                    
69            // Further initialize with the somewhat random PHP process ID.
                    
70            $random_state .= getmypid();
                    
108    // Modify the hmac so it's safe to use in URLs.
                    
109    return strtr($hmac, array('+' => '-', '/' => '_', '=' => ''));
                    
110  }
                    
124    // Modify the hash so it's safe to use in URLs.
                    
125    return strtr($hash, array('+' => '-', '/' => '_', '=' => ''));
                    
126  }
                    
                
PwTenpay.php https://gitlab.com/wuhang2003/phpwind | PHP | 73 lines
                    
1<?php
                    
2defined('WEKIT_VERSION') || exit('Forbidden');
                    
9 * @author Jianmin Chen <sky_hold@163.com>
                    
10 * @copyright ©2003-2103 phpwind.com
                    
11 * @license http://www.phpwind.com
                    
11 * @license http://www.phpwind.com
                    
12 * @version $Id: PwTenpay.php 24975 2013-02-27 09:24:54Z jieyin $
                    
13 * @package forum
                    
41	public function getUrl(PwPayVo $vo) {
                    
42		$strTransactionId = $vo->getOrderNo();
                    
43		$strBillDate = substr($strTransactionId, 10, 8);
                    
43		$strBillDate = substr($strTransactionId, 10, 8);
                    
44		$strSpBillNo = substr($strTransactionId, -10);
                    
45
                    
49			'bargainor_id'		=> $this->tenpay,
                    
50			'transaction_id'	=> $strTransactionId,
                    
51			'sp_billno'			=> $strSpBillNo,
                    
                
Loader.php https://github.com/jonathanslenders/balancirk-website.git | PHP | 147 lines
                    
1<?php
                    
2
                    
50		// include class paths or rebuild paths if the cache file isn't there
                    
51		$cacheFile = $this->cacheDir.'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php';
                    
52		if (file_exists($cacheFile)) {
                    
79				} else {
                    
80					$this->classPath[str_replace(array('function.','block.','modifier.','outputfilter.','filter.','prefilter.','postfilter.','pre.','post.','output.','shared.','helper.'), '', basename($f, '.php'))] = $f;
                    
81				}
                    
87			if (!file_put_contents($cacheFile, serialize($this->classPath))) {
                    
88				throw new Dwoo_Exception('Could not write into '.$cacheFile.', either because the folder is not there (create it) or because of the chmod configuration (please ensure this directory is writable by php), alternatively you can change the directory used with $dwoo->setCompileDir() or provide a custom loader object with $dwoo->setLoader()');
                    
89			}
                    
104			if ($forceRehash) {
                    
105				$this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir . 'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php');
                    
106				foreach ($this->paths as $path=>$file) {
                    
137		}
                    
138		$cacheFile = $this->cacheDir . 'classpath-'.substr(strtr($pluginDir, '/\\:'.PATH_SEPARATOR, '----'), strlen($pluginDir) > 80 ? -80 : 0).'.d'.Dwoo::RELEASE_TAG.'.php';
                    
139		$this->paths[$pluginDir] = $cacheFile;
                    
                
livejournal.php http://core.svn.wordpress.org/ | PHP | 172 lines
                    
1<?php
                    
2
                    
15
                    
16	function unhtmlentities($string) { // From php.net for < 4.3 compat
                    
17		$trans_tbl = get_html_translation_table(HTML_ENTITIES);
                    
18		$trans_tbl = array_flip($trans_tbl);
                    
19		return strtr($string, $trans_tbl);
                    
20	}
                    
23		echo '<p>'.__('Howdy! This importer allows you to extract posts from LiveJournal XML export file into your blog.  Pick a LiveJournal file to upload and click Import.').'</p>';
                    
24		wp_import_upload_form("admin.php?import=livejournal&amp;step=1");
                    
25	}
                    
                
SecurityPolicy.php https://gitlab.com/dcnf/dcbase.org | PHP | 126 lines
                    
1<?php
                    
2
                    
52        foreach ($methods as $class => $m) {
                    
53            $this->allowedMethods[$class] = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]);
                    
54        }
                    
94        $allowed = false;
                    
95        $method = strtr($method, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
                    
96        foreach ($this->allowedMethods as $class => $methods) {
                    
                
form-tags-manager.php https://gitlab.com/pankajmohale/chef2go | PHP | 355 lines
                    
1<?php
                    
2
                    
150		$attr = trim( preg_replace( '/[\r\n\t ]+/', ' ', $m[3] ) );
                    
151		$attr = strtr( $attr, array( '<' => '&lt;', '>' => '&gt;' ) );
                    
152
                    
                
FileLoader.php https://gitlab.com/adam.kvita/MI-VMM-SIFT | PHP | 100 lines
                    
1<?php
                    
2
                    
79	{
                    
80		return $this->baseDir . strtr($file, '/', DIRECTORY_SEPARATOR);
                    
81	}
                    
89		$res = [];
                    
90		foreach (explode('/', strtr($path, '\\', '/')) as $part) {
                    
91			if ($part === '..' && $res) {
                    
                
sfWidgetFormSelectRadio.class.php https://github.com/bb-dev/OpenPNE3.git | PHP | 122 lines
                    
1<?php
                    
2
                    
16 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
                    
17 * @version    SVN: $Id: sfWidgetFormSelectRadio.class.php 27738 2010-02-08 15:07:33Z Kris.Wallsmith $
                    
18 */
                    
74      {
                    
75        $parts[] = strtr($this->getOption('template'), array('%group%' => $key, '%options%' => $this->formatChoices($name, $value, $option, $attributes)));
                    
76      }
                    
                
TbBaseMenu.php https://gitlab.com/cuitianze/eduwind | PHP | 195 lines
                    
1<?php
                    
2/**
                    
5 * @copyright Copyright &copy; Christoffer Niska 2012-
                    
6 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
                    
7 * @package bootstrap.widgets
                    
90						$template = isset($item['template']) ? $item['template'] : $this->itemTemplate;
                    
91						echo strtr($template, array('{menu}' => $menu));
                    
92					}
                    
                
SystemAuthorizeTest.php https://gitlab.com/geeta7/drupal | PHP | 65 lines
                    
1<?php
                    
2
                    
12/**
                    
13 * Tests the authorize.php script and related API.
                    
14 *
                    
33  /**
                    
34   * Helper function to initialize authorize.php and load it via drupalGet().
                    
35   *
                    
35   *
                    
36   * Initializing authorize.php needs to happen in the child Drupal
                    
37   * installation, not the parent. So, we visit a menu callback provided by
                    
39   * $_SESSION inside the test site, not the framework site. This callback
                    
40   * redirects to authorize.php when it's done initializing.
                    
41   *
                    
53    $this->drupalGetAuthorizePHP($page_title);
                    
54    $this->assertTitle(strtr('@title | Drupal', array('@title' => $page_title)), 'authorize.php page title is correct.');
                    
55    $this->assertNoText('It appears you have reached this page in error.');
                    
                
 

Source

Language