3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.4.22
Parse error: syntax error, unexpected ';' in /in/iSSpq on line 13
Process exited with code 255.