3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array(array("Price" => 66), array("Price" => 99)); function extractPrice($guestPrices, $priceType) { $modifier = 10; $newArray = array(); foreach($guestPrices as $guestPrice){ $newArray[] = $guestPrice[$priceType]*$modifier; } return $newArray; } var_dump(extractPrice($data, 'Price'));

preferences:
39.96 ms | 402 KiB | 5 Q