3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = '1|"two"|"|"|5'; if( ! $fh = fopen('php://temp', 'w+') ) { exit('nope'); } fputs($fh, $data); rewind($fh); var_dump(fgetcsv($fh, 4096, "|"));
based on YaYje
Output for 5.5.0 - 7.3.0rc4
array(4) { [0]=> string(1) "1" [1]=> string(3) "two" [2]=> string(1) "|" [3]=> string(1) "5" }