3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class hello { function world($value) { return $value * 2; } } $test = [1, 2, 3]; $result = array_map('hello->world', $test); var_dump($result);
based on gvgrJ
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc3
Warning: array_map() expects parameter 1 to be a valid callback, function 'hello->world' not found or invalid function name in /in/pHZB7 on line 9 NULL
Output for hhvm-3.15.4
Warning: array_map() expects parameter 1 to be a valid callback in /in/pHZB7 on line 9 NULL