Hacker News new | ask | show | jobs
by hevi_jos 2434 days ago
PHP was a C front end at first...
2 comments

Edited: you might be thinking of C++ ?

I don’t think php ever compiled to C, based on a quick scan of the Wikipedia page. I thought it compiled to perl at one point but that doesn’t seem to be true either.

It never compiled to C, but it was first intended to only provide bindings to libraries that were written in C.
Iirc it was kind of like a templating language first. Imagine writing a cgi-bin c application and becoming tired of writing out HTML with printf statements.
Facebook (HipHop for PHP) transpiled PHP to C++ but that 15 years into its life.