3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $csv = new SplFileObject('php://tmp', 'wb'); $csv->setCsvControl(',', '"', '\\'); $csv->fputcsv(['Escape my " character.', 'Field 2']); $csv->fpassthru();
based on dtBnI
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught RuntimeException: SplFileObject::__construct(): Invalid php:// URL specified in /in/EkRgq:3 Stack trace: #0 /in/EkRgq(3): SplFileObject->__construct('php://tmp', 'wb') #1 {main} thrown in /in/EkRgq on line 3
Process exited with code 255.
Output for 5.4.12 - 5.6.21
Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileObject::__construct(): Invalid php:// URL specified' in /in/EkRgq:3 Stack trace: #0 /in/EkRgq(3): SplFileObject->__construct('php://tmp', 'wb') #1 {main} thrown in /in/EkRgq on line 3
Process exited with code 255.
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/EkRgq on line 5
Process exited with code 255.