mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2 This is a squash of PR #3734, which is a squash of PR #3313. Co-authored-by: Bob Weinand <bobwei9@hotmail.com> Co-authored-by: Joe Watkins <krakjoe@php.net> Co-authored-by: Dmitry Stogov <dmitry@zend.com>
This commit is contained in:
parent
fe8fdfa3bd
commit
e219ec144e
210 changed files with 22678 additions and 5594 deletions
|
@ -1434,21 +1434,25 @@ PHP_FUNCTION(xml_parse_into_struct)
|
|||
size_t data_len;
|
||||
int ret;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz/|z/", &pind, &data, &data_len, &xdata, &info) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz|z", &pind, &data, &data_len, &xdata, &info) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (info) {
|
||||
zval_ptr_dtor(info);
|
||||
array_init(info);
|
||||
info = zend_try_array_init(info);
|
||||
if (!info) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ((parser = (xml_parser *)zend_fetch_resource(Z_RES_P(pind), "XML Parser", le_xml_parser)) == NULL) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
zval_ptr_dtor(xdata);
|
||||
array_init(xdata);
|
||||
xdata = zend_try_array_init(xdata);
|
||||
if (!xdata) {
|
||||
return;
|
||||
}
|
||||
|
||||
ZVAL_COPY_VALUE(&parser->data, xdata);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue