3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $location = 'Boston, MA'; $comma = strpos($location,','); $city = substr($location,0,$comma); $state = substr($location,$comma); echo $city; echo '<br>'; echo $state; ?>
Output for 4.3.0 - 7.2.0
Boston<br>, MA