3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(E_ALL); class ClassWithTypedProperty { public int $number; public function __construct() { $this->number = 1234; } public function __set($name, $value) { printf("UNEXPECTED SETTING OF %s\n", $name); } } printf("\n--- Typed Property ---\n"); var_dump(new ClassWithTypedProperty());

preferences:
22.53 ms | 406 KiB | 5 Q