Browse Source

DECLARE_CONST

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@752 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 11 years ago
parent
commit
5be83a23b0
  1. 6
      Decompiler.class.php
  2. 3
      decompilesample.php

6
Decompiler.class.php

@ -1568,12 +1568,16 @@ class Decompiler
case XC_DECLARE_FUNCTION:
$this->dfunction($this->dc['function_table'][$op1['constant']], $EX['indent']);
break;
case XC_DECLARE_LAMBDA_FUNCTION:
case XC_DECLARE_LAMBDA_FUNCTION: // {{{
ob_start();
$this->dfunction($this->dc['function_table'][$op1['constant']], $EX['indent']);
$resvar = ob_get_clean();
$istmpres = true;
break;
// }}}
case XC_DECLARE_CONST:
$resvar = 'const ' . unquoteName($this->getOpVal($op1, $EX), $EX) . ' = ' . str($this->getOpVal($op2, $EX));
break;
case XC_DECLARE_FUNCTION_OR_CLASS:
/* always removed by compiler */
break;

3
decompilesample.php

@ -275,8 +275,11 @@ echo __FILE__;
echo __LINE__;
//* >= PHP 5.3
echo 'PHP 5.3+ code testing';
const CONST_VALUE = 1;
echo $this::CONST_VALUE;
echo $a::CONST_VALUE;
echo CONST_VALUE;
$this::__construct();
$obj::__construct();

Loading…
Cancel
Save