3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array( //"one" => "'1", "one" => 0xbf5c27, //"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) + CHR(37) + CHR(97) + CHR(100) + CHR(109) + CHR(105) + CHR(110) + CHR(37) + CHR(34) ?>
based on lSBiP
Output for 7.1.0 - 7.2.0
12540967... $a[one] => 12540967. 2... $a[two] => 2. 3... $a[three] => 3. 17... $a[seventeen] => 17. Warning: A non-numeric value encountered in /in/j4MPD on line 22 Warning: A non-numeric value encountered in /in/j4MPD on line 22 Warning: A non-numeric value encountered in /in/j4MPD on line 22 Warning: A non-numeric value encountered in /in/j4MPD on line 22 Warning: A non-numeric value encountered in /in/j4MPD on line 22 Warning: A non-numeric value encountered in /in/j4MPD on line 22 Warning: A non-numeric value encountered in /in/j4MPD on line 22 Warning: A non-numeric value encountered in /in/j4MPD on line 22 Warning: A non-numeric value encountered in /in/j4MPD on line 22
Output for 5.3.18 - 7.0.20
12540967... $a[one] => 12540967. 2... $a[two] => 2. 3... $a[three] => 3. 17... $a[seventeen] => 17.