3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Model { public function create() { return new self(); } } class Product extends Model { } $product = Product::create(); var_dump($product);
based on SHAmB
Output for 7.0.0 - 7.2.0
Deprecated: Non-static method Model::create() should not be called statically in /in/rEBMU on line 15 object(Model)#1 (0) { }
Output for 5.3.20 - 5.6.28
Strict Standards: Non-static method Model::create() should not be called statically in /in/rEBMU on line 15 object(Model)#1 (0) { }