3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ ')(8234@#$ABCFG3478&* hello', // mix '456456', // numeric 'ghijkl', // alphabetic '!@#$%^&*(', // non-alphanumeric ]; foreach ($strings as $string) { var_export( [ 'string' => $string, 'firstAlphaNumeric1' => preg_match('/[a-z0-9]/i', $string, $match) ? $match[0] : null, 'firstAlphaNumeric2' => $string[strcspn($string, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')] ?? null, 'firstAlphaNumeric3' => $string[strcspn($string, 'A..Zabcdefghijklmnopqrstuvwxyz0123456789')] ?? null, ] ); echo "\n"; }

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.30.0090.00917.48
8.5.20.0100.00717.94
8.5.10.0120.00616.90
8.5.00.0130.00820.45
8.4.180.0160.00619.87
8.4.170.0100.01319.79
8.4.160.0120.01019.81
8.4.150.0100.00316.99
8.4.140.0070.01317.77
8.4.130.0120.00818.72
8.4.120.0140.00520.51
8.4.110.0050.00422.55
8.4.100.0120.01018.73
8.4.90.0110.00918.67
8.4.80.0040.00419.66
8.4.70.0090.01018.25
8.4.60.0100.00918.94
8.4.50.0100.01018.25
8.4.40.0080.00018.15
8.4.30.0110.00420.47
8.4.20.0070.00319.80
8.4.10.0060.00321.44
8.3.300.0040.00620.69
8.3.290.0130.00718.57
8.3.280.0170.00518.73
8.3.270.0120.00616.98
8.3.260.0120.00816.86
8.3.250.0060.00417.27
8.3.240.0110.00916.73
8.3.230.0050.00416.61
8.3.220.0130.00518.84
8.3.210.0050.00316.85
8.3.200.0060.00216.70
8.3.190.0120.00916.73
8.3.180.0060.01416.98
8.3.170.0040.00417.11
8.3.160.0120.00620.67
8.3.150.0100.01018.88
8.3.140.0090.00616.59
8.3.130.0080.00416.95
8.3.120.0060.00319.21
8.3.110.0030.00617.05
8.3.100.0000.00818.84
8.3.90.0030.00826.77
8.3.80.0070.00319.36
8.3.70.0040.01118.37
8.3.60.0120.00916.63
8.3.50.0170.00024.57
8.3.40.0110.00421.98
8.3.30.0070.00718.80
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.300.0100.01118.28
8.2.290.0140.00620.55
8.2.280.0100.00918.43
8.2.270.0100.01020.70
8.2.260.0110.00318.92
8.2.250.0070.01018.54
8.2.240.0180.00018.59
8.2.230.0050.00320.94
8.2.220.0080.00024.06
8.2.210.0040.00426.77
8.2.200.0030.01018.88
8.2.190.0140.00716.67
8.2.180.0110.00325.92
8.2.170.0030.01119.22
8.2.160.0110.00322.96
8.2.150.0030.00525.66
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0040.00421.04
8.2.110.0080.00321.06
8.2.100.0070.00319.40
8.2.90.0040.00420.64
8.2.80.0000.00820.41
8.2.70.0000.00818.05
8.2.60.0030.00618.16
8.2.50.0080.00018.10
8.2.40.0040.00421.02
8.2.30.0040.00419.22
8.2.20.0080.00018.09
8.2.10.0030.00519.21
8.2.00.0040.00419.30
8.1.340.0130.00717.69
8.1.330.0090.01022.07
8.1.320.0030.00616.29
8.1.310.0050.00517.05
8.1.300.0110.00416.45
8.1.290.0070.00330.84
8.1.280.0070.01025.92
8.1.270.0060.00323.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0000.00822.05
8.1.230.0040.00820.97
8.1.220.0040.00417.79
8.1.210.0030.00618.99
8.1.200.0060.00317.48
8.1.190.0060.00317.25
8.1.180.0040.00418.10
8.1.170.0000.00818.64
8.1.160.0040.00418.93
8.1.150.0040.00418.91
8.1.140.0000.00818.96
8.1.130.0000.00720.05
8.1.120.0040.00417.63
8.1.110.0000.00817.63
8.1.100.0040.00417.62
8.1.90.0040.00417.63
8.1.80.0040.00417.58
8.1.70.0070.00017.52
8.1.60.0030.00617.76
8.1.50.0030.00517.59
8.1.40.0000.00817.72
8.1.30.0000.00717.86
8.1.20.0000.00817.71
8.1.10.0050.00217.64
8.1.00.0040.00417.72
8.0.300.0070.00020.03
8.0.290.0040.00417.00
8.0.280.0030.00318.43
8.0.270.0050.00218.16
8.0.260.0060.00018.61
8.0.250.0030.00317.01
8.0.240.0040.00417.01
8.0.230.0070.00017.11
8.0.220.0000.00817.05
8.0.210.0000.00716.95
8.0.200.0000.00817.13
8.0.190.0090.00017.10
8.0.180.0040.00417.07
8.0.170.0030.00617.07
8.0.160.0040.00417.11
8.0.150.0070.00016.88
8.0.140.0000.00716.88
8.0.130.0000.00613.52
8.0.120.0040.00417.03
8.0.110.0000.00717.00
8.0.100.0030.00617.05
8.0.90.0050.00217.00
8.0.80.0100.00817.04
8.0.70.0040.00417.00
8.0.60.0040.00416.91
8.0.50.0060.00317.13
8.0.30.0130.00317.20
8.0.20.0060.01517.09
8.0.10.0040.00417.03
8.0.00.0070.01117.10
7.4.330.0000.00515.55
7.4.320.0070.00016.66
7.4.300.0000.00716.82
7.4.290.0030.00516.62
7.4.280.0030.00616.70
7.4.270.0060.00316.88
7.4.260.0050.00313.47
7.4.250.0040.00416.79
7.4.240.0040.00416.68
7.4.230.0000.00716.71
7.4.220.0020.00516.84
7.4.210.0050.01216.83
7.4.200.0030.00316.82
7.4.130.0110.00716.43
7.4.120.0100.01016.38
7.4.110.0060.01316.81
7.4.100.0040.01517.01
7.4.90.0070.01316.48
7.4.80.0170.00716.69
7.4.70.0110.00916.66
7.4.60.0090.01516.78
7.4.50.0090.00916.78
7.4.40.0120.00716.73
7.4.30.0150.00916.84
7.4.20.0130.00716.60
7.4.10.0140.00516.64
7.4.00.0120.00916.85
7.3.330.0000.00716.59
7.3.320.0030.00313.32
7.3.310.0000.00716.36
7.3.300.0070.00016.48
7.3.290.0000.00816.44
7.3.260.0100.01016.57
7.3.250.0100.01016.76
7.3.240.0090.00916.36
7.3.230.0150.00316.43
7.3.220.0200.00416.31
7.3.210.0140.00916.34
7.3.200.0160.00716.74
7.3.190.0120.01216.48
7.3.180.0030.01616.29
7.3.170.0070.01116.44
7.3.160.0160.00616.49
7.3.150.0110.01116.68
7.3.140.0060.01316.59
7.3.130.0190.00316.65
7.3.120.0100.01316.64
7.3.110.0060.01216.66
7.3.100.0120.00916.71
7.3.90.0170.00716.58
7.3.80.0120.01316.57
7.3.70.0070.01716.48
7.3.60.0140.01016.57
7.3.50.0210.00416.58
7.3.40.0120.01216.52
7.3.30.0070.01716.55
7.3.20.0150.00916.53
7.3.10.0100.01416.71
7.3.00.0090.01216.58

preferences:
53.34 ms | 1468 KiB | 5 Q