CRITICAL
Rule Definition
The structure include_once include and check the specified file during the script execution. The functionality is similar to include with the difference that in the case of include_once a verification is done to be sure that the file has been included only once.
For this reason include_once is more costly than include statement. Sometimes it's necessary, but you should default to include() in most situations.
Remediation
Try and reduce the use of include_once
Violation Code Sample
<?php
include_once "a.php"; // VIOLATION
include_once "B.php"; // VIOLATION
?>
Fixed Code Sample
<?php
include "a.php"; // CORRECTED
include "B.php"; // CORRECTED
?>
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.