3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); class Test { public string $property = ''; } $test = new Test(); $refProp = new \ReflectionProperty(Test::class, 'property'); $refProp->setValue($test, 3); var_dump($test->property); $test->property = 3;

preferences:
20.43 ms | 474 KiB | 4 Q