- preg_match: documentation ( source)
- print_r: documentation ( source)
<?php
//$regex = '~(?P<function_name>.*?)\s*(?P<parameters>\(.*?\))\s*~six';
//$regex = '/(.+)\(([^)]+)/';
$regex ='/(.+)\((.*?)\)/';
preg_match($regex, 'printr("abc", "assdd")', $matches);
print_r($matches);