3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rawArray = array("A"=>"['B' => 3, 'C' => 5, 'D' => 9],", "B"=>"['A' => 3, 'C' => 3, 'D' => 4, 'E' => 7],", "C"=>"['A' => 5, 'B' => 3, 'D' => 2, 'E' => 6, 'F' => 3],", "D"=>"['A' => 9, 'B' => 4, 'C' => 2, 'E' => 2, 'F' => 2],", "E"=>"['B' => 7, 'C' => 6, 'D' => 2, 'F' => 5],", "F"=>"['C' => 3, 'D' => 2, 'E' => 5],", ); foreach($rawArray as $k => $v){ preg_match_all("/\'(.)\'/", $v, $key); preg_match_all("/=> (\d)/", $v, $val); $graph[$k] = array_combine($key[1], $val[1]); } print_r($graph);
Output for git.master_jit, git.master, rfc.property-hooks
Array ( [A] => Array ( [B] => 3 [C] => 5 [D] => 9 ) [B] => Array ( [A] => 3 [C] => 3 [D] => 4 [E] => 7 ) [C] => Array ( [A] => 5 [B] => 3 [D] => 2 [E] => 6 [F] => 3 ) [D] => Array ( [A] => 9 [B] => 4 [C] => 2 [E] => 2 [F] => 2 ) [E] => Array ( [B] => 7 [C] => 6 [D] => 2 [F] => 5 ) [F] => Array ( [C] => 3 [D] => 2 [E] => 5 ) )

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:
27.21 ms | 407 KiB | 5 Q