3v4l.org

run code in 300+ PHP versions simultaneously
<?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) { if(!empty(strrpos( $string, $city ))) { print "yay"; } else { pritn "nay"; } } ?>
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.30
Fatal error: Can't use function return value in write context in /in/XVXB6 on line 40
Process exited with code 255.

preferences:
174.95 ms | 1395 KiB | 67 Q