3v4l.org

run code in 300+ PHP versions simultaneously
<?php $color = array('white', 'green', 'red'); foreach ($color as $c) { echo "$c, "; } sort($color); foreach ($color as $y) { echo $y; } ?>

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.0100.00718.31
8.3.50.0110.00822.91
8.3.40.0070.00718.77
8.3.30.0070.01418.70
8.3.20.0000.00720.21
8.3.10.0060.00323.66
8.3.00.0080.00019.25
8.2.180.0100.00716.63
8.2.170.0140.00722.96
8.2.160.0060.00620.39
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0040.00421.15
8.2.110.0100.01022.25
8.2.100.0040.00717.79
8.2.90.0000.01219.13
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0080.00020.00
8.2.30.0040.00418.13
8.2.20.0040.00417.71
8.2.10.0000.00718.04
8.2.00.0000.00717.73
8.1.280.0150.00325.92
8.1.270.0050.00323.79
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00623.87
8.1.230.0040.00719.08
8.1.220.0080.00017.79
8.1.210.0000.01018.77
8.1.200.0050.00917.13
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0000.00918.67
8.1.160.0040.00421.94
8.1.150.0070.00018.87
8.1.140.0040.00417.31
8.1.130.0080.00017.81
8.1.120.0070.00017.34
8.1.110.0000.00717.48
8.1.100.0000.00817.39
8.1.90.0000.00817.44
8.1.80.0040.00417.29
8.1.70.0030.00317.39
8.1.60.0030.00517.54
8.1.50.0040.00417.45
8.1.40.0040.00417.38
8.1.30.0040.00417.63
8.1.20.0000.00817.60
8.1.10.0000.00717.50
8.1.00.0000.00817.38
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0070.00018.39
8.0.270.0030.00317.13
8.0.260.0030.00617.18
8.0.250.0030.00316.98
8.0.240.0020.00516.98
8.0.230.0040.00416.92
8.0.220.0030.00316.79
8.0.210.0000.00916.87
8.0.200.0000.00716.95
8.0.190.0070.00016.94
8.0.180.0000.00716.78
8.0.170.0030.00516.80
8.0.160.0000.00716.89
8.0.150.0040.00416.89
8.0.140.0030.00516.73
8.0.130.0030.00313.30
8.0.120.0030.00516.87
8.0.110.0070.00016.90
8.0.100.0040.00416.78
8.0.90.0040.00416.76
8.0.80.0070.01016.79
8.0.70.0040.00416.83
8.0.60.0000.00716.88
8.0.50.0040.00416.84
8.0.30.0090.01017.19
8.0.20.0090.01317.40
8.0.10.0000.00816.82
8.0.00.0100.00916.75
7.4.330.0030.00315.09
7.4.320.0000.00616.61
7.4.300.0100.00016.44
7.4.290.0030.00316.63
7.4.280.0030.00816.55
7.4.270.0070.00016.60
7.4.260.0000.00716.43
7.4.250.0000.00716.36
7.4.240.0040.00416.52
7.4.230.0000.00716.39
7.4.220.0160.01016.43
7.4.210.0100.00616.50
7.4.200.0070.00016.68
7.4.160.0150.00616.41
7.4.150.0060.01217.40
7.4.140.0050.01217.86
7.4.130.0090.00716.43
7.4.120.0110.00816.56
7.4.110.0070.01016.32
7.4.100.0080.00816.34
7.4.90.0080.00816.38
7.4.80.0110.01119.39
7.4.70.0060.01216.52
7.4.60.0060.01316.45
7.4.50.0040.00416.33
7.4.40.0060.01516.42
7.4.30.0090.00616.43
7.4.00.0080.00815.10
7.3.330.0000.00613.09
7.3.320.0000.00512.95
7.3.310.0000.00716.35
7.3.300.0030.00316.25
7.3.290.0100.00516.18
7.3.280.0080.01116.24
7.3.270.0120.00617.40
7.3.260.0160.00416.39
7.3.250.0080.01216.29
7.3.240.0120.00916.37
7.3.230.0070.01316.39
7.3.210.0090.00916.46
7.3.200.0130.00319.39
7.3.190.0060.01316.32
7.3.180.0130.00716.40
7.3.170.0110.00516.43
7.3.160.0130.01016.46
7.2.330.0060.01016.65
7.2.320.0030.01616.49
7.2.310.0080.00816.76
7.2.300.0060.01016.60
7.2.290.0120.00916.44
7.2.60.0030.01016.84
7.2.00.0210.00819.59
7.1.200.0040.00715.71
7.1.100.0100.00018.21
7.1.70.0070.00017.16
7.1.60.0160.00619.40
7.1.50.0110.01416.70
7.1.00.0100.07322.41
7.0.200.0000.01016.73
7.0.140.0030.07322.00
7.0.60.0100.05319.85
7.0.50.0030.07317.77
7.0.40.0070.05720.12
7.0.30.0300.06720.34
7.0.20.0300.05320.16
7.0.10.0230.07720.00
7.0.00.0100.08720.33
5.6.280.0000.07720.87
5.6.210.0070.07320.70
5.6.200.0000.05718.08
5.6.190.0030.04720.39
5.6.180.0470.06720.49
5.6.170.0230.05320.50
5.6.160.0170.06020.49
5.6.150.0130.05318.07
5.6.140.0130.08018.12
5.6.130.0130.03018.20
5.6.120.0070.08020.75
5.6.110.0100.08320.97
5.6.100.0170.07321.03
5.6.90.0000.04320.96
5.6.80.0130.07320.36
5.5.350.0170.04020.46
5.5.340.0130.07717.89
5.5.330.0100.06720.19
5.5.320.0370.05720.13
5.5.310.0300.07320.41
5.5.300.0000.04317.87
5.5.290.0070.06017.95
5.5.280.0100.04720.84
5.5.270.0070.03720.74
5.5.260.0030.04020.84
5.5.250.0100.08020.68
5.5.240.0130.08020.16
5.4.450.0230.05019.57
5.4.440.0470.03319.24
5.4.430.0200.04319.09
5.4.420.0170.04019.38
5.4.410.0270.04319.13
5.4.400.0400.04018.78
5.4.390.0370.04019.26
5.4.380.0270.05718.50
5.4.370.0300.05018.73
5.4.360.0270.05318.59
5.4.350.0330.05318.68
5.4.340.0270.05318.71
5.4.320.0070.04112.46
5.4.310.0060.03712.45
5.4.300.0050.04812.45
5.4.290.0030.04012.45
5.4.280.0080.03312.35
5.4.270.0070.03412.35
5.4.260.0050.04012.35
5.4.250.0070.03412.35
5.4.240.0100.03712.35
5.4.230.0080.04212.34
5.4.220.0060.03512.34
5.4.210.0040.03812.34
5.4.200.0070.03612.34
5.4.190.0060.04212.34
5.4.180.0050.03612.34
5.4.170.0090.03712.35
5.4.160.0070.03812.34
5.4.150.0070.05112.34
5.4.140.0090.06212.02
5.4.130.0090.04612.01
5.4.120.0040.03711.97
5.4.110.0070.03511.97
5.4.100.0070.03411.97
5.4.90.0030.04011.96
5.4.80.0100.03411.97
5.4.70.0030.03711.96
5.4.60.0060.03411.96
5.4.50.0060.03311.96
5.4.40.0070.03211.95
5.4.30.0060.03511.95
5.4.20.0010.03911.95
5.4.10.0040.03611.95
5.4.00.0070.03311.44
5.3.290.0050.04012.80
5.3.280.0030.04012.71
5.3.270.0080.04412.72
5.3.260.0070.04412.72
5.3.250.0030.04412.71
5.3.240.0050.04512.72
5.3.230.0040.04112.71
5.3.220.0090.03312.68
5.3.210.0040.04112.68
5.3.200.0060.03712.68
5.3.190.0080.04312.68
5.3.180.0060.03612.67
5.3.170.0040.03912.67
5.3.160.0040.03712.67
5.3.150.0020.04012.68
5.3.140.0050.03612.66
5.3.130.0040.04112.66
5.3.120.0050.04312.65
5.3.110.0070.04012.65
5.3.100.0050.04612.11
5.3.90.0050.03612.08
5.3.80.0040.03712.08
5.3.70.0040.03812.07
5.3.60.0010.04012.06
5.3.50.0060.04712.00
5.3.40.0030.04212.00
5.3.30.0050.03711.94
5.3.20.0060.04411.72
5.3.10.0070.03211.69
5.3.00.0080.03811.68
5.2.170.0050.0299.18
5.2.160.0040.0319.18
5.2.150.0060.0289.18
5.2.140.0080.0389.17
5.2.130.0050.0299.13
5.2.120.0040.0289.13
5.2.110.0030.0359.14
5.2.100.0040.0399.13
5.2.90.0070.0289.14
5.2.80.0040.0319.13
5.2.70.0060.0289.14
5.2.60.0040.0309.09
5.2.50.0040.0319.05
5.2.40.0050.0309.04
5.2.30.0100.0369.00
5.2.20.0040.0319.00
5.2.10.0050.0318.92
5.2.00.0040.0298.78
5.1.60.0040.0258.06
5.1.50.0040.0248.06
5.1.40.0030.0258.04
5.1.30.0030.0278.39
5.1.20.0040.0308.41
5.1.10.0040.0298.13
5.1.00.0040.0268.13
5.0.50.0020.0216.61
5.0.40.0030.0196.47
5.0.30.0070.0336.29
5.0.20.0070.0216.26
5.0.10.0060.0186.24
5.0.00.0040.0306.23
4.4.90.0020.0164.78
4.4.80.0010.0174.76
4.4.70.0000.0184.75
4.4.60.0020.0154.75
4.4.50.0000.0184.77
4.4.40.0030.0244.71
4.4.30.0010.0174.76
4.4.20.0020.0164.85
4.4.10.0040.0154.85
4.4.00.0040.0274.76
4.3.110.0010.0184.67
4.3.100.0040.0134.66
4.3.90.0050.0124.63
4.3.80.0010.0254.59
4.3.70.0010.0164.63
4.3.60.0040.0154.63
4.3.50.0030.0174.63
4.3.40.0010.0294.54
4.3.30.0030.0153.29
4.3.20.0050.0173.27
4.3.10.0020.0183.23
4.3.00.0030.01715.66

preferences:
35.2 ms | 401 KiB | 5 Q