3v4l.org

run code in 300+ PHP versions simultaneously
<?php $paths = array( 'one' => array( 'visited' => false, 'shortest_path' => INF, 'neighbors' => array( 'two' => array(1 => BUS), 'three' => array(5 => SUBWAY), 'fow' => array(10 => BUS), ) ), 'two' => array( 'visited' => false, 'shortest_path' => INF, 'neighbors' => array( 'one' => array(1 => BUS), ) ), 'three' => array( 'visited' => false, 'shortest_path' => INF, 'neighbors' => array( 'one' => array(5 => BUS), 'six' => array(20 => FOOT) ) ), 'fow' => array( 'visited' => false, 'shortest_path' => INF, 'neighbors' => array( 'one' => array(10 => BUS), 'five' => array(5 => BUS) ) ), 'five' => array( 'visited' => false, 'shortest_path' => INF, 'neighbors' => array( 'fow' => array(5 => BUS), 'six' => array(5 => FOOT) ) ), 'six' => array( 'visited' => false, 'shortest_path' => INF, 'neighbors' => array( 'three' => array(20 => BUS), 'five' => array(5 => FOOT) ) ) ); $array = array ( 0 => 'two ', 1 => 'three ', 2 => 'fow ', 3 => 'five ', 4 => 'six ', 5 => 'six ', ); // sort ДЛЯ СОРТИРОВКИ foreach ($array as $key => $name) { echo $name."\n"; if (count($paths[$name][neighbors]) >=2 ) { echo 123; foreach ($paths[$name][neighbors] as $neighbor) { if ($array[$key+1] == $neighbor) { echo $name; } } } }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Undefined constant "BUS" in /in/n6epa:8 Stack trace: #0 {main} thrown in /in/n6epa on line 8
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:
61.38 ms | 401 KiB | 8 Q