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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As other have mention,
requireand for exampleecho,issetandemptyare 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.