There is an opinion that several first versions of PHP programming language were written in Perl language.
Sometimes even some clever people state it as a fact.
I've heard this statement several times and I was sure that it is true. Well, it looks like it can be true. I'm writing a lot of Perl, so I was pleased to think that Perl was used to create PHP.
On May 16 2015 on YAPC::Russia conference Ivan Serezhkin was showing his presentation "Perl long history". And he has mention that PHP has never been written in Perl and PHP was written in C from the very beginning.
So, I've decided to check it.
Wikipedia states that PHP was written in 1994 with C programming language. The 1.0 version has arrived at 1995 and then the language was called "Personal Home Page/Forms Interpreter" or PHP/FI.
Here is a perl oneliner to count the number of different kind of files in the PHP first version source coude:
$ ls -1 | perl -nalE '/(\..*?)$/; say $1' | sort | uniq -c | sort -r 9 .c 6 .h 3
As you can see there is no Perl in PHP version 1. The very first PHP version was written in C from the very beginning. And the story that first version of PHP was written in Perl is just a myth.
4 august 2018