- array_reverse: documentation ( source)
- implode: documentation ( source)
- str_split: documentation ( source)
<?php
function str_reverse( $str ){
return implode("", array_reverse( str_split( (string)$str ) ) );
}
print str_reverse("Marlboro tobacco ruined my life with a lot of lung cancer.");