<?php
$exp = array('/^[a-z]{2}|all$/', '/^[a-z]{2}|all$/');
$tests = array('fr', 'french', 'FR', 'all', 'ALL');
foreach ($exp as $e) {
foreach ($tests as $test) {
echo sprintf("%-20s %-10s : %s\n", $e, $test, preg_match($, $test) ? "OK" : "ERROR");
}
}
- Output for 5.4.0 - 5.4.27
- Parse error: syntax error, unexpected ',', expecting variable (T_VARIABLE) or '$' in /in/cfuFv on line 7
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected ',', expecting T_VARIABLE or '$' in /in/cfuFv on line 7
Process exited with code 255.
preferences:
173.95 ms | 1395 KiB | 64 Q