3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fields = []; $rowData = []; $fields[] = &$rowData['column1']; $fields[] = &$rowData['column2']; useRefs(...$fields); var_dump($rowData); useRefs2(...$fields); var_dump($rowData); function useRefs(&...$fields) { $fields[0] = 'col 1 value 1'; $fields[1] = 'col 2 value 1'; } function useRefs2(&...$fields) { $fields[0] = 'col 1 value 2'; $fields[1] = null; }
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { ["column1"]=> &string(13) "col 1 value 1" ["column2"]=> &string(13) "col 2 value 1" } array(2) { ["column1"]=> &string(13) "col 1 value 2" ["column2"]=> &NULL }

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