- Fixed bug #27443 (defined() returns wrong type).

This commit is contained in:
Derick Rethans 2004-03-01 08:07:25 +00:00
parent 4db900732d
commit a84efbe923
2 changed files with 10 additions and 2 deletions

View file

@ -506,9 +506,9 @@ ZEND_FUNCTION(defined)
convert_to_string_ex(var);
if (zend_get_constant((*var)->value.str.val, (*var)->value.str.len, &c TSRMLS_CC)) {
zval_dtor(&c);
RETURN_LONG(1);
RETURN_TRUE;
} else {
RETURN_LONG(0);
RETURN_FALSE;
}
}
/* }}} */

8
tests/lang/bug27443.phpt Normal file
View file

@ -0,0 +1,8 @@
--TEST--
Bug #27443 (defined() returns wrong type)
--FILE--
<?php
echo gettype(defined('test'));
?>
--EXPECT--
boolean