php does not disable functions


I call php from the commandline, with the -c argument to load another php.ini file, like this:

php -c my_ini_file.ini test.php

So in disabled_functions I added the echo function.

In test.php, echo works, and I don't know why. phpinfo() shows echo as a disabled function.

Echo is not a function, it is a built-in command. It cannot be disabled.

echo() is not actually a function (it is a language construct), so you are not required to use parentheses with it. echo() (unlike some other language constructs) does not behave like a function, so it cannot always be used in the context of a function. Additionally, if you want to pass more than one parameter to echo(), the parameters must not be enclosed within parentheses.