3v4l.org

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

preferences:
26.12 ms | 404 KiB | 5 Q