3v4l.org

run code in 300+ PHP versions simultaneously
<?php function betweenScope($num, $min, $max) { //$num = ($num > $max) ? $max : ((!$num < $min) ?: $min); if ($num > $max) { return $num; } else { if (!$num < $min) { return $num; } else { return $min; } } } echo betweenScope(21, 0, 5); echo betweenScope(3, 0, 5); echo betweenScope(-10, 0, 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.60.0090.00918.27
8.3.50.0110.01121.21
8.3.40.0080.00618.67
8.3.30.0070.00720.35
8.3.20.0070.00020.34
8.3.10.0070.00022.09
8.3.00.0050.00222.39
8.2.180.0110.01116.63
8.2.170.0110.00322.96
8.2.160.0030.01020.52
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0080.00019.54
8.2.110.0000.00920.40
8.2.100.0080.00317.59
8.2.90.0040.00419.38
8.2.80.0000.00918.70
8.2.70.0040.00417.50
8.2.60.0040.00417.80
8.2.50.0080.00018.07
8.2.40.0000.00918.05
8.2.30.0000.00718.01
8.2.20.0070.00017.71
8.2.10.0050.00317.56
8.2.00.0050.00217.63
8.1.280.0070.01025.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00422.08
8.1.230.0070.00323.86
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0030.00617.22
8.1.190.0040.00417.22
8.1.180.0000.00818.10
8.1.170.0000.00818.69
8.1.160.0040.00418.74
8.1.150.0050.00318.63
8.1.140.0060.00317.39
8.1.130.0070.00017.76
8.1.120.0000.00717.41
8.1.110.0080.00017.28
8.1.100.0070.00017.33
8.1.90.0080.00017.29
8.1.80.0000.00817.40
8.1.70.0040.00417.32
8.1.60.0000.00817.53
8.1.50.0040.00417.42
8.1.40.0080.00017.33
8.1.30.0070.00017.54
8.1.20.0040.00417.52
8.1.10.0050.00317.38
8.1.00.0000.00817.26
8.0.300.0000.00718.77
8.0.290.0030.00616.75
8.0.280.0000.00718.39
8.0.270.0080.00017.16
8.0.260.0000.00716.70
8.0.250.0040.00416.92
8.0.240.0030.00616.91
8.0.230.0040.00416.88
8.0.220.0000.00716.73
8.0.210.0030.00316.81
8.0.200.0060.00016.95
8.0.190.0070.00016.92
8.0.180.0020.00516.92
8.0.170.0030.00616.87
8.0.160.0030.00316.87
8.0.150.0050.00216.82
8.0.140.0000.00716.75
8.0.130.0060.00013.19
8.0.120.0020.00516.68
8.0.110.0050.00316.81
8.0.100.0070.00016.72
8.0.90.0000.00716.80
8.0.80.0120.00616.83
8.0.70.0000.00716.84
8.0.60.0060.00316.84
8.0.50.0070.00016.71
8.0.30.0130.00817.07
8.0.20.0080.01117.40
8.0.10.0040.00416.90
8.0.00.0070.01216.63
7.4.330.0050.00015.00
7.4.320.0000.00616.53
7.4.300.0060.00016.44
7.4.290.0000.00716.45
7.4.280.0000.00616.53
7.4.270.0040.00416.55
7.4.260.0000.00716.54
7.4.250.0030.00316.38
7.4.240.0000.00716.41
7.4.230.0000.00816.57
7.4.220.0080.00816.45
7.4.210.0020.01216.53
7.4.200.0000.00816.65
7.4.190.0050.00216.33
7.4.160.0120.00316.54
7.4.150.0140.00717.40
7.4.140.0130.00517.86
7.4.130.0130.00616.48
7.4.120.0130.00716.49
7.4.110.0130.01016.53
7.4.100.0100.00716.45
7.4.90.0090.01216.43
7.4.80.0140.00419.39
7.4.70.0120.00916.52
7.4.60.0080.00816.38
7.4.50.0000.00516.61
7.4.40.0060.00622.77
7.4.30.0060.01216.27
7.4.00.0090.00715.02
7.3.330.0000.00613.39
7.3.320.0000.00513.21
7.3.310.0030.00316.47
7.3.300.0040.00416.25
7.3.290.0120.00316.42
7.3.280.0050.01316.33
7.3.270.0080.00817.40
7.3.260.0080.01216.57
7.3.250.0070.01116.28
7.3.240.0060.01216.36
7.3.230.0070.01016.58
7.3.210.0070.01016.67
7.3.200.0060.01319.39
7.3.190.0110.01116.63
7.3.180.0070.01016.45
7.3.170.0060.01016.39
7.3.160.0040.01216.36
7.3.120.0060.00914.99
7.3.110.0050.01314.86
7.3.100.0080.00614.69
7.3.90.0050.00714.85
7.3.80.0070.00614.65
7.3.70.0020.01114.94
7.3.60.0080.00214.80
7.3.50.0050.00714.87
7.3.40.0020.01414.73
7.3.30.0000.01214.85
7.3.20.0050.01016.73
7.3.10.0040.01016.61
7.3.00.0070.00716.61
7.2.330.0100.01016.71
7.2.320.0120.00516.63
7.2.310.0070.01416.71
7.2.300.0100.01016.64
7.2.290.0160.00016.66
7.2.250.0100.01014.94
7.2.240.0060.01014.98
7.2.230.0080.00715.12
7.2.220.0070.00714.69
7.2.210.0080.00815.06
7.2.200.0020.01115.04
7.2.190.0060.00814.90
7.2.180.0070.00714.99
7.2.170.0050.00614.94
7.2.60.0130.00617.00
7.1.330.0080.00815.60
7.1.320.0070.00615.80
7.1.310.0020.01115.94
7.1.300.0050.00715.72
7.1.290.0050.01015.78
7.1.280.0060.00615.65
7.1.270.0050.00815.81
7.1.260.0020.01015.77
7.1.200.0060.00915.72
7.1.70.0040.00417.27
7.1.60.0110.01119.21
7.1.50.0040.01916.63
7.1.00.0070.05022.36
7.0.200.0170.00714.47
7.0.140.0100.06321.93
7.0.60.0030.09319.96
7.0.50.0130.06717.86
7.0.40.0030.05320.38
7.0.30.0330.06320.20
7.0.20.0230.08320.30
7.0.10.0370.06720.12
7.0.00.0070.06720.06
5.6.280.0030.07321.13
5.6.210.0000.07720.63
5.6.200.0200.07018.23
5.6.190.0030.08320.56
5.6.180.0230.08720.63
5.6.170.0230.06020.44
5.6.160.0070.05020.45
5.6.150.0030.07718.15
5.6.140.0070.03718.18
5.6.130.0130.07018.16
5.6.120.0130.04321.09
5.6.110.0070.04021.00
5.6.100.0100.08321.05
5.6.90.0070.08321.00
5.6.80.0070.08020.39
5.6.70.0230.06720.38
5.5.350.0100.07720.42
5.5.340.0030.04318.00
5.5.330.0030.09020.30
5.5.320.0270.08020.31
5.5.310.0330.06720.36
5.5.300.0070.05717.98
5.5.290.0030.04318.03
5.5.280.0200.07320.64
5.5.270.0070.08320.68
5.5.260.0000.04320.96
5.5.250.0070.06320.61
5.5.240.0070.08020.13
5.4.450.0730.06319.45
5.4.440.0700.07019.17
5.4.430.0570.06019.70
5.4.420.0770.04319.33
5.4.410.0900.05019.30
5.4.400.0400.04318.76
5.4.390.0530.05318.45
5.4.380.0230.05018.50
5.4.370.0170.05018.75
5.4.360.0130.04718.52
5.4.350.0070.03812.02
5.4.340.0110.04012.02
5.4.320.0060.04412.51
5.4.310.0100.04112.50
5.4.300.0080.03612.51
5.4.290.0060.03712.50
5.4.280.0060.03512.40
5.4.270.0080.04112.39
5.4.260.0080.03512.40
5.4.250.0030.08018.80
5.4.240.0130.07318.97
5.4.230.0170.04719.00
5.4.220.0130.07018.66
5.4.210.0300.05319.01
5.4.200.0170.06018.96
5.4.190.0100.05718.77
5.4.180.0070.05318.91
5.4.170.0000.05719.02
5.4.160.0070.05318.94
5.4.150.0100.04718.82
5.4.140.0130.05016.39
5.4.130.0100.04316.29
5.4.120.0030.05016.53
5.4.110.0030.05316.34
5.4.100.0100.04316.48
5.4.90.0030.05316.38
5.4.80.0100.05016.61
5.4.70.0070.05316.37
5.4.60.0070.05016.60
5.4.50.0130.05716.53
5.4.40.0100.04716.52
5.4.30.0100.04316.30
5.4.20.0130.04716.39
5.4.10.0000.06016.38
5.4.00.0130.05716.04
5.3.290.0050.04312.80
5.3.280.0070.06014.58
5.3.270.0000.06014.59
5.3.260.0100.04714.77
5.3.250.0070.05014.69
5.3.240.0130.04714.68
5.3.230.0070.05014.75
5.3.220.0100.04714.55
5.3.210.0130.04714.65
5.3.200.0100.04714.70
5.3.190.0070.05014.64
5.3.180.0070.05314.72
5.3.170.0030.05014.62
5.3.160.0100.04714.71
5.3.150.0030.05314.52
5.3.140.0130.05714.64
5.3.130.0030.06014.62
5.3.120.0070.05314.56
5.3.110.0100.06014.62
5.3.100.0030.05314.02
5.3.90.0170.04014.00
5.3.80.0000.05713.92
5.3.70.0100.06314.10
5.3.60.0070.05314.01
5.3.50.0030.05313.92
5.3.40.0070.05014.02
5.3.30.0170.03714.07
5.3.20.0100.05013.71
5.3.10.0170.04313.86
5.3.00.0030.06013.80
5.2.170.0070.04311.05
5.2.160.0100.03311.23
5.2.150.0070.04011.21
5.2.140.0130.05011.20
5.2.130.0070.04311.07
5.2.120.0170.03011.07
5.2.110.0070.03710.93
5.2.100.0100.03311.32
5.2.90.0070.03711.07
5.2.80.0070.04311.27
5.2.70.0070.04311.07
5.2.60.0100.05710.96
5.2.50.0100.03711.21
5.2.40.0100.03711.08
5.2.30.0070.04011.14
5.2.20.0100.03311.02
5.2.10.0000.04310.86
5.2.00.0030.04010.80
5.1.60.0070.0309.96
5.1.50.0000.04310.20
5.1.40.0000.04010.07
5.1.30.0030.03310.41
5.1.20.0030.03710.35
5.1.10.0030.03710.25
5.1.00.0000.04010.16
5.0.50.0070.0238.78
5.0.40.0070.0238.49
5.0.30.0070.0408.46
5.0.20.0070.0238.41
5.0.10.0030.0278.41
5.0.00.0130.0338.41
4.4.90.0030.0238.41
4.4.80.0070.0278.41
4.4.70.0030.0238.41
4.4.60.0030.0208.41
4.4.50.0100.0138.41
4.4.40.0070.0308.41
4.4.30.0000.0308.41
4.4.20.0000.0238.41
4.4.10.0000.0238.41
4.4.00.0030.0338.41
4.3.110.0030.0308.41
4.3.100.0030.0208.41
4.3.90.0000.0208.41
4.3.80.0030.0338.41
4.3.70.0000.0208.41
4.3.60.0030.0208.41
4.3.50.0030.0208.41
4.3.40.0000.0338.41
4.3.30.0000.0238.41
4.3.20.0030.0208.41
4.3.10.0030.0208.41
4.3.00.0100.0236.61

preferences:
47.18 ms | 401 KiB | 5 Q