3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $DEST = '["ADT - HomeSecurityRatings","http://www.protectyourhome.com/partner/dl-01t-wl","100","ADT - HomeSecurityRatings","http://quickpixel.net/?a=653&amp;c=21503&amp;s1 ","0"]'; $array = explode(',',$DEST); $iter = 0; $max = count($array); $records = $max/3; $result = array(); $row = array(); $row = []; for ($j =0;$j<$records; $j++) { $index = ($j*3)+$j; $result[]=array($array[$index],$array[$index+1],$array[$index+2]); } print_r($result);
Output for 5.4.0 - 7.1.0
Notice: Undefined offset: 6 in /in/YicMB on line 13 Array ( [0] => Array ( [0] => ["ADT - HomeSecurityRatings" [1] => "http://www.protectyourhome.com/partner/dl-01t-wl" [2] => "100" ) [1] => Array ( [0] => "http://quickpixel.net/?a=653&amp;c=21503&amp;s1 " [1] => "0"] [2] => ) )
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/YicMB on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/YicMB on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/YicMB on line 10
Process exited with code 255.