3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = "ejIjSS3Fh5GSYG3hALUII53AeIR55ej3LeeAeSjReS5jRjeeG3GL5hLShhFS5h5GUAheRISFSO5IOIIAGFGGAS3eh5h5FjLe33Ueje3h35jIjjhj5L5j53A3"; foreach (asort(count_chars($data, 1)) as $i => $val) { echo "There were $val instance(s) of \"" , chr($i) , "\" in the string.\n"; } ?>
Output for 7.0.0 - 7.1.0
Notice: Only variables should be passed by reference in /in/5XhQs on line 4 Warning: Invalid argument supplied for foreach() in /in/5XhQs on line 4
Output for 5.1.0 - 5.6.28
Strict Standards: Only variables should be passed by reference in /in/5XhQs on line 4 Warning: Invalid argument supplied for foreach() in /in/5XhQs on line 4
Output for 5.0.5
Fatal error: Only variables can be passed by reference in /in/5XhQs on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.0.4
Warning: Invalid argument supplied for foreach() in /in/5XhQs on line 4
Output for 4.3.11