<?php
declare(strict_types=1);
$processor = function($data) {
return htmlentities($data)
|> str_split(....),
|> fn($x) => array_map(strtoupper(...), $x),
|> fn($x) => array_filter($x, fn($v) => $v != 'O');
};
// or
/**
$processor = fn ($data) => htmlentities($data)
|> 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),
);
- Output for 8.2.0 - 8.2.28, 8.3.0 - 8.3.21, 8.4.1 - 8.4.7
- Parse error: syntax error, unexpected token ">" in /in/87Sj2 on line 7
Process exited with code 255.
preferences:
151.51 ms | 996 KiB | 7 Q