$s = '1000';
after process,should be '0001'
Is it a trick question?
http://us.php.net/manual/en/function.strrev.php
strrev
You can use strrev :
$s = '1000'; $rev = strrev($s); var_dump($rev);
Will get you :
string '0001' (length=4)