3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $mlbCities = array( 'Carolina', 'Atlanta', 'New Orleans', 'Philadelphia', 'St. Louis', 'Washington', 'Houston', 'Tennessee', 'New England', 'NY Jets', 'Cincinnati', 'Green Bay', 'Arizona', 'Jacksonville', 'Oakland', 'Kansas City', 'Minnesota', 'Detroit', 'Tampa Bay', 'Buffalo', 'Seattle', 'San Francisco', 'Pittsburgh', 'Chicago', 'Baltimore', 'San Diego', 'Cleveland', 'Denver', 'NY Giants', 'Dallas', 'Indianapolis', 'Miami' ); $string = 'San Francisco Giants'; foreach($mlbCities as $city) { $index = strrpos( $string, $city ); if(!empty($index)) { print "yay"; } else { pritn "nay"; } } ?>
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '"nay"' (T_CONSTANT_ENCAPSED_STRING) in /in/4sQ7t on line 44
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/4sQ7t on line 44
Process exited with code 255.