Which is the better syntax while including a file in PHP? -
this question has answer here:
some people include files this:
include ('file.php');
and people include files this:
include 'file.php';
i think here use of brackets unnecessary. views? style better , why?
when brackets unnecessary, it's better remove them (same return
instead of return ()
give better performances). same includes.
http://php.net/manual/en/function.return.php
note: note since return language construct , not function, parentheses surrounding arguments not required. common leave them out, , should php has less work in case.
moreoever, using whole path include better relative.
Comments
Post a Comment