summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-11-22 04:24:35 +0000
committerSascha Schumann <sas@php.net>2000-11-22 04:24:35 +0000
commit2ef6b689e8f3c5ddd62c790f8f429cece8a57ff9 (patch)
treeb0c1a87d87629096217cb614ed05c4f4e55d0418 /Zend/zend_execute.c
parent6c1af2031098a170194f1d5e9bab34eb24185461 (diff)
downloadphp-git-2ef6b689e8f3c5ddd62c790f8f429cece8a57ff9.tar.gz
Pass on the exit status
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 4c4e97492d..eb61393b69 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -2280,7 +2280,13 @@ send_by_ref:
NEXT_OPCODE();
case ZEND_EXIT:
if (opline->op1.op_type != IS_UNUSED) {
- zend_print_variable(get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R));
+ zval *ptr;
+
+ ptr = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
+ if (Z_TYPE_P(ptr) == IS_LONG) {
+ EG(exit_status) = Z_LVAL_P(ptr);
+ }
+ zend_print_variable(ptr);
FREE_OP(&opline->op1, EG(free_op1));
}
zend_bailout();