3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test {} function addToStorage(\SplObjectStorage $storage, Test $test) { if (!$storage->contains($test)) { $storage->attach($test); } } $storage = new \SplObjectStorage(); $test1 = new Test(); $test2 = new Test(); addToStorage($storage, $test1); addToStorage($storage, $test2); echo $storage->count();

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.70.0070.00718.30
8.3.60.0000.01518.30
8.3.50.0120.00821.00
8.3.40.0150.00618.68
8.3.30.0070.01018.81
8.3.20.0030.00520.38
8.3.10.0080.00023.56
8.3.00.0080.00019.55
8.2.180.0090.01216.50
8.2.170.0130.00722.96
8.2.160.0070.01019.08
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00720.88
8.2.110.0030.00620.44
8.2.100.0040.00817.63
8.2.90.0040.00419.05
8.2.80.0060.00317.97
8.2.70.0030.00617.38
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0040.00421.01
8.2.30.0000.00719.85
8.2.20.0000.00817.70
8.2.10.0040.00418.13
8.2.00.0070.00018.14
8.1.280.0100.00325.92
8.1.270.0090.00620.26
8.1.260.0050.00526.35
8.1.250.0080.00028.09
8.1.240.0060.00319.21
8.1.230.0120.00017.66
8.1.220.0060.00317.74
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0040.00417.22
8.1.180.0090.00018.10
8.1.170.0040.00418.65
8.1.160.0000.00722.07
8.1.150.0070.00018.82
8.1.140.0030.00517.54
8.1.130.0000.00717.71
8.1.120.0040.00417.46
8.1.110.0020.00517.37
8.1.100.0020.00517.47
8.1.90.0050.00317.46
8.1.80.0040.00417.48
8.1.70.0030.00317.45
8.1.60.0030.00517.63
8.1.50.0040.00417.51
8.1.40.0040.00417.51
8.1.30.0040.00417.55
8.1.20.0030.00617.61
8.1.10.0030.00617.60
8.1.00.0030.00517.55
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0070.00018.39
8.0.270.0000.00717.18
8.0.260.0030.00317.23
8.0.250.0040.00416.99
8.0.240.0070.00017.05
8.0.230.0000.00716.91
8.0.220.0000.00616.94
8.0.210.0030.00317.01
8.0.200.0000.00616.89
8.0.190.0050.00317.03
8.0.180.0000.00816.94
8.0.170.0000.01016.90
8.0.160.0000.00716.93
8.0.150.0040.00416.93
8.0.140.0000.00716.89
8.0.130.0050.00313.45
8.0.120.0000.00816.91
8.0.110.0000.00716.85
8.0.100.0030.00516.85
8.0.90.0040.00417.02
8.0.80.0060.00916.96
8.0.70.0040.00417.01
8.0.60.0030.00617.08
8.0.50.0040.00416.91
8.0.30.0070.01017.17
8.0.20.0090.01217.40
8.0.10.0050.00217.00
8.0.00.0090.00916.72
7.4.330.0050.00015.08
7.4.320.0030.00316.44
7.4.300.0030.00316.41
7.4.290.0000.00716.54
7.4.280.0040.00416.58
7.4.270.0030.00316.60
7.4.260.0040.00416.52
7.4.250.0000.00716.50
7.4.240.0040.00316.56
7.4.230.0040.00416.50
7.4.220.0140.00416.44
7.4.210.0130.00616.63
7.4.200.0000.00716.72
7.4.160.0080.00816.36
7.4.150.0090.00917.40
7.4.140.0100.00817.86
7.4.130.0100.01016.65
7.4.120.0150.00516.58
7.4.110.0100.01016.55
7.4.100.0060.01216.54
7.4.90.0140.00916.61
7.4.80.0090.01519.39
7.4.70.0070.01016.52
7.4.60.0120.00616.41
7.4.50.0090.00016.52
7.4.40.0070.01416.43
7.4.30.0030.01616.76
7.4.00.0030.00914.99
7.3.330.0020.00213.10
7.3.320.0000.00613.03
7.3.310.0030.00616.13
7.3.300.0030.00316.25
7.3.290.0060.01016.25
7.3.280.0060.01016.30
7.3.270.0030.01417.40
7.3.260.0130.00316.52
7.3.250.0090.00816.32
7.3.240.0130.01016.48
7.3.230.0070.01116.40
7.3.210.0160.00316.29
7.3.200.0070.01019.39
7.3.190.0000.01816.08
7.3.180.0000.01516.52
7.3.170.0110.01216.27
7.3.160.0050.01116.21
7.3.10.0070.00816.47
7.3.00.0040.01116.53
7.2.330.0150.00916.46
7.2.320.0160.00016.73
7.2.310.0140.00316.66
7.2.300.0100.00716.70
7.2.290.0060.01016.63
7.2.130.0120.00616.69
7.2.120.0060.01016.44
7.2.110.0080.00516.52
7.2.100.0110.00516.66
7.2.90.0110.00616.45
7.2.80.0090.00916.78
7.2.70.0040.01116.39
7.2.60.0090.00716.64
7.2.50.0130.00916.68
7.2.40.0070.00716.46
7.2.30.0130.00716.56
7.2.20.0060.01016.46
7.2.10.0090.01016.46
7.2.00.0090.00917.61
7.1.250.0050.00815.42
7.1.100.0000.01117.88
7.1.70.0000.01017.09
7.1.60.0090.01620.03
7.1.50.0030.01716.94
7.1.00.0070.07322.36
7.0.200.0000.01016.76
7.0.60.0030.08019.88
7.0.50.0030.04017.89
7.0.40.0030.09320.13
7.0.30.0430.03720.02
7.0.20.0200.04020.16
7.0.10.0030.04720.32
7.0.00.0000.05720.11
5.6.280.0100.06320.89
5.6.210.0130.07320.77
5.6.200.0070.04318.12
5.6.190.0070.07320.61
5.6.180.0130.07720.46
5.6.170.0270.05720.44
5.6.160.0030.04020.55
5.6.150.0100.08018.21
5.6.140.0070.07018.24
5.6.130.0100.06718.18
5.6.120.0100.05021.02
5.6.110.0100.08320.96
5.6.100.0100.07320.98
5.6.90.0130.07721.13
5.6.80.0170.06020.38
5.5.350.0200.06720.52
5.5.340.0100.04017.96
5.5.330.0070.05720.25
5.5.320.0170.08020.27
5.5.310.0300.07320.30
5.5.300.0130.07718.08
5.5.290.0070.03717.92
5.5.280.0030.04020.84
5.5.270.0000.04320.79
5.5.260.0000.04320.89
5.5.250.0030.06720.58
5.5.240.0300.07020.15
5.4.450.0700.05719.46
5.4.440.0530.06019.17
5.4.430.0600.05319.61
5.4.420.0630.05019.45
5.4.410.0630.04719.48
5.4.400.0670.05019.15
5.4.390.0700.05019.26
5.4.380.0970.06719.26
5.4.370.0730.05019.29
5.4.360.0630.05719.06
5.4.350.0630.04319.12
5.4.340.0630.06719.30
5.4.320.0630.05019.14
5.4.310.0570.05319.27
5.4.300.0730.05319.28
5.4.290.0770.05318.97
5.4.280.0530.06319.25
5.4.270.0570.05318.84
5.4.260.0700.05018.87
5.4.250.0530.05719.11
5.4.240.0800.05318.87
5.4.230.0700.06318.97
5.4.220.0400.06319.22
5.4.210.0200.04318.97
5.4.200.0130.05016.89
5.4.190.0500.05019.02
5.4.180.0530.06319.01
5.4.170.0670.05019.00
5.4.160.0600.06019.23
5.4.150.0500.06719.13
5.4.140.0700.03716.38
5.4.130.0630.04316.35
5.4.120.0700.04316.39
5.4.110.0730.03716.77
5.4.100.0970.06316.36
5.4.90.0830.06016.61
5.4.80.0900.04716.57
5.4.70.0770.06016.58
5.4.60.0800.04016.69
5.4.50.0530.04716.41
5.4.40.0400.05016.52
5.4.30.0100.04716.41
5.4.20.0700.05016.29
5.4.10.0500.05016.36
5.4.00.0030.05316.00

preferences:
66.29 ms | 401 KiB | 5 Q