3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Wl\A; class B { public function get() { return "BBBBB"; } } class A { public function b(B $b) { print_r($b::get()); } } $a = new A(); $reflection = new \ReflectionFunction($closure); $arguments = $reflection->getParameters(); echo "ARGS:\n"; var_dump($arguments); exit; try { $a->b(""); } catch (\Exception $e) { echo "catched"; } catch (\TypeError $e) { echo "subidubi"; }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $closure in /in/LW4UO on line 18 Deprecated: ReflectionFunction::__construct(): Passing null to parameter #1 ($function) of type Closure|string is deprecated in /in/LW4UO on line 18 Fatal error: Uncaught ReflectionException: Function () does not exist in /in/LW4UO:18 Stack trace: #0 /in/LW4UO(18): ReflectionFunction->__construct('') #1 {main} thrown in /in/LW4UO on line 18
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:
44.62 ms | 401 KiB | 8 Q