If you try to get all methods / functions assigning an optional argument before a mandatory one, try this regex (single line)
<?php
function\s+[a-z][a-zA-Z0-9_]*\((?:\$[a-z][a-zA-Z0-9]*\s*,\s*)*
(?:\$[a-z][A-Za-z0-9_]*\s*=[^\$\)]+)+\$[a-z][a-zA-Z0-9_]*\)
?>
for
<?php
public function test($a, $b) {
$a = [];
$b = [$abc => $ss[],
];
}
private function too($c, $a = true, $b) {
}
protected function bar($a = []) {
}
public function foo($a, $b = true) {
}
public function fooBar32($a=true, $b = [], $c) {
}
private function oo_bAr($a = []) {
}
?>
it will match too() and fooBar32()
Have a nice migration! ;)