3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class X{ public function createCost() { $cost_example = array(1,2,3); function checkDescription($array_item) { return $array_item; } $array_mapped = array_map('checkDescription', $cost_example); print_r($array_mapped); } } $x = new X(); $x->createCost();
based on KOQb5
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
Array ( [0] => 1 [1] => 2 [2] => 3 )