PageRenderTime 811ms queryTime 36ms sortTime 30ms getByIdsTime 615ms findMatchingLines 65ms

100+ results results for 'php strtr repo:monkeycraps/swoole_framework' (811 ms)

Not the results you expected?
Ftp.php https://bitbucket.org/dnejedly/eaparts.git | PHP | 509 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 */
                    
412        $trans = array('-' => '0', 'r' => '4', 'w' => '2', 'x' => '1');
                    
413        $chmod = substr(strtr($chmod, $trans), 1);
                    
414        $array = str_split($chmod, 3);
                    
444    /**
                    
445     * Get directory contents in PHP array
                    
446     *
                    
                
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
                    
                
Url.php https://bitbucket.org/alessandro-aglietti/itis-leonardo-da-vinci.git | PHP | 548 lines
                    
1<?php
                    
2
                    
275
                    
276        $this->path = strtr($path, $pathReplace);
                    
277
                    
                
web.php https://github.com/XioNoX/Benevolus.git | PHP | 509 lines
                    
1<?php
                    
2
                    
3/**
                    
4	Web pack for the PHP Fat-Free Framework
                    
5
                    
37		$out=preg_replace('/([^\w]|-)+/','-',
                    
38			trim(strtr(str_replace('\'','',$text),
                    
39			self::$vars['DIACRITICS'])));
                    
205		if ($echo) {
                    
206			if (PHP_SAPI!='cli' && !headers_sent())
                    
207				header(self::HTTP_Content.': '.$mime[$ext[1]].'; '.
                    
295				self::HTTP_Agent.': Mozilla/5.0 '.
                    
296					'(compatible;'.PHP_OS.')'.self::EOL.
                    
297				($reqhdrs?
                    
330					self::$vars['HEADERS'][]=$hdr;
                    
331					if (PHP_SAPI!='cli' && $forward)
                    
332						// Forward HTTP header
                    
                
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
                    
                
TbBaseMenu.php https://github.com/LosYear/FluentCMS.git | PHP | 189 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
                    
72                        $template = isset($item['template']) ? $item['template'] : $this->itemTemplate;
                    
73                        echo strtr($template, array('{menu}' => $menu));
                    
74                    }
                    
                
Debug.php https://bitbucket.org/jokusafet/magento2.git | 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) 2012 X.commerce, Inc. (http://www.magentocommerce.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 . "'";
                    
                
Helpers.php https://github.com/iguana007/gui-for-ACL-NETTE-2.0.git | PHP | 206 lines
                    
1<?php
                    
2
                    
33		if (Debugger::$editor && is_file($file)) {
                    
34			$dir = dirname(strtr($file, '/', DIRECTORY_SEPARATOR));
                    
35			$base = isset($_SERVER['SCRIPT_FILENAME']) ? dirname(dirname(strtr($_SERVER['SCRIPT_FILENAME'], '/', DIRECTORY_SEPARATOR))) : dirname($dir);
                    
39			return Nette\Utils\Html::el('a')
                    
40				->href(strtr(Debugger::$editor, array('%file' => rawurlencode($file), '%line' => $line)))
                    
41				->title("$file:$line")
                    
76		if (is_bool($var)) {
                    
77			return '<span class="php-bool">' . ($var ? 'TRUE' : 'FALSE') . "</span>\n";
                    
78
                    
79		} elseif ($var === NULL) {
                    
80			return "<span class=\"php-null\">NULL</span>\n";
                    
81
                    
82		} elseif (is_int($var)) {
                    
83			return "<span class=\"php-int\">$var</span>\n";
                    
84
                    
                
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 @
                    
                
CNumberValidator.php https://bitbucket.org/urkh/chino-yii.git | 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,
                    
                
RegistrationPresenter.php https://bitbucket.org/iiic/iszp.git | PHP | 204 lines
                    
1<?php
                    
2
                    
168		$text = $this->page->email;
                    
169		$text = strtr($text, array(
                    
170			'{$email}' => $user->email,
                    
                
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";
                    
                
Bundle.php https://bitbucket.org/vvanuytven/php_auto.git | PHP | 197 lines
                    
1<?php
                    
2
                    
182        $finder = new Finder();
                    
183        $finder->files()->name('*Command.php')->in($dir);
                    
184
                    
188            if ($relativePath = $file->getRelativePath()) {
                    
189                $ns .= '\\'.strtr($relativePath, '/', '\\');
                    
190            }
                    
190            }
                    
191            $r = new \ReflectionClass($ns.'\\'.$file->getBasename('.php'));
                    
192            if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract() && !$r->getConstructor()->getNumberOfRequiredParameters()) {
                    
                
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);
                    
                
sfViewCacheManager.class.php https://github.com/richhl/kalturaCE.git | PHP | 515 lines
                    
1<?php
                    
2
                    
20 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
                    
21 * @version    SVN: $Id: sfViewCacheManager.class.php 3232 2007-01-11 20:51:54Z fabien $
                    
22 */
                    
