3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array ( 'a' => array ( 0 => 111, 1 => 222, 2 => 333, 3 => 444, ), 'b' => array ( 0 => 555, 1 => 666, 2 => 777, 3 => 888, ), 'c' => array ( 0 => 999, 1 => 000, 2 => 111, 3 => 222, ), ); $lastRowNumber = array_key_last($data['a']); $columns = array_keys($data); for ( $rowNumber = 0; $rowNumber <= $lastRowNumber; $rowNumber++ ) { $csvRow = []; foreach ( $columns as $columnKey ) { $csvRow[] = $data[$columnKey][$rowNumber]; } echo implode(',', $csvRow), PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
111,555,999 222,666,0 333,777,111 444,888,222

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:
82.86 ms | 405 KiB | 5 Q