3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public readonly int $bar; public function set(int $i) { $this->bar = &$i; } } $i = 1; $foo = new Foo(); $foo->set($i); $i = 20; 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.0100.01020.44
8.4.110.0130.00719.06
8.4.100.0120.00819.00
8.4.90.0100.01020.62
8.4.80.0060.00317.96
8.4.70.0050.00318.16
8.4.60.0140.00617.59
8.4.50.0110.00818.54
8.4.40.0170.00317.68
8.4.30.0100.01018.73
8.4.20.0130.00718.00
8.4.10.0160.00019.71
8.3.250.0030.00417.00
8.3.240.0100.01016.52
8.3.230.0090.00516.93
8.3.220.0120.00618.71
8.3.210.0110.00816.78
8.3.200.0110.00716.45
8.3.190.0100.00416.79
8.3.180.0120.00816.55
8.3.170.0120.00619.10
8.3.160.0070.01018.35
8.3.150.0080.00020.48
8.3.140.0040.00418.81
8.3.130.0040.00418.74
8.3.120.0030.00618.78
8.3.110.0040.01120.94
8.3.100.0060.00316.57
8.3.90.0060.00316.55
8.3.50.0110.00016.75
8.3.20.0080.01123.61
8.3.10.0150.00423.70
8.3.00.0130.00718.84
8.2.290.0100.00920.29
8.2.280.0070.01116.99
8.2.270.0040.01117.10
8.2.260.0100.00716.54
8.2.250.0070.01316.53
8.2.240.0110.00416.93
8.2.230.0060.00322.58
8.2.220.0040.00416.75
8.2.210.0030.00616.68
8.2.150.0160.00320.16
8.2.140.0090.00920.56
8.2.130.0070.01120.52
8.2.120.0100.01019.27
8.2.110.0150.00319.27
8.2.100.0070.01118.85
8.2.90.0170.00318.96
8.2.80.0120.00919.22
8.2.70.0070.00718.76
8.2.60.0160.00018.60
8.2.50.0130.00719.10
8.2.40.0120.00318.84
8.2.30.0100.01018.70
8.2.20.0100.01018.69
8.2.10.0160.00318.83
8.2.00.0140.00418.78
8.1.330.0120.00721.74
8.1.320.0140.00616.14
8.1.310.0090.00616.81
8.1.300.0050.00318.52
8.1.270.0110.00923.32
8.1.260.0130.00721.98
8.1.250.0110.00422.20
8.1.240.0120.00318.57
8.1.230.0150.00318.49
8.1.220.0090.00918.99
8.1.210.0070.01118.43
8.1.200.0090.00918.64
8.1.190.0120.00318.68
8.1.180.0100.00718.42
8.1.170.0140.00018.69
8.1.160.0090.00618.29
8.1.150.0080.00620.53
8.1.140.0080.00620.16
8.1.130.0090.00620.52
8.1.120.0000.01420.28
8.1.110.0040.01120.18
8.1.100.0120.00318.60
8.1.90.0110.00318.39
8.1.80.0070.00719.79
8.1.70.0070.00617.56
8.1.60.0060.00918.70
8.1.50.0150.00618.52
8.1.40.0120.00618.63
8.1.30.0080.00818.74
8.1.20.0090.00619.91
8.1.10.0060.00618.04
8.1.00.0040.00717.90
8.0.300.0090.01018.48
8.0.290.0180.00317.91
8.0.280.0210.00317.75
8.0.270.0070.00717.82
8.0.260.0140.00717.69
8.0.250.0110.01117.96
8.0.240.0150.00918.01
8.0.230.0160.00617.95
8.0.220.0140.00317.87
8.0.210.0210.00717.63
8.0.200.0160.00817.73
8.0.190.0120.01217.74
8.0.180.0180.00317.83
8.0.170.0220.00717.83
8.0.160.0100.00317.83
8.0.150.0200.00317.75
8.0.140.0090.00917.18
8.0.130.0150.00317.18
8.0.120.0190.00317.34
8.0.110.0110.00418.26
8.0.100.0170.00617.28
8.0.90.0150.00817.28
8.0.80.0220.00217.21
8.0.70.0140.00317.23
8.0.60.0180.00517.35
8.0.50.0170.00517.21
8.0.30.0080.00917.34
8.0.20.0120.00517.33
8.0.10.0180.00417.27
7.4.330.0220.00614.18
7.4.320.0280.00617.31
7.4.300.0230.00717.28
7.4.290.0250.00617.05
7.4.280.0310.00317.25
7.4.270.0210.00316.77
7.4.260.0190.00616.90
7.4.250.0220.00816.84
7.4.240.0190.00816.77
7.4.230.0220.01116.83
7.4.220.0230.00316.64
7.4.210.0190.00816.79
7.4.200.0260.00316.78
7.4.190.0170.00716.86
7.4.180.0150.00816.82
7.4.160.0190.00416.82
7.4.150.0210.00516.81
7.4.140.0200.00516.81
7.4.130.0210.00716.65
7.4.120.0240.00416.55
7.4.110.0240.00316.68
7.4.100.0200.00616.67
7.4.90.0150.00916.76
7.4.80.0130.01116.71
7.4.70.0170.00616.73
7.4.60.0160.00616.65
7.4.50.0170.00716.60
7.4.40.0160.00716.72
7.4.30.0180.00616.64
7.4.20.0180.00616.59
7.4.10.0210.00316.68
7.4.00.0190.00516.76

preferences:
26.87 ms | 403 KiB | 5 Q