3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public $p; } class B extends A { private $p; }
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.6
Fatal error: Access level to B::$p must be public (as in class A) in /in/JWMTv on line 11
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Access level to B::$p() must be public (as in class A) or weaker in /in/JWMTv:8 Stack trace: #0 {main}
Process exited with code 255.