1
0
Fork 0

fix build for pre-5.6

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1489 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
master
Xuefer 2014-05-27 15:54:45 +00:00
parent 5f8c3d0ee3
commit 71137b9c29
3 changed files with 10 additions and 4 deletions

View File

@ -44,12 +44,14 @@ abstract class ClassName
static public $static_const10 = array(CONST_VALUE => CONST_VALUE);
static public $static_const11 = array(self::CONST_VALUE => self::CONST_VALUE);
static public $static_const12 = array(ClassName::CONST_VALUE => ClassName::CONST_VALUE);
#if PHP_VERSION >= 560
static public $ast_binop = ClassName::CONST_VALUE + ClassName::CONST_VALUE;
static public $ast_and = ClassName::CONST_VALUE && 1;
static public $ast_or = ClassName::CONST_VALUE || 2;
static public $ast_select = ClassName::CONST_VALUE ? a : b;
static public $ast_unaryPlus = +ClassName::CONST_VALUE;
static public $ast_unaryMinus = -ClassName::CONST_VALUE;
#endif
/** doc */
static public $public_static = array(2, 'str');
/** doc */

View File

@ -648,11 +648,11 @@ class Decompiler
XC_JMP_SET_VAR => "?:",
XC_JMPZ_EX => "&&",
XC_JMPNZ_EX => "||",
// zend_ast
ZEND_BOOL_AND => '&&',
ZEND_BOOL_OR => '||',
);
if (defined('IS_CONSTANT_AST')) {
$this->binops[ZEND_BOOL_AND] = '&&';
$this->binops[ZEND_BOOL_OR] = '||';
}
// }}}
$this->includeTypes = array( // {{{
ZEND_EVAL => 'eval',

View File

@ -98,6 +98,10 @@ static inline void xc_add_assoc_null_ex(zval *arg, char *key, uint key_len)
#endif
/* }}} */
#ifndef ZEND_ENGINE_2_6
typedef void zend_ast;
#endif
#ifdef ZEND_ENGINE_2_4
# define Z_OP(op) (op)
# define Z_OP_CONSTANT(op) (op).literal->constant