The first version of PHP was a simple set of tools that I put together for my Website and for a couple of projects. One tool did some fancy hit logging to an mSQL database, another acted as a form data interpreter. I ended up with about 30 different little CGI programs written in C before I got sick of it, and combined all of them into a single C library. I then wrote a very simple parser that would pick tags out of HTML files and replace them with the output of the corresponding functions in the C library.
简单的解析器慢慢地发展到包含条件标记,然后循环标记、函数等。我从没想过我在写脚本语言。我只是向宏替换解析器添加了一点功能。我还在用 C 写我所有真正的业务逻辑。
我在哪里读到过,由于所有引入的函数基本上都像 HTML 文档中的标记,而且由于 HTML 标记不区分大小写,所以他选择 PHP 中的函数名不区分大小写。后来这个特征在语言中仍然存在。