Well, likely this is a bug of some sort in PHP. Your code is well-formed as they say for the PHP parser. But, the side effect of the parser gives you a false return. This same question has been asked on tons of other sites in different formats. Just search Google on “PHP embedded functions” to read about it further. In my humble opinion it is badly formed code, but, it can be used in one way.
If you have some function and it creates new values to run thru another function that is okay, but, not doubled or embedded. Just makes confused code that could fail with ease do to variable parsing. (Globals vs Local variables!)
If for some reason you need to have a function call a second one, do it that way. Have a line in the first function that calls the second one. Just don’t embed them. Make sense?