3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __construct( public readonly string $bar ){} } $foo = new Foo('bar'); var_dump($foo->bar); $arrayObject = new ArrayObject($foo); $arrayObject['bar'] = new \DateTimeImmutable("1986-08-20 midnight"); var_dump($foo->bar);

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.120.0120.00620.39
8.4.110.0040.00422.70
8.4.100.0150.00718.86
8.4.90.0140.00718.80
8.4.80.0100.01017.92
8.4.70.0080.00617.84
8.4.60.0090.00618.06
8.4.50.0110.00719.59
8.4.40.0090.01517.75
8.4.30.0100.01020.57
8.4.20.0070.01318.18
8.4.10.0060.00319.56
8.3.250.0100.00918.87
8.3.240.0120.00816.68
8.3.230.0110.00916.79
8.3.220.0050.00217.12
8.3.210.0120.00616.66
8.3.200.0110.00816.80
8.3.190.0080.00916.76
8.3.180.0040.00416.79
8.3.170.0100.01018.88
8.3.160.0180.00318.41
8.3.150.0080.00818.85
8.3.140.0090.00916.79
8.3.130.0100.00016.54
8.3.120.0070.00420.76
8.3.110.0060.00320.94
8.3.100.0000.01016.96
8.3.90.0040.00416.87
8.3.80.0270.00830.84
8.3.70.0290.00630.84
8.3.60.0290.00530.84
8.3.50.0040.00630.84
8.3.40.0130.00530.84
8.3.30.0190.00330.84
8.3.20.0180.00828.38
8.3.10.0130.01028.40
8.3.00.0150.00627.86
8.2.290.0080.00920.52
8.2.280.0100.00918.39
8.2.270.0130.00617.24
8.2.260.0150.00320.20
8.2.250.0100.00016.98
8.2.240.0120.00618.69
8.2.230.0040.01122.58
8.2.220.0070.00318.62
8.2.210.0000.01016.64
8.2.200.0250.00330.84
8.2.190.0250.00430.84
8.2.180.0280.00330.84
8.2.170.0260.00830.84
8.2.160.0230.00230.84
8.2.150.0210.00427.50
8.2.140.0200.00827.93
8.2.130.0120.00728.04
8.2.120.0120.00827.89
8.2.110.0120.00823.87
8.2.100.0140.00623.76
8.2.90.0150.00723.59
8.2.80.0120.00623.77
8.2.70.0120.00623.55
8.2.60.0120.00623.42
8.2.50.0120.00723.48
8.2.40.0130.00623.47
8.2.30.0100.00723.50
8.2.20.0110.00423.49
8.2.10.0130.00623.54
8.2.00.0110.00623.59
8.1.330.0120.00721.90
8.1.320.0090.00916.38
8.1.310.0060.01316.73
8.1.300.0090.00917.91
8.1.290.0370.00830.84
8.1.280.0340.00630.84
8.1.270.0340.00428.55
8.1.260.0150.00428.24
8.1.250.0100.00628.24
8.1.240.0110.00722.87
8.1.230.0110.00623.39
8.1.220.0120.00523.39
8.1.210.0110.00524.18
8.1.200.0110.00623.61
8.1.190.0110.00823.35
8.1.180.0140.00623.32
8.1.170.0130.00523.52
8.1.160.0120.00623.65
8.1.150.0110.00823.77
8.1.140.0140.00623.35
8.1.130.0110.00623.49
8.1.120.0110.00723.50
8.1.110.0090.00723.62
8.1.100.0110.00623.48
8.1.90.0110.00623.39
8.1.80.0110.00523.58
8.1.70.0090.00623.38
8.1.60.0120.00523.39
8.1.50.0110.00523.21
8.1.40.0120.00523.20
8.1.30.0120.00723.26
8.1.20.0120.00723.25
8.1.10.0110.00523.25
8.1.00.0100.00623.23
8.0.300.0100.00422.67
8.0.290.0110.00622.59
8.0.280.0080.00622.71
8.0.270.0080.00622.58
8.0.260.0120.00422.60
8.0.250.0120.00522.60
8.0.240.0090.00522.63
8.0.230.0100.00423.05
8.0.220.0100.00522.93
8.0.210.0100.00622.92
8.0.200.0110.00522.74
8.0.190.0110.00522.94
8.0.180.0120.00522.73
8.0.170.0100.00622.85
8.0.160.0100.00522.85
8.0.150.0110.00522.68
8.0.140.0130.00322.68
8.0.130.0110.00522.59
8.0.120.0090.00622.68
8.0.110.0100.00522.66
8.0.100.0110.00522.57
8.0.90.0110.00422.76
8.0.80.0100.00622.58
8.0.70.0100.00422.59
8.0.60.0100.00522.58
8.0.50.0120.00422.58
8.0.30.0100.00522.63
8.0.20.0120.00622.64
8.0.10.0100.00722.63

preferences:
26.16 ms | 403 KiB | 5 Q