3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mostlyUpperInString($s, $threshold) { return preg_match_all("/\p{Lu}/u", $s) / mb_strlen($s) > $threshold; } function moreUpperThanLower($s, $threshold) { return preg_match_all("/\p{Lu}/u", $s) / preg_match_all("/\P{Lu}/u", $s) > $threshold; } $strings = [ "THE 15 SMALL BROWN FOXES JUMP INTO THE BURNING barn!", "The 15 Small Brown Foxes JUMP Into the Burning Barn!" ]; foreach ($strings as $str) { echo $str . " -> 80% mostlyUpperInString: ". (mostlyUpperInString($str, 0.8) ? "true" : "false") . PHP_EOL; echo $str . " -> 80% moreUpperThanLower: ". (moreUpperThanLower($str, 0.8) ? "true" : "false") . PHP_EOL; echo PHP_EOL; }

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.4.130.0100.01118.08
8.4.120.0090.00720.55
8.4.110.0130.00722.27
8.4.100.0130.00818.00
8.4.90.0120.00718.86
8.4.80.0140.00618.08
8.4.70.0130.00818.05
8.4.60.0130.00818.93
8.4.50.0100.01119.90
8.4.40.0100.01019.68
8.4.30.0100.01020.55
8.4.20.0150.00618.32
8.4.10.0160.00017.93
8.3.260.0030.00616.78
8.3.250.0120.00718.68
8.3.240.0170.00317.07
8.3.230.0070.01316.99
8.3.220.0130.00417.13
8.3.210.0120.00616.91
8.3.200.0040.00516.66
8.3.190.0130.00617.33
8.3.180.0140.00518.78
8.3.170.0040.01418.89
8.3.160.0120.00818.89
8.3.150.0000.01420.68
8.3.140.0090.00916.98
8.3.130.0080.00018.61
8.3.120.0060.01119.02
8.3.110.0050.00317.00
8.3.100.0030.00624.06
8.3.90.0030.00626.77
8.3.80.0060.00316.89
8.3.70.0200.00016.86
8.3.60.0040.01416.63
8.3.50.0110.00718.54
8.3.40.0070.00719.18
8.3.30.0090.00619.21
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0000.00826.16
8.2.290.0090.01120.23
8.2.280.0050.00218.73
8.2.270.0040.00417.38
8.2.260.0060.00320.18
8.2.250.0180.00416.75
8.2.240.0050.00517.47
8.2.230.0060.00320.94
8.2.220.0070.00337.54
8.2.210.0120.00626.77
8.2.200.0090.00016.63
8.2.190.0100.01016.58
8.2.180.0080.00825.92
8.2.170.0060.00919.04
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.73
8.2.110.0180.00421.16
8.2.100.0150.00518.28
8.2.90.0030.00618.00
8.2.80.0030.00519.08
8.2.70.0030.00617.88
8.2.60.0050.00317.92
8.2.50.0050.00518.07
8.2.40.0060.00318.22
8.2.30.0040.00418.07
8.2.20.0000.00720.34
8.2.10.0000.00817.89
8.2.00.0000.00819.40
8.1.330.0110.00721.95
8.1.320.0110.00916.46
8.1.310.0110.00416.93
8.1.300.0060.00318.67
8.1.290.0090.00030.84
8.1.280.0080.00625.92
8.1.270.0050.00323.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00322.00
8.1.230.0070.00421.00
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0060.00317.48
8.1.190.0040.00417.48
8.1.180.0000.00818.10
8.1.170.0080.00018.61
8.1.160.0000.00718.98
8.1.150.0070.00018.92
8.1.140.0000.00717.62
8.1.130.0030.00318.98
8.1.120.0030.00417.65
8.1.110.0040.00417.66
8.1.100.0000.01117.61
8.1.90.0040.00417.52
8.1.80.0000.00817.61
8.1.70.0070.00017.68
8.1.60.0040.00417.70
8.1.50.0000.00917.77
8.1.40.0050.00317.75
8.1.30.0030.00517.78
8.1.20.0120.00617.85
8.1.10.0240.00017.70
8.1.00.0240.00317.64
8.0.300.0000.00818.77
8.0.290.0050.00217.00
8.0.280.0090.00020.23
8.0.270.0050.00218.30
8.0.260.0000.00718.60
8.0.250.0000.00817.11
8.0.240.0030.00617.18
8.0.230.0070.00017.14
8.0.220.0000.00717.27
8.0.210.0040.00317.16
8.0.200.0080.00017.26
8.0.190.0040.00417.24
8.0.180.0000.00717.09
8.0.170.0000.00817.10
8.0.160.0090.00917.12
8.0.150.0100.01017.09
8.0.140.0160.00317.05
8.0.130.0090.00916.94
8.0.120.0160.00417.13
8.0.110.0130.00517.24
8.0.100.0140.00517.18
8.0.90.0140.00617.19
8.0.80.0140.00717.15
8.0.70.0160.00317.18
8.0.60.0160.00417.11
8.0.50.0120.00717.27
8.0.30.0160.00317.12
8.0.20.0190.00017.12
8.0.10.0140.00717.04
7.4.330.0000.00515.55
7.4.320.0040.00416.87
7.4.300.0040.00416.79
7.4.290.0000.00816.74
7.4.280.0000.00716.86
7.4.270.0180.00416.72
7.4.260.0120.00816.65
7.4.250.0190.00316.86
7.4.240.0230.00016.79
7.4.230.0110.00816.88
7.4.220.0140.00616.75
7.4.210.0120.00816.76
7.4.200.0160.00416.77
7.4.190.0150.00416.84
7.4.180.0160.00316.81
7.4.160.0120.00616.79
7.4.150.0190.00016.76
7.4.140.0160.00316.75
7.4.130.0100.00716.66
7.4.120.0120.00616.70
7.4.110.0120.00616.83
7.4.100.0130.00516.80
7.4.90.0130.00416.81
7.4.80.0110.00716.78
7.4.70.0160.00416.75
7.4.60.0120.00516.75
7.4.50.0160.00316.70
7.4.40.0110.00816.71
7.4.30.0160.00016.67
7.4.20.0140.00916.61
7.4.10.0110.00516.63
7.4.00.0040.00916.67

preferences:
26.75 ms | 403 KiB | 5 Q