xref: /php-src/ext/simplexml/tests/bug36611.phpt (revision 7f2f0c00)
1--TEST--
2Bug #36611 (assignment to SimpleXML object attribute changes argument type to string)
3--EXTENSIONS--
4simplexml
5--FILE--
6<?php
7
8$xml_str = <<<EOD
9<?xml version="1.0" encoding="ISO-8859-1" ?>
10<c_fpobel >
11  <pos >
12    <pos/>
13  </pos>
14</c_fpobel>
15EOD;
16
17$xml = simplexml_load_string($xml_str);
18
19$val = 1;
20
21var_dump($val);
22$xml->pos["act_idx"] = $val;
23var_dump($val);
24
25?>
26--EXPECT--
27int(1)
28int(1)
29