3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputs = ['7', '54', '3', 'foo']; foreach ($inputs as $input) { echo "\n---\n$input >>> "; $sanitized = min(max((int)$input, 5), 50); var_dump($sanitized); }

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.0080.00818.43
8.3.50.0170.00317.98
8.3.40.0070.01518.72
8.3.30.0140.00018.71
8.3.20.0040.00420.35
8.3.10.0070.00022.00
8.3.00.0070.00022.51
8.2.180.0090.00918.06
8.2.170.0130.00322.96
8.2.160.0070.01022.14
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00619.46
8.2.110.0000.00920.93
8.2.100.0080.00419.55
8.2.90.0030.00617.78
8.2.80.0060.00318.04
8.2.70.0060.00317.80
8.2.60.0040.00418.16
8.2.50.0000.00818.10
8.2.40.0080.00020.92
8.2.30.0040.00419.31
8.2.20.0000.00718.08
8.2.10.0040.00419.45
8.2.00.0040.00419.29
8.1.280.0150.00025.92
8.1.270.0080.00023.87
8.1.260.0040.00426.35
8.1.250.0100.00328.09
8.1.240.0030.00623.82
8.1.230.0080.00322.75
8.1.220.0040.00417.74
8.1.210.0080.00018.97
8.1.200.0050.00517.22
8.1.190.0050.00317.00
8.1.180.0040.00418.10
8.1.170.0040.00418.43
8.1.160.0040.00418.99
8.1.150.0000.00718.79
8.1.140.0000.00720.27
8.1.130.0040.00420.07
8.1.120.0000.00717.50
8.1.110.0040.00417.48
8.1.100.0040.00417.33
8.1.90.0020.00517.34
8.1.80.0040.00417.45
8.1.70.0100.00017.33
8.1.60.0040.00417.63
8.1.50.0040.00417.41
8.1.40.0060.00317.57
8.1.30.0040.00417.58
8.1.20.0040.00417.58
8.1.10.0000.00817.48
8.1.00.0030.00617.36
8.0.300.0000.00719.84
8.0.290.0080.00016.75
8.0.280.0070.00018.42
8.0.270.0000.00717.25
8.0.260.0000.00720.07
8.0.250.0070.00016.83
8.0.240.0030.00616.93
8.0.230.0070.00016.86
8.0.220.0030.00316.80
8.0.210.0000.00816.72
8.0.200.0000.00716.98
8.0.190.0040.00416.81
8.0.180.0050.00216.81
8.0.170.0040.00816.77
8.0.160.0000.00716.88
8.0.150.0070.00016.81
8.0.140.0030.00616.84
8.0.130.0000.00513.34
8.0.120.0000.00716.86
8.0.110.0040.00416.93
8.0.100.0040.00416.92
8.0.90.0000.00816.82
8.0.80.0090.01216.90
8.0.70.0070.00016.75
8.0.60.0050.00316.76
8.0.50.0040.00416.82
8.0.30.0090.00917.41
8.0.20.0110.00716.96
8.0.10.0000.00716.86
8.0.00.0110.00716.91
7.4.330.0050.00015.55
7.4.320.0030.00316.60
7.4.300.0000.00616.50
7.4.290.0070.00016.50
7.4.280.0040.00416.59
7.4.270.0030.00316.55
7.4.260.0030.00313.25
7.4.250.0050.00216.46
7.4.240.0040.00416.49
7.4.230.0050.00216.67
7.4.220.0000.00716.48
7.4.210.0040.01416.54
7.4.200.0040.00416.52
7.4.130.0090.01316.50
7.4.120.0110.00716.43
7.4.110.0100.00916.54
7.4.100.0140.00416.49
7.4.90.0080.00816.59
7.4.80.0060.01319.39
7.4.70.0030.01216.64
7.4.60.0030.01416.41
7.4.50.0040.01116.13
7.4.40.0160.00016.61
7.4.00.0080.00815.10
7.3.330.0040.00416.26
7.3.320.0030.00313.16
7.3.310.0030.00316.39
7.3.300.0030.00316.31
7.3.290.0030.00316.25
7.3.280.0060.00916.29
7.3.260.0080.01016.35
7.3.240.0080.01016.43
7.3.230.0060.01216.28
7.3.210.0150.00316.52
7.3.200.0080.00816.39
7.3.190.0060.00916.36
7.3.180.0100.00716.49
7.3.170.0070.01416.35
7.3.160.0060.01216.29
7.3.100.0090.00614.87
7.3.90.0070.01014.88
7.3.80.0140.00014.91
7.3.70.0030.01014.53
7.3.60.0110.00414.87
7.3.50.0060.00914.60
7.3.40.0030.01014.86
7.3.30.0060.00914.73
7.3.20.0000.01916.64
7.3.10.0100.00316.66
7.3.00.0130.00516.47
7.2.330.0100.01016.48
7.2.320.0200.00316.65
7.2.310.0160.00316.86
7.2.300.0120.00616.56
7.2.290.0100.00716.76
7.2.230.0070.00715.03
7.2.220.0110.00314.80
7.2.210.0110.00615.00
7.2.200.0080.00814.97
7.2.190.0130.00315.16
7.2.180.0070.00714.95
7.2.170.0060.00915.08
7.2.160.0170.00614.91
7.2.150.0130.00716.81
7.2.140.0070.00816.83
7.2.130.0110.00716.97
7.2.120.0120.00616.62
7.2.110.0030.01316.82
7.2.100.0090.00916.58
7.2.90.0090.01216.94
7.2.80.0140.00416.88
7.2.70.0030.01417.05
7.2.60.0060.00916.93
7.2.50.0120.00616.77
7.2.40.0120.01016.80
7.2.30.0030.01417.05
7.2.20.0030.01516.76
7.2.10.0070.01016.87
7.2.00.0120.00616.84
7.1.320.0080.00515.80
7.1.310.0160.00315.86
7.1.300.0070.00715.88
7.1.290.0000.01315.80
7.1.280.0030.01015.62
7.1.270.0060.01215.83
7.1.260.0040.01115.97
7.1.250.0100.00315.66

preferences:
86.93 ms | 400 KiB | 5 Q