3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $method = 'GET'; $test_method = 'HEAD'; $methods = array('POST', 'GET'); foreach ($method as $test) { var_dump($test); } foreach ($methods as $test) { var_dump($test); }
Output for 4.3.0 - 4.3.10, 4.4.0 - 7.1.0
Warning: Invalid argument supplied for foreach() in /in/C3MFT on line 7 string(4) "POST" string(3) "GET"
Output for 4.3.11
string(4) "POST" string(3) "GET"