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; }

preferences:
24.56 ms | 409 KiB | 5 Q