3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $list = array( "Michigan" => "9", "Data Structure" => "10", "Database" => "11", "Creativity" => "12", "Forest" => "13", "Al Pacino" => "14", "Humans" => "15", "Technology" => "16" ); $post = array (Michigan, Delaware); $all_key_values = $all_keys = array(); foreach ($post as $keyword) { foreach ($list as $word=>$num) { $sim_chars = similar_text($keyword, $word); if ($sim_chars/strlen($keyword) =1 && $sim_chars/strlen($word) =1) { $all_key_values[] = $num; $all_keys[] = $word; } elseif (stripos($keyword, $word) !== false || strpos($word, $keyword) !== false) { $sll_key_values[] = $num; $all_keys[] = $word; } } } print_r(implode(',', $all_key_values)); echo "\n"; print_r(implode(',', $all_keys));
Output for 5.3.0 - 5.4.29
Fatal error: Can't use function return value in write context in /in/GkE03 on line 22
Process exited with code 255.