3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Il n'y a pas d'accent, devait être correct \n"; $pattern = '/^[A-Za-z0-9-_\.]*$/'; $string = 'Il-etait-une-fois-9-canards'.PHP_EOL; printf(" Résultat: %s\n", preg_match($pattern, $string) ? 'Correct!' : 'Oups; incorrect') ; echo "Cette fois il y a un accent, incorrect \n"; $pattern = '/^[A-Za-z0-9-_\.]*$/'; $string = 'Il-était-une-fois-9-canards'; printf(" Résultat: %s\n", preg_match($pattern, $string) ? 'Correct!' : 'Oups; incorrect') ;

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.4.130.0130.00717.86
8.4.120.0110.01022.32
8.4.110.0140.00818.88
8.4.100.0110.00917.81
8.4.90.0120.00818.07
8.4.80.0060.00218.02
8.4.70.0110.01017.90
8.4.60.0150.00718.09
8.4.50.0080.00418.64
8.4.40.0170.00317.92
8.4.30.0140.00620.31
8.4.20.0030.00718.21
8.4.10.0100.01019.80
8.3.260.0100.00916.74
8.3.250.0040.00418.75
8.3.240.0100.00816.95
8.3.230.0110.00916.65
8.3.220.0110.00717.17
8.3.210.0090.00916.70
8.3.200.0050.00718.62
8.3.190.0100.01016.85
8.3.180.0070.00618.79
8.3.170.0130.00617.48
8.3.160.0040.00416.43
8.3.150.0090.00916.78
8.3.140.0040.00416.64
8.3.130.0080.00618.51
8.3.120.0080.00018.67
8.3.110.0060.01220.94
8.3.100.0030.00724.06
8.3.90.0090.00526.77
8.3.80.0120.00016.50
8.3.70.0120.00618.55
8.3.60.0110.00416.63
8.3.50.0150.00524.52
8.3.40.0040.01118.83
8.3.30.0060.00918.84
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.290.0090.01020.20
8.2.280.0100.00916.68
8.2.270.0160.00316.52
8.2.260.0000.01517.03
8.2.250.0070.01416.76
8.2.240.0030.00618.86
8.2.230.0040.00422.58
8.2.220.0050.00537.54
8.2.210.0130.00326.77
8.2.200.0090.00316.88
8.2.190.0110.00718.29
8.2.180.0090.00925.92
8.2.170.0100.01018.94
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0000.00826.35
8.2.110.0100.00719.32
8.2.100.0080.00417.84
8.2.90.0060.00319.21
8.2.80.0050.00517.97
8.2.70.0060.00317.75
8.2.60.0080.00018.05
8.2.50.0060.00318.07
8.2.40.0040.00418.34
8.2.30.0000.00718.13
8.2.20.0000.00818.11
8.2.10.0040.00419.24
8.2.00.0000.00719.07
8.1.330.0110.00816.77
8.1.320.0100.00516.32
8.1.310.0120.00618.37
8.1.300.0030.01318.12
8.1.290.0030.00618.88
8.1.280.0070.01125.92
8.1.270.0030.00523.96
8.1.260.0070.00028.09
8.1.250.0050.00328.09
8.1.240.0100.00022.20
8.1.230.0050.00518.86
8.1.220.0030.00617.74
8.1.210.0050.00318.77
8.1.200.0050.00517.36
8.1.190.0030.00617.35
8.1.180.0030.00518.10
8.1.170.0030.00518.63
8.1.160.0000.00718.89
8.1.150.0040.00418.83
8.1.140.0040.00420.54
8.1.130.0030.00317.51
8.1.120.0070.00017.55
8.1.110.0040.00417.45
8.1.100.0000.00817.41
8.1.90.0080.00017.54
8.1.80.0040.00417.53
8.1.70.0030.00317.52
8.1.60.0040.00417.58
8.1.50.0040.00417.48
8.1.40.0030.00517.60
8.1.30.0000.00817.63
8.1.20.0060.00617.61
8.1.10.0070.00317.66
8.1.00.0080.00417.59
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.38
8.0.270.0050.00218.18
8.0.260.0000.00716.90
8.0.250.0040.00416.93
8.0.240.0000.00617.00
8.0.230.0070.00016.97
8.0.220.0000.00717.00
8.0.210.0000.00716.94
8.0.200.0050.00316.91
8.0.190.0040.00417.01
8.0.180.0070.00016.95
8.0.170.0030.00616.94
8.0.160.0040.00416.90
8.0.150.0040.00416.89
8.0.140.0040.00416.80
8.0.130.0000.00513.44
8.0.120.0000.00716.96
8.0.110.0000.00816.88
8.0.100.0070.00016.79
8.0.90.0070.00016.99
8.0.80.0110.00616.89
8.0.70.0000.00816.84
8.0.60.0000.00817.00
8.0.50.0040.00416.78
8.0.30.0090.01517.36
8.0.20.0170.00616.94
8.0.10.0070.01316.86
8.0.00.0110.01017.00
7.4.330.0000.00415.55
7.4.320.0030.00316.71
7.4.300.0040.00416.74
7.4.290.0000.00916.65
7.4.280.0050.00316.52
7.4.270.0000.00716.63
7.4.260.0030.00313.40
7.4.250.0000.00716.75
7.4.240.0050.00216.64
7.4.230.0000.00716.86
7.4.220.0030.00316.44
7.4.210.0070.01016.61
7.4.200.0050.00316.56
7.4.150.0150.00716.61
7.4.140.0110.00716.75
7.4.130.0090.00916.63
7.4.120.0120.00616.55
7.4.110.0110.00716.65
7.4.100.0130.00716.56
7.4.90.0070.01116.63
7.4.80.0090.00916.62
7.4.70.0060.01016.55
7.4.60.0100.00716.75
7.4.50.0060.01316.75
7.4.40.0120.00916.52
7.4.30.0160.00316.32
7.4.20.0100.00616.56
7.4.10.0070.01016.48
7.4.00.0120.00916.79
7.3.330.0050.00316.17
7.3.320.0030.00313.21
7.3.310.0040.00416.24
7.3.300.0060.00016.32
7.3.290.0050.01116.26
7.3.270.0100.00916.30
7.3.260.0040.02216.66
7.3.250.0070.01116.35
7.3.240.0090.00916.64
7.3.230.0150.00416.63
7.3.220.0080.01016.47
7.3.210.0140.00316.75
7.3.200.0080.00816.29
7.3.190.0080.00816.43
7.3.180.0110.00716.37
7.3.170.0100.01616.34
7.3.160.0150.00316.32
7.3.150.0030.01416.38
7.3.140.0100.00616.29
7.3.130.0080.00816.44
7.3.120.0110.00716.37
7.3.110.0130.01016.27
7.3.100.0150.00916.19
7.3.90.0070.01116.59
7.3.80.0060.01216.53
7.3.70.0150.00616.47
7.3.60.0130.01016.39
7.3.50.0120.00616.60
7.3.40.0100.01016.46
7.3.30.0120.00616.53
7.3.20.0190.00316.57
7.3.10.0060.01216.34
7.3.00.0150.00916.33

preferences:
28.67 ms | 403 KiB | 5 Q