PageRenderTime 575ms queryFilters 0ms Sphinxql 232ms GetByIds 266ms meta 0ms repositoryFilters 10ms languageFilters 1ms sourceFilters 1ms

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

Source

Language

Repository

fUTF8.php https://bitbucket.org/wbond/flourish/ | PHP | 1,640 lines
1<?php
2/**
5 * This class is implemented to provide a UTF-8 version of almost every built-in
6 * PHP string function. For more information about UTF-8, please visit
7 * http://flourishlib.com/docs/UTF-8.
20 * @changes    1.0.0b12  Fixed a variable name typo in ::sub() [wb, 2011-05-09]
21 * @changes    1.0.0b11  Updated the class to not using phpinfo() to determine the iconv implementation [wb, 2010-11-04]
22 * @changes    1.0.0b10  Fixed a bug with capitalizing a lowercase i resulting in a dotted upper-case I [wb, 2010-11-01]
25 * @changes    1.0.0b7   Added the methods ::trim(), ::rtrim() and ::ltrim() [wb, 2010-05-11]
26 * @changes    1.0.0b6   Fixed ::clean() to work with PHP installs that use an iconv library that doesn't support //IGNORE [wb, 2010-03-02]
27 * @changes    1.0.0b5   Changed ::ucwords() to also uppercase words right after various punctuation [wb, 2009-09-18]
197	/**
198	 * All lowercase UTF-8 characters not properly handled by [http://php.net/mb_strtoupper mb_strtoupper()] mapped to uppercase characters
199	 * 
216	/**
217	 * All uppercase UTF-8 characters not properly handled by [http://php.net/mb_strtolower mb_strtolower()] mapped to lowercase characters
218	 * 
phpthumb.functions.php git://github.com/modxcms/revolution.git | PHP | 1,077 lines
7///                                                         //
8// phpthumb.functions.php - general support functions       //
9//                                                         ///
138			ob_end_clean();
139			$phpinfo_array = explode("\n", $phpinfo);
140		}
951			);
952			$phpinfo_array = phpthumb_functions::phpinfo_array();
953			foreach ($phpinfo_array as $line) {
981				if (function_exists('imagecreatefromgif')) {
982					if ($tempfilename = phpthumb::phpThumb_tempnam()) {
983						if ($fp_tempfile = @fopen($tempfilename, 'wb')) {
1024		}
1025		return strtr($string, $strtr_preg_quote);
1026	}
Mail.php http://firephp.googlecode.com/svn/trunk/ | text | 0 lines
1<?php
2/**
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
19 * @version    $Id: Mail.php 9222 2008-04-14 13:48:41Z yoshida@zend.co.jp $
20 */
25 */
26require_once 'Zend/Mail/Transport/Abstract.php';
27
30 */
31require_once 'Zend/Mime.php';
32
35 */
36require_once 'Zend/Mail/Transport/Abstract.php';
37
40 */
41require_once 'Zend/Mime/Message.php';
42
phpthumb.functions.php http://modx-revo-ja.googlecode.com/svn/ | PHP | 1,044 lines
6///                                                         //
7// phpthumb.functions.php - general support functions       //
8//                                                         ///
148			);
149			$phpinfo_array = phpthumb_functions::phpinfo_array();
150			foreach ($phpinfo_array as $line) {
790		if (in_array(phpversion(), $BrokenURLfopenPHPversions)) {
791			$error .= 'fopen(URL) broken in PHP v'.phpversion().'; ';
792		} elseif (@ini_get('allow_url_fopen')) {
917			);
918			$phpinfo_array = phpthumb_functions::phpinfo_array();
919			foreach ($phpinfo_array as $line) {
947				if (function_exists('ImageCreateFromGIF')) {
948					if ($tempfilename = phpthumb::phpThumb_tempnam()) {
949						if ($fp_tempfile = @fopen($tempfilename, 'wb')) {
Helpers.php git://github.com/nette/nette.git | PHP | 222 lines
1<?php
2
32		if (Debugger::$editor && is_file($file)) {
33			$dir = dirname(strtr($file, '/', DIRECTORY_SEPARATOR));
34			$base = isset($_SERVER['SCRIPT_FILENAME']) ? dirname(dirname(strtr($_SERVER['SCRIPT_FILENAME'], '/', DIRECTORY_SEPARATOR))) : dirname($dir);
38			return Nette\Utils\Html::el('a')
39				->href(strtr(Debugger::$editor, array('%file' => rawurlencode($file), '%line' => $line)))
40				->title("$file:$line")
75		if (is_bool($var)) {
76			return '<span class="php-bool">' . ($var ? 'TRUE' : 'FALSE') . "</span>\n";
77
78		} elseif ($var === NULL) {
79			return "<span class=\"php-null\">NULL</span>\n";
80
81		} elseif (is_int($var)) {
82			return "<span class=\"php-int\">$var</span>\n";
83
phpthumb.functions.php git://github.com/Datawalke/Coordino.git | PHP | 1,044 lines
6///                                                         //
7// phpthumb.functions.php - general support functions       //
8//                                                         ///
148			);
149			$phpinfo_array = phpthumb_functions::phpinfo_array();
150			foreach ($phpinfo_array as $line) {
790		if (in_array(phpversion(), $BrokenURLfopenPHPversions)) {
791			$error .= 'fopen(URL) broken in PHP v'.phpversion().'; ';
792		} elseif (@ini_get('allow_url_fopen')) {
917			);
918			$phpinfo_array = phpthumb_functions::phpinfo_array();
919			foreach ($phpinfo_array as $line) {
947				if (function_exists('ImageCreateFromGIF')) {
948					if ($tempfilename = phpthumb::phpThumb_tempnam()) {
949						if ($fp_tempfile = @fopen($tempfilename, 'wb')) {
phpthumb.functions.php http://cmsdamu.googlecode.com/svn/trunk/ | PHP | 1,044 lines
6///                                                         //
7// phpthumb.functions.php - general support functions       //
8//                                                         ///
148			);
149			$phpinfo_array = phpthumb_functions::phpinfo_array();
150			foreach ($phpinfo_array as $line) {
790		if (in_array(phpversion(), $BrokenURLfopenPHPversions)) {
791			$error .= 'fopen(URL) broken in PHP v'.phpversion().'; ';
792		} elseif (@ini_get('allow_url_fopen')) {
917			);
918			$phpinfo_array = phpthumb_functions::phpinfo_array();
919			foreach ($phpinfo_array as $line) {
947				if (function_exists('ImageCreateFromGIF')) {
948					if ($tempfilename = phpthumb::phpThumb_tempnam()) {
949						if ($fp_tempfile = @fopen($tempfilename, 'wb')) {
function.strtr.html git://github.com/matsubo/matsu-shell-setting.git | HTML | 219 lines
11 <div class="up"><a href="ref.strings.html">String Functions</a></div>
12 <div class="home"><a href="index.html">PHP Manual</a></div>
13</div><hr /><div id="function.strtr" class="refentry">
15  <h1 class="refname">strtr</h1>
16  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">strtr</span> &mdash; <span class="dc-title">Translate characters or replace substrings</span></p>
17
148<div class="phpcode"><code><span style="color: #000000">
149<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//In&nbsp;this&nbsp;form,&nbsp;strtr()&nbsp;does&nbsp;byte-by-byte&nbsp;translation<br />//Therefore,&nbsp;we&nbsp;are&nbsp;assuming&nbsp;a&nbsp;single-byte&nbsp;encoding&nbsp;here:<br /></span><span style="color: #0000BB">$addr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strtr</span><span style="color: #007700">(</span><span style="color: #0000BB">$addr</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"дец"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"aao"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
150</span>
165<div class="phpcode"><code><span style="color: #000000">
166<span style="color: #0000BB">&lt;?php<br />$trans&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"h"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"-"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"hello"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"hi"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"hi"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"hello"</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #0000BB">strtr</span><span style="color: #007700">(</span><span style="color: #DD0000">"hi&nbsp;all,&nbsp;I&nbsp;said&nbsp;hello"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$trans</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
167</span>
186<div class="phpcode"><code><span style="color: #000000">
187<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">strtr</span><span style="color: #007700">(</span><span style="color: #DD0000">"baab"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"ab"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"01"</span><span style="color: #007700">),</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$trans&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"ab"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"01"</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #0000BB">strtr</span><span style="color: #007700">(</span><span style="color: #DD0000">"baab"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$trans</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
188</span>
function.strtr.html git://pkgs.fedoraproject.org/kdewebdev | HTML | 320 lines
3><TITLE
4>strtr</TITLE
5><META
40ALIGN="center"
41>PHP Manual</TH
42></TR
73><A
74NAME="function.strtr"
75></A
75></A
76>strtr</H1
77><DIV
82><P
83>    (PHP 3, PHP 4 )</P
84>strtr&nbsp;--&nbsp;Translate certain characters</DIV
Helpers.php https://bitbucket.org/Aurielle/nette.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://bitbucket.org/Jedna/nette-sandbox.git | PHP | 221 lines
1<?php
2
32		if (Debugger::$editor && is_file($file)) {
33			$dir = dirname(strtr($file, '/', DIRECTORY_SEPARATOR));
34			$base = isset($_SERVER['SCRIPT_FILENAME']) ? dirname(dirname(strtr($_SERVER['SCRIPT_FILENAME'], '/', DIRECTORY_SEPARATOR))) : dirname($dir);
38			return Nette\Utils\Html::el('a')
39				->href(strtr(Debugger::$editor, array('%file' => rawurlencode($file), '%line' => $line)))
40				->title("$file:$line")
75		if (is_bool($var)) {
76			return '<span class="php-bool">' . ($var ? 'TRUE' : 'FALSE') . "</span>\n";
77
78		} elseif ($var === NULL) {
79			return "<span class=\"php-null\">NULL</span>\n";
80
81		} elseif (is_int($var)) {
82			return "<span class=\"php-int\">$var</span>\n";
83
Subs.php https://github.com/Arantor/Elkarte.git | PHP | 4,142 lines
1047
1048						for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
1049						{
1059							}
1060							$php_parts[$php_i] = highlight_php_code($php_string . $php_parts[$php_i]);
1061						}
1084
1085						for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
1086						{
1096							}
1097							$php_parts[$php_i] = highlight_php_code($php_string . $php_parts[$php_i]);
1098						}
2937			// @todo add a hook here
2938			$securityFiles = array('install.php', 'webinstall.php', 'upgrade.php', 'convert.php', 'repair_paths.php', 'repair_settings.php', 'Settings.php~', 'Settings_bak.php~');
2939			foreach ($securityFiles as $i => $securityFile)
Subs-Auth.php https://github.com/smf-portal/SMF2.1.git | PHP | 803 lines
1<?php
2
10 * @copyright 2012 Simple Machines
11 * @license http://www.simplemachines.org/about/smf/license.php BSD
12 *
70			// Fake the $boardurl so we can set a different cookie.
71			$alias = strtr(trim($alias), array('http://' => '', 'https://' => ''));
72			$boardurl = 'http://' . $alias;
90		// We need to meddle with the session.
91		require_once($sourcedir . '/Session.php');
92
120
121	// Parse the URL with PHP to make life easier.
122	$parsed_url = parse_url($boardurl);
148 * - sets $_SESSION['login_url'] to $_SERVER['REQUEST_URL'].
149 * - uses the 'kick_guest' sub template found in Login.template.php.
150 */
Subs-Editor.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 2,171 lines
1<?php
2
8 * @copyright 2011 Simple Machines
9 * @license http://www.simplemachines.org/about/smf/license.php BSD
10 *
73	{
74		$_REQUEST['message'] = strtr($_REQUEST['message'], array('#smcol#' => ';', '#smlt#' => '&lt;', '#smgt#' => '&gt;', '#smamp#' => '&amp;'));
75		$context['message'] = bbc_to_html($_REQUEST['message']);
79		$_REQUEST['message'] = un_htmlspecialchars($_REQUEST['message']);
80		$_REQUEST['message'] = strtr($_REQUEST['message'], array('#smcol#' => ';', '#smlt#' => '&lt;', '#smgt#' => '&gt;', '#smamp#' => '&amp;'));
81
93	// Turn line breaks back into br's.
94	$text = strtr($text, array("\r" => '', "\n" => '<br />'));
95
97	// !!! Tie in with bbc permissions ?
98	foreach (array('code', 'php', 'nobbc') as $code)
99	{
Subs-Post.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 3,272 lines
1<?php
2
8 * @copyright 2011 Simple Machines
9 * @license http://www.simplemachines.org/about/smf/license.php BSD
10 *
146		- types supported are 'approval', 'activation', and 'standard'.
147		- called by registerMember() function in Subs-Members.php.
148		- email is sent to all groups that have the moderate_forum permission.
165	// Clean up after nobbc ;).
166	$message = preg_replace_callback('~\[nobbc\](.+?)\[/nobbc\]~i', create_function('$m', ' return "[nobbc]" . strtr("$m[1]", array("[" => "&#91;", "]" => "&#93;", ":" => "&#58;", "@" => "&#64;")) . "[/nobbc]";'), $message);
167
168	// Remove \r's... they're evil!
169	$message = strtr($message, array("\r" => ''));
170
238					if ($htmlfunc === null)
239						$htmlfunc = create_function('$m', 'return \'[html]\' . strtr(un_htmlspecialchars("$m[1]"), array("\n" => \'&#13;\', \'  \' => \' &#32;\', \'[\' => \'&#91;\', \']\' => \'&#93;\')) . \'[/html]\';');
240					$parts[$i] = preg_replace_callback('~\[html\](.+?)\[/html\]~is', $htmlfunc, $parts[$i]);
Search.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 2,105 lines
1<?php
2
8 * @copyright 2011 Simple Machines
9 * @license http://www.simplemachines.org/about/smf/license.php BSD
10 *
25		- decodes and loads search parameters given in the URL (if any).
26		- the form redirects to index.php?action=search2.
27
49	'forum_version' => 'SMF 2.0',
50	// This is the minimum version of SMF that an API could have been written for to work. (strtr to stop accidentally updating version on release)
51	'search_version' => strtr('SMF 2+0=Beta=2', array('+' => '.', '=' => ' ')),
82	{
83		require_once($sourcedir . '/Subs-Editor.php');
84		$verificationOptions = array(
313
314	require_once($sourcedir . '/Display.php');
315	require_once($sourcedir . '/Subs-Package.php');
Load.php https://github.com/dekoza/openshift-smf-2.0.7.git | PHP | 2,750 lines
1455		$detected_url .= empty($_SERVER['HTTP_HOST']) ? $_SERVER['SERVER_NAME'] . (empty($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT']) : $_SERVER['HTTP_HOST'];
1456		$temp = preg_replace('~/' . basename($scripturl) . '(/.+)?$~', '', strtr(dirname($_SERVER['PHP_SELF']), '\\', '/'));
1457		if ($temp != '/')
2233
2234		<div style="margin: 0 20px;"><tt>', strtr(strtr($error, array('<strong>' . $boarddir => '<strong>...', '<strong>' . strtr($boarddir, '\\', '/') => '<strong>...')), '\\', '/'), '</tt></div>';
2235
2568
2569	$key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . strtr($key, ':', '-');
2570	$value = $value === null ? null : serialize($value);
2678
2679	$key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . strtr($key, ':', '-');
2680
2706	// Otherwise it's SMF data!
2707	elseif (file_exists($cachedir . '/data_' . $key . '.php') && filesize($cachedir . '/data_' . $key . '.php') > 10)
2708	{
Packages.php https://github.com/leftnode/nooges.com.git | PHP | 2,245 lines
1<?php
2/**********************************************************************************
78	// Load all the basic stuff.
79	require_once($sourcedir . '/Subs-Package.php');
80	loadLanguage('Packages');
148
149	require_once($sourcedir . '/Subs-Package.php');
150
383					'type' => $txt['execute_modification'],
384					'action' => $smcFunc['htmlspecialchars'](strtr($action['filename'], array($boarddir => '.'))),
385					'description' => $txt['package_action_error'],
575				'type' => $txt['package_move'] . ' ' . ($action['type'] == 'move-dir' ? $txt['package_tree'] : $txt['package_file']),
576				'action' => $smcFunc['htmlspecialchars'](strtr($action['source'], array($boarddir => '.'))) . ' => ' . $smcFunc['htmlspecialchars'](strtr($action['destination'], array($boarddir => '.')))
577			);
1725	{
1726		if (substr(strtolower(strtr($row['value'], array('\\' => '/'))), 0, strlen($boarddir) + 7) == strtolower(strtr($boarddir, array('\\' => '/')) . '/Themes'))
1727			$context['file_tree'][strtr($boarddir, array('\\' => '/'))]['contents']['Themes']['contents'][substr($row['value'], strlen($boarddir) + 8)] = array(
Util.php https://code.google.com/p/s3db/ | PHP | 743 lines
1<?PHP
2/* vim: set expandtab tabstop=4 shiftwidth=4: */
3// +----------------------------------------------------------------------+
4// | PHP Version 4                                                        |
5// +----------------------------------------------------------------------+
5// +----------------------------------------------------------------------+
6// | Copyright (c) 1997-2002 The PHP Group                                |
7// +----------------------------------------------------------------------+
7// +----------------------------------------------------------------------+
8// | This source file is subject to version 2.0 of the PHP license,       |
9// | that is bundled with this package in the file LICENSE, and is        |
10// | available at through the world-wide-web at                           |
11// | http://www.php.net/license/2_02.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          |
14// | license@php.net so we can mail you a copy immediately.               |
15// +----------------------------------------------------------------------+
utf_tools.php git://github.com/phpbb/phpbb3.git | PHP | 1,469 lines
5*
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
7* @license GNU General Public License, version 2 (GPL-2.0)
571	{
572		$uniarray['f'] = include($phpbb_root_path . 'includes/utf/data/case_fold_f.' . $phpEx);
573	}
1277* previously a PECL extension, included in the core since PHP 5.3.0
1278* http://php.net/manual/en/normalizer.normalize.php
1279*
1341{
1342	global $phpbb_root_path, $phpEx;
1343
1346	{
1347		$homographs = include($phpbb_root_path . 'includes/utf/data/confusables.' . $phpEx);
1348	}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21