3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { var_dump($this); } } $foo = new Foo(); $f = (new ReflectionMethod($foo, 'bar'))->getClosure($foo)->bindTo(null); var_dump((new ReflectionFunction($f))->getClosureThis());
Output for rfc.property-hooks, git.master, git.master_jit
Warning: Cannot unbind $this of method in /in/aagAj on line 15 Deprecated: ReflectionFunction::__construct(): Passing null to parameter #1 ($function) of type Closure|string is deprecated in /in/aagAj on line 17 Fatal error: Uncaught ReflectionException: Function () does not exist in /in/aagAj:17 Stack trace: #0 /in/aagAj(17): ReflectionFunction->__construct('') #1 {main} thrown in /in/aagAj 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:
52.99 ms | 2273 KiB | 4 Q