3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sessionArray = array( 'Romero' => 2, 'Ronaldinho' => 4, 'ronaldo' =>8, 'messi' => 20 ); $str="ro"; $id = array(); $name = array(); foreach($sessionArray as $key => $value) { if(strpos(strtolower($key), strtolower($str)) !== FALSE) { $id[] = $value; $name[] = $key; } } print_r($id); echo "\n"; print_r($name);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 2 [1] => 4 [2] => 8 ) Array ( [0] => Romero [1] => Ronaldinho [2] => ronaldo )

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