I wrote a small piece of code that I believe should have succeeded if tail recursion was optimized, however it blew up the stack. Should I conclude PHP does not optimize tai
It is important to know that PHP is a scripting language written in C so limitations of this sort are bound to appear. The lack of optimization shows in the underlying C language also:
http://rosettacode.org/wiki/Find_limit_of_recursion
As you can see PHP is not the only language that does not handle things gracefully.
I recommend using Erlang and the MyPeb PHP/Erlang bridge for a true solution to a problem like this.