2

I found the list of PHP opcodes and this helped me a bit to understand the internals of PHP. But I still have problems to exactly understand the scheme used to display all informations of the opcodes on this page. For example, look here under the section PHP opcodes. I already figured out that a "!" means variable, a "->" means line of code and a "~" seems to address a "memory for internal computed results", e.g. echo 2 + 3 has to compute 2 + 3 first, so the result will be stored temporarily.

I would really appreciate a detailed explanation of the characters used in the explanations of the opcodes and the meaning of the columns "fetch" and "ext". Also, there are no opcodes for the numbers 116-131 and 137. Does this have a meaning?

halfer
  • 19,824
  • 17
  • 99
  • 186
Sirac
  • 693
  • 4
  • 18
  • I think this question is a bit broad, but it would be better for it to be improved rather than deleted. For example, are there particular opcodes you would like more detail on? What do you need to know about them? – halfer May 30 '14 at 21:34
  • [This article](http://blog.golemon.com/2008/01/understanding-opcodes.html) by Sara Golemon might help – Mark Baker May 30 '14 at 21:43
  • I would like to know about the internals of opcode that are neccessary for a language (or the most common), so things like DECLARE_*, FETCH_* or ZEND_* are not neccesary to explain. I just want to know how things work behind the curtain, where temporarily created results are stored and so on. – Sirac May 30 '14 at 21:45
  • ^ Would you add that into your question? Editing questions is generally better than addenda in the comments, as it keeps everything in one place. – halfer May 30 '14 at 21:46
  • @Sirac - Check the PHP source code on git. Here's the file that corresponds to the opcode definitions: https://github.com/php/php-src/blob/44dcdd146d36c91dddc9b89b4679074fdbf2e183/Zend/zend_vm_opcodes.h – Mr. Llama May 30 '14 at 21:48
  • There's also some interesting slides on opcache optimisation that refers to output from vld in [this presentation](http://www.slideshare.net/jpauli/yoopee-cache-op-cache-internals) by Julien Pauli at this year's PHPUK Conference – Mark Baker May 30 '14 at 21:49
  • @MarkBaker Thanks for the article, it helped. I am still going over it to understand it completely, but it'll do. It also mentioned the file GigaWatt mentioned, but personally I cannot do much with that file, if I want to understand the inner workings of Opcodes. – Sirac May 30 '14 at 22:20

0 Answers0