<?php class Foo { public int $bar { get => $this->bar; set => empty($this->bar) ? $this->bar = $value : throw new LogicException("nope"); } } $foo = new Foo(); $foo->bar = 42; echo $foo->bar . "\n"; $foo->bar += 1;
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).