3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Soggetti = array(); $results = array( [ 'ID' => 0, 'CodiceIscrizione' => 'hello4', 'Visitato' => 'world4', ], [ 'ID' => 4, 'CodiceIscrizione' => 'hello4', 'Visitato' => 'world4', ], [ 'ID' => 2, 'CodiceIscrizione' => 'hello2', 'Visitato' => 'world2', ], [ 'ID' => 5, 'CodiceIscrizione' => 'hello5', 'Visitato' => 'world5', ], [ 'ID' => 3, 'CodiceIscrizione' => 'hello3', 'Visitato' => 'world3', ], ); foreach($results as $row) { $Soggetti[$row['ID']] = array(); $Soggetti[$row['ID']]['CodiceIscrizione'] = $row['CodiceIscrizione']; $Soggetti[$row['ID']]['Visitato'] = intval($row['Visitato']); } var_dump($Soggetti);
Output for git.master, git.master_jit, rfc.property-hooks
array(5) { [0]=> array(2) { ["CodiceIscrizione"]=> string(6) "hello4" ["Visitato"]=> int(0) } [4]=> array(2) { ["CodiceIscrizione"]=> string(6) "hello4" ["Visitato"]=> int(0) } [2]=> array(2) { ["CodiceIscrizione"]=> string(6) "hello2" ["Visitato"]=> int(0) } [5]=> array(2) { ["CodiceIscrizione"]=> string(6) "hello5" ["Visitato"]=> int(0) } [3]=> array(2) { ["CodiceIscrizione"]=> string(6) "hello3" ["Visitato"]=> int(0) } }

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:
46.03 ms | 402 KiB | 8 Q