3v4l.org

run code in 300+ PHP versions simultaneously
<?php $headers = array("A", "B", "C"); var_dump($headers); function calcExcelHeader($idx) { var_dump($headers); $i = 0; while ($idx % count($headers) >= count($headers)) { $idx -= count($headers); $i++; } return $idx . " + " . $i; } echo calcExcelHeader(3);
Output for git.master_jit, git.master, rfc.property-hooks
array(3) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" } Warning: Undefined variable $headers in /in/kogds on line 8 NULL Warning: Undefined variable $headers in /in/kogds on line 11 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/kogds:11 Stack trace: #0 /in/kogds(19): calcExcelHeader(3) #1 {main} thrown in /in/kogds on line 11
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:
45.93 ms | 402 KiB | 8 Q