3v4l.org

run code in 300+ PHP versions simultaneously
<?php // create a string $string = '1234-5678'; // look for a match echo preg_match("/1234-?5678/", $string, $matches);

preferences:
49.65 ms | 402 KiB | 5 Q