3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/[^\w]bored\s/'; if (preg_match($pattern, 'I am bored on saturday, I will lear programing')) { echo 'Bored is present'; } else { echo 'Not bored string'; }

preferences:
36.74 ms | 402 KiB | 5 Q