fork download
  1. <?php
  2.  
  3. function esquerda($str, $length)
  4. {
  5. return substr($str, (strlen($str) - $length), $length);
  6. }
  7.  
  8. $n = '1400001';
  9.  
  10. echo esquerda($n, 5);
  11.  
  12.  
Success #stdin #stdout 0.02s 23468KB
stdin
Standard input is empty
stdout
00001