fork download
  1. <?php
  2.  
  3. // your code goes here
  4. $a = '/test1';
  5. $b = 'test2';
  6.  
  7. echo '/'.ltrim($a, '/') . "\n";
  8. echo '/'.ltrim($b, '/') . "\n";
Success #stdin #stdout 0.03s 25632KB
stdin
Standard input is empty
stdout
/test1
/test2