3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new arrayObject(array(1, 2, 'd', "1,3")); $file = new splfileobject('/tmp/stdfile.txt', 'w+'); $file->fputcsv($a); var_dump(file_get_contents('/tmp/stdfile.txt'));
based on 8jRYN
Output for 5.4.0 - 7.2.0
Warning: SplFileObject::fputcsv() expects parameter 1 to be array, object given in /in/SfAdO on line 6 string(0) ""
Output for 5.1.0 - 5.3.29
Fatal error: Call to undefined method SplFileObject::fputcsv() in /in/SfAdO on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Class 'splfileobject' not found in /in/SfAdO on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: arrayobject in /in/SfAdO on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: arrayobject in /in/SfAdO on line 3