I can't say using PHP is impractical, but let me put it in these terms: spend some months reinventing the wheel, or spend some months reverse engineering the wheel so you know how it works and then getting it to fit right.
But the problem is that your comparisons aren't correct. Writing an entire language implementation is a huge, huge task of which you've just barely scratched the surface. Just wait till you start doing garbage collection and stuff like that.
It would take me quite a while to implement my own language. But it would take me a day or two to embed Lua. Of course, I had to learn how Lua works, but using their incredibly helpful manual and book Programming in Lua, that was also just a week's worth of very casual reading.
The devs of PHP used Bison to build their parser/lexer, and so the rules PHP uses are available, in Bison format.
That's helpful but just the tip of the iceberg, unfortunately, and not a very useful tip. The difficulty of writing a parser pales in comparison to the difficulty of getting the runtime working.
The walker still needs to know the grammar in some senses in order to do things correctly.
Not really; the walker needs to know the structure you parse into. You could have completely different syntaxes that parse to the same abstract syntax tree. (Hence the term 'abstract' in AST.) The grammar is just syntax; the semantics are what the tree walker needs to know about.
The walker executes the function, or any expression for that matter, gets the appropriate value back, and passes it through the return routine. Am I missing something?
I'm talking about the basic case of returning a symbol that is a function, like function pointers in C, or the more advanced (but much more interesting) case of returning a function -- but not the result of a function.
In Lua you can do things like this:
return a + howMuch
add_two = make_add(2)
print(add_two(2)) -- result: 4
This particular example is obviously not doing something hugely interesting but the idea can be used for extremely powerful purposes.
You can also declare functions anonymously, which is extremely helpful. Perl can do that so I'd be surprised if PHP couldn't. I just don't remember because when I used PHP it was for relatively simple stuff and database access, no interesting algorithms.