3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (null as $x) {}
Output for 8.0.0 - 8.0.22, 8.1.0 - 8.1.9
Warning: foreach() argument must be of type array|object, null given in /in/SfAuc on line 3
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.30
Warning: Invalid argument supplied for foreach() in /in/SfAuc on line 3

preferences:
47.34 ms | 410 KiB | 5 Q