<?php
class foo {
var $var;
function bar() {
array_map(array($this, "baz"), array(1,2,3));
}
function baz($arg) {
$this->var = $this->var + $arg;
}
}
?> //https://www.php.net/manual/zh/function.array-map.php
原文:https://www.cnblogs.com/init-007/p/11353236.html