3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { // isPrivateSet() = true (OK) public private(set) mixed $public_private_set; // isPrivateSet() = false (I would expect true) private private(set) mixed $private_private_set; // isPrivateSet() = false (I would expect true) private mixed $private; // isProtectedSet() = true (OK, explained in the RFC) public readonly mixed $public_readonly; // isProtectedSet() = false (I would expect true) protected readonly mixed $protected_readonly; // isProtectedSet() = false (I would expect true) protected protected(set) readonly mixed $protected_protected_set_readonly; } foreach (new ReflectionClass(A::class)->getProperties() as $property) { echo $property->name; echo ': isPrivateSet() = ', $property->isPrivateSet() ? 'true' : 'false'; echo ', isProtectedSet() = ', $property->isProtectedSet() ? 'true' : 'false'; echo PHP_EOL; }

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).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.50.0050.00316.62

preferences:
43.74 ms | 489 KiB | 4 Q