3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class LoginExtern { private $sWindow = "redirect"; public function doRedirect() { var_dump($this->sWindow); if ($this->sWindow == "redirect") { return true; } else { return false; } } } LoginExtern::doRedirect();
based on h5frJ
Output for 7.0.0 - 7.2.0
Deprecated: Non-static method LoginExtern::doRedirect() should not be called statically in /in/ddoVm on line 13 Fatal error: Uncaught Error: Using $this when not in object context in /in/ddoVm:5 Stack trace: #0 /in/ddoVm(13): LoginExtern::doRedirect() #1 {main} thrown in /in/ddoVm on line 5
Process exited with code 255.
Output for hhvm-3.11.1 - 3.17.3
Fatal error: Uncaught Error: $this is null in /in/ddoVm:5 Stack trace: #0 /in/ddoVm(13): LoginExtern::doRedirect() #1 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Fatal error: $this is null in /in/ddoVm on line 5
Process exited with code 255.
Output for 5.5.0 - 5.6.30
Strict Standards: Non-static method LoginExtern::doRedirect() should not be called statically in /in/ddoVm on line 13 Fatal error: Using $this when not in object context in /in/ddoVm on line 5
Process exited with code 255.