3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class TestClass { static $_cat; public function setCat($val) { self::$_cat = $val; } public function getCat() { return self::$_cat; } } $testClass = new TestClass(); $testClassTwo = new TestClass(); TestClass::setCat('mittens'); echo $testClass->getCat(); echo $testClassTwo->getCat();
based on VtpvY
Output for 7.0.0 - 7.2.0
Deprecated: Non-static method TestClass::setCat() should not be called statically in /in/9ov8N on line 18 mittensmittens
Output for 5.3.20 - 5.6.28
Strict Standards: Non-static method TestClass::setCat() should not be called statically in /in/9ov8N on line 18 mittensmittens