3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function __construct( public private(set) string $asymmetricProperty, ) {} } $foo = new Foo("bar"); echo $foo->asymmetricProperty;
Output for 8.4.4 - 8.4.5
bar
Output for 8.2.28, 8.3.5 - 8.3.19
Fatal error: Multiple access type modifiers are not allowed in /in/NvkEX on line 5
Process exited with code 255.

preferences:
40.39 ms | 505 KiB | 3 Q