<?php
// https://gist.github.com/TazeTSchnitzel/33cf828bfa306b1b1d2187a6de639375
// https://3v4l.org/u0TEq
class fnClass {
private $obj;
public function __construct(&$obj) {
$this->obj = &$obj;
}
public function __call($fn_name, $fn_args) {
$this->obj = call_user_func_array($fn_name, $fn_args);
return $this;
}
};
function fn(&$obj) {
return new fnClass($obj);
};
$nama = 'anovsiradj';
echo $nama, "\n";
fn($nama)
->str_replace('a', '4', $nama)
->str_replace('i', '1', $nama)
->str_replace('o', '0', $nama)
->str_rot13($nama)
->md5($nama);
echo $nama;
- Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
- Parse error: syntax error, unexpected token "fn", expecting "(" in /in/msSQq on line 17
Process exited with code 255. - Output for 7.4.0 - 7.4.33
- Parse error: syntax error, unexpected 'fn' (T_FN), expecting '(' in /in/msSQq on line 17
Process exited with code 255. - Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.33
- anovsiradj
c7467860d30d453769755f341cdd19c0
preferences:
80.71 ms | 409 KiB | 5 Q