A slightly optimized version would be:
The one I submitted was copied directly from php-web, but I have no problem with the optimization, once tested.
P.S.: BTW, thanks for reviewing some livedocs' patches.
Yes, thanks.
Ilia also said he'd take a look, later today.
S