3v4l.org

run code in 300+ PHP versions simultaneously
<?php $line = "###FLAG###\r\n###FLAG###"; // no modifiers preg_match('~###FLAG###.*###FLAG###~', $line, $matches); var_dump($matches); // with 's' modifier preg_match('~###FLAG###.*###FLAG###~s', $line, $matches); var_dump($matches);
Output for 8.1.28, 8.2.17 - 8.2.19, 8.3.4 - 8.3.7
array(0) { } array(1) { [0]=> string(22) "###FLAG### ###FLAG###" }

preferences:
39.46 ms | 402 KiB | 13 Q