3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class A { private int $value; public function __construct(int $value) { $this->value = $value; } public function getValue(): int { return $this->value; } } $a = new A(100); echo $a->getValue() . PHP_EOL; $a->__construct(200); echo $a->getValue() . PHP_EOL;

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
157.27 ms | 2119 KiB | 10 Q