3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "log dog hat bat"; echo preg_match('~^[^abc]+~', $string, $match) ? $match[0] : '';

preferences:
44.61 ms | 1362 KiB | 5 Q