1.2.1027. Redeclared PHP Functions¶
Function that bear the same name as a PHP function, and that are declared.
This is useful when managing backward compatibility, like emulating an old function, or preparing for newer PHP versions, like emulating new upcoming function.
<?php
if (version_compare(PHP_VERSION, 7.0) > 0) {
function split($separator, $string) {
return explode($separator, $string);
}
}
print_r( split(' ', '2 3'));
?>
1.2.1027.1. Connex PHP features¶
1.2.1027.1.1. Suggestions¶
Check if it is still worth emulating that function
1.2.1027.1.2. Specs¶
Short name |
Functions/RedeclaredPhpFunction |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Slow (1 hour) |
Precision |
Very high |
Available in |