3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class SiteUser { function getUniqueUsernameFromDetails() { echo 'Hello world'; } } class UserManager { function foo() { SiteUser::getUniqueUsernameFromDetails(); } function getUniqueUsernameFromDetails() { } } $um = new UserManager(); $um->foo();
based on AOjlC
Output for 7.0.0 - 7.1.0
Deprecated: Non-static method SiteUser::getUniqueUsernameFromDetails() should not be called statically in /in/GfoYI on line 10 Hello world
Output for 5.6.8 - 5.6.28
Deprecated: Non-static method SiteUser::getUniqueUsernameFromDetails() should not be called statically, assuming $this from incompatible context in /in/GfoYI on line 10 Hello world
Output for 5.1.3 - 5.5.35
Strict Standards: Non-static method SiteUser::getUniqueUsernameFromDetails() should not be called statically, assuming $this from incompatible context in /in/GfoYI on line 10 Hello world
Output for 4.3.0 - 5.1.2
Hello world