3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = ['foo', 'bar', 'doo', 'lorem', 'ipsum']; // Take the current array-key from the URL $key = 3; // $_GET['key'] // validate if it really exists in the array, otherwise take a fallback if(!array_key_exists($key, $items)) $key = 0; // show data to this key echo $items[$key]; // provide a button to switch to the next array key sprintf('<a href="?key=%s">next</a>', $key+1);

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.130.0070.00817.70
8.4.120.0090.01120.45
8.4.110.0120.00918.96
8.4.100.0140.00618.76
8.4.90.0140.00717.40
8.4.80.0060.00517.73
8.4.70.0150.00517.88
8.4.60.0050.00418.66
8.4.50.0090.00418.60
8.4.40.0060.01319.55
8.4.30.0030.02119.23
8.4.20.0040.00420.53
8.4.10.0110.00717.64
8.3.260.0100.00316.75
8.3.250.0110.00718.87
8.3.240.0090.01016.45
8.3.230.0110.00816.60
8.3.220.0100.00816.53
8.3.210.0070.00818.41
8.3.200.0080.00116.49
8.3.190.0100.01017.12
8.3.180.0060.00217.24
8.3.170.0100.00720.72
8.3.160.0060.00317.19
8.3.150.0040.01517.09
8.3.140.0100.00316.61
8.3.130.0030.00518.44
8.3.120.0110.00718.95
8.3.110.0120.00620.94
8.3.100.0100.01024.06
8.3.90.0000.00826.77
8.3.80.0060.00617.97
8.3.70.0140.00716.50
8.3.60.0130.00716.63
8.3.50.0090.00617.22
8.3.40.0070.00718.54
8.3.30.0170.00020.73
8.3.20.0070.00622.31
8.3.10.0090.00722.48
8.3.00.0120.00221.74
8.2.290.0120.00720.31
8.2.280.0050.00318.24
8.2.270.0180.00016.91
8.2.260.0140.00016.92
8.2.250.0130.00716.68
8.2.240.0040.00418.92
8.2.230.0090.00022.58
8.2.220.0060.00937.54
8.2.210.0100.01026.77
8.2.200.0070.00718.54
8.2.190.0180.00018.22
8.2.180.0090.00618.54
8.2.170.0120.00318.83
8.2.160.0090.00922.96
8.2.150.0080.01223.57
8.2.140.0100.00923.81
8.2.130.0070.00624.56
8.2.120.0050.00822.00
8.2.110.0050.00821.74
8.2.100.0070.00820.44
8.2.90.0080.00620.36
8.2.80.0070.00620.47
8.2.70.0070.00720.49
8.2.60.0090.00420.53
8.2.50.0050.00920.53
8.2.40.0110.00221.12
8.2.30.0080.00621.15
8.2.20.0050.00720.53
8.2.10.0060.00620.45
8.2.00.0090.00621.18
8.1.330.0130.00621.85
8.1.320.0160.00816.30
8.1.310.0120.00616.69
8.1.300.0000.00816.27
8.1.290.0040.00718.88
8.1.280.0120.00325.92
8.1.270.0070.00323.05
8.1.260.0070.00725.04
8.1.250.0110.00525.96
8.1.240.0070.01022.49
8.1.230.0090.00721.08
8.1.220.0060.00720.35
8.1.210.0070.00520.87
8.1.200.0040.00920.09
8.1.190.0070.00520.04
8.1.180.0110.00520.53
8.1.170.0090.00420.71
8.1.160.0050.00820.88
8.1.150.0020.01120.97
8.1.140.0110.00022.48
8.1.130.0040.00821.54
8.1.120.0050.00720.17
8.1.110.0040.00820.20
8.1.100.0050.00920.19
8.1.90.0040.00720.17
8.1.80.0040.00720.24
8.1.70.0000.01120.19
8.1.60.0060.00520.26
8.1.50.0070.00420.23
8.1.40.0080.00320.16
8.1.30.0050.00620.30
8.1.20.0110.00020.31
8.1.10.0040.00720.25
8.1.00.0040.00720.16
8.0.300.0100.00221.31
8.0.290.0110.00519.86
8.0.280.0100.00620.72
8.0.270.0070.00520.13
8.0.260.0140.00620.71
8.0.250.0120.00319.96
8.0.240.0170.00519.97
8.0.230.0110.00719.95
8.0.220.0110.00419.88
8.0.210.0160.00519.87
8.0.200.0150.00519.88
8.0.190.0140.00719.95
8.0.180.0130.00419.92
8.0.170.0160.00519.88
8.0.160.0160.00419.94
8.0.150.0120.00519.91
8.0.140.0170.00519.87
8.0.130.0140.00318.13
8.0.120.0110.00519.85
8.0.110.0130.00419.96
8.0.100.0070.00719.86
8.0.90.0170.00619.86
8.0.80.0150.01118.89
8.0.70.0120.00319.93
8.0.60.0070.01219.87
8.0.50.0110.00719.94
8.0.30.0130.00618.94
8.0.20.0070.01320.18
8.0.10.0100.00620.04
8.0.00.0100.00918.71
7.4.330.0090.00219.90
7.4.320.0060.00819.71
7.4.300.0150.00519.71
7.4.290.0170.00319.80
7.4.280.0140.00819.77
7.4.270.0180.00219.74
7.4.260.0160.00419.70
7.4.250.0230.00119.72
7.4.240.0150.00719.72
7.4.230.0180.00219.82
7.4.220.0140.00419.75
7.4.210.0120.01118.72
7.4.200.0120.00619.78
7.4.190.0270.00722.96
7.4.180.0210.00822.96
7.4.160.0110.00817.82
7.4.150.0280.00022.96
7.4.140.0130.01018.58
7.4.130.0190.00819.65
7.4.120.0150.00817.56
7.4.110.0160.00919.65
7.4.100.0160.00819.69
7.4.90.0140.01019.81
7.4.80.0240.00221.18
7.4.70.0190.00519.68
7.4.60.0130.00918.60
7.4.50.0150.01018.63
7.4.40.0150.01419.76
7.4.30.0180.00619.70
7.4.20.0200.00619.75
7.4.10.0190.00819.67
7.4.00.0150.00717.99
7.3.330.0190.00217.99
7.3.320.0150.00518.08
7.3.310.0180.00119.53
7.3.300.0120.00719.56
7.3.290.0180.00519.61
7.3.280.0140.01018.48
7.3.270.0250.00722.96
7.3.260.0130.00817.79
7.3.250.0160.01222.96
7.3.240.0100.01017.77
7.3.230.0210.00519.63
7.3.220.0250.00722.96
7.3.210.0210.00519.80
7.3.200.0100.01319.66
7.3.190.0190.00719.56
7.3.180.0150.00818.61
7.3.170.0120.01619.65
7.3.160.0150.00819.62
7.3.150.0220.00319.70
7.3.140.0220.00719.74
7.3.130.0220.00619.74
7.3.120.0190.00319.48
7.3.110.0190.00519.66
7.3.100.0220.00719.72
7.3.90.0180.00919.59
7.3.80.0190.00919.61
7.3.70.0170.01019.56
7.3.60.0150.01019.68
7.3.50.0200.00719.64
7.3.40.0210.00719.51
7.3.30.0200.00819.70
7.3.20.0230.00519.55
7.3.10.0200.00819.66
7.3.00.0140.00919.68
7.2.340.0210.00622.96
7.2.330.0170.00519.75
7.2.320.0200.00519.83
7.2.310.0200.00919.74
7.2.300.0200.00719.83
7.2.290.0160.01219.72
7.2.280.0140.01319.65
7.2.270.0190.00419.82
7.2.260.0150.00819.67
7.2.250.0210.00719.75
7.2.240.0190.00719.81
7.2.230.0190.00919.81
7.2.220.0180.01119.77
7.2.210.0250.00519.86
7.2.200.0260.00819.72
7.2.190.0120.01019.79
7.2.180.0130.01019.67
7.2.170.0140.00819.75
7.2.160.0130.00919.66
7.2.150.0330.00419.83
7.2.140.0210.00619.79
7.2.130.0160.00819.72
7.2.120.0150.00818.06
7.2.110.0230.00718.07
7.2.100.0300.00617.95
7.2.90.0130.00818.10
7.2.80.0250.00818.03
7.2.70.0280.01018.24
7.2.60.0260.00918.12
7.2.50.0180.00718.09
7.2.40.0250.00818.13
7.2.30.0180.00618.19
7.2.20.0140.01018.08
7.2.10.0300.00718.14
7.2.00.0340.00418.13
7.1.330.0270.00519.31
7.1.320.0250.00919.27
7.1.310.0210.01419.27
7.1.300.0270.00719.27
7.1.290.0210.00619.21
7.1.280.0230.00919.25
7.1.270.0190.00719.25
7.1.260.0250.00819.25
7.1.250.0230.00719.21
7.1.240.0370.00717.42
7.1.230.0300.00617.46
7.1.220.0270.00617.49
7.1.210.0170.00617.49
7.1.200.0300.00517.49
7.1.190.0330.01017.51
7.1.180.0260.00817.40
7.1.170.0240.01017.50
7.1.160.0150.01117.33
7.1.150.0270.00917.49
7.1.140.0240.00717.43
7.1.130.0310.00717.52
7.1.120.0280.00517.45
7.1.110.0190.00617.47
7.1.100.0240.00517.56
7.1.90.0190.00817.45
7.1.80.0230.00317.43
7.1.70.0270.00617.35
7.1.60.0270.00317.41
7.1.50.0290.00717.38
7.1.40.0310.00717.42
7.1.30.0190.00717.37
7.1.20.0220.00817.38
7.1.10.0280.00717.44
7.1.00.0360.00417.40
7.0.330.0150.00919.03
7.0.320.0240.00419.06
7.0.310.0160.00819.11
7.0.300.0240.00919.01
7.0.290.0190.00819.04
7.0.280.0260.00619.07
7.0.270.0260.00419.10
7.0.260.0250.00819.03
7.0.250.0260.00319.15
7.0.240.0220.00819.07
7.0.230.0210.00619.07
7.0.220.0200.01019.10
7.0.210.0200.00719.05
7.0.200.0210.00719.11
7.0.190.0190.00719.11
7.0.180.0220.00619.07
7.0.170.0230.00619.12
7.0.160.0170.00919.00
7.0.150.0210.00519.09
7.0.140.0160.01119.06
7.0.130.0180.00819.13
7.0.120.0270.00019.12
7.0.110.0220.00419.10
7.0.100.0180.00718.95
7.0.90.0180.00919.00
7.0.80.0220.00219.01
7.0.70.0140.01019.11
7.0.60.0160.00418.96
7.0.50.0240.00019.10
7.0.40.0210.00519.01
7.0.30.0140.00618.97
7.0.20.0140.01018.75
7.0.10.0170.00919.09
7.0.00.0170.00918.99
5.6.400.0180.00819.41
5.6.390.0180.00619.46
5.6.380.0110.01417.85
5.6.370.0260.00819.47
5.6.360.0210.00619.46
5.6.350.0190.01019.53
5.6.340.0230.00719.43
5.6.330.0180.00819.50
5.6.320.0190.00819.45
5.6.310.0180.00919.45
5.6.300.0200.00619.47
5.6.290.0160.01119.52
5.6.280.0180.00919.44
5.6.270.0170.00919.55
5.6.260.0180.01019.37
5.6.250.0170.00919.42
5.6.240.0190.00719.39
5.6.230.0180.00719.46
5.6.220.0190.00619.39
5.6.210.0190.00519.48
5.6.200.0190.00719.47
5.6.190.0140.01019.38
5.6.180.0180.00819.42
5.6.170.0140.01119.43
5.6.160.0210.00619.41
5.6.150.0160.00719.34
5.6.140.0180.00719.32
5.6.130.0200.00619.45
5.6.120.0160.00819.33
5.6.110.0170.00719.35
5.6.100.0230.00619.46
5.6.90.0160.01119.39
5.6.80.0190.00919.20
5.6.70.0210.00719.46
5.6.60.0180.01019.32
5.6.50.0200.00819.45
5.6.40.0130.01119.52
5.6.30.0130.00919.39
5.6.20.0190.00619.34
5.6.10.0160.00819.30
5.6.00.0080.01319.25

preferences:
30.21 ms | 403 KiB | 5 Q