3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function reverse($str) { $ret = ''; for ($i = mb_strlen($str, 'utf-8')-1; $i >= 0; $i--) { $ret .= mb_substr($str, $i, 1, 'utf-8'); } return $ret; } function oddList($x) { return implode(', ', range(1, $x, 2)); } echo reverse('ābc');
Output for 4.3.0 - 7.1.0
cbā