3v4l.org

run code in 300+ PHP versions simultaneously
<?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 git.master, git.master_jit, rfc.property-hooks
Parse error: syntax error, unexpected token "fn", expecting "(" in /in/msSQq on line 17
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
25.44 ms | 405 KiB | 5 Q