3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $processor = compose( htmlentities(...), str_split(...), fn ($x) => array_map(strtoupper(...), $x), fn ($x) => array_filter($x, fn ($v) => $v != 'O'), ); $data = "Hello World!"; var_dump( $data, $processor($data), ); // polyfill function compose(...$calls): Closure { $next = fn ($data) => $data; foreach ($calls as $prev) { $next = fn ($data) => $prev($next($data)); } return $next; }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
164.97 ms | 1494 KiB | 14 Q