diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-05-15 01:11:29 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-05-15 01:11:29 +0300 |
commit | 196b9517281aebd972e7f287433aa97af2e06087 (patch) | |
tree | fd5a5edad984ceff11c3b98582c14835b838993c | |
parent | 06693c3d43ac04ffac9a95081ab60ae179a6e568 (diff) | |
download | php-git-196b9517281aebd972e7f287433aa97af2e06087.tar.gz |
Optimized === and !== with NULL, FALSE, TRUE.
-rw-r--r-- | Zend/zend_operators.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 5e16bf87f4..c026f23415 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -848,6 +848,8 @@ static zend_always_inline int fast_is_identical_function(zval *op1, zval *op2) { if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { return 0; + } else if (Z_TYPE_P(op1) <= IS_TRUE) { + return 1; } return zend_is_identical(op1, op2); } @@ -856,6 +858,8 @@ static zend_always_inline int fast_is_not_identical_function(zval *op1, zval *op { if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { return 1; + } else if (Z_TYPE_P(op1) <= IS_TRUE) { + return 0; } return !zend_is_identical(op1, op2); } |