QM_ASSIGN

PHP code

<?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 opcodes

Function name: (null)

Compiled variables: none

line#opfetchextreturnoperands
60NOP    
101NOP    
142RETURN   1

Function name: A

Compiled variables: none

line#opfetchextreturnoperands
70JMPZ   1,->3
 1QM_ASSIGN  ~02
 2JMP   ->4
 3QM_ASSIGN  ~03
 4ECHO   ~0
85RETURN   null

Function name: B

Compiled variables: !0=$b, !1=$a

line#opfetchextreturnoperands
110ASSIGN   !0,0
121IS_SMALLER  ~11,!0
 2JMPZ   ~1,->5
 3QM_ASSIGN  ~210
 4JMP   ->6
 5QM_ASSIGN  ~211
 6ASSIGN   !1,~2
137RETURN   null