diff options
author | Xinchen Hui <laruence@php.net> | 2015-07-02 12:18:23 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-07-02 12:18:23 +0800 |
commit | 0e68e278546b186484310261d95716ac45a13b6e (patch) | |
tree | 5c5f877cc168cf955229ea827d750e9dff1a8ab4 | |
parent | 70d7ecfec6e6d415bf0c5226c500213469fc56b0 (diff) | |
download | php-git-0e68e278546b186484310261d95716ac45a13b6e.tar.gz |
Use one_char_string
-rw-r--r-- | Zend/zend_operators.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index a669cc206c..7ab9e5bd46 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -797,7 +797,11 @@ try_again: case IS_FALSE: return ZSTR_EMPTY_ALLOC(); case IS_TRUE: - return zend_string_init("1", 1, 0); + if (CG(one_char_string)['1']) { + return CG(one_char_string)['1']; + } else { + return zend_string_init("1", 1, 0); + } case IS_RESOURCE: { char buf[sizeof("Resource id #") + MAX_LENGTH_OF_LONG]; int len; |