3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $uuid = "1111-1111-1111-1111"; function printResults($str) { if (eregi("^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$", $str)) { printf("'%s' is a valid GUID/UUID.\n", $str); } else { printf("'%s' is NOT a valid GUID/UUID.\n", $str); } } printResults($uuid); ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function eregi() in /in/bLJWB:5 Stack trace: #0 /in/bLJWB(12): printResults('1111-1111-1111-...') #1 {main} thrown in /in/bLJWB on line 5
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Deprecated: Function eregi() is deprecated in /in/bLJWB on line 5 '1111-1111-1111-1111' is NOT a valid GUID/UUID.
Output for 4.3.0 - 5.2.17
'1111-1111-1111-1111' is NOT a valid GUID/UUID.