3v4l.org

run code in 300+ PHP versions simultaneously
<?php $matches=array(); $string = 'This is a [templateVar]'; preg_match_all("/^[^O]*/", $string, $matches); var_dump($matches);

preferences:
27.65 ms | 402 KiB | 5 Q