3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Wl\A; class B { public function get() { return "BBBBB"; } } $b = new B(); $funct = function (B $b) { print_r($b::get()); }; $closure = &$funct; $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"; }

preferences:
55.68 ms | 402 KiB | 5 Q