3v4l.org

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