160    {
                    
161      $options['vary'][$key] = strtr(strtolower($name), '_', '-');
                    
162    }
                    
                
ezpi18n.php https://github.com/Yannix/ezpublish.git | PHP | 146 lines
                    
1<?php
                    
2/**
                    
42            }
                    
43            $text = strtr( $text, $replaceList );
                    
44        }
                    
                
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, "/");
                    
                
Language.php https://bitbucket.org/kudutest1/moodlegit.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    }
                    
                
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
                    
                
format.php https://github.com/henriquecrang/e-UNI.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    } 
                    
                
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)) {
                    
                
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;
                    
                
CStringValidator.php https://bitbucket.org/haichau59/manga.git | PHP | 177 lines
                    
1<?php
                    
2/**
                    
62	 * @var string the encoding of the string value to be validated (e.g. 'UTF-8').
                    
63	 * This property is used only when mbstring PHP extension is enabled.
                    
64	 * The value of this property will be used as the 2nd parameter of the
                    
119			$message=Yii::t('yii','{attribute} is of the wrong length (should be {length} characters).');
                    
120		$message=strtr($message, array(
                    
121			'{attribute}'=>$label,
                    
126			$tooShort=Yii::t('yii','{attribute} is too short (minimum is {min} characters).');
                    
127		$tooShort=strtr($tooShort, array(
                    
128			'{attribute}'=>$label,
                    
133			$tooLong=Yii::t('yii','{attribute} is too long (maximum is {max} characters).');
                    
134		$tooLong=strtr($tooLong, array(
                    
135			'{attribute}'=>$label,
                    
                
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		}
                    
                
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);
                    
                
TaggableBehavior.php https://github.com/mmonguilod/sfPropel15TaggableBehaviorPlugin.git | PHP | 304 lines
                    
11        'tagging_table' => '%TABLE%_tagging',
                    
12        'tagging_table_phpname' => '%PHPNAME%Tagging',
                    
13        'tag_table' => 'taggable_tag',
                    
39        $tagTableName = $this->getTagTableName();
                    
40        $tagTablePhpName = $this->replaceTokens($this->parameters['tag_table_phpname']);
                    
41
                    
46                'name'      => $tagTableName,
                    
47                'phpName'   => $tagTablePhpName,
                    
48                'package'   => $table->getPackage(),
                    
92                'name'      => $taggingTableName,
                    
93                'phpName'   => $this->replaceTokens($this->parameters['tagging_table_phpname']),
                    
94                'package'   => $table->getPackage(),
                    
298            '%TABLE%'   => $table->getName(),
                    
299            '%PHPNAME%' => $table->getPhpName(),
                    
300        ));
                    
                
php-brief.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 162 lines
                    
1<?php
                    
2/*************************************************************************************
                    
2/*************************************************************************************
                    
3 * php-brief.php
                    
4 * -------------
                    
11 *
                    
12 * PHP language file for GeSHi (brief version).
                    
13 *
                    
50$language_data = array (
                    
51	'LANG_NAME' => 'PHP',
                    
52	'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
                    
64			'null', '__LINE__', '__FILE__',
                    
65			'false', '&lt;?php', '?&gt;',
                    
66			'true', 'var', 'default',
                    
72			'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
                    
73			'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',
                    
74			'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',
                    
                
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/sksabir/support4planet | PHP | 305 lines
                    
238	<tr>
                    
239	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?></label></th>
                    
240	<td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /></td>
                    
243	<tr>
                    
244	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><?php echo esc_html( __( 'Default value', 'contact-form-7' ) ); ?></label></th>
                    
245	<td><input type="text" name="values" class="oneline" id="<?php echo esc_attr( $args['content'] . '-values' ); ?>" /><br />
                    
278	<tr>
                    
279	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'contact-form-7' ) ); ?></label></th>
                    
280	<td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" /></td>
                    
283	<tr>
                    
284	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'contact-form-7' ) ); ?></label></th>
                    
285	<td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" /></td>
                    
301
                    
302	<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>
                    
303</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    }
                    
                
UrlMatcherTest.php https://bitbucket.org/hill2steve/mobileroom.git | PHP | 245 lines
                    
1<?php
                    
2
                    
20
                    
21class UrlMatcherTest extends \PHPUnit_Framework_TestCase
                    
22{
                    
168        $this->assertEquals(array('_route' => 'foo', 'foo' => $chars), $matcher->match('/'.rawurlencode($chars).'/bar'));
                    
169        $this->assertEquals(array('_route' => 'foo', 'foo' => $chars), $matcher->match('/'.strtr($chars, array('%' => '%25')).'/bar'));
                    
170    }
                    
                
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    } 
                    
                
UpdateCommand.php https://github.com/genemu/GenemuDoctrineExtraBundle.git | PHP | 290 lines
                    
1<?php
                    
2
                    
66                $files = new Finder();
                    
67                $files->files()->name('*Controller.php')->in($dir);
                    
68
                    
69                foreach ($files as $file) {
                    
70                    if ('Controller.php' !== $controllerName = $file->getBasename('Controller.php')) {
                    
71                        $ns = $class->getNamespace().'\\Controller';
                    
73                        if ($relativePath = $file->getRelativePath()) {
                    
74                            $ns .= '\\'.strtr($relativePath, array('/' => '\\'));
                    
75                        }
                    
76
                    
77                        $reflection = new \ReflectionClass($ns.'\\'.$file->getBasename('.php'));
                    
78
                    
89                                if (preg_match('/^(.+)Action$/', $method->getName())) {
                    
90                                    $methods[strtr($method->getName(), array('Action' => ''))] = true;
                    
91                                }
                    
                
DigestAuthenticationListener.php https://github.com/jdewit/symfony.git | PHP | 222 lines
                    
1<?php
                    
2
                    
63
                    
64        if (!$header = $request->server->get('PHP_AUTH_DIGEST')) {
                    
65            return;
                    
164    {
                    
165        return strtr($this->elements['username'], array("\\\"" => "\"", "\\\\" => "\\"));
                    
166    }
                    
                
check_integrity_inc.php https://github.com/fusenigk/mantisbt-1.git | PHP | 188 lines
                    
23 * @uses check_api.php
                    
24 * @uses config_api.php
                    
25 */
                    
