3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tries = array("foo", "bar", "why?"); $answers = array("When", "Why?", "Foo"); $count = 0; foreach ($answers as $key => $value) { if (in_array(strtolower($value),$tries)) $count++; } echo $count;
Output for 4.3.0 - 7.1.0
2