Changeset 743 in svn


Ignore:
Timestamp:
2011-04-14T04:14:32+02:00 (4 years ago)
Author:
Xuefer
Message:

decompiler: process ZEND_CASE opcode, switch/case is not recognized as it used to be however

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Decompiler.class.php

    r741 r743  
    8989    function Decompiler_Code($src)
    9090    {
     91        assert('isset($src)');
    9192        $this->src = $src;
    9293    }
     
    14041405                    // }}}
    14051406                case XC_CASE:
     1407                    $switchValue = $this->getOpVal($op1, $EX);
     1408                    $caseValue = $this->getOpVal($op2, $EX);
     1409                    $resvar = $switchValue . ' == ' . $caseValue;
     1410                    break;
    14061411                case XC_BRK:
    14071412                    break;
  • trunk/decompilesample.php

    r742 r743  
    6767echo str_replace(array('a' => 'a', 'b' => 'c'), 'b');
    6868
     69switch ($switch) {
     70case 'case1':
     71    echo 'case1';
     72    break;
     73
     74case 'case2':
     75    echo 'case2';
     76    break;
     77
     78default:
     79    echo 'default';
     80    break;
     81}
     82
    6983?>
Note: See TracChangeset for help on using the changeset viewer.