3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tz = 'Europe/London'; preg_match('/([[:alpha:]\/]{3,30})(?!.*([[:alpha:]\/]{3,30}))/', $tz, $match); var_dump($match); $tz = 'America/New_York'; preg_match('/([[:alpha:]\/]{3,30})(?!.*([[:alpha:]\/]{3,30}))/', $tz, $match); var_dump($match);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { [0]=> string(13) "Europe/London" [1]=> string(13) "Europe/London" } array(2) { [0]=> string(4) "York" [1]=> string(4) "York" }