3v4l.org

run code in 500+ PHP versions simultaneously
<?php $paths = [ sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'bishop', tempnam(sys_get_temp_dir(), 'bishop'), ]; foreach ($paths as $path) { $fileW = new \SplFileObject($path, 'w'); $fileW->fputcsv(range(0,2)); assert(6 === $fileW->getSize()); echo $fileW->getSize() . PHP_EOL; $fileR = new \SplFileObject($path, 'r'); assert(6 === $fileR->getSize()); echo $fileR->getSize() . PHP_EOL; }
Output for master
Deprecated: Method SplFileObject::fputcsv() is deprecated since 8.6 in /in/vLlb0 on line 9 Deprecated: SplFileObject::fputcsv(): the $escape parameter must be provided, as its default value will change, either explicitly or via SplFileObject::setCsvControl() in /in/vLlb0 on line 9 6 6 Deprecated: Method SplFileObject::fputcsv() is deprecated since 8.6 in /in/vLlb0 on line 9 Deprecated: SplFileObject::fputcsv(): the $escape parameter must be provided, as its default value will change, either explicitly or via SplFileObject::setCsvControl() in /in/vLlb0 on line 9 6 6

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
14.4 ms | 1209 KiB | 7 Q