3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $filtered_decoded[0]['data'] = array( array( 'position' => 2, 'date' => '2013-01-02' ), array( 'position' => 3, 'date' => '2013-01-03' ) ); ) $filtered_decoded[1]['data'] = array( array( 'position' => 8, 'date' => '2013-01-02' ), array( 'position' => 5, 'date' => '2013-01-03' ) ); $converteddatesarray = array(); print_r($filtered_decoded); foreach ($filtered_decoded['data'] as $key => $list) { $converteddatesarray[] = '['.strtotime($list['date']).'000,'.$list['position'].']'; } $test .= '{"name":"'.$name.'","data":['. implode(",",$converteddatesarray).']},'; echo '['.rtrim($test,",").']'; }
Output for 5.3.0 - 5.5.3
Parse error: syntax error, unexpected ')' in /in/bq6g4 on line 13
Process exited with code 255.