itrebal
public text v1 · immutable<?php
$string = 'function(); functions(something);';
preg_match('/(.+?)\((.+?)\)/', $string, $match);
print_r($match);
?>
$ php test.php
Array
(
[0] => function(); functions(something)
[1] => function
[2] => ); functions(something
)