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');
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.22
Parse error: syntax error, unexpected ';' in /in/iSSpq on line 13
Process exited with code 255.

preferences:
169.58 ms | 1399 KiB | 58 Q