PageRenderTime 802ms queryFilters 0ms Sphinxql 223ms GetByIds 483ms meta 0ms repositoryFilters 8ms languageFilters 0ms sourceFilters 2ms

68,424 results for 'php strtr' (802 ms)

Source

Language

Repository

utf8.php https://bitbucket.org/rhizomatik/lorea_production/ | PHP | 1,658 lines
1<?php
2/**
96     * @author <bmorel@ssi.fr>
97     * @link   http://www.php.net/manual/en/function.utf8-encode.php
98     */
173        // cast parameters to appropriate types to avoid multiple notices/warnings
174        $str = (string)$str;                          // generates E_NOTICE for PHP4 objects, but not PHP5 objects
175        $offset = (int)$offset;
339        global $UTF8_LOWER_TO_UPPER;
340        return strtr($string,$UTF8_LOWER_TO_UPPER);
341    }
373     * @return string with first char of each word uppercase
374     * @see http://www.php.net/ucwords
375     */
501     * @author <vpribish at shopping dot com>
502     * @link   http://www.php.net/manual/en/function.utf8-decode.php
503     */
utf8.php http://rapyd-framework.googlecode.com/svn/trunk/ | PHP | 1,619 lines
1<?php
2/**
57     * @author <bmorel@ssi.fr>
58     * @link   http://www.php.net/manual/en/function.utf8-encode.php
59     */
134        // cast parameters to appropriate types to avoid multiple notices/warnings
135        $str = (string)$str;                          // generates E_NOTICE for PHP4 objects, but not PHP5 objects
136        $offset = (int)$offset;
300        global $UTF8_LOWER_TO_UPPER;
301        return strtr($string,$UTF8_LOWER_TO_UPPER);
302    }
334     * @return string with first char of each word uppercase
335     * @see http://www.php.net/ucwords
336     */
462     * @author <vpribish at shopping dot com>
463     * @link   http://www.php.net/manual/en/function.utf8-decode.php
464     */
txplib_misc.php http://textpattern.googlecode.com/svn/development/4.x/ | PHP | 6,666 lines
1<?php
2
183 * @return  string
184 * @see     http://www.php.net/manual/function.htmlspecialchars.php
185 * @since   4.5.0
191//    Ignore ENT_HTML5 and ENT_XHTML for now.
192//    ENT_HTML5 and ENT_XHTML are defined in PHP 5.4+ but we consistently encode single quotes as &#039; in any doctype.
193//    global $prefs;
1913                // Side effect: callback handler *must* be ordinary function, *must not* be class method in PHP <5.4
1914                // see https://bugs.php.net/bug.php?id=47160
1915                $return_value[] = $c['function']($event, $step, $data, $options);
3400            break;
3401        // Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3.
3402        case UPLOAD_ERR_NO_TMP_DIR :
6390    if (version_compare(REQUIRED_PHP_VERSION, PHP_VERSION) > 0) {
6391        txp_die('This server runs PHP version '.PHP_VERSION.'. Textpattern needs PHP version '. REQUIRED_PHP_VERSION. ' or better.');
6392    }
P2Helper.php http://phundament.googlecode.com/svn/trunk/modules/p2/ | PHP | 681 lines
21 * @author Tobias Munk <schmunk@usrbin.de>
22 * @version $Id: P2Helper.php 547 2010-03-31 22:54:57Z schmunk $
23 * @package p2.components
372                Yii::import("application.controllers.*");
373                #self::getActions(str_replace(".php","",$controller));
374
376                if ($module !== null)
377                    $return[strtr($controller, $trans)] = $module . "/" . P2Helper::lcfirst(strtr($controller, $trans));
378                else
378                else
379                    $return[strtr($controller, $trans)] = P2Helper::lcfirst(strtr($controller, $trans));
380            }
415     *
416     * from http://inanimatt.com/php-convert-entities.php
417     *
MTUtil.php git://github.com/movabletype/movabletype.git | PHP | 1,823 lines
1<?php
2# Movable Type (r) (C) 2001-2020 Six Apart Ltd. All Rights Reserved.
576    global $Latin1_ASCII;
577    return strtr($s, $Latin1_ASCII);
578}
820    } else {
821        $str = strtr($str, $_encode_xml_Map);
822        $str = preg_replace_callback('/&amp;#(x?)((?:[0-9]+|[0-9a-fA-F]+).*?);/', '__check_xml_char', $str);
833        global $_encode_xml_Map;
834        $str = strtr($str, array_flip($_encode_xml_Map));
835    }
856    if (!isset($str)) return '';
857    // Do not use JSON_UNESCAPED_UNICODE with json_encode for supporting PHP 5.3.x and before.
858    // Do not use closure for supporting PHP 5.2.x and before.
943    if (! isset($is_old_php)) {
944        $is_old_php = version_compare(phpversion(), '4.3.0', '<');
945    }
MTUtil.php http://movable-type-zh-project.googlecode.com/svn/trunk/ | PHP | 1,690 lines
1<?php
2# Movable Type (r) Open Source (C) 2001-2011 Six Apart, Ltd.
496    global $Utf8_ASCII;
497    return strtr($s, $Utf8_ASCII);
498}
579    global $Latin1_ASCII;
580    return strtr($s, $Latin1_ASCII);
581}
859    } else {
860        $str = strtr($str, $_encode_xml_Map);
861        $str = preg_replace('/&amp;((\#([0-9]+)|\#x([0-9a-fA-F]+)).*?);/', "&$1;", $str);
872        global $_encode_xml_Map;
873        $str = strtr($str, array_flip($_encode_xml_Map));
874    }
948    $trans_table = get_html_translation_table(HTML_SPECIALCHARS, $quote_style);
949    if( $trans_table["'"] != '&#039;' ) { # some versions of PHP match single quotes to &#39;
950        $trans_table["'"] = '&#039;';
MTUtil.php https://code.google.com/p/movabletype/ | PHP | 1,690 lines
1<?php
2# Movable Type (r) Open Source (C) 2001-2010 Six Apart, Ltd.
5#
6# $Id: MTUtil.php 5151 2010-01-06 07:51:27Z takayama $
7
549    global $Utf8_ASCII;
550    return strtr($s, $Utf8_ASCII);
551}
632    global $Latin1_ASCII;
633    return strtr($s, $Latin1_ASCII);
634}
867    } else {
868        $str = strtr($str, $_encode_xml_Map);
869        $str = preg_replace('/&amp;((\#([0-9]+)|\#x([0-9a-fA-F]+)).*?);/', "&$1;", $str);
880        global $_encode_xml_Map;
881        $str = strtr($str, array_flip($_encode_xml_Map));
882    }
qa-app-format.php git://github.com/q2a/question2answer.git | PHP | 1,698 lines
1<?php
2
9	File: qa-include/qa-app-format.php
10	Version: See define()s at top of qa-include/qa-base.php
11	Description: Common functions for creating theme-ready structures from data
23
24	More about this license: http://www.question2answer.org/license.php
25*/
96	{
97		require_once QA_INCLUDE_DIR.'qa-app-users.php';
98		
208	$dummy is a placeholder (used to be $categories parameter but that's no longer needed)
209	$options is an array which sets what is displayed (see qa_post_html_defaults() in qa-app-options.php)
210	If something is missing from $post (e.g. ['content']), correponding HTML also omitted.
1450						foreach ($searchmatches as $searchmatch)
1451							$layerphp=substr_replace($layerphp, $replace, $searchmatch[1], strlen($searchmatch[0]));
1452					}
utf8.php git://github.com/usebb/UseBB.git | PHP | 1,628 lines
1<?php
2
60     * @author <bmorel@ssi.fr>
61     * @link   http://www.php.net/manual/en/function.utf8-encode.php
62     */
137        // cast parameters to appropriate types to avoid multiple notices/warnings
138        $str = (string)$str;                          // generates E_NOTICE for PHP4 objects, but not PHP5 objects
139        $offset = (int)$offset;
303        global $UTF8_LOWER_TO_UPPER;
304        return strtr($string,$UTF8_LOWER_TO_UPPER);
305    }
337     * @return string with first char of each word uppercase
338     * @see http://www.php.net/ucwords
339     */
465     * @author <vpribish at shopping dot com>
466     * @link   http://www.php.net/manual/en/function.utf8-decode.php
467     */
Language.php git://pkgs.fedoraproject.org/mediawiki | PHP | 2,654 lines
1<?php
2/**
159			// Preload base classes to work around APC/PHP5 bug
160			if ( file_exists( "$IP/languages/classes/$class.deps.php" ) ) {
161				include_once("$IP/languages/classes/$class.deps.php");
162			}
163			if ( file_exists( "$IP/languages/classes/$class.php" ) ) {
164				include_once("$IP/languages/classes/$class.php");
293		foreach($ns as $k => $v) {
294			$ns[$k] = strtr($v, '_', ' ');
295		}
998	 *
999	 * @link http://phpnuke.org/modules.php?name=News&file=article&sid=8234&mode=thread&order=0&thold=0
1000	 */
1492		# *input* string. We just ignore those too.
1493		# REF: http://bugs.php.net/bug.php?id=37166
1494		# REF: https://bugzilla.wikimedia.org/show_bug.cgi?id=16885
extract.php git://pkgs.fedoraproject.org/gallery2 | PHP | 289 lines
1#!/usr/bin/php -f
2<?php
3/*
4 * PHP script to extract strings from all the files and print
5 * to stdout for use with xgettext.
10 *
11 * http://cvs.horde.org/co.php/horde/COPYING?r=2.1
12 *
25 *
26 * $Id: extract.php 17580 2008-04-13 00:38:13Z tnalmdal $
27 */
32if (!function_exists('token_get_all')) {
33    errorExit("PHP tokenizer required.\n"
34	    . "Must use a PHP binary that is NOT built with --disable-tokenizer\n");
116    /*
117     * class|inc|php are module and core PHP files.
118     * Parse .html as PHP for installer/upgrader templates/*.html files.
rcube_ldap.php git://pkgs.fedoraproject.org/roundcubemail | PHP | 1,967 lines
1<?php
2/*
3 +-----------------------------------------------------------------------+
4 | program/include/rcube_ldap.php                                        |
5 |                                                                       |
19
20 $Id: rcube_ldap.php 5879 2012-02-15 08:29:33Z thomasb $
21
157                'file' => __FILE__, 'line' => __LINE__,
158                'message' => "No ldap support in this installation of PHP"),
159                true, true);
229
230            $dc = 'dc='.strtr($d, array('.' => ',dc=')); // hierarchal domain string
231
239                // Search for the dn to use to authenticate
240                $this->prop['search_base_dn'] = strtr($this->prop['search_base_dn'], $replaces);
241                $this->prop['search_filter'] = strtr($this->prop['search_filter'], $replaces);
utf8.php https://git01.codeplex.com/portablenginxdokuwik | PHP | 1,684 lines
1<?php
2/**
57     * @author <bmorel@ssi.fr>
58     * @link   http://www.php.net/manual/en/function.utf8-encode.php
59     */
87     * @see basename()
88     * @link   https://bugs.php.net/bug.php?id=37738
89     * @param string $path     A path
160        // cast parameters to appropriate types to avoid multiple notices/warnings
161        $str = (string)$str;                          // generates E_NOTICE for PHP4 objects, but not PHP5 objects
162        $offset = (int)$offset;
314        global $UTF8_UPPER_TO_LOWER;
315        return strtr($string,$UTF8_UPPER_TO_LOWER);
316    }
494     * @author <vpribish at shopping dot com>
495     * @link   http://www.php.net/manual/en/function.utf8-decode.php
496     */
rcube_ldap.php https://github.com/fretelweb/roundcubemail.git | PHP | 1,953 lines
1<?php
2
252        // with OpenLDAP 2.x ldap_connect() always succeeds but ldap_bind will fail if host isn't reachable
253        // see http://www.php.net/manual/en/function.ldap-connect.php
254        foreach ($this->prop['hosts'] as $host) {
285
286                $dc = 'dc='.strtr($d, array('.' => ',dc=')); // hierarchal domain string
287
291                if ($this->prop['search_base_dn'] && $this->prop['search_filter']) {
292                    $search_bind_dn = strtr($this->prop['search_bind_dn'], $replaces);
293                    $search_base_dn = strtr($this->prop['search_base_dn'], $replaces);
293                    $search_base_dn = strtr($this->prop['search_base_dn'], $replaces);
294                    $search_filter  = strtr($this->prop['search_filter'], $replaces);
295
350                // Replace the bind_dn and base_dn variables.
351                $bind_dn              = strtr($bind_dn, $replaces);
352                $this->base_dn        = strtr($this->base_dn, $replaces);
_comments.html https://github.com/evangelia-mitsopoulou/phpjs.git | HTML | 317 lines
75advanced use WARNING!
76  strtr(&quot;This string is text.&quot;,{'text':'string','string':'text'});
77=This text is text.
137- `krsort()`
138- `strtr()`
139
147on 2009-12-10 05:42:56 <br />
148@jpfle: Should now be fixed: http://github.com/kvz/phpjs/blob/master/functions/strings/strtr.js . Please note that I've needed to add a new dependency: ini_set(). Also, this will not work with IE5 as is, since I also added for-in filtering for hasOwnProperty (you can remove the check (or alter it to at least make sure from[fr] is a string) if you need to support IE5, but you risk interfering with other libraries that override the Object prototype; otherwise it's best to leave it as is).
149<hr />
302on 2009-05-29 09:36:38 <br />
303There is a bug for the function. For example, when using PHP strtr(&quot;abc&quot;,&quot;abc&quot;,&quot;cba&quot;) the result is &quot;cba&quot;. But using this function, the result is &quot;aba&quot;. Because the first character &quot;a&quot; is replaced by &quot;c&quot;, however it became &quot;a&quot; when trying to replace all character &quot;c&quot; with &quot;a&quot;. Maybe here we can use some array to store the status as well the chars in order to solve the problem. 
304Good Luck
311on 2009-03-10 13:35:01 <br />
312In PHP the function strtr() called with three arguments (string, from, to) replaces the characters in the whole string. Shouldn't be the global modificator 'g' in your script?
313
ManageMembers.php https://github.com/Arantor/Elkarte.git | PHP | 1,299 lines
1<?php
2
170			// Delete all the selected members.
171			require_once(SUBSDIR . '/Members.subs.php');
172			deleteMembers($delete, true);
369				// Replace the wildcard characters ('*' and '?') into MySQL ones.
370				$parameter = strtolower(strtr($smcFunc['htmlspecialchars']($search_params[$param_name], ENT_QUOTES), array('%' => '\%', '_' => '\_', '*' => '%', '?' => '_')));
371
428		'get_items' => array(
429			'file' => SUBSDIR . '/Members.subs.php',
430			'function' => 'list_getMembers',
436		'get_count' => array(
437			'file' => SUBSDIR . '/Members.subs.php',
438			'function' => 'list_getNumMembers',
462					'sprintf' => array(
463						'format' => '<a href="' . strtr($scripturl, array('%' => '%%')) . '?action=profile;u=%1$d">%2$s</a>',
464						'params' => array(
Subs-Editor.php https://github.com/smf-portal/SMF2.1.git | PHP | 2,294 lines
1<?php
2
11 * @copyright 2012 Simple Machines
12 * @license http://www.simplemachines.org/about/smf/license.php BSD
13 *
36	// Turn line breaks back into br's.
37	$text = strtr($text, array("\r" => '', "\n" => '<br />'));
38
40	// @todo Tie in with bbc permissions ?
41	foreach (array('code', 'php', 'nobbc') as $code)
42	{
51				if ($i % 4 == 2)
52					$parts[$i] = strtr($parts[$i], array('[' => '&#91;', ']' => '&#93;', "'" => "'"));
53			}
64	// Fix for having a line break then a thingy.
65	$text = strtr($text, array('<br /><div' => '<div', "\n" => '', "\r" => ''));
66
ManageMembers.php https://github.com/smf-portal/SMF2.1.git | PHP | 1,302 lines
1<?php
2
10 * @copyright 2012 Simple Machines
11 * @license http://www.simplemachines.org/about/smf/license.php BSD
12 *
166			// Delete all the selected members.
167			require_once($sourcedir . '/Subs-Members.php');
168			deleteMembers($_POST['delete'], true);
369				// Replace the wildcard characters ('*' and '?') into MySQL ones.
370				$parameter = strtolower(strtr($smcFunc['htmlspecialchars']($search_params[$param_name], ENT_QUOTES), array('%' => '\%', '_' => '\_', '*' => '%', '?' => '_')));
371
428		'get_items' => array(
429			'file' => $sourcedir . '/Subs-Members.php',
430			'function' => 'list_getMembers',
436		'get_count' => array(
437			'file' => $sourcedir . '/Subs-Members.php',
438			'function' => 'list_getNumMembers',
ManageErrors.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 376 lines
1<?php
2
8 * @copyright 2011 Simple Machines
9 * @license http://www.simplemachines.org/about/smf/license.php BSD
10 *
74			'value' => array(
75				'sql' => in_array($_GET['filter'], array('message', 'url', 'file')) ? base64_decode(strtr($_GET['value'], array(' ' => '+'))) : $smcFunc['db_escape_wildcard_string']($_GET['value']),
76			),
130			$search_message = $smcFunc['db_escape_wildcard_string']($row['message']);
131		$show_message = strtr(strtr(preg_replace('~&lt;span class=&quot;remove&quot;&gt;(.+?)&lt;/span&gt;~', '$1', $row['message']), array("\r" => '', '<br />' => "\n", '<' => '&lt;', '>' => '&gt;', '"' => '&quot;')), array("\n" => '<br />'));
132
223		elseif ($filter['variable'] == 'url')
224			$context['filter']['value']['html'] = '\'' . strtr(htmlspecialchars((substr($filter['value']['sql'], 0, 1) == '?' ? $scripturl : '') . $filter['value']['sql']), array('\_' => '_')) . '\'';
225		elseif ($filter['variable'] == 'message')
345	// Make sure the file we are looking for is one they are allowed to look at
346	if ($ext != '.php' || (strpos($file, $real_board) === false && strpos($file, $real_source) === false) || ($basename == 'settings.php' || $basename == 'settings_bak.php') || strpos($file, $real_cache) !== false || !is_readable($file))
347		fatal_lang_error('error_bad_file', true, array(htmlspecialchars($file)));
ManageMembers.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 1,307 lines
1<?php
2
8 * @copyright 2011 Simple Machines
9 * @license http://www.simplemachines.org/about/smf/license.php BSD
10 *
195			// Delete all the selected members.
196			require_once($sourcedir . '/Subs-Members.php');
197			deleteMembers($_POST['delete'], true);
386				// Replace the wildcard characters ('*' and '?') into MySQL ones.
387				$parameter = strtolower(strtr($smcFunc['htmlspecialchars']($_POST[$param_name], ENT_QUOTES), array('%' => '\%', '_' => '\_', '*' => '%', '?' => '_')));
388
443		'get_items' => array(
444			'file' => $sourcedir . '/Subs-Members.php',
445			'function' => 'list_getMembers',
451		'get_count' => array(
452			'file' => $sourcedir . '/Subs-Members.php',
453			'function' => 'list_getNumMembers',
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21