3v4l.org

run code in 200+ php & hhvm versions
<?php $row = ['a\\"', 'bbb']; $fp = fopen('php://memory', 'w+'); fputcsv($fp, $row, ',', '"', "\0"); rewind($fp); echo stream_get_contents($fp); fclose($fp);
based on 0C7dZ
Output for 5.6.0 - 5.6.40, hhvm-3.18.4 - 3.22.0, 7.0.0 - 7.3.3
"a\""",bbb