3v4l.org

run code in 300+ PHP versions simultaneously
<?php $searchString = "12/29/2014"; 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/SdMGc 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/SdMGc on line 4
Process exited with code 255.

preferences:
189.8 ms | 1386 KiB | 63 Q