xref: /PHP-8.3/ext/simplexml/tests/bug41175.phpt (revision 7f2f0c00)
1--TEST--
2Bug #41175 (addAttribute() fails to add an attribute with an empty value)
3--EXTENSIONS--
4simplexml
5--FILE--
6<?php
7
8$xml = new SimpleXmlElement("<img></img>");
9$xml->addAttribute("src", "foo");
10$xml->addAttribute("alt", "");
11echo $xml->asXML();
12
13?>
14--EXPECT--
15<?xml version="1.0"?>
16<img src="foo" alt=""/>
17