PRINT
RAISE_ABSTRACT_ERROR
オペコードの説明とサンプル
PHP Manual

## QM_ASSIGN

## PHP コード

`<?php
/*
* Question Mark Assign, used twice inside a question mark assign to temporarily assign result as value1 (this is followed up with an ASSIGN bytecode)
* opcode number: 22
*/
function A(){
echo 1?2:3;
}
function B(){
$b = 0;
$a = $b > 1 ? 10: 11;
}
?>`

## PHP オペコード

関数名: (null)

コンパイルされた変数: none

line | # | op | fetch | ext | return | operands
--- | --- | --- | --- | --- | --- | ---
6 | 0 | NOP |  |  |  |
10 | 1 | NOP |  |  |  |
14 | 2 | RETURN |  |  |  | 1

関数名: A

コンパイルされた変数: none

line | # | op | fetch | ext | return | operands
--- | --- | --- | --- | --- | --- | ---
7 | 0 | JMPZ |  |  |  | 1,->3
| 1 | QM_ASSIGN |  |  | ~0 | 2
| 2 | JMP |  |  |  | ->4
| 3 | QM_ASSIGN |  |  | ~0 | 3
| 4 | ECHO |  |  |  | ~0
8 | 5 | RETURN |  |  |  | null

関数名: B

コンパイルされた変数: !0=$b, !1=$a

line | # | op | fetch | ext | return | operands
--- | --- | --- | --- | --- | --- | ---
11 | 0 | ASSIGN |  |  |  | !0,0
12 | 1 | IS_SMALLER |  |  | ~1 | 1,!0
| 2 | JMPZ |  |  |  | ~1,->5
| 3 | QM_ASSIGN |  |  | ~2 | 10
| 4 | JMP |  |  |  | ->6
| 5 | QM_ASSIGN |  |  | ~2 | 11
| 6 | ASSIGN |  |  |  | !1,~2
13 | 7 | RETURN |  |  |  | null

PRINT
RAISE_ABSTRACT_ERROR
オペコードの説明とサンプル
PHP Manual