Is it possible to define a function and use without ()?
Like require("a.php") and require "a.php".
function getNameById($id){}; /*and use it like*/ $id = getNameById "1";
Thanks.
Is it possible to define a function and use without ()?
Like require("a.php") and require "a.php".
function getNameById($id){}; /*and use it like*/ $id = getNameById "1";
Thanks.
As other have mention, require and for example echo, isset and empty are language constructs. Which means that it is built into the php core.
The only way you can create your own constructs is by writing a php extension in C. So to answer your question, not in pure php.