- array_map: documentation ( source)
- var_dump: documentation ( source)
<?php
class MyTest
{
public function __construct()
{
$array = array( 1, 2, 3 );
$r = array_map( array($this,'getHoge'), $array );
var_dump($r);
}
public static function getHoge($item){
$item ++;
}
}
new MyTest();