function to reverse a string in php

function to reverse a string in php

<?php
echo strrev("Hello world!"); // outputs "!dlrow olleH"
?>