I know there is an official document for Java (JLS), I'd like to know if it's also the case of PHP language. I found the "Language Reference" section on the PHP manual, but it doesn't look as detailed as the JLS.
The thing is I have a good practical knowledge of PHP but I'm miserably clueless about what really happens under the hood.
If there isn't any official document, could you recommend me some good books to read?
There was a discussion about that topic on the internals mailing list not too long ago.
You can check the status there.
Starting Post: http://marc.info/?l=php-internals&m=129379585417113&w=2
and one hopefully helpfull follow up describing some grammar:
http://marc.info/?l=php-internals&m=129387252319019&w=2
And Stats take in the matter:
http://marc.info/?l=php-internals&m=129383062812273&w=2
An initial draft specification for the PHP language has now been announced. The introduction of the specification reads as follows:
See also the latest version of the draft.
From what I read on Wikipedia, both PHP and Perl5 have in common that they are "languages" which are entirely defined through one single implementation. The language is precisely whatever the interpreter does. Neither are like C or C++ or Java or ECMAScript, which are standardised languages with many different implementations. (Apparently Perl6 will be different and actually have a specification. No idea of PHP will also one day make this step.)
From this (dated) weblog post it appears that there is no specification for PHP like there is one for Java.
For the formally inclined, a detailed (executable) semantics of PHP is available at www.phpsemantics.org and will be presented tomorrow at the ECOOP 2014 conference in Sweden.
PHP and Java are different languages for different purposes, of course the documentation do not follow the same standard. I think
php.net
is the best place to find whatever you want, also have good books, it all depends what about your needs.Java also has great books, and of course the Java Specification.
PHP does not have an specification, but have a tech manual of it and plenty of examples. What more do you need? Perhaps an specific book, try to look for Wiley Publishing they print books about PHP and other languages.