PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

uopz_copy - Copy a function | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

uopz_copy

(PECL uopz 1 >= 1.0.4, PECL uopz 2)

uopz_copyCopy a function

警告

This function has been REMOVED in PECL uopz 5.0.0.

説明

Closure uopz_copy ( string $class , string $function )
Closure uopz_copy ( string $function )

Copy a function by name

パラメータ

class

The name of the class containing the function to copy

function

The name of the function

返り値

A Closure for the specified function

例1 uopz_copy() 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'));
?>

上の例の出力は、 たとえば以下のようになります。

string(5) "dummy"

忘却曲線を使ってこの関数を確実に記憶に残す

フォーラムで「uopz_copy - Copy a function」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | uopz_copy - Copy a function」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: