3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Container { private $a; private $b; public function __construct($a, $b) { $this->a = $a; $this->b = $b; } } class Clazz { private $containers; public function __construct(array $containers) { $this->containers = $containers; } } $containers = array(); for ($i = 0; $i < 100000; $i++) { $containers[] = new Container('a' . $i, 'b' . $i); } $clazz = new Clazz($containers);

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.60.0130.04434.38
8.3.50.0240.03833.74
8.3.40.0270.02435.20
8.3.30.0280.02435.07
8.3.20.0110.01835.07
8.3.10.0100.01635.78
8.3.00.0100.01638.41
8.2.180.0190.04533.00
8.2.170.0290.02335.20
8.2.160.0040.04636.80
8.2.150.0180.01135.18
8.2.140.0130.01636.71
8.2.130.0090.01238.49
8.2.120.0030.01737.37
8.2.110.0240.01736.94
8.2.100.0190.02534.28
8.2.90.0070.02735.55
8.2.80.0000.03434.30
8.2.70.0140.02134.00
8.2.60.0070.02734.41
8.2.50.0170.02033.88
8.2.40.0160.02034.72
8.2.30.0030.02636.29
8.2.20.0070.02733.99
8.2.10.0070.02833.95
8.2.00.0120.02234.18
8.1.280.0310.02435.92
8.1.270.0060.02340.23
8.1.260.0130.02740.46
8.1.250.0130.01740.13
8.1.240.0170.02839.03
8.1.230.0170.02738.87
8.1.220.0030.03335.80
8.1.210.0140.02536.82
8.1.200.0240.01035.52
8.1.190.0070.02835.54
8.1.180.0100.02735.53
8.1.170.0130.02236.70
8.1.160.0100.02336.66
8.1.150.0150.01836.39
8.1.140.0190.01635.22
8.1.130.0030.02935.66
8.1.120.0030.03035.25
8.1.110.0100.02935.13
8.1.100.0100.02435.14
8.1.90.0070.02935.28
8.1.80.0100.02335.23
8.1.70.0170.01735.12
8.1.60.0170.03835.41
8.1.50.0140.02535.30
8.1.40.0100.02935.40
8.1.30.0170.02435.45
8.1.20.0130.02635.40
8.1.10.0030.03435.32
8.1.00.0100.03835.34
8.0.300.0070.02737.72
8.0.290.0180.01834.90
8.0.280.0100.02636.05
8.0.270.0030.03034.81
8.0.260.0100.02736.11
8.0.250.0030.03334.52
8.0.240.0070.02934.65
8.0.230.0060.02834.50
8.0.220.0130.02034.39
8.0.210.0170.02734.57
8.0.200.0100.02634.49
8.0.190.0100.02934.48
8.0.180.0100.02934.54
8.0.170.0140.02434.50
8.0.160.0070.03134.65
8.0.150.0130.02634.35
8.0.140.0090.02834.50
8.0.130.0160.02931.01
8.0.120.0100.02834.52
8.0.110.0070.03934.45
8.0.100.0160.02234.48
8.0.90.0160.02234.20
8.0.80.0310.03234.39
8.0.70.0110.02534.35
8.0.60.0140.02434.29
8.0.50.0060.03234.23
8.0.30.0340.05534.48
8.0.20.0260.04934.63
8.0.10.0130.02634.59
8.0.00.0420.04234.38
7.4.330.0000.02733.00
7.4.320.0120.02234.11
7.4.300.0130.02034.16
7.4.290.0100.02734.18
7.4.280.0070.03334.04
7.4.270.0100.02733.96
7.4.260.0200.03330.99
7.4.250.0130.02834.11
7.4.240.0070.03134.07
7.4.230.0030.03333.97
7.4.220.0230.04934.25
7.4.210.0210.04934.12
7.4.200.0100.02834.26
7.4.190.0130.02634.16
7.4.160.0270.04333.95
7.4.150.0370.03734.17
7.4.140.0360.07234.19
7.4.130.0330.04634.14
7.4.120.0280.04834.10
7.4.110.0260.05434.14
7.4.100.0250.04834.25
7.4.90.0260.06334.18
7.4.80.0190.05634.17
7.4.70.0280.05234.11
7.4.60.0380.03834.16
7.4.50.0070.04434.15
7.4.40.0170.04434.08
7.4.30.0230.06034.04
7.4.00.0070.04832.67
7.3.330.0070.02930.89
7.3.320.0230.02630.93
7.3.310.0090.03133.89
7.3.300.0140.02433.92
7.3.290.0260.04633.87
7.3.280.0220.06033.86
7.3.270.0230.05034.00
7.3.260.0290.05033.91
7.3.250.0280.06234.19
7.3.240.0240.04833.79
7.3.230.0220.05234.01
7.3.210.0320.05234.11
7.3.200.0360.07434.08
7.3.190.0290.04834.05
7.3.180.0290.04534.00
7.3.170.0260.04633.93
7.3.160.0200.06834.03
7.3.120.0160.04232.57
7.2.330.0230.05634.49
7.2.320.0370.04734.39
7.2.310.0410.05334.53
7.2.300.0260.06034.35
7.2.290.0270.05734.40
7.2.00.0100.03337.61
7.1.100.0070.03836.01
7.1.70.0070.05735.33
7.1.60.0100.06335.68
7.1.50.0160.06635.27
7.1.00.0070.11340.65
7.0.200.6350.02733.00
7.0.140.0070.12040.27
7.0.70.6630.09737.70
7.0.60.6930.11037.75
7.0.50.3970.10338.06
7.0.40.1200.09724.14
7.0.30.1470.06024.21
7.0.20.1300.07724.19
7.0.10.1370.06324.11
7.0.00.1370.07024.09
5.6.280.0230.18366.00
5.6.220.0200.14364.23
5.6.210.0100.19364.31
5.6.200.0270.17764.69
5.6.190.0030.13064.68
5.6.180.0100.12364.70
5.6.170.0030.13064.82
5.6.160.0030.13364.72
5.6.150.0270.10764.82
5.6.140.0100.12764.70
5.6.130.0030.13064.68
5.6.120.0070.12764.75
5.6.110.0270.13764.77
5.6.100.0200.10064.66
5.6.90.0270.13764.58
5.6.80.0230.19064.11
5.6.70.0170.18364.00
5.6.60.0100.14363.95
5.6.50.0170.19764.11
5.6.40.0200.15063.96
5.6.30.0170.12764.05
5.6.20.0270.16764.14
5.6.10.0170.18364.02
5.6.00.0330.15764.02
5.5.360.0530.17064.04
5.5.350.0200.17364.10
5.5.340.0130.17064.47
5.5.330.0100.10764.47
5.5.320.0200.09364.40
5.5.310.0170.10064.51
5.5.300.0200.11364.54
5.5.290.0130.14064.24
5.5.280.0100.12364.54
5.5.270.0270.09064.46
5.5.260.0170.11764.27
5.5.250.0170.11764.37
5.5.240.0130.12363.86
5.5.230.0270.15063.92
5.5.220.0230.19363.91
5.5.210.0270.17063.66
5.5.200.0230.16063.71
5.5.190.0200.18063.86
5.5.180.0230.11763.79
5.5.160.0200.19763.88
5.5.150.0370.18363.90
5.5.140.0200.17063.91
5.5.130.0230.17763.89
5.5.120.0200.17063.89
5.5.110.0230.14763.62
5.5.100.0370.12363.72
5.5.90.0070.13763.77
5.5.80.0270.15763.75
5.5.70.0230.15063.80
5.5.60.0300.16763.69
5.5.50.0270.15063.79
5.5.40.0070.20063.79
5.5.30.0200.17363.72
5.5.20.0200.18763.71
5.5.10.0300.16763.70
5.5.00.0270.17763.66
5.4.450.0200.11062.92
5.4.440.0170.11763.02
5.4.430.0170.14062.91
5.4.420.0200.10762.93
5.4.410.0170.17762.81
5.4.400.0130.18362.75
5.4.390.0130.16062.43
5.4.380.0070.14062.47
5.4.370.0330.17362.61
5.4.360.0200.17062.47
5.4.350.0330.17762.63
5.4.340.0230.12062.76
5.4.320.0330.18062.57
5.4.310.0230.24362.64
5.4.300.0230.15762.72
5.4.290.0170.16362.75
5.4.280.0130.20362.63
5.4.270.0130.20062.56
5.4.260.0100.12062.61
5.4.250.0300.15362.47
5.4.240.0170.19362.66
5.4.230.0130.12762.79
5.4.220.0370.17062.47
5.4.210.0230.12762.56
5.4.200.0170.17762.60
5.4.190.0300.11762.59
5.4.180.0200.19362.52
5.4.170.0230.16062.46
5.4.160.0100.19362.64
5.4.150.0300.16362.56
5.4.140.0230.18360.00
5.4.130.0170.13060.00
5.4.120.0230.15760.11
5.4.110.0170.14360.12
5.4.100.0200.14760.05
5.4.90.0270.17759.89
5.4.80.0170.11360.03
5.4.70.0500.16359.90
5.4.60.0170.15759.86
5.4.50.0130.15759.88
5.4.40.0130.12059.99
5.4.30.0400.17359.88
5.4.20.0070.18760.09
5.4.10.0170.13759.95
5.4.00.0370.15359.41
5.3.290.0230.20374.93
5.3.280.0170.14375.02
5.3.270.0200.14775.24
5.3.260.0300.16075.07
5.3.250.0170.13375.24
5.3.240.0270.14775.14
5.3.230.0130.17775.23
5.3.220.0200.14775.00
5.3.210.0370.19074.98
5.3.200.0270.13775.13
5.3.190.0430.18075.07
5.3.180.0200.13375.07
5.3.170.0230.13075.12
5.3.160.0200.19375.62
5.3.150.0400.19375.08
5.3.140.0230.17074.89
5.3.130.0130.17075.08
5.3.120.0200.19075.18
5.3.110.0200.20375.08
5.3.100.0130.14374.51
5.3.90.0330.19374.59
5.3.80.0200.20074.38
5.3.70.0300.17074.52
5.3.60.0370.19774.43
5.3.50.0270.19374.04
5.3.40.0370.17774.16
5.3.30.0200.14074.10
5.3.20.0270.18773.88
5.3.10.0100.17374.02
5.3.00.0370.19374.04
5.2.170.0230.19372.59
5.2.160.0300.20072.54
5.2.150.0130.15372.70
5.2.140.0400.19772.64
5.2.130.0230.21372.65
5.2.120.0300.20772.61
5.2.110.0270.18072.67
5.2.100.0300.20072.46
5.2.90.0200.16772.44
5.2.80.0230.17772.64
5.2.70.0270.12772.50
5.2.60.0330.12372.53
5.2.50.0370.19772.72
5.2.40.0130.21372.65
5.2.30.0230.21372.39
5.2.20.0230.18772.61
5.2.10.0300.16772.61
5.2.00.0070.16781.65
5.1.60.0470.240103.78
5.1.50.0300.203103.84
5.1.40.0330.247103.83
5.1.30.0500.220104.24
5.1.20.0200.170104.18
5.1.10.0400.170103.80
5.1.00.0300.233103.84
5.0.50.0070.03312.27
5.0.40.0070.02712.27
5.0.30.0030.05012.27
5.0.20.0000.04712.27
5.0.10.0000.04712.27
5.0.00.0000.06712.27
4.4.90.0000.02312.27
4.4.80.0000.03312.27
4.4.70.0030.02012.27
4.4.60.0000.03712.27
4.4.50.0000.04012.27
4.4.40.0070.05312.27
4.4.30.0030.03012.27
4.4.20.0030.03712.27
4.4.10.0030.03312.27
4.4.00.0070.04312.27
4.3.110.0030.02712.27
4.3.100.0100.03012.27
4.3.90.0030.03312.27
4.3.80.0000.04712.27
4.3.70.0000.03712.27
4.3.60.0030.02712.27
4.3.50.0030.02312.27
4.3.40.0000.05312.27
4.3.30.0000.03312.27
4.3.20.0030.03312.27
4.3.10.0030.03312.27
4.3.00.0070.03012.27

preferences:
36.16 ms | 401 KiB | 5 Q