1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00
Files
archived-php-src/ext/simplexml/tests/038.phpt
Nikita Popov f4e9d0e325 Don't return temporary from SXE write_property handler
Return the original value. If we don't return the original value,
we need to own the zval, which we don't.

For clarity also switch things to work on a zend_string* value
instead of a zval*.
2020-08-25 11:28:44 +02:00

15 lines
257 B
PHP

--TEST--
SimpleXML: Property assignment return value
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
$xml =<<<EOF
<root></root>
EOF;
$root = simplexml_load_string($xml);
var_dump($root->prop = 42);
?>
--EXPECT--
int(42)