3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = array( array( 'order_cart_id' => 1, ), array( 'order_cart_id' => 2, ), array( 'order_cart_id' => 3, ), array( 'order_cart_id' => 4, ), ); $carts = array(); for($list as $i => $item) { if(!empty($item['order_cart_id'])) { $carts[] = $item['order_cart_id']; } }
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected 'as' (T_AS), expecting ';' in /in/ObW0O on line 20
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_AS, expecting ';' in /in/ObW0O on line 20
Process exited with code 255.

preferences:
189.46 ms | 1395 KiB | 66 Q