[php-src] Issue #20395: \Dom\ParentNode::querySelector and \Dom\ParentNode::querySelectorAll requires elements in $selectors to be lowercase

From: Date: Wed, 05 Nov 2025 11:31:58 +0000
Subject: [php-src] Issue #20395: \Dom\ParentNode::querySelector and \Dom\ParentNode::querySelectorAll requires elements in $selectors to be lowercase
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251178@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/20395 Author: DeveloperRob ### Description (Related: https://github.com/php/php-src/issues/17802 - in this issue there was a very similar issue, where if attribute names in $selectors didn't match the case of the attribute then the node was not matched.) The following [code](https://3v4l.org/e9JOn): ```php <?php $html = "<!doctype html><html><head></head><body></body></html>"; $dom = \Dom\HtmlDocument::createFromString($html); var_dump(\is_null($dom->querySelector("html"))); var_dump(\is_null($dom->querySelector("Html"))); var_dump(\is_null($dom->querySelector("HTML"))); ``` Resulted in this output: ``` bool(false) bool(true) bool(true) ``` But I expected this output instead: ``` bool(false) bool(false) bool(false) ``` ### PHP Version ```plain All PHP8.4 versions and git.master (2025-09-27) ``` ### Operating System _No response_

« previous php.bugs (#251178) next »