[php-src] Issue #13033: syntax error

From: Date: Tue, 26 Dec 2023 23:31:50 +0000
Subject: [php-src] Issue #13033: syntax error
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246129@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/13033 Author: SVGAnimate ### Description The following code: ```php <?xml version="1.0" encoding="UTF-8"?> <note> <to><?php echo "Is this valid PHP"; ?></to> <body>This is valid XML</body> </note> ``` Resulted in this output: ``` Parse error: syntax error, unexpected identifier "version" in /home/user/scripts/code.php on line 1 ``` But I expected this output instead: ```XML <?xml version="1.0" encoding="UTF-8"?> <note> <to>Is this valid PHP</to> <body>This is valid XML</body> </note> ``` Why should I have an echo? ```php <?php echo '<?xml version="1.0" encoding="UTF-8"?>'; <note> ... </note> ``` ### PHP Version PHP 8.0.30 ### Operating System _No response_

« previous php.bugs (#246129) next »