<?php
$a = array(
//"one" => "'1",
"one" => chr(0xbf27),
//"one" => CHAR(34,37,97,100,109,105,110,37,34),
"two" => 2,
"three" => 3,
"seventeen" => 17
);
foreach ($a as $k => $v) {
echo "$v...\n";
//$str = $v;
$str = addslashes($v);
echo "\$a[$k] => $str.\n";
}
CHR(34,37,97,100,109,105,110,37,34)
?>
- Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- '...
$a[one] => \'.
2...
$a[two] => 2.
3...
$a[three] => 3.
17...
$a[seventeen] => 17.
Fatal error: Uncaught ArgumentCountError: chr() expects exactly 1 argument, 9 given in /in/RBC5m:22
Stack trace:
#0 /in/RBC5m(22): chr(34, 37, 97, 100, 109, 105, 110, 37, 34)
#1 {main}
thrown in /in/RBC5m on line 22
Process exited with code 255. - Output for 7.4.0 - 7.4.33
- '...
$a[one] => \'.
2...
$a[two] => 2.
3...
$a[three] => 3.
17...
$a[seventeen] => 17.
Warning: chr() expects exactly 1 parameter, 9 given in /in/RBC5m on line 22
- Output for 5.4.1 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
- '...
$a[one] => \'.
2...
$a[two] => 2.
3...
$a[three] => 3.
17...
$a[seventeen] => 17.
Warning: Wrong parameter count for chr() in /in/RBC5m on line 22
preferences:
188.47 ms | 403 KiB | 257 Q