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) { var_dump(str_split(strrev($y))); foreach (str_split(strrev($y)) as $a => $w) { $y[$a] = ctype_upper($w); } $z .= $l[bindec($y)]; } echo $z;
based on XTLS9
Output for 7.1.0 - 7.2.0
array(5) { [0]=> string(1) "a" [1]=> string(1) "s" [2]=> string(1) "j" [3]=> string(1) "e" [4]=> string(1) "h" } Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 array(5) { [0]=> string(1) "s" [1]=> string(1) "j" [2]=> string(1) "e" [3]=> string(1) "h" [4]=> string(1) "n" } Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 array(2) { [0]=> string(1) "n" [1]=> string(1) "a" } Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 Warning: Cannot assign an empty string to a string offset in /in/XTvkW on line 8 hejsanhejsanAAA
Output for 5.3.22 - 7.0.20
array(5) { [0]=> string(1) "a" [1]=> string(1) "s" [2]=> string(1) "j" [3]=> string(1) "e" [4]=> string(1) "h" } array(5) { [0]=> string(1) "s" [1]=> string(1) "j" [2]=> string(1) "e" [3]=> string(1) "h" [4]=> string(1) "n" } array(2) { [0]=> string(1) "n" [1]=> string(1) "a" } hejsanhejsanAAA