CASE

PHP code

<?php
/*
 * Set result to true if value1 equals value2.  The value2 must be a constant value?
 * opcode number: 48
 */
$i=0;
switch ($i) {
   case 0:
         echo "i=0";
         break;
   case 1:
         echo "i=1";
         break;
   case 2:
         echo "i=2";
         break;
}
?>

PHP opcodes

Function name: (null)

Compiled variables: !0=$i

line#opfetchextreturnoperands
60ASSIGN   !0,0
81CASE  ~1!0,0
 2JMPZ   ~1,->6
93ECHO   'i%3D0'
104BRK   1
115JMP   ->8
 6CASE  ~1!0,1
 7JMPZ   ~1,->11
128ECHO   'i%3D1'
139BRK   1
1410JMP   ->13
 11CASE  ~1!0,2
 12JMPZ   ~1,->16
1513ECHO   'i%3D2'
1614BRK   1
1715JMP   ->16
1816RETURN   1