<?php class Example { private int $_nextNumber; public int $nextNumber { get { $this->_nextNumber ??= 0; return $this->_nextNumber++; } } } $foo = new Example; var_dump($foo->nextNumber, $foo->nextNumber, $foo->nextNumber); $foo->nextNumber = 42;
You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).