runkit7_function_copy

Copy a function to a new function name

&reftitle.description; `bool` `runkit7_function_copy` `string` `source_name` `string` `target_name`
&reftitle.parameters;

`source_name`

- Name of the existing function

`target_name`

- Name of the new function to copy the definition to

&reftitle.returnvalues;

&return.success;

&reftitle.examples;

### A `runkit7_function_copy` example

    <?php
    function original() {
      echo "In a function\n";
    }
    runkit7_function_copy('original','duplicate');
    original();
    duplicate();
    ?>

&example.outputs;

    In a function
    In a function

&reftitle.seealso;

- `runkit7_function_add`
- `runkit7_function_redefine`
- `runkit7_function_rename`
- `runkit7_function_remove`