33 */
                    
34require_once( 'check_api.php' );
                    
35require_api( 'config_api.php' );
                    
91			$t_file_relative = $p_relative_path_prefix . $t_file_relative;
                    
92			$t_file_relative = strtr( $t_file_relative, '\\', '/' );
                    
93			$t_file_relative = ltrim( $t_file_relative, '/' );
                    
134	$t_can_perform_integrity_check,
                    
135	array( false => 'Ensure integrity_release_blobs.php and/or integrity_commit_blobs.php are available.' )
                    
136);
                    
154	'custom_relationships_inc.php',
                    
155	'custom_strings_inc.php',
                    
156	'mantis_offline.php'
                    
                
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);
                    
                
modinstalldriver_mysql.class.php https://github.com/francisreboucas/revolution.git | PHP | 212 lines
                    
1<?php
                    
2/*
                    
21 */
                    
22require_once (strtr(realpath(dirname(__FILE__)), '\\', '/') . '/modinstalldriver.class.php');
                    
23/**
                    
                
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++;
                    
                
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);
                    
                
Ftp.php https://bitbucket.org/jokusafet/magento2.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 X.commerce, 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     *
                    
                
login.processor.php https://github.com/gunf/novo-isaak.local.git | PHP | 301 lines
                    
1<?php
                    
2require_once(strtr(realpath(dirname(__FILE__)), '\\', '/').'/../includes/protect.inc.php');
                    
3
                    
4// set the include_once path
                    
5if(version_compare(phpversion(), "4.3.0")>=0) {
                    
6    set_include_path(get_include_path() . PATH_SEPARATOR . "../includes/");
                    
13// include the database configuration file
                    
14include_once "config.inc.php";
                    
15
                    
27// get the settings from the database
                    
28include_once "settings.inc.php";
                    
29
                    
30// include version info
                    
31include_once "version.inc.php";
                    
32
                    
                
Set.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 106 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 *  $Id: Set.php 48519 2012-02-03 23:18:52Z btowles $
                    
4 *
                    
26 * @subpackage  Query
                    
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
                    
28 * @link        www.doctrine-project.org
                    
76
                    
77        return strtr($dql, $termsTranslation);
                    
78    }
                    
                
ufpdf.php https://bitbucket.org/steve_delbar/iepsm-projet-de-d-veloppement-internet-2013.git | 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}
                    
                
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.
                    
                
Request.class.php https://bitbucket.org/webinfopro/sqlitemanager.git | PHP | 567 lines
                    
1<?php
                    
2/**
                    
18* @author Frédéric HENNINOT
                    
19* @version $Id: SQLite.i18n.php,v 1.25 2006/04/14 15:16:52 freddy78 Exp $ $Revision: 1.25 $
                    
20*/
                    
