With boredom comes php_template v2.9.2
It’s been a very, very long time since I last touched php_template and just out of the blue today I decided I’d finally get off my ass and create a Visual C++ project out of it so I could compile it for Windows users.
Well, after several hours of tinkering and encountering PHP source code “bugs”, I finally got it to compile. I had to do a few fixes too apparently – I was missing some TSRM junk to the parse_tag() function (and I believe that’s because it passes a zval around, so it needs the thread-safe stuff with it), and I had some calls to strlen() which needed to be explicitly cast to avoid warnings. This got rid of some of the compile-time warnings (there are still warnings about strcat() and cousins being used, but I’m smart and know how to use them properly) generated by VC++ 2005 and popped out a tasty php_template.dll for PHP 5.2.1.
Read more…