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::setCat('fluffles'); $testClass = new TestClass(); TestClass::setCat('mittens'); $testClassTwo = new TestClass(); echo $testClass->getCat(); echo $testClassTwo->getCat();
based on jR6vV
Output for 7.0.0 - 7.2.0
Deprecated: Non-static method TestClass::setCat() should not be called statically in /in/VtpvY on line 16 Deprecated: Non-static method TestClass::setCat() should not be called statically in /in/VtpvY on line 20 mittensmittens
Output for 5.3.20 - 5.6.28
Strict Standards: Non-static method TestClass::setCat() should not be called statically in /in/VtpvY on line 16 Strict Standards: Non-static method TestClass::setCat() should not be called statically in /in/VtpvY on line 20 mittensmittens