3v4l.org

run code in 200+ PHP versions simultaneously
<?php class Test { // No.4 インスタンスメソッド public function count() { static $e = 10; echo $e; $e++; } // No.5 インスタンスメソッド public function division($f,$g) { echo $f / $g; } } // No.4 インスタンスメソッドへアクセス Test::count(); // No.5 インスタンスメソッドへアクセス Test::division(4,2);
based on u1lEa
Output for 7.2.0 - 7.4.2
Deprecated: Non-static method Test::count() should not be called statically in /in/do6vT on line 20 10 Deprecated: Non-static method Test::division() should not be called statically in /in/do6vT on line 23 2