3v4l.org

run code in 500+ PHP versions simultaneously
<?php class ReadonlyWakeupWithReflection { public function __construct(public readonly string $value) {} public function __wakeup(): void { (new \ReflectionProperty($this, 'value'))->setValue($this, 'set by reflection on wakeup'); } } $obj = new ReadonlyWakeupWithReflection('test'); $serialized = serialize($obj); $unserialized = unserialize($serialized); print $unserialized->value;

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.5.30.0280.00716.71
8.5.20.0340.00816.63
8.5.10.0320.00816.70
8.5.00.0320.00816.71
8.4.180.0340.00919.71
8.4.170.0300.01119.81
8.4.160.0350.00719.61
8.4.150.0340.01019.48
8.4.140.0350.00717.90
8.4.130.0340.00617.87
8.4.120.0360.01018.00
8.4.110.0370.00918.05
8.4.100.0360.00717.88
8.4.90.0380.00818.08
8.4.80.0360.00917.92
8.4.70.0380.00817.95
8.4.60.0350.01118.04
8.4.50.0350.00817.93
8.4.40.0360.00717.92
8.4.30.0380.00517.81
8.4.20.0350.00717.87
8.4.10.0310.00817.77
8.3.300.0220.00518.31
8.3.290.0290.00618.27
8.3.280.0280.00618.39
8.3.270.0330.00816.70
8.3.260.0370.00916.71
8.3.250.0300.01016.78
8.3.240.0340.00716.71
8.3.230.0330.00816.72
8.3.220.0290.01016.74
8.3.210.0320.00616.69
8.3.200.0310.00516.88
8.3.190.0340.00816.70
8.3.180.0320.00816.66
8.3.170.0350.01016.71
8.3.160.0310.00816.75
8.3.150.0310.00616.74
8.3.140.0310.00616.75
8.3.130.0290.00816.80
8.3.120.0250.00416.85
8.3.110.0220.00416.83
8.3.100.0350.00916.77
8.3.90.0300.00816.62
8.3.80.0380.00716.71
8.3.70.0350.00616.82
8.3.60.0360.00916.83
8.3.50.0350.01016.63
8.3.40.0380.00618.00
8.3.30.0280.01017.97
8.3.20.0280.00618.04
8.3.10.0260.00717.94
8.3.00.0250.00717.90

preferences:
47.84 ms | 723 KiB | 5 Q