mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Use zend_string_init_fast() for single-character string creation (#21438)
This commit is contained in:
@@ -402,7 +402,7 @@ static inline zend_result ct_eval_fetch_dim(zval *result, zval *op1, zval *op2,
|
||||
return FAILURE;
|
||||
}
|
||||
if (index >= 0 && index < Z_STRLEN_P(op1)) {
|
||||
ZVAL_STR(result, zend_string_init(&Z_STRVAL_P(op1)[index], 1, 0));
|
||||
ZVAL_CHAR(result, Z_STRVAL_P(op1)[index]);
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user