3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(ticks=1); function tick_handler() { echo "tick_handler() called\n"; } function inverse($x) {tick_handler(); if ($x=TRUE) {tick_handler(); throw new Exception('Division by zero.'); tick_handler(); } return 1/$x; tick_handler(); } try { echo inverse(5) . "\n"; echo inverse(TRUE) . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } ?>

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.0150.00018.55
8.3.50.0120.00521.91
8.3.40.0070.01419.09
8.3.30.0140.00319.23
8.3.20.0050.00220.16
8.3.10.0040.00423.44
8.3.00.0040.00422.32
8.2.180.0140.00418.30
8.2.170.0040.01122.96
8.2.160.0090.00522.03
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00019.36
8.2.110.0100.00719.21
8.2.100.0000.01317.84
8.2.90.0050.00319.23
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0040.00418.04
8.2.50.0030.00618.10
8.2.40.0050.00320.64
8.2.30.0000.01117.96
8.2.20.0040.00417.68
8.2.10.0070.00017.80
8.2.00.0040.00417.82
8.1.280.0110.00425.92
8.1.270.0090.00023.99
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00022.34
8.1.230.0120.00017.77
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0030.00517.23
8.1.180.0050.00318.10
8.1.170.0060.00318.78
8.1.160.0000.00722.01
8.1.150.0030.00618.65
8.1.140.0000.00817.51
8.1.130.0000.00717.82
8.1.120.0000.00717.31
8.1.110.0000.00817.50
8.1.100.0040.00417.50
8.1.90.0070.00017.45
8.1.80.0000.00717.49
8.1.70.0030.00317.33
8.1.60.0050.00317.57
8.1.50.0060.00317.42
8.1.40.0040.00417.51
8.1.30.0040.00417.65
8.1.20.0050.00317.56
8.1.10.0000.00817.64
8.1.00.0060.00317.51
8.0.300.0100.00018.77
8.0.290.0080.00016.88
8.0.280.0000.00718.49
8.0.270.0030.00317.25
8.0.260.0070.00016.87
8.0.250.0030.00317.08
8.0.240.0030.00617.05
8.0.230.0030.00316.96
8.0.220.0000.00716.85
8.0.210.0000.00716.82
8.0.200.0060.00016.99
8.0.190.0080.00016.86
8.0.180.0040.00416.93
8.0.170.0000.00716.87
8.0.160.0080.00016.94
8.0.150.0030.00316.88
8.0.140.0040.00416.97
8.0.130.0040.00413.38
8.0.120.0070.00016.92
8.0.110.0050.00316.89
8.0.100.0000.00716.75
8.0.90.0030.00416.75
8.0.80.0030.01216.96
8.0.70.0000.00816.81
8.0.60.0000.00716.98
8.0.50.0000.00716.94
8.0.30.0090.01417.36
8.0.20.0130.00417.40
8.0.10.0080.00016.97
8.0.00.0100.01016.69
7.4.330.0000.00515.01
7.4.320.0040.00416.59
7.4.300.0070.00016.50
7.4.290.0000.00716.50
7.4.280.0030.00316.39
7.4.270.0040.00716.52
7.4.260.0080.00016.58
7.4.250.0040.00416.38
7.4.240.0020.00516.50
7.4.230.0000.00716.40
7.4.220.0150.01216.57
7.4.210.0040.01016.56
7.4.200.0030.00316.61
7.4.190.0000.00716.36
7.4.160.0060.01016.39
7.4.150.0160.00817.40
7.4.140.0080.01117.86
7.4.130.0090.01016.51
7.4.120.0070.01116.47
7.4.110.0100.00716.62
7.4.100.0100.00716.77
7.4.90.0140.01016.69
7.4.80.0110.00816.50
7.4.70.0100.01316.73
7.4.60.0080.00816.32
7.4.50.0020.00216.43
7.4.40.0000.01722.77
7.4.30.0110.00716.44
7.4.00.0030.01315.06
7.3.330.0030.00313.34
7.3.320.0000.00513.23
7.3.310.0030.00316.39
7.3.300.0060.00016.30
7.3.290.0030.01016.37
7.3.280.0090.01016.30
7.3.270.0080.00817.40
7.3.260.0110.00816.43
7.3.250.0120.00716.38
7.3.240.0070.01016.29
7.3.230.0040.01516.39
7.3.210.0030.01616.45
7.3.200.0090.00919.39
7.3.190.0120.00616.45
7.3.180.0070.01016.21
7.3.170.0120.00316.28
7.3.160.0130.00316.51
7.3.120.0030.01315.00
7.3.110.0060.00914.88
7.3.100.0060.00614.80
7.3.90.0030.01014.62
7.3.80.0060.01014.82
7.3.70.0070.01014.88
7.3.60.0030.01314.51
7.3.50.0090.00614.45
7.3.40.0090.00614.79
7.3.30.0100.00714.87
7.3.20.0030.01416.66
7.3.10.0030.01216.60
7.3.00.0030.00716.45
7.2.330.0100.00716.67
7.2.320.0060.01316.68
7.2.310.0090.00916.80
7.2.300.0080.00816.64
7.2.290.0170.00016.68
7.2.240.0090.00615.07
7.2.230.0070.00715.17
7.2.220.0030.01014.90
7.2.210.0000.01515.12
7.2.200.0090.00614.98
7.2.190.0090.00615.03
7.2.180.0000.01214.93
7.2.170.0030.00614.79
7.2.160.0030.00714.85
7.2.150.0060.00616.71
7.2.140.0060.00916.79
7.2.130.0040.01117.06
7.2.120.0100.00616.88
7.2.110.0000.01616.72
7.2.100.0030.01316.95
7.2.90.0060.00916.65
7.2.80.0090.00616.97
7.2.70.0070.00416.80
7.2.60.0080.00916.88
7.2.50.0130.00316.82
7.2.40.0070.00716.91
7.2.30.0120.00417.07
7.2.20.0000.01717.01
7.2.10.0030.00716.93
7.2.00.0140.00316.89
7.1.330.0030.01415.80
7.1.320.0040.01115.71
7.1.310.0000.00815.63
7.1.300.0060.00315.70
7.1.290.0090.00615.74
7.1.280.0070.00715.68
7.1.270.0180.00015.66
7.1.260.0000.01415.41
7.1.250.0030.00615.91
7.1.200.0030.01015.75
7.1.100.0030.01017.68
7.1.70.0030.01616.84
7.1.60.0150.00919.24
7.1.50.0030.01716.61
7.1.00.0000.08022.41
7.0.200.0040.00816.69
7.0.140.0000.07721.97
7.0.60.0130.07719.93
7.0.50.0130.06317.89
7.0.40.0100.04320.19
7.0.30.0330.05320.17
7.0.20.0200.06020.05
7.0.10.0200.08720.19
7.0.00.0000.09320.16
5.6.280.0070.07020.82
5.6.210.0200.07020.73
5.6.200.0000.08318.16
5.6.190.0070.08720.79
5.6.180.0030.06720.57
5.6.170.0230.06320.52
5.6.160.0070.09320.54
5.6.150.0070.03718.14
5.6.140.0070.05018.11
5.6.130.0100.08018.28
5.6.120.0070.03721.18
5.6.110.0170.07321.12
5.6.100.0130.08021.05
5.6.90.0070.08021.07
5.6.80.0070.07720.36
5.6.70.3930.04720.37
5.5.350.0030.08020.44
5.5.340.0070.08317.98
5.5.330.0030.05320.56
5.5.320.0030.08320.42
5.5.310.0270.07320.26
5.5.300.0000.06718.00
5.5.290.0030.08718.02
5.5.280.0100.03320.88
5.5.270.0070.08320.88
5.5.260.0100.04320.86
5.5.250.0100.06020.70
5.5.240.0130.04320.19
5.4.450.0170.05019.32
5.4.440.0430.04719.64
5.4.430.0370.03719.43
5.4.420.0230.04319.54
5.4.410.0070.06718.95
5.4.400.0070.06318.54
5.4.390.0070.05718.76
5.4.380.0170.05318.73
5.4.370.0130.06018.47
5.4.360.0270.05718.80
5.4.350.0370.04718.81
5.4.340.0230.05718.75
5.4.320.0060.03712.50
5.4.310.0090.03912.50
5.4.300.0050.03612.50
5.4.290.0050.03812.50
5.4.280.0080.03712.40
5.4.270.0060.03812.40
5.4.260.0020.04412.39
5.4.250.0050.03912.39
5.4.240.0040.03812.39
5.4.230.0060.04312.39
5.4.220.0100.04012.39
5.4.210.0090.03912.39
5.4.200.0120.03412.39
5.4.190.0270.06512.38
5.4.180.0150.04512.38
5.4.170.0190.04212.39
5.4.160.0140.04512.39
5.4.150.0130.04712.38
5.4.140.0140.04412.07
5.4.130.0130.04412.05
5.4.120.0130.04412.01
5.4.110.0150.04112.01
5.4.100.0130.04512.01
5.4.90.0170.04612.00
5.4.80.0120.04612.01
5.4.70.0130.04512.00
5.4.60.0130.04412.00
5.4.50.0160.04112.00
5.4.40.0130.04311.99
5.4.30.0150.04311.98
5.4.20.0150.04211.99
5.4.10.0140.04211.98
5.4.00.0290.05911.47
5.3.290.0050.04512.80
5.3.280.0030.04412.71
5.3.270.0170.04712.72
5.3.260.0130.04712.72
5.3.250.0160.04612.72
5.3.240.0140.04512.72
5.3.230.0140.04912.71
5.3.220.0190.04312.68
5.3.210.0110.04912.68
5.3.200.0130.04612.68
5.3.190.0250.06812.68
5.3.180.0210.04012.67
5.3.170.0170.04312.67
5.3.160.0260.06412.67
5.3.150.0140.04712.67
5.3.140.0170.04812.66
5.3.130.0150.04512.66
5.3.120.0140.04512.66
5.3.110.0160.04512.66
5.3.100.0130.04812.13
5.3.90.0170.04212.11
5.3.80.0220.03912.09
5.3.70.0100.05112.10
5.3.60.0150.04512.08
5.3.50.0180.04112.03
5.3.40.0120.04712.03
5.3.30.0200.03812.00
5.3.20.0120.04611.77
5.3.10.0160.04011.74
5.3.00.0100.04711.71
5.2.170.0140.0359.22
5.2.160.0210.0569.22
5.2.150.0120.0359.22
5.2.140.0120.0369.22
5.2.130.0150.0319.18
5.2.120.0090.0379.18
5.2.110.0100.0419.18
5.2.100.0110.0379.19
5.2.90.0130.0339.19
5.2.80.0110.0379.18
5.2.70.0110.0379.18
5.2.60.0150.0619.12
5.2.50.0110.0359.09
5.2.40.0130.0359.07
5.2.30.0140.0339.05
5.2.20.0100.0389.05
5.2.10.0150.0318.95
5.2.00.0150.0328.80
5.1.60.0110.0288.09
5.1.50.0090.0318.09
5.1.40.0270.0738.07
5.1.30.0120.0308.41
5.1.20.0110.0308.44
5.1.10.0170.0258.16
5.1.00.0150.0288.17
5.0.50.0060.0296.64
5.0.40.0100.0216.50
5.0.30.0080.0376.31
5.0.20.0090.0226.29
5.0.10.0130.0186.26
5.0.00.0090.0356.25
4.4.90.0070.0174.78
4.4.80.0070.0174.75
4.4.70.0070.0184.75
4.4.60.0050.0214.76
4.4.50.0080.0164.77
4.4.40.0200.0464.71
4.4.30.0080.0184.76
4.4.20.0060.0194.84
4.4.10.0110.0164.85
4.4.00.0040.0334.75
4.3.110.0080.0164.67
4.3.100.0070.0174.67
4.3.90.0080.0154.63
4.3.80.0070.0274.59
4.3.70.0060.0184.63
4.3.60.0070.0164.63
4.3.50.0070.0174.62
4.3.40.0130.0504.54
4.3.30.0060.0173.30
4.3.20.0060.0173.29
4.3.10.0060.0183.25
4.3.00.0000.01313.38

preferences:
45.87 ms | 401 KiB | 5 Q