CRITICAL
Rule Definition
It is highly advised to limit the use of the regular expressions. There are known to be much slower than their php counterparts. For example use str_replace instead of preg_replace.
Remediation
Try to reduce the use of regular expressions.Use insead functions as str_replace.
Violation Code Sample
<?php
if (preg_match("/php/i", "PHP is the web scripting language of choice.")) { // VIOLATION
echo "A match was found.";
} else {
echo "A match was not found.";
}
?>
Related Technologies
Technical Criterion
Efficiency - Memory, Network and Disk Space Management
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.