[php-src] Issue #8093: Unexpected behavior when parsing csv

From: Date: Mon, 14 Feb 2022 09:10:07 +0000
Subject: [php-src] Issue #8093: Unexpected behavior when parsing csv
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-239757@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8093 Author: stefket ### Description The following code: ```php <?php $tempFile = __DIR__ . '/temp.csv'; $dataBefore = ['foo', 'foo\\']; $handle = fopen($tempFile, 'w'); fputcsv($handle, $dataBefore); fclose($handle); $handle = fopen($tempFile, 'r'); $dataAfter = fgetcsv($handle); fclose($handle); unlink($tempFile); var_dump($dataBefore === $dataAfter); ``` Resulted in this output: ``` false ``` But I expected this output instead: ``` true ``` ### PHP Version Tested with 7.4 / 8.0 / 8.1 ### Operating System Tested with Ubuntu 20.04 and Mac OS

« previous php.bugs (#239757) next »