3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function _makeLongArray($value) { $minLength = 1000 + 1; $resultArray = array(); if (!is_array($value)) { $resultArray = array_pad(array(), $minLength, $value); } else { $count = count($value); if ($count >= $minLength) { $resultArray = $value; } else { while(count($resultArray) < $minLength) { $resultArray = array_merge($resultArray, $value); } } } return $resultArray; } var_dump(_makeLongArray(array(5,6,7));
Output for 5.3.0 - 5.4.22
Parse error: syntax error, unexpected ';' in /in/gaO1C on line 27
Process exited with code 255.