summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2002-08-08 16:32:34 +0000
committerAndi Gutmans <andi@php.net>2002-08-08 16:32:34 +0000
commit52406cb37c3b62a93cff0d15ae7d7a85cd7fd419 (patch)
treea0f531428218e3e49d72736711dfa3ffd30be9f1 /Zend/zend_compile.c
parent7904787f950ea7b95f53d64af341c0a88393b748 (diff)
downloadphp-git-52406cb37c3b62a93cff0d15ae7d7a85cd7fd419.tar.gz
- Make new 'is' operator work with classes only and return false when
- the object isn't of the said class or the value isn't an object.
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 99aa9709a7..1561c2b9bf 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -2724,23 +2724,16 @@ void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC
}
-void zend_do_is_type(znode *result, znode *expr, znode *class, int type TSRMLS_DC)
+void zend_do_is_class(znode *result, znode *expr, znode *class, int type TSRMLS_DC)
{
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline->opcode = ZEND_IS_TYPE;
+ opline->opcode = ZEND_IS_CLASS;
opline->result.op_type = IS_TMP_VAR;
opline->result.u.var = get_temporary_variable(CG(active_op_array));
opline->op1 = *expr;
- if (class) {
- opline->op2 = *class;
- opline->extended_value = 1;
- } else {
- opline->op2.u.constant.value.lval = type;
- SET_UNUSED(opline->op2);
- opline->extended_value = 0;
- }
+ opline->op2 = *class;
*result = opline->result;
}