PHP 8.3.21 Released!

Voting

: seven minus three?
(Example: nine)

The Note You're Voting On

kenorb at gmail dot com
15 years ago
If you need convert function arguments without default default values and references, you can try this code:

<?php
$func_args
= '$node, $op, $a3 = NULL, $form = array(), $a4 = NULL'
$call_arg = preg_match_all('@(?<func_arg>\$[^,= ]+)@i', $func_args, $matches);
$call_arg = implode(',', $matches['func_arg']);
?>
Result: string = "$node,$op,$a3,$form,$a4"

<< Back to user notes page

To Top