3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (null as $x) {}
Output for 8.0.0 - 8.0.3
Warning: foreach() argument must be of type array|object, null given in /in/SfAuc on line 3
Output for 7.1.25 - 7.1.28, 7.2.0 - 7.2.33, 7.3.0 - 7.3.26, 7.4.0 - 7.4.16
Warning: Invalid argument supplied for foreach() in /in/SfAuc on line 3