3v4l.org

run code in 300+ PHP versions simultaneously
<?php function string_reverse($str) { $temp = ''; for( $i = mb_strlen($str); $i >=0 ; $i--) { $temp.= $str{$i}; } return $temp; } echo string_reverse('Output') ;

preferences:
44.51 ms | 402 KiB | 5 Q