3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function test(string $num) : int { return (int) $num; } echo test('5');

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.70.0070.00718.18
8.3.60.0110.00416.50
8.3.50.0080.01122.02
8.3.40.0070.00718.77
8.3.30.0150.00418.86
8.3.20.0050.00320.16
8.3.10.0070.00023.48
8.3.00.0000.00819.79
8.2.180.0090.00616.32
8.2.170.0070.00722.96
8.2.160.0000.01420.38
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0110.00021.03
8.2.120.0050.00326.35
8.2.110.0090.01220.39
8.2.100.0080.00317.80
8.2.90.0000.00819.03
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0030.00517.93
8.2.50.0040.00418.07
8.2.40.0000.00822.08
8.2.30.0000.00720.54
8.2.20.0020.00517.65
8.2.10.0000.00717.89
8.2.00.0000.00717.79
8.1.280.0070.01025.92
8.1.270.0090.00620.33
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0080.00417.70
8.1.220.0000.00717.74
8.1.210.0000.00918.77
8.1.200.0030.00617.23
8.1.190.0050.00317.10
8.1.180.0060.00318.10
8.1.170.0050.00318.58
8.1.160.0040.00420.63
8.1.150.0040.00418.71
8.1.140.0040.00419.51
8.1.130.0030.00317.48
8.1.120.0060.00317.31
8.1.110.0000.00717.19
8.1.100.0040.00417.23
8.1.90.0040.00417.33
8.1.80.0080.00017.20
8.1.70.0000.00717.32
8.1.60.0000.00817.55
8.1.50.0030.00617.34
8.1.40.0040.00417.44
8.1.30.0120.00017.57
8.1.20.0000.00717.60
8.1.10.0000.00717.50
8.1.00.0040.00417.48
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0040.00418.47
8.0.270.0000.00817.21
8.0.260.0030.00317.24
8.0.250.0030.00316.87
8.0.240.0050.00216.89
8.0.230.0040.00716.82
8.0.220.0040.00416.70
8.0.210.0000.00816.79
8.0.200.0000.00616.89
8.0.190.0030.00816.90
8.0.180.0030.00416.77
8.0.170.0050.00316.80
8.0.160.0030.00316.87
8.0.150.0070.00016.75
8.0.140.0000.00716.80
8.0.130.0050.00013.22
8.0.120.0020.00516.80
8.0.110.0070.00016.83
8.0.100.0040.00416.80
8.0.90.0030.00316.70
8.0.80.0100.00616.81
8.0.70.0030.00416.72
8.0.60.0030.00616.86
8.0.50.0000.00716.88
8.0.30.0090.00717.05
8.0.20.0100.01017.40
8.0.10.0000.00716.94
8.0.00.0070.01016.72
7.4.330.0030.00316.67
7.4.320.0060.00016.42
7.4.300.0070.00016.52
7.4.290.0100.00016.44
7.4.280.0000.00816.41
7.4.270.0000.00616.45
7.4.260.0080.00016.34
7.4.250.0000.00816.49
7.4.240.0020.00516.50
7.4.230.0040.00416.51
7.4.220.0090.00916.51
7.4.210.0090.01016.34
7.4.200.0000.00716.55
7.4.160.0090.00616.27
7.4.150.0060.01217.40
7.4.140.0120.01117.86
7.4.130.0080.01016.47
7.4.120.0090.00916.41
7.4.110.0100.01316.41
7.4.100.0100.00716.60
7.4.90.0110.00616.35
7.4.80.0060.01219.39
7.4.70.0060.01616.27
7.4.60.0090.00616.48
7.4.50.0040.01416.47
7.4.40.0140.00316.21
7.4.30.0070.01616.65
7.4.00.0060.01114.80
7.3.330.0080.00013.11
7.3.320.0050.00013.30
7.3.310.0000.00716.27
7.3.300.0070.00016.30
7.3.290.0060.01016.29
7.3.280.0060.01116.27
7.3.270.0110.00717.40
7.3.260.0070.01016.41
7.3.250.0080.01416.38
7.3.240.0080.01016.41
7.3.230.0100.00716.42
7.3.210.0080.00816.44
7.3.200.0090.00616.37
7.3.190.0130.00316.52
7.3.180.0070.01016.48
7.3.170.0060.01216.42
7.3.160.0080.00816.51
7.3.120.0090.00914.68
7.3.110.0060.01014.86
7.3.100.0050.00814.93
7.3.90.0150.00414.71
7.3.80.0000.01415.11
7.3.70.0030.01614.54
7.3.60.0040.00814.98
7.3.50.0030.01014.77
7.3.40.0070.00314.77
7.3.30.0060.00314.52
7.3.20.0030.01016.67
7.3.10.0040.01216.84
7.3.00.0030.01016.69
7.2.330.0100.00716.43
7.2.320.0090.00616.67
7.2.310.0110.00916.71
7.2.300.0130.00316.43
7.2.290.0100.00616.73
7.2.250.0060.00815.03
7.2.240.0080.01114.85
7.2.230.0040.01114.90
7.2.220.0060.01214.78
7.2.210.0070.01315.02
7.2.200.0060.00614.78
7.2.190.0110.00014.93
7.2.180.0040.01115.00
7.2.170.0040.00814.89
7.2.60.0040.01116.71
7.2.00.0040.01119.53
7.1.330.0000.01615.64
7.1.320.0060.00615.65
7.1.310.0100.01015.76
7.1.300.0060.00615.65
7.1.290.0030.01015.39
7.1.280.0030.00715.70
7.1.270.0040.01115.73
7.1.260.0000.01315.42
7.1.200.0040.00415.67
7.1.100.0030.00618.04
7.1.70.0040.00416.89
7.1.60.0070.01119.13
7.1.50.0130.00917.02
7.1.00.0070.07322.37
7.0.200.0660.00314.80
7.0.60.0000.08019.81
7.0.50.0070.07717.85
7.0.40.0200.08020.11
7.0.30.0470.07020.06
7.0.20.0230.06020.16
7.0.10.0130.07720.16
7.0.00.0130.06020.32
5.6.280.0130.06020.79
5.6.210.0130.08320.48
5.6.200.0030.08318.21
5.6.190.0130.04320.58
5.6.180.0200.05020.50
5.6.170.0300.07320.56
5.6.160.0030.04020.57
5.6.150.0030.04018.18
5.6.140.0030.08018.25
5.6.130.0030.07718.11
5.6.120.0030.04720.99
5.6.110.0030.05721.15
5.6.100.0100.08020.98
5.6.90.0070.07021.13
5.6.80.0130.07020.29
5.5.350.0070.04020.35
5.5.340.0030.07717.98
5.5.330.0070.05020.14
5.5.320.0570.06320.44
5.5.310.0200.05020.34
5.5.300.0100.08017.98
5.5.290.0030.05017.92
5.5.280.0100.07320.84
5.5.270.0170.07020.96
5.5.260.0030.04320.96
5.5.250.0100.07720.58
5.5.240.0170.07720.26

preferences:
63.91 ms | 401 KiB | 5 Q