uopz_copy(3) php man page | unix.com

Man Page: uopz_copy

Operating Environment: php

Section: 3

UOPZ_COPY(3)								 1							      UOPZ_COPY(3)

uopz_copy - Copy a function

SYNOPSIS
Closure uopz_copy (string $class, string $function)
DESCRIPTION
Closure uopz_copy (string $function) Copy a function by name
PARAMETERS
o $class - The name of the class containing the function to copy o $function - The name of the function
RETURN VALUES
A Closure for the specified function
EXAMPLES
Example #1 uopz_copy(3) example <?php $strtotime = uopz_copy('strtotime'); uopz_function("strtotime", function($arg1, $arg2) use($strtotime) { /* can call original strtotime from here */ var_dump($arg1); }); var_dump(strtotime('dummy')); ?> The above example will output something similar to: string(5) "dummy" PHP Documentation Group UOPZ_COPY(3)
Related Man Pages
iterator(3) - php
class_alias(3) - php
date_sun_info(3) - php
uopz_function(3) - php
var_dump(3) - php
Similar Topics in the Unix Linux Community
UNIX.COM 2017 Year End Summary
New Code Tags (Syntax Highlighting)
Please Welcome Ravinder Singh to the Moderation Team
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun
Please Welcome Nicki Paul to the Moderator Team!