Phalanger /2.0/Tests/Strings/strtr.php

Language PHP Lines 23
MD5 Hash 1a7eee13cf19b25a14f9dd0437074e0b Estimated Cost $170 (why?)
Repository https://Phalanger.svn.codeplex.com/svn View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
[expect php]
[file]

<pre>
<?php
$addr = "this is some address.\n";
echo strtr($addr, "aaimm", "AEIOU");

$trans = array("hello" => "hi", "hi" => "hello");
echo strtr("hi all, I said hello\n", $trans);

// hello all, I said hi

$trans = array_flip(array("a" => "e", "b" => "e"));
echo strtr("hi all, I said hello\n", $trans);

$trans = array("a" => 1, "e" => false, 1 => "ONE", 3.14 => round(M_PI,5));
echo strtr("12[3]45, hi all, I said hello\n", $trans);

?>  
</pre>
 
Back to Top