I just read some articles about php's require / require_once respectively include / include_once and was just wondering when _once should be used? Is it just the performace aspect or can I run into any difficulties when including / requiring the same file multiple times?
            Asked
            
        
        
            Active
            
        
            Viewed 44 times
        
    1
            
            
        - 
                    Possible duplicate of http://stackoverflow.com/questions/2418473/when-should-i-use-require-once-vs-include – ChicagoRedSox Aug 26 '13 at 17:06
1 Answers
1
            Think about this scenario:
<?php
function a() {
}
?>
What's going to happen when you include/require it twice? "function a already declared".
 
    
    
        Sergiu Paraschiv
        
- 9,929
- 5
- 36
- 47
