3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public $bars = []; } class bar { public $field; } $foo = new foo(); $bar = new bar(); $bar->field = 'hello'; $foo->bars[] = $bar; foreach ($foo->bars as $bar) { print_r($bar->field); }

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.0140.00018.11
8.3.50.0150.00721.98
8.3.40.0090.00618.59
8.3.30.0100.00318.88
8.3.20.0070.00020.16
8.3.10.0040.00420.54
8.3.00.0050.00319.38
8.2.180.0060.01216.38
8.2.170.0110.00322.96
8.2.160.0100.00320.24
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00422.23
8.2.110.0060.00320.45
8.2.100.0000.01218.09
8.2.90.0000.00719.24
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0080.00017.93
8.2.50.0030.00518.07
8.2.40.0000.00818.34
8.2.30.0070.00019.36
8.2.20.0000.00717.81
8.2.10.0040.00418.16
8.2.00.0040.00417.67
8.1.280.0070.01325.92
8.1.270.0000.00822.19
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.83
8.1.230.0030.01019.16
8.1.220.0040.00417.76
8.1.210.0080.00018.77
8.1.200.0030.00717.23
8.1.190.0040.00417.22
8.1.180.0070.00018.10
8.1.170.0100.00318.57
8.1.160.0000.00722.00
8.1.150.0050.00218.80
8.1.140.0040.00417.38
8.1.130.0000.00717.73
8.1.120.0040.00417.48
8.1.110.0070.00017.51
8.1.100.0000.00817.50
8.1.90.0040.00417.46
8.1.80.0000.00717.40
8.1.70.0030.00317.45
8.1.60.0040.00417.47
8.1.50.0030.00917.57
8.1.40.0000.00817.53
8.1.30.0040.00417.50
8.1.20.0000.00717.70
8.1.10.0040.00417.41
8.1.00.0100.00017.46
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.43
8.0.270.0040.00417.18
8.0.260.0030.00317.17
8.0.250.0030.00316.82
8.0.240.0040.00417.00
8.0.230.0030.00316.83
8.0.220.0000.00716.93
8.0.210.0040.00416.79
8.0.200.0050.00216.83
8.0.190.0020.00516.93
8.0.180.0070.00016.80
8.0.170.0050.00316.88
8.0.160.0000.00716.91
8.0.150.0040.00416.84
8.0.140.0050.00216.77
8.0.130.0000.00513.28
8.0.120.0060.00316.86
8.0.110.0040.00416.88
8.0.100.0050.00216.88
8.0.90.0040.00416.95
8.0.80.0030.01216.85
8.0.70.0040.00416.68
8.0.60.0070.00016.75
8.0.50.0030.00616.93
8.0.30.0100.00816.99
8.0.20.0150.00317.40
8.0.10.0040.00417.06
8.0.00.0110.00916.63
7.4.330.0000.00515.07
7.4.320.0000.00616.60
7.4.300.0060.00016.54
7.4.290.0050.00316.64
7.4.280.0030.00616.55
7.4.270.0000.00716.51
7.4.260.0050.00216.57
7.4.250.0040.00416.53
7.4.240.0070.00016.56
7.4.230.0040.00416.68
7.4.220.0160.00316.65
7.4.210.0060.01016.41
7.4.200.0000.00716.68
7.4.160.0150.00016.47
7.4.150.0080.01217.40
7.4.140.0040.01417.86
7.4.130.0140.00716.48
7.4.120.0030.01316.47
7.4.110.0070.01016.46
7.4.100.0050.01116.35
7.4.90.0140.00416.40
7.4.80.0110.00819.37
7.4.70.0130.00716.50
7.4.60.0100.00516.57
7.4.50.0080.00016.48
7.4.40.0120.00916.37
7.4.30.0110.00416.42
7.4.10.0070.01416.21
7.4.00.0070.00915.21
7.3.330.0060.00013.37
7.3.320.0060.00013.31
7.3.310.0000.00716.33
7.3.300.0030.00316.25
7.3.290.0070.00716.26
7.3.280.0060.01116.27
7.3.270.0130.00817.40
7.3.260.0060.00916.52
7.3.250.0100.01116.51
7.3.240.0070.01016.47
7.3.230.0060.01016.39
7.3.210.0130.00616.38
7.3.200.0060.01019.39
7.3.190.0180.00416.38
7.3.180.0070.00716.48
7.3.170.0110.00716.48
7.3.160.0080.01316.43
7.3.130.0070.01316.31
7.3.120.0050.01415.31
7.3.110.0060.01115.46
7.3.100.0090.00615.26
7.3.90.0070.00715.34
7.3.80.0090.00715.36
7.3.70.0070.00715.32
7.3.60.0070.00515.14
7.3.50.0040.00715.29
7.3.40.0070.00815.24
7.3.30.0090.00315.32
7.3.20.0070.00517.09
7.3.10.0080.00417.24
7.3.00.0020.01117.19
7.2.330.0030.01416.70
7.2.320.0120.00416.79
7.2.310.0040.01216.66
7.2.300.0100.00716.51
7.2.290.0030.01516.68
7.2.260.0180.00416.40
7.2.250.0080.01115.73
7.2.240.0070.01115.44
7.2.230.0050.00915.53
7.2.220.0050.00915.55
7.2.210.0080.00815.55
7.2.200.0050.01015.64
7.2.190.0070.00615.64
7.2.180.0030.01215.60
7.2.170.0050.00915.64
7.2.160.0040.00516.54
7.2.150.0060.00318.50
7.2.140.0070.00718.29
7.2.130.0120.00018.42
7.2.120.0040.01218.60
7.2.110.0040.01518.50
7.2.100.0100.00318.49
7.2.90.0060.00918.31
7.2.80.0100.00718.57
7.2.70.0110.00818.60
7.2.60.0080.00817.74
7.2.50.0030.01218.44
7.2.40.0070.00318.46
7.2.30.0070.00718.37
7.2.20.0030.01218.48
7.2.10.0030.01018.39
7.2.00.0070.00318.86
7.1.330.0070.00616.18
7.1.320.0040.00916.35
7.1.310.0080.00716.33
7.1.300.0060.00616.29
7.1.290.0050.01016.41
7.1.280.0090.00516.18
7.1.270.0060.00816.25
7.1.260.0090.00516.17
7.1.250.0100.00017.18
7.1.240.0000.01417.41
7.1.230.0000.01317.32
7.1.220.0030.00617.23
7.1.210.0030.01017.34
7.1.200.0050.00916.55
7.1.190.0060.00317.27
7.1.180.0030.01417.23
7.1.170.0070.01017.15
7.1.160.0080.00317.31
7.1.150.0030.00717.47
7.1.140.0080.00817.36
7.1.130.0000.01217.31
7.1.120.0100.00317.15
7.1.110.0110.00017.52
7.1.100.0030.01217.59
7.1.90.0070.00717.11
7.1.80.0000.01317.32
7.1.70.0020.01017.19
7.1.60.0080.01018.41
7.1.50.0060.01117.15
7.1.40.0080.00417.16
7.1.30.0000.01717.34
7.1.20.0030.00617.44
7.1.10.0040.01117.66
7.1.00.0070.03819.73
7.0.330.0030.01217.20
7.0.320.0070.00717.04
7.0.310.0000.01316.84
7.0.300.0100.00316.86
7.0.290.0000.01216.95
7.0.280.0070.00716.97
7.0.270.0070.00716.91
7.0.260.0030.01017.18
7.0.250.0000.01117.16
7.0.240.0110.00416.92
7.0.230.0030.01316.87
7.0.220.0030.01217.26
7.0.210.0090.00317.05
7.0.200.0040.00716.90
7.0.190.0030.01016.91
7.0.180.0000.01616.97
7.0.170.0070.00717.02
7.0.160.0000.00917.10
7.0.150.0070.00717.02
7.0.140.0030.04019.42
7.0.130.0040.01116.77
7.0.120.0110.00417.03
7.0.110.0090.00617.05
7.0.100.0000.01316.84
7.0.90.0060.00616.86
7.0.80.0090.00616.84
7.0.70.0000.00917.04
7.0.60.0090.04018.52
7.0.50.0100.04117.46
7.0.40.0070.04817.76
7.0.30.0290.04217.63
7.0.20.0180.04117.63
7.0.10.0100.04617.52
7.0.00.0110.04417.57
5.6.400.0060.00916.11
5.6.390.0070.01016.04
5.6.380.0110.00416.00
5.6.370.0030.01015.85
5.6.360.0130.00315.77
5.6.350.0060.00916.08
5.6.340.0030.00916.00
5.6.330.0030.00816.36
5.6.320.0070.00715.98
5.6.310.0060.00915.93
5.6.300.0110.00416.24
5.6.290.0100.00315.95
5.6.280.0050.04018.39
5.6.270.0030.01016.00
5.6.260.0000.01216.04
5.6.250.0060.00815.86
5.6.240.0070.01016.02
5.6.230.0000.01215.91
5.6.220.0030.01515.90
5.6.210.0070.04618.37
5.6.200.0060.04317.18
5.6.190.0090.02718.10
5.6.180.0130.03818.35
5.6.170.0120.02718.39
5.6.160.0050.04618.23
5.6.150.0070.02116.97
5.6.140.0020.03317.20
5.6.130.0070.03817.13
5.6.120.0100.03118.44
5.6.110.0050.03818.33
5.6.100.0100.04218.50
5.6.90.0060.04118.69
5.6.80.0040.03218.08
5.6.70.0000.01716.19
5.6.60.0100.00715.74
5.6.50.0060.00616.05
5.6.40.0080.00415.98
5.6.30.0040.01416.19
5.6.20.0000.01215.95
5.6.10.0090.00615.80
5.6.00.0060.00615.97
5.5.380.0060.00815.97
5.5.370.0080.01415.85
5.5.360.0080.01216.23
5.5.350.0080.02418.10
5.5.340.0090.04416.91
5.5.330.0070.04618.08
5.5.320.0240.04218.17
5.5.310.0170.04718.18
5.5.300.0090.04316.94
5.5.290.0030.03316.94
5.5.280.0100.02718.31
5.5.270.0060.04418.13
5.5.260.0080.02118.45
5.5.250.0130.03318.34
5.5.240.0120.04018.02
5.5.230.0100.00715.80
5.5.220.0100.00615.94
5.5.210.0060.01015.77
5.5.200.0100.01015.73
5.5.190.0090.00915.81
5.5.180.0000.01315.63
5.5.170.0060.00615.64
5.5.160.0060.00615.73
5.5.150.0040.01415.91
5.5.140.0030.01015.86
5.5.130.0070.00715.72
5.5.120.0090.00316.02
5.5.110.0090.00615.86
5.5.100.0060.01015.86
5.5.90.0090.00015.73
5.5.80.0030.01415.91
5.5.70.0110.00515.91
5.5.60.0120.00415.70
5.5.50.0040.01215.89
5.5.40.0000.01115.93
5.5.30.0030.01015.62
5.5.20.0060.00815.92
5.5.10.0060.00915.70
5.5.00.0070.01015.47
5.4.450.0020.02116.32
5.4.440.0520.03716.29
5.4.430.0400.03716.09
5.4.420.0360.00316.27
5.4.410.0370.00016.15
5.4.400.0420.00716.06
5.4.390.0330.00516.12
5.4.380.0280.02615.87
5.4.370.0170.04315.90
5.4.360.0200.03815.76
5.4.350.0310.04015.76
5.4.340.0160.03315.76
5.4.330.0030.00613.00
5.4.320.0040.02312.75
5.4.310.0020.02312.75
5.4.300.0070.02012.74
5.4.290.0060.02412.74
5.4.280.0040.02412.69
5.4.270.0050.02412.69
5.4.260.0050.02112.69
5.4.250.0050.02312.69
5.4.240.0030.02312.69
5.4.230.0080.01912.69
5.4.220.0060.02112.69
5.4.210.0050.02312.69
5.4.200.0050.02112.69
5.4.190.0020.02412.69
5.4.180.0050.02212.69
5.4.170.0080.01912.69
5.4.160.0070.02012.69
5.4.150.0040.02112.69
5.4.140.0040.02112.53
5.4.130.0080.01912.53
5.4.120.0070.01912.50
5.4.110.0050.02112.50
5.4.100.0050.02412.50
5.4.90.0070.02112.50
5.4.80.0040.02212.50
5.4.70.0060.02012.50
5.4.60.0020.02312.50
5.4.50.0020.02412.50
5.4.40.0050.02112.49
5.4.30.0040.02112.49
5.4.20.0070.02012.49
5.4.10.0060.02012.49
5.4.00.0040.02112.24
5.3.290.0080.04012.80
5.3.280.0040.04312.71
5.3.270.0080.03812.72
5.3.260.0060.04012.72
5.3.250.0060.03612.72
5.3.240.0070.03712.72
5.3.230.0080.03412.71
5.3.220.0050.03612.68
5.3.210.0070.04412.68
5.3.200.0100.03312.68
5.3.190.0060.03712.68
5.3.180.0080.03412.67
5.3.170.0060.03612.67
5.3.160.0050.03712.68
5.3.150.0060.04012.68
5.3.140.0030.04012.66
5.3.130.0060.03812.66
5.3.120.0080.03512.65
5.3.110.0040.04112.66
5.3.100.0060.03512.12
5.3.90.0060.03812.10
5.3.80.0040.04112.09
5.3.70.0080.03612.09
5.3.60.0100.04212.08
5.3.50.0060.04112.02
5.3.40.0090.03412.02
5.3.30.0050.03711.98
5.3.20.0070.04011.76
5.3.10.0070.03911.73
5.3.00.0080.04011.71
5.2.170.0060.0369.21
5.2.160.0070.0309.21
5.2.150.0100.0259.21
5.2.140.0060.0299.20
5.2.130.0060.0279.17
5.2.120.0020.0309.16
5.2.110.0030.0339.18
5.2.100.0050.0279.17
5.2.90.0050.0329.17
5.2.80.0070.0319.17
5.2.70.0060.0289.17
5.2.60.0050.0339.13
5.2.50.0070.0269.10
5.2.40.0040.0319.06
5.2.30.0070.0279.04
5.2.20.0050.0289.03
5.2.10.0060.0348.94
5.2.00.0070.0298.80
5.1.60.0060.0238.09
5.1.50.0050.0288.09
5.1.40.0020.0278.06
5.1.30.0050.0258.41
5.1.20.0030.0278.43
5.1.10.0040.0308.16
5.1.00.0030.0278.16
5.0.50.0030.0216.63
5.0.40.0020.0266.50
5.0.30.0030.0316.30
5.0.20.0040.0196.28
5.0.10.0040.0196.26
5.0.00.0030.0316.25
4.4.90.0040.0144.78
4.4.80.0010.0174.76
4.4.70.0040.0154.76
4.4.60.0030.0154.76
4.4.50.0020.0164.77
4.4.40.0020.0254.71
4.4.30.0040.0144.75
4.4.20.0020.0164.85
4.4.10.0030.0154.85
4.4.00.0020.0254.76
4.3.110.0030.0154.67
4.3.100.0030.0144.66
4.3.90.0020.0154.63
4.3.80.0070.0204.58
4.3.70.0050.0144.63
4.3.60.0000.0174.62
4.3.50.0030.0154.62
4.3.40.0020.0324.54
4.3.30.0030.0153.30
4.3.20.0030.0223.28
4.3.10.0020.0153.24
4.3.00.0030.01014.30

preferences:
34.69 ms | 401 KiB | 5 Q