3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { var $Вік; var $Датанародження; var $Стать; function Vvid( $a,$b,$c ) { $this-> Вік = $a; $this-> Дата_народження = $b; $this-> Стать = $c; } } class B extends A { function Vuvid() { echo "<H1 align=center>$this->Вік</H1>"; echo "<H1 align=center>$this->Дата_народження</H1>"; echo "<H1 align=center>$this->Стать</H1>"; A::Vvid( 18,"04.05.1997","Чол." ); } } A::Vvid( 18,"04.05.1997","Чол." ); $b = new B; $b->Vuvid(); ?>
based on 8UcaO
Output for 7.0.0 - 7.2.0
Deprecated: Non-static method A::Vvid() should not be called statically in /in/Xu55r on line 25 Fatal error: Uncaught Error: Using $this when not in object context in /in/Xu55r:8 Stack trace: #0 /in/Xu55r(25): A::Vvid(18, '04.05.1997', '\xD0\xA7\xD0\xBE\xD0\xBB.') #1 {main} thrown in /in/Xu55r on line 8
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Strict Standards: Non-static method A::Vvid() should not be called statically in /in/Xu55r on line 25 Fatal error: Using $this when not in object context in /in/Xu55r on line 8
Process exited with code 255.