3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $privateProperty = 1; private function privateMethod() {} } class B extends A {} try { echo (string) $method = new ReflectionMethod('B', 'privateMethod'); } catch(Throwable $e){ echo (string) $e; } try { echo (string) new ReflectionProperty('B', 'privateProperty'); } catch(Throwable $e){ echo (string) $e; }

This is an error 404

There are `0` results


preferences:
133.12 ms | 1015 KiB | 7 Q