3v4l.org

run code in 300+ PHP versions simultaneously
<?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.

preferences:
169.6 ms | 1399 KiB | 63 Q