3v4l.org

run code in 300+ PHP versions simultaneously
<?php $location = 'Boston, MA'; $comma = strpos($location,','); $city = substr($location,0,$comma); $state = substr($location,$comma); echo $city; echo '<br'>; echo $state; ?>
Output for 5.3.0 - 5.3.21, 5.4.0 - 5.4.11
Parse error: syntax error, unexpected ';' in /in/DG6Yb on line 8
Process exited with code 255.

preferences:
171.19 ms | 1399 KiB | 41 Q