3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = '[2017-03-14 11:48:22] Steve T: Hi! [2017-03-14 11:49:01] Oscar: Hi! :D How are u doin? [2017-03-14 11:50:24] Steve T: Im doing great :P'; $returnValue = preg_match_all( '/^\\[(\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2})\\] ([\\w\\s]+): (.+)$/m', $subject, $matches, PREG_SET_ORDER // this groups the result nicely ); print_r($matches);
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
Array ( [0] => Array ( [0] => [2017-03-14 11:48:22] Steve T: Hi! [1] => 2017-03-14 11:48:22 [2] => Steve T [3] => Hi! ) [1] => Array ( [0] => [2017-03-14 11:49:01] Oscar: Hi! :D How are u doin? [1] => 2017-03-14 11:49:01 [2] => Oscar [3] => Hi! :D How are u doin? ) [2] => Array ( [0] => [2017-03-14 11:50:24] Steve T: Im doing great :P [1] => 2017-03-14 11:50:24 [2] => Steve T [3] => Im doing great :P ) )
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
167.18 ms | 408 KiB | 5 Q