3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public string $bar = 'a'; public ?string $baz = null; public function __construct(public readonly ?string $x = null) { } } $foo = new Foo(); $fooSerialized = 'O:3:"Foo":1:{s:3:"bar";s:1:"a";}a'; $fooUnserialized = unserialize($fooSerialized); var_dump($fooUnserialized->bar); // works because exists in serialized string var_dump($fooUnserialized->baz); // works because regular typed property, even if not existing in serialized string var_dump($fooUnserialized->x); // Doesn't work

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.4.140.0110.00917.99
8.4.130.0120.00917.82
8.4.120.0110.00820.60
8.4.110.0120.00822.52
8.4.100.0120.00917.82
8.4.90.0130.00817.83
8.4.80.0110.00917.73
8.4.70.0040.00517.96
8.4.60.0160.00618.00
8.4.50.0040.00422.69
8.4.40.0190.00020.66
8.4.30.0070.00723.91
8.4.20.0140.00718.11
8.4.10.0030.00623.93
8.3.270.0110.01016.53
8.3.260.0120.00716.60
8.3.250.0030.00819.00
8.3.240.0110.00816.45
8.3.230.0100.00916.91
8.3.220.0120.00617.25
8.3.210.0120.01116.73
8.3.200.0100.00916.68
8.3.190.0040.00416.77
8.3.180.0130.00818.34
8.3.170.0070.00716.94
8.3.160.0110.00718.60
8.3.150.0140.00717.04
8.3.140.0090.00917.35
8.3.130.0040.00418.58
8.3.120.0090.00019.02
8.3.110.0030.00618.37
8.3.100.0030.00618.61
8.3.50.0060.00318.43
8.2.290.0110.00920.33
8.2.280.0120.00818.60
8.2.270.0130.00617.04
8.2.260.0070.00716.71
8.2.250.0130.00318.25
8.2.240.0060.00319.07
8.2.230.0130.00718.43
8.2.220.0080.00818.35
8.2.60.0040.00517.56
8.1.330.0120.00716.67
8.1.320.0080.01216.03
8.1.310.0120.00318.47
8.1.300.0040.00419.62

preferences:
69.84 ms | 403 KiB | 5 Q