3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Baz{ abstract private function shit(); function noooo(){ echo $this->shit(); } } class A{ use Baz; private function shit(){ return "A"; } } class B extends A{ use Baz; private function shit(){ return "B"; } } (new A)->noooo(); (new B)->noooo();
Output for 5.5.0 - 5.5.33, 5.6.0 - 5.6.19, 7.0.0 - 7.0.4
Fatal error: Abstract function Baz::shit() cannot be declared private in /in/jBYPh on line 4
Process exited with code 255.

preferences:
28.9 ms | 716 KiB | 4 Q