3v4l.org

run code in 300+ PHP versions simultaneously
<?php $utf8_string = "àbcdèfgàbcdèfg"; $n = 0; foreach (array('è', 'à') as $char) { $n += substr_count($utf8_string, $char); } echo "Trovati: ", $n;

preferences:
26.14 ms | 404 KiB | 5 Q