3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $z = "hejsanhejsan";//$argv[1]; $x = str_split($z, 5); $l = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345"; foreach ($x as $y) { foreach (str_split(strrev($y)) as $a => $w) { $y[$a] = ctype_upper($w); } $z .= $l[bindec($y)]; } echo $z; var_dump(str_split(strrev($y)));
Output for 7.1.0 - 7.2.0
Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 Warning: Cannot assign an empty string to a string offset in /in/XTLS9 on line 7 hejsanhejsanAAAarray(2) { [0]=> string(1) "n" [1]=> string(1) "a" }
Output for 5.3.22 - 7.0.20
hejsanhejsanAAAarray(2) { [0]=> string(1) "" [1]=> string(1) "" }