252		}
                    
253		$source = strtr($source, $ttr);
                    
254
                    
                
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();
                    
                
AsseticNode.php https://github.com/nattaphat/hgis.git | PHP | 166 lines
                    
1<?php
                    
2
                    
143        $compiler
                    
144            ->raw("strtr(")
                    
145            ->string($asset->getTargetPath())
                    
                
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;
                    
                
server_status.php https://bitbucket.org/steve_delbar/iepsm-projet-de-d-veloppement-internet-2013.git | PHP | 261 lines
                    
80                            <td bgcolor="<?php echo $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $strReceived; ?>&nbsp;</td>
                    
81                            <td bgcolor="<?php echo $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo join(' ', PMA_formatByteDown($serverStatus['Bytes_received'])); ?>&nbsp;</td>
                    
82                            <td bgcolor="<?php echo $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo join(' ', PMA_formatByteDown($serverStatus['Bytes_received'] * 3600 / $serverStatus['Uptime'])); ?>&nbsp;</td>
                    
84                        <tr>
                    
85                            <td bgcolor="<?php echo $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $strSent; ?>&nbsp;</td>
                    
86                            <td bgcolor="<?php echo $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo join(' ', PMA_formatByteDown($serverStatus['Bytes_sent'])); ?>&nbsp;</td>
                    
117                            <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>" align="right">&nbsp;<?php echo number_format($serverStatus['Connections'], 0, $number_decimal_separator, $number_thousands_separator); ?>&nbsp;</td>
                    
118                            <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>" align="right">&nbsp;<?php echo number_format(($serverStatus['Connections'] * 3600 / $serverStatus['Uptime']), 2, $number_decimal_separator, $number_thousands_separator); ?>&nbsp;</td>
                    
119                            <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>" align="right">&nbsp;<?php echo number_format(100, 2, $number_decimal_separator, $number_thousands_separator); ?>&nbsp;%&nbsp;</td>
                    
142                            <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>" align="right">&nbsp;<?php echo number_format(($serverStatus['Questions'] * 60 / $serverStatus['Uptime']), 2, $number_decimal_separator, $number_thousands_separator); ?>&nbsp;</td>
                    
143                            <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>" align="right">&nbsp;<?php echo number_format(($serverStatus['Questions'] / $serverStatus['Uptime']), 2, $number_decimal_separator, $number_thousands_separator); ?>&nbsp;</td>
                    
144                        </tr>
                    
226                            <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo htmlspecialchars(str_replace('_', ' ', $name)); ?>&nbsp;</td>
                    
227                            <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo htmlspecialchars($value); ?>&nbsp;</td>
                    
228                        </tr>
                    
                
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    }
                    
                
TemplateListener.php https://github.com/nguyennamtien/TaskBoxx.git | PHP | 160 lines
                    
1<?php
                    
2
                    
150    {
                    
151        $namespace = strtr(dirname(strtr($class, '\\', '/')), '/', '\\');
                    
152        foreach ($this->container->get('kernel')->getBundles() as $bundle) {
                    
                
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    }
                    
                
TbBaseMenu.php https://bitbucket.org/sonnylazuardi/savary.git | 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					}
                    
                
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)) {
                    
                
sfWidgetFormSchemaFormatter.class.php https://github.com/bheneka/gitta.git | PHP | 346 lines
                    
1<?php
                    
2
                    
46  {
                    
47    return strtr($this->getRowFormat(), array(
                    
48      '%label%'         => $label,
                    
80
                    
81      return strtr($subject, $parameters);
                    
82    }
                    
108   *
                    
109   * @throws InvalidArgumentException if an invalid php callable or sfCallable has been provided
                    
110   */
                    
114    {
                    
115      throw new InvalidArgumentException('Provided i18n callable should be either an instance of sfCallable or a valid PHP callable');
                    
116    }
                    
127
                    
128    return strtr($this->getHelpFormat(), array('%help%' => $this->translate($help)));
                    
129  }
                    
                
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  "??????????ÁÂ?Ä??Ç?É?Ë?ÍÎ????ÓÔ?Ö??Ú?ÜÝß?áâ?ä??ç?é?ë?íî????óô?ö??ú?üý?", 
                    
                
CEmailValidator.php https://github.com/LosYear/FluentCMS.git | 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();
                    
                
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    }
                    
                
CBreadcrumbs.php https://bitbucket.org/rezanachmad/php-selenium-training.git | 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),
                    
                
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});
                    
                
ClassDoc.class.php https://github.com/treuter/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
                    
                
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
                    
                
sqlite3.php https://github.com/vohnicky/treeview.git | PHP | 531 lines
                    
