3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $searchString = "2014-02-20"; if (preg_match('/\b\d{4}-\d{2}-\d{2}\b/' $searchString)) { echo "Seach string is a date wish dashes."; } if (preg_match('/\b\d{2}/\d{2}/\d{4}\b/' $searchString)) { echo "Seach string is a date wish slashes."; }
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '$searchString' (T_VARIABLE) in /in/WvkC0 on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/WvkC0 on line 4
Process exited with code 255.