search

Home  >  Q&A  >  body text

php - What are bytecode and opcode? What's the difference?

Q1

What are bytecode bytecode and opcode operation code?

Q2

What's the difference?

Q3

Do all interpreted languages ​​have similar codes?

My understanding is:

怪我咯怪我咯2760 days ago699

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-06-05 11:09:43

    opcode is Operation Code.

    The bytecode used in java is also a kind of opcode. Because each operation code uses one byte, it is called bytecode (actually there are also multi-byte ones).

    Each byte is used to represent an instruction, and theoretically there can be 256 opcodes.

    The iadd (add two integers) and dadd (add two floating point numbers) that we often see are not bytecodes, but mnemonics.

    Many interpreted languages ​​do not have similar codes.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-06-05 11:09:43

    Bytecode and opcode are both intermediate codes and are not comparable. Java is compiled into intermediate code bytecode and then executed in jvm. PHP is compiled into intermediate code opcode and executed in ZendVM.

    reply
    0
  • Cancelreply