3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = 20; $a = function ($n) { return 10 * floor($n / 4); }; $b = function ($n) { return 2 ** ($n % 4); }; $values = []; for ($n = 0; $input >= $value = $a($n) + $b($n) ; ++$n) { $values[] = $value; } echo implode(' ', $values);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
151.36 ms | 2213 KiB | 10 Q