Changeset 758 in svn for trunk/decompilesample.php


Ignore:
Timestamp:
2011-04-17T08:23:57Z (4 years ago)
Author:
Xuefer
Message:

Decompiler: improves break/continue/goto, updates test sample

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/decompilesample.php

    r753 r758  
    186186$a = $b ^ $c;
    187187$a = ~$b;
     188$a = -$b;
     189$a = +$b;
    188190$a = $b >> $c;
    189191$a = $b >> $c;
     
    249251
    250252foreach ($array as $key => $value) {
    251     echo $key . ' = ' . $value . "\n";
    252     continue;
     253    foreach ($array as $key => $value) {
     254        echo $key . ' = ' . $value . "\n";
     255        break 2;
     256        continue;
     257    }
    253258}
    254259
     
    279284echo __LINE__;
    280285
    281 //* >= PHP 5.3
     286//*
    282287echo 'PHP 5.3+ code testing';
    283288const CONST_VALUE = 1;
     
    309314$greet('PHP');
    310315$total = 0;
     316$tax = 1;
    311317$callback = function ($quantity, $product) use ($tax, &$total) {
     318    static $static = array(1);
     319    $tax = 'tax';
    312320    $pricePerItem = constant('PRICE_' . strtoupper($product));
    313321    $total += $pricePerItem * $quantity * ($tax + 1);
Note: See TracChangeset for help on using the changeset viewer.