3v4l.org

run code in 300+ 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 git.master, git.master_jit, rfc.property-hooks
6 6 Fatal error: Uncaught AssertionError: assert(6 === $fileW->getSize()) in /in/vLlb0:10 Stack trace: #0 /in/vLlb0(10): assert(false, 'assert(6 === $f...') #1 {main} thrown in /in/vLlb0 on line 10
Process exited with code 255.

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:
31.98 ms | 401 KiB | 8 Q