3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = 'test.'; // match print preg_match('/^'.$regex.'$/i', 'tests') ? 'match' : 'nomatch'; print PHP_EOL; // nomatch print preg_match('/^'.preg_quote($regex).'$/i', 'tests') ? 'match' : 'nomatch'; print PHP_EOL; // nomatch print preg_match('/^\Q'.$regex.'\E$/i', 'tests') ? 'match' : 'nomatch'; print 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.5.30.0060.00218.19
8.5.20.0100.00820.18
8.5.10.0100.00916.86
8.5.00.0120.01020.11
8.4.180.0130.00922.08
8.4.170.0120.00923.78
8.4.160.0090.01223.73
8.4.150.0090.00316.96
8.4.140.0140.00717.64
8.4.130.0070.00218.06
8.4.120.0140.00620.80
8.4.110.0080.01222.43
8.4.100.0140.00717.76
8.4.90.0120.00817.96
8.4.80.0150.01319.77
8.4.70.0170.01019.63
8.4.60.0420.00717.87
8.4.50.0230.00417.89
8.4.40.0440.00817.48
8.4.30.0440.00917.67
8.4.20.0240.00617.64
8.4.10.0260.00117.38
8.3.300.0100.01120.93
8.3.290.0140.00620.95
8.3.280.0140.00618.62
8.3.270.0110.00916.70
8.3.260.0120.00916.86
8.3.250.0120.00718.90
8.3.240.0130.00716.68
8.3.230.0110.00916.82
8.3.220.0090.00316.97
8.3.210.0100.00316.97
8.3.200.0320.00616.97
8.3.190.0170.00516.97
8.3.180.0260.00518.09
8.3.170.0200.00216.97
8.3.160.0220.00416.97
8.3.150.0240.00516.97
8.3.140.0220.00116.97
8.3.130.0270.00416.97
8.3.120.0240.00416.97
8.3.110.0160.00616.97
8.3.100.0330.00716.97
8.3.90.0230.00416.97
8.3.80.0230.00616.97
8.3.70.0240.00416.97
8.3.60.0200.00516.97
8.3.50.0210.00316.97
8.3.40.0180.00317.64
8.3.30.0300.00917.64
8.3.20.0330.00717.54
8.3.10.0340.00717.73
8.3.00.0140.00719.49
8.2.300.0100.00918.73
8.2.290.0120.00420.20
8.2.280.0180.00416.97
8.2.270.0270.00516.97
8.2.260.0220.01016.97
8.2.250.0330.01016.97
8.2.240.0320.00816.97
8.2.230.0340.00916.97
8.2.220.0320.00916.97
8.2.210.0360.00616.97
8.2.200.0310.00916.97
8.2.190.0280.01116.97
8.2.180.0300.00716.97
8.2.170.0360.00517.75
8.2.160.0350.00817.62
8.2.150.0390.01117.59
8.2.140.0230.00719.25
8.2.130.0160.00317.63
8.2.120.0290.00417.60
8.2.110.0230.00417.49
8.2.100.0180.00617.55
8.2.90.0180.00717.56
8.2.80.0160.00617.76
8.2.70.0200.00117.48
8.2.60.0170.00417.43
8.2.50.0170.00517.45
8.2.40.0180.00517.62
8.2.30.0250.00817.57
8.2.20.0190.00317.34
8.2.10.0170.00617.62
8.2.00.0170.00317.60
8.1.340.0130.00821.63

preferences:
62.18 ms | 846 KiB | 5 Q