Req->Bug #36045 [Opn->Nab]: Nested quotes are ignored by parse_ini_file

From: Date: Mon, 27 Sep 2021 13:58:34 +0000
Subject: Req->Bug #36045 [Opn->Nab]: Nested quotes are ignored by parse_ini_file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236861@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=36045&edit=1 ID: 36045 Updated by: cmb@php.net Reported by: php at koterov dot ru Summary: Nested quotes are ignored by parse_ini_file -Status: Open +Status: Not a bug -Type: Feature/Change Request +Type: Bug Package: Filesystem function related Operating System: Windows XP PHP Version: 5.1.2 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: You need to escape with a backslash[1]. While this might be uncommon for INI files, it is a long standing and well documented[2] behavior, so it's not going to change. [1] <https://3v4l.org/fqZ0F> [2] <https://www.php.net/manual/en/function.parse-ini-file.php#refsect1-function.parse-ini-file-examples> Previous Comments: ------------------------------------------------------------------------ [2006-01-17 10:26:17] php at koterov dot ru Description: ------------ While using parse_ini_file there is no possibility to insert double-quote in the value. Seems function completely removes nested quotes and da data between them. Standard for INI file "quote quoting" method is doubling (see MS Excell, Thunderbird, Outlook, GMail programs which could create INI files). But it does not work with parse_ini_file. Reproduce code: --------------- --file.ini-- key = "test""quotes" --test.php-- print_r(parse_ini_file('file.ini')); Expected result: ---------------- test"quotes Actual result: -------------- testquotes ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=36045&edit=1

« previous php.bugs (#236861) next »