Is there any way we can create our own print function in PHP so when using it we can do the following
my_print_function "My Content";
rather than
my_print_function("My Content");
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.
No, there is not. The ones without brackets (like echo, and include) are language constructs, which you can’t make in your own code. Could probably do it by making a PHP extension in C, but it’s not possible in pure PHP.