1<?php
                    
2
                    
7 * @copyright  Copyright (c) 2005, 2010 David Grudl
                    
8 * @license    http://dibiphp.com/license  dibi license
                    
9 * @link       http://dibiphp.com
                    
50		if (!extension_loaded('sqlite3')) {
                    
51			throw new DibiDriverException("PHP extension 'sqlite3' is not loaded.");
                    
52		}
                    
217		case dibi::IDENTIFIER:
                    
218			return '[' . str_replace('.', '].[', strtr($value, '[]', '  ')) . ']';
                    
219
                    
                
Observer.php https://bitbucket.org/jokusafet/magento2.git | PHP | 196 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 X.commerce, Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
168        if ($manipulationAllowed || $isContainer) {
                    
169            $elementId = 'vde_element_' . rtrim(strtr(base64_encode($elementName), '+/', '-_'), '=');
                    
170            $this->_wrappingRenderer->setData(array(
                    
                
StringUtils.php https://github.com/testlinkjp/testlink-japanese-localization.git | PHP | 406 lines
                    
1<?php
                    
2/**
                    
207        }
                    
208        return strtr( $this->r, $pairs );
                    
209    }
                    
244/**
                    
245 * Replacement array for FSS with fallback to strtr()
                    
246 * Supports lazy initialisation of FSS resource
                    
253     * Create an object with the specified replacement array
                    
254     * The array should have the same form as the replacement array for strtr()
                    
255     */
                    
315        } else {
                    
316            $result = strtr( $subject, $this->data );
                    
317        }
                    
                
CustomController.php https://github.com/rgranadino/magento-mirror.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) 2011 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
81    {
                    
82        $packageName = base64_decode(strtr($this->getRequest()->getParam('id'), '-_,', '+/='));
                    
83        if ($packageName) {
                    
                
sfWidgetFormSelectRadio.class.php https://github.com/coolpink/CpSymfony.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      }
                    
                
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        }
                    
                
l10n_scanner.php https://bitbucket.org/JakePratt/kupcakz.com.git | PHP | 178 lines
                    
1<?php defined("SYSPATH") or die("No direct script access.");
                    
2/**
                    
53
                    
54  static function scan_php_file($file, &$cache) {
                    
55    $code = file_get_contents($file);
                    
173    } else {
                    
174      $str = strtr($str, array("\\'" => "'", "\\\\" => "\\"));
                    
175    }
                    
                
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(
                    
                
RegistrationController.php https://github.com/LosYear/FluentCMS.git | PHP | 56 lines
                    
1<?php
                    
2Yii::import('application.modules.registration.controllers.YumRegistrationController');
                    
37        if (is_object($content)) {
                    
38            $body = strtr('Hi, {email}, your new password is {password}. Please activate your account by clicking this link: {activation_url}', array(
                    
39                '{email}' => $user->profile->email,
                    
                
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		}
                    
                
controller.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 129 lines
                    
1<?php
                    
2/**
                    
12jimport('joomla.application.component.controller');
                    
13include_once(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/legacy_class.php');
                    
14
                    
55   	{
                    
56   		require_once JPATH_ADMINISTRATOR.'/components/com_modules/helpers/modules.php';
                    
57
                    
69   			$this->setMessage($this->getError(), 'error');
                    
70   			$this->setRedirect(JRoute::_(sprintf('index.php?option=%s&view=modules',RokSprocket_Helper::getRedirectionOption()), false));
                    
71
                    
113        $cs2 = substr_count($str, "\\'");
                    
114        $tmp = strtr($str, array(
                    
115                                "\\\""  => "",
                    
120        if ($cd1 == $cd2 && $cs1 == $cs2 && $cb1 == 2 * $cb2) {
                    
121            return strtr($str, array(
                    
122                                    "\\\""  => "\"",
                    
                
 

Source

Language