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/3b26v:8 Stack trace: #0 {main} thrown in /in/3b26v 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:
57.13 ms | 401 KiB | 8 Q