3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'Bienvenue chez nous'; $result = match (true) { preg_match('/Welcome/', $text) || preg_match('/Hello/', $text) => 'en', preg_match('/Bienvenue/', $text) || preg_match('/Bonjour/', $text) => 'fr', default => 'other', }; var_dump($result); $result = match (true) { preg_match('/Welcome/', $text), preg_match('/Hello/', $text) => 'en', preg_match('/Bienvenue/', $text), preg_match('/Bonjour/', $text) => 'fr', default => 'other', }; var_dump($result);

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.10.0090.00916.70
8.5.00.0120.00919.96
8.4.160.0170.00823.88
8.4.150.0020.00014.05
8.4.140.0130.00817.77
8.4.130.0090.00318.08
8.4.120.0040.00520.63
8.4.110.0050.00422.63
8.4.100.0140.00717.98
8.4.90.0150.00718.84
8.4.80.0150.00519.84
8.4.70.0080.01219.89
8.4.60.0390.00717.63
8.4.50.0360.01017.95
8.4.40.0270.01017.73
8.4.30.0430.00917.48
8.4.20.0380.00917.80
8.4.10.0390.00717.47
8.3.280.0150.00618.62
8.3.270.0140.00616.55
8.3.260.0110.01016.71
8.3.250.0060.00218.77
8.3.240.0130.00616.73
8.3.230.0110.00816.97
8.3.220.0140.00516.80
8.3.210.0070.00816.91
8.3.200.0330.01016.60
8.3.190.0340.00816.61
8.3.180.0340.00916.60
8.3.170.0360.00816.44
8.3.160.0410.00716.71
8.3.150.0340.01216.51
8.3.140.0410.00816.54
8.3.130.0340.00716.53
8.3.120.0300.00716.74
8.3.110.0360.00916.52
8.3.100.0370.01016.48
8.3.90.0320.00816.62
8.3.80.0310.00816.63
8.3.70.0380.00816.73
8.3.60.0380.00916.34
8.3.50.0350.01116.39
8.3.40.0380.00817.67
8.3.30.0280.00717.44
8.3.20.0290.00917.56
8.3.10.0290.01017.76
8.3.00.0280.01017.68
8.2.290.0090.00820.47
8.2.280.0260.00916.74
8.2.270.0310.00916.49
8.2.260.0300.01116.51
8.2.250.0350.00616.36
8.2.240.0340.00716.40
8.2.230.0220.00816.49
8.2.220.0160.00616.46
8.2.210.0260.01116.46
8.2.200.0230.00816.55
8.2.190.0300.00716.46
8.2.180.0330.00716.61
8.2.170.0320.00917.77
8.2.160.0320.00617.70
8.2.150.0320.00717.72
8.2.140.0340.00717.36
8.2.130.0330.01017.60
8.2.120.0360.00817.66
8.2.110.0340.00417.65
8.2.100.0320.01017.64
8.2.90.0350.00617.68
8.2.80.0350.00717.71
8.2.70.0370.00517.70
8.2.60.0320.00917.64
8.2.50.0340.00817.68
8.2.40.0290.01017.71
8.2.30.0400.00917.29
8.2.20.0290.00917.61
8.2.10.0290.00717.51
8.2.00.0280.00817.50

preferences:
34.91 ms | 403 KiB | 5 Q