3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/[$](.*?);$/ms'; $str = '$this->foo()\n->bar();\nassadds\n$this->foo() \n->bar();'; preg_match_all($re, $str, $matches); print_r($matches);

preferences:
34.72 ms | 402 KiB | 5 Q