3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array(array("Price" => 66), array("Price" => 99)); function extractPrice($priceType) { $modifier = 10; return function($guestPrice) use($priceType, $modifier) { return $guestPrice[$priceType]*$modifier); }; } var_dump(array_map($extractPrice('Price'), $data));
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.22
Parse error: syntax error, unexpected ')' in /in/liKVE on line 8
Process exited with code 255.

preferences:
172.33 ms | 1395 KiB | 58 Q