3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'my_name_is_John_Doe', 'my_name_is john doe', 'my_name_is_john_doe', 'i_am_20_years_old', "i'm_cool!" ]; foreach ($strings as $string) { echo json_encode([ $string, !strlen(ltrim($string, 'a..z_')), !preg_match('/[a-z_]*[^a-z_]/', $string) ]); echo "\n\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.3.130.0060.00318.62
8.3.120.0000.00818.82
8.3.110.0000.00820.94
8.3.100.0030.00624.06
8.3.90.0060.00326.77
8.3.80.0000.00918.43
8.3.70.0070.01118.43
8.3.60.0040.01118.31
8.3.50.0070.01420.21
8.3.40.0090.00618.98
8.3.30.0040.01119.25
8.3.20.0050.00224.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.250.0080.00816.83
8.2.240.0000.00919.23
8.2.230.0160.00322.58
8.2.220.0070.01137.54
8.2.210.0040.00426.77
8.2.200.0050.00516.75
8.2.190.0110.00316.75
8.2.180.0100.00625.92
8.2.170.0140.00019.03
8.2.160.0120.00322.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0040.00426.16
8.2.110.0060.00320.43
8.2.100.0080.00417.85
8.2.90.0040.00418.00
8.2.80.0030.00517.97
8.2.70.0000.00817.75
8.2.60.0050.00317.88
8.2.50.0080.00017.98
8.2.40.0040.00418.16
8.2.30.0000.00718.23
8.2.20.0020.00522.14
8.2.10.0050.00218.04
8.2.00.0000.00719.30
8.1.300.0050.00320.37
8.1.290.0060.00330.84
8.1.280.0100.01025.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00619.34
8.1.230.0070.00422.75
8.1.220.0080.00017.76
8.1.210.0040.00418.77
8.1.200.0030.00717.48
8.1.190.0090.00317.48
8.1.180.0030.00518.10
8.1.170.0000.00817.62
8.1.160.0040.00418.79
8.1.150.0040.00418.86
8.1.140.0090.00017.64
8.1.130.0030.00318.80
8.1.120.0050.00217.51
8.1.110.0020.00517.51
8.1.100.0050.00217.61
8.1.90.0080.00017.53
8.1.80.0070.00317.50
8.1.70.0000.00717.56
8.1.60.0000.00817.61
8.1.50.0040.00417.72
8.1.40.0040.00417.68
8.1.30.0080.00717.67
8.1.20.0180.00617.78
8.1.10.0210.00317.61
8.1.00.0180.00617.63
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.38
8.0.270.0070.00016.97
8.0.260.0000.00618.33
8.0.250.0030.00317.11
8.0.240.0040.00417.04
8.0.230.0030.00317.03
8.0.220.0000.00717.05
8.0.210.0030.00616.92
8.0.200.0030.00317.03
8.0.190.0000.00816.96
8.0.180.0040.00417.09
8.0.170.0090.00016.89
8.0.160.0160.00316.92
8.0.150.0120.00816.83
8.0.140.0140.00516.82
8.0.130.0140.00616.98
8.0.120.0160.00416.93
8.0.110.0110.00916.99
8.0.100.0040.00816.85
8.0.90.0100.00016.97
8.0.80.0180.00017.08
8.0.70.0160.00316.81
8.0.60.0150.00416.86
8.0.50.0140.00616.98
8.0.30.0130.00717.00
8.0.20.0140.00517.00
8.0.10.0130.00817.03
7.4.330.0040.00015.55
7.4.320.0000.00616.70
7.4.300.0090.00016.63
7.4.290.0000.00716.64
7.4.280.0190.00416.61
7.4.270.0160.00616.59
7.4.260.0150.00816.67
7.4.250.0170.00716.56
7.4.240.0230.00516.73
7.4.230.0180.00616.69
7.4.220.0140.00716.75
7.4.210.0160.00316.78
7.4.200.0220.00316.59
7.4.190.0170.00316.82
7.4.180.0160.00516.73
7.4.160.0140.00716.70
7.4.150.0180.00216.71
7.4.140.0070.00316.73
7.4.130.0080.00316.67
7.4.120.0100.00016.55
7.4.110.0040.00816.59
7.4.100.0070.00516.75
7.4.90.0100.00316.67
7.4.80.0070.00716.71
7.4.70.0130.00016.73
7.4.60.0140.00016.49
7.4.50.0060.00616.56
7.4.40.0060.00616.62
7.4.30.0130.00316.63
7.4.20.0100.00316.66
7.4.10.0030.00816.46
7.4.00.0110.00016.57

preferences:
27.3 ms | 403 KiB | 5 Q