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.1.31, 8.2.17 - 8.2.27, 8.3.4 - 8.3.15, 8.4.1 - 8.4.2
array(0) { } array(1) { [0]=> string(22) "###FLAG### ###FLAG###" }

preferences:
59.09 ms | 406 KiB | 5 Q