<?php class A { protected static $id = 0; public function show() { $i = self::$id++; echo $i . PHP_EOL; } } $a = new A(); $a->show(); $a->show(); $a->show();
You have javascript disabled. You will not be able to edit any code.