views:

619

answers:

3

$s = '1000';

after process,should be '0001'

+4  A: 

Is it a trick question?

http://us.php.net/manual/en/function.strrev.php

Ilya Kochetov
+10  A: 

strrev

knittl
+3  A: 

You can use strrev :

$s = '1000';
$rev = strrev($s);

var_dump($rev);

Will get you :

string '0001' (length=4)
Pascal MARTIN