mirror of
https://github.com/php/php-src.git
synced 2026-04-14 11:32:11 +02:00
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*.
15 lines
257 B
PHP
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)
|