1.JAVASCRIPT:
a. 代码:
b. 输出:
hello
2. PHP:
a. 代码:
PHP;">
}
$a = new a();
$a->say = function(){
echo "hello";
};
$say = $a->say;
$say();
$a = new a();
$a->say = function(){
echo "hello";
};
$say = $a->say;
$say();
b. 输出:
原文链接:https://www.f2er.com/js/33077.htmlhello