3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lookup = ['neither', 'upper', 'lower']; $tests = ['A', 'z', '+', '0', 'ǻ', 'Ͱ', '']; foreach ($tests as $test) { preg_match('~(\p{Lu})|(\p{Ll})|~u', $test, $out); printf("%s, %s\n", $test, $lookup[array_key_last($out)]); //printf("%s, %s\n", $test, $lookup[count($out) - 1]); }

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.5.00.0110.01020.22
8.4.150.0020.00014.05
8.4.140.0080.01318.00
8.4.130.0040.00518.05
8.4.120.0020.00620.77
8.4.110.0110.00922.57
8.4.100.0110.01119.03
8.4.90.0090.01118.99
8.4.80.0120.00818.64
8.4.70.0160.00318.30
8.4.60.0060.00618.87
8.4.50.0050.00520.48
8.4.40.0180.00317.85
8.4.30.0190.00020.46
8.4.20.0100.01020.77
8.4.10.0090.00619.57
8.3.280.0090.01218.86
8.3.270.0170.01416.70
8.3.260.0130.00616.70
8.3.250.0140.00518.74
8.3.240.0090.01117.32
8.3.230.0130.00816.72
8.3.220.0130.00518.89
8.3.210.0100.00716.95
8.3.200.0040.00516.89
8.3.190.0120.00717.16
8.3.180.0100.00817.08
8.3.170.0070.00719.04
8.3.160.0060.00317.30
8.3.150.0160.00319.14
8.3.140.0190.00018.80
8.3.130.0040.00418.49
8.3.120.0110.00020.80
8.3.110.0050.00320.94
8.3.100.0090.00018.70
8.3.90.0080.00026.77
8.3.80.0090.00018.55
8.3.70.0070.00718.43
8.3.60.0090.00617.04
8.3.50.0120.00917.02
8.3.40.0060.00821.90
8.3.30.0120.00822.96
8.3.20.0110.00822.96
8.3.10.0040.01522.96
8.3.00.0160.00322.96
8.2.290.0100.00620.58
8.2.280.0120.00818.74
8.2.270.0090.00617.40
8.2.260.0130.00616.58
8.2.250.0000.00818.82
8.2.240.0090.00317.14
8.2.230.0070.00322.58
8.2.220.0030.00624.06
8.2.210.0040.00426.77
8.2.200.0030.00718.31
8.2.190.0130.01017.13
8.2.180.0100.01016.75
8.2.170.0000.01422.96
8.2.160.0150.00422.96
8.2.150.0000.01922.96
8.2.140.0090.00922.96
8.2.130.0150.00322.96
8.2.120.0150.00422.96
8.2.110.0180.00022.96
8.2.100.0190.00022.96
8.2.90.0100.01022.96
8.2.80.0080.01122.96
8.2.70.0150.00622.96
8.2.60.0080.00822.96
8.2.50.0140.00022.96
8.2.40.0120.00322.96
8.2.30.0120.00322.96
8.2.20.0040.01122.96
8.2.10.0090.00622.96
8.2.00.0120.00322.96
8.1.330.0090.00921.76
8.1.320.0110.00916.30
8.1.310.0040.01516.60
8.1.300.0110.00820.16
8.1.290.0030.00630.84
8.1.280.0120.00925.92
8.1.270.0070.00722.96
8.1.260.0100.00323.76
8.1.250.0100.00324.01
8.1.240.0110.00422.96
8.1.230.0090.00622.96
8.1.220.0040.01122.96
8.1.210.0070.00722.96
8.1.200.0070.00722.96
8.1.190.0100.00322.96
8.1.180.0140.00022.96
8.1.170.0110.00322.96
8.1.160.0120.00322.96
8.1.150.0040.01122.96
8.1.140.0140.00022.96
8.1.130.0110.00422.96
8.1.120.0060.00922.96
8.1.110.0120.00322.96
8.1.100.0040.01122.96
8.1.90.0110.00422.96
8.1.80.0160.00022.96
8.1.70.0060.00922.96
8.1.60.0040.01122.96
8.1.50.0090.00622.96
8.1.40.0070.00722.96
8.1.30.0040.01122.96
8.1.20.0130.00322.96
8.1.10.0100.00622.96
8.1.00.0170.00022.96

preferences:
29.55 ms | 403 KiB | 5 Q