3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $priceTableData = array( array('productId'=>1,'price'=>50,'discount'=>12), array('productId'=>2,'price'=>22,'discount'=>2), array('productId'=>3,'price'=>7,'discount'=>0), array('productId'=>4,'price'=>9,'discount'=>0), array('productId'=>5,'price'=>35,'discount'=>7), ); $discounts= array_column($priceTableData , 'discount'); print_r($discounts);
Output for 5.5.0 - 7.1.0
Array ( [0] => 12 [1] => 2 [2] => 0 [3] => 0 [4] => 7 )
Output for 5.0.0 - 5.4.45
Fatal error: Call to undefined function array_column() in /in/HSDeb on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_column() in /in/HSDeb on line 12
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_column() in /in/HSDeb on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_column() in /in/HSDeb on line 12