3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1, 2); $file = new splfileobject('/tmp/stdfile.txt', 'w+'); $file->fputcsv($a); var_dump(file_get_contents('/tmp/stdfile.txt'));

preferences:
38.68 ms | 402 KiB | 5 Q