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.33, 8.2.17 - 8.2.29, 8.3.4 - 8.3.26, 8.4.1 - 8.4.13
array(0) { } array(1) { [0]=> string(22) "###FLAG### ###FLAG###" }

preferences:
75.17 ms | 406 KiB | 5 Q