3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function foo(bool $x): string { if ($x) echo 'yes'; echo 'no'; } foo(true); // TypeError

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.01118.30
8.3.60.0030.01418.40
8.3.50.0160.00321.99
8.3.40.0120.00318.71
8.3.30.0110.00318.44
8.3.20.0040.00420.18
8.3.10.0050.00318.60
8.3.00.0030.00620.34
8.2.190.0110.00416.63
8.2.180.0170.00318.23
8.2.170.0100.00722.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0060.00319.25
8.2.120.0070.00026.35
8.2.110.0030.00622.25
8.2.100.0080.00417.63
8.2.90.0030.00519.16
8.2.80.0030.00617.97
8.2.70.0000.00817.75
8.2.60.0080.00018.04
8.2.50.0040.00418.09
8.2.40.0030.00520.42
8.2.30.0040.00421.23
8.2.20.0050.00317.60
8.2.10.0040.00417.95
8.2.00.0040.00417.86
8.1.280.0040.01125.92
8.1.270.0040.00423.97
8.1.260.0050.00328.09
8.1.250.0070.00028.09
8.1.240.0030.00722.50
8.1.230.0040.00721.03
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0050.00517.23
8.1.190.0000.00817.11
8.1.180.0030.00518.10
8.1.170.0000.00818.51
8.1.160.0000.00720.75
8.1.150.0030.00418.66
8.1.140.0000.00819.48
8.1.130.0070.00017.55
8.1.120.0040.00417.32
8.1.110.0080.00017.27
8.1.100.0000.00717.21
8.1.90.0030.00517.35
8.1.80.0040.00417.22
8.1.70.0000.00717.21
8.1.60.0000.00817.53
8.1.50.0000.00817.49
8.1.40.0000.00817.45
8.1.30.0030.00517.54
8.1.20.0000.00817.61
8.1.10.0000.00717.50
8.1.00.0040.00417.42
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0030.00318.37
8.0.270.0070.00017.23
8.0.260.0030.00317.26
8.0.250.0030.00316.89
8.0.240.0030.00316.94
8.0.230.0040.00416.94
8.0.220.0000.00716.92
8.0.210.0000.00816.77
8.0.200.0060.00016.83
8.0.190.0000.00916.83
8.0.180.0000.00716.94
8.0.170.0040.00416.95
8.0.160.0000.00716.85
8.0.150.0080.00016.91
8.0.140.0040.00416.63
8.0.130.0050.00013.33
8.0.120.0000.00916.84
8.0.110.0030.00516.79
8.0.100.0040.00416.94
8.0.90.0030.00416.79
8.0.80.0120.00916.85
8.0.70.0040.00416.94
8.0.60.0000.00716.74
8.0.50.0070.00016.89
8.0.30.0060.01217.14
8.0.20.0170.00717.40
8.0.10.0000.00817.05
8.0.00.0120.00816.71
7.4.330.0020.00216.84
7.4.320.0000.00716.42
7.4.300.0030.00316.48
7.4.290.0030.00316.41
7.4.280.0080.00016.42
7.4.270.0050.00216.52
7.4.260.0070.00016.55
7.4.250.0040.00416.40
7.4.240.0030.00316.43
7.4.230.0070.00016.51
7.4.220.0120.00616.61
7.4.210.0070.00716.55
7.4.200.0030.00316.53
7.4.160.0080.00816.45
7.4.150.0090.00817.40
7.4.140.0090.01017.86
7.4.130.0130.00616.50
7.4.120.0080.01216.34
7.4.110.0110.00616.34
7.4.100.0120.00616.56
7.4.90.0090.00916.47
7.4.80.0030.01919.39
7.4.70.0100.00716.42
7.4.60.0160.00316.43
7.4.50.0030.01016.32
7.4.40.0090.00616.54
7.4.30.0160.00616.58
7.4.00.0060.01114.84
7.3.330.0000.00513.38
7.3.320.0000.00513.14
7.3.310.0030.00316.46
7.3.300.0030.00316.24
7.3.290.0050.00916.31
7.3.280.0040.01216.32
7.3.270.0060.01017.40
7.3.260.0040.01216.29
7.3.250.0060.01216.41
7.3.240.0160.00516.35
7.3.230.0170.00016.48
7.3.210.0130.00316.34
7.3.200.0030.01519.39
7.3.190.0160.00016.51
7.3.180.0120.00316.39
7.3.170.0090.00916.46
7.3.160.0130.00716.58
7.3.120.0060.01214.85
7.3.110.0090.00614.98
7.3.100.0110.00714.75
7.3.90.0030.01014.84
7.3.80.0030.00914.55
7.3.70.0060.00614.82
7.3.60.0070.00714.91
7.3.50.0000.01314.80
7.3.40.0000.00914.85
7.3.30.0070.00714.52
7.3.20.0030.01316.54
7.3.10.0050.00716.55
7.3.00.0030.01116.47
7.2.330.0070.01116.72
7.2.320.0120.00616.61
7.2.310.0060.01216.37
7.2.300.0060.01416.66
7.2.290.0090.00616.39
7.2.250.0130.00714.93
7.2.240.0000.02114.93
7.2.230.0000.01615.02
7.2.220.0040.01115.13
7.2.210.0060.01115.04
7.2.200.0040.01114.83
7.2.190.0090.00314.61
7.2.180.0070.01014.70
7.2.170.0080.00415.00
7.2.160.0070.01014.91
7.2.150.0090.00616.98
7.2.140.0030.00716.58
7.2.130.0080.00616.86
7.2.120.0020.01116.71
7.2.110.0050.00716.81
7.2.100.0060.00816.72
7.2.90.0040.01116.77
7.2.80.0050.01016.72
7.2.70.0060.00916.78
7.2.60.0030.01016.83
7.2.50.0050.00816.79
7.2.40.0050.00816.70
7.2.30.0050.01016.77
7.2.20.0060.00716.73
7.2.10.0060.00516.66
7.2.00.0080.00717.37
7.1.330.0060.01315.87
7.1.320.0060.00315.61
7.1.310.0030.01015.55
7.1.300.0000.01015.72
7.1.290.0060.01015.80
7.1.280.0090.00315.55
7.1.270.0030.01215.44
7.1.260.0000.01015.72
7.1.250.0060.00715.61
7.1.240.0040.00915.81
7.1.230.0050.00615.56
7.1.220.0000.01015.70
7.1.210.0030.00815.68
7.1.200.0040.00715.67
7.1.190.0040.00915.74
7.1.180.0050.00515.59
7.1.170.0020.00915.59
7.1.160.0030.01015.67
7.1.150.0090.00915.71
7.1.140.0030.00815.75
7.1.130.0060.00415.77
7.1.120.0020.00615.86
7.1.110.0110.00515.65
7.1.100.0320.01215.77
7.1.90.0060.00815.81
7.1.80.0050.00815.68
7.1.70.0050.00816.13
7.1.60.0050.01017.16
7.1.50.0070.00716.17
7.1.40.0070.00515.56
7.1.30.0040.00815.62
7.1.20.0030.01015.74
7.1.10.0000.01015.54
7.1.00.0070.02718.00
7.0.330.0060.00415.34
7.0.320.0090.00215.11
7.0.310.0050.00815.24
7.0.300.0070.00415.29
7.0.290.0060.00815.53
7.0.280.0030.00815.27
7.0.270.0040.00515.20
7.0.260.0050.00815.26
7.0.250.0050.00815.47
7.0.240.0100.00215.31
7.0.230.0030.00815.48
7.0.220.0030.01015.26
7.0.210.0030.00915.37
7.0.200.0080.00815.29
7.0.190.0060.00615.42
7.0.180.0070.00515.33
7.0.170.0020.00815.22
7.0.160.0030.00615.57
7.0.150.0080.00315.45
7.0.140.0090.00415.28
7.0.130.0020.01015.40
7.0.120.0070.00415.31
7.0.110.0070.00715.44
7.0.100.0020.00815.42
7.0.90.0010.01015.35
7.0.80.0030.01115.36
7.0.70.0060.00515.18
7.0.60.0130.02116.80
7.0.50.0080.01816.33
7.0.40.0070.01815.86
7.0.30.0150.01715.71
7.0.20.0110.02915.83
7.0.10.0020.03115.79
7.0.00.0110.02215.62
5.6.400.0040.00814.29
5.6.390.0040.00814.09
5.6.380.0030.00814.21
5.6.370.0040.00813.98
5.6.360.0000.01114.15
5.6.350.0050.00614.07
5.6.340.0030.00714.31
5.6.330.0050.01014.01
5.6.320.0030.01214.17
5.6.310.0060.00814.10
5.6.300.0080.00414.07
5.6.290.0040.00614.04
5.6.280.0040.02916.38
5.6.270.0080.00914.09
5.6.260.0050.01114.20
5.6.250.0070.00614.11
5.6.240.0070.00614.34
5.6.230.0020.01113.99
5.6.220.0070.00813.93
5.6.210.0040.03416.22
5.6.200.0050.02415.53
5.6.190.0080.03216.22
5.6.180.0170.02716.26
5.6.170.0120.03116.27
5.6.160.0040.02616.18
5.6.150.0050.02115.58
5.6.140.0050.02015.45
5.6.130.0030.02015.49
5.6.120.0080.03116.44
5.6.110.0070.01916.26
5.6.100.0060.01916.36
5.6.90.0050.02716.43
5.6.80.0060.03216.18
5.6.70.0070.00314.01
5.6.60.0050.00813.96
5.6.50.0050.00514.11
5.6.40.0040.00914.08
5.6.30.0050.00713.96
5.6.20.0030.00814.07
5.6.10.0070.00514.11
5.6.00.0050.00714.12
5.5.380.0050.00812.72
5.5.370.0000.01312.97
5.5.360.0030.00912.86
5.5.350.1450.01715.34
5.5.340.0040.03114.52
5.5.330.0070.03015.22
5.5.320.0090.02015.37
5.5.310.0090.02115.41
5.5.300.0040.02314.57
5.5.290.0080.02814.60
5.5.280.0020.03115.54
5.5.270.0060.02315.45
5.5.260.0070.02015.43
5.5.250.0030.03015.37
5.5.240.0130.02815.26
5.5.230.0090.00412.82
5.5.220.0050.00612.82
5.5.210.0060.00612.74
5.5.200.0030.00912.80
5.5.190.0070.00512.84
5.5.180.0060.00512.75
5.5.170.0090.00112.84
5.5.160.0050.00612.86
5.5.150.0030.00912.72
5.5.140.0080.00412.88
5.5.130.0020.00712.73
5.5.120.0090.00312.73
5.5.110.0050.00512.74
5.5.100.0010.00912.87
5.5.90.0060.00612.84
5.5.80.0070.00512.94
5.5.70.0020.00812.76
5.5.60.0050.00312.70
5.5.50.0060.00512.83
5.5.40.0050.00512.71
5.5.30.0070.00312.70
5.5.20.0060.00412.79
5.5.10.0020.00912.71
5.5.00.0040.00812.90

preferences:
18.89 ms | 401 KiB | 5 Q