fork download
  1. <?php
  2.  
  3. function charOffset(string $char, $offset = 3): string
  4. {
  5. return chr(ord($char) + $offset);
  6. }
  7.  
  8. echo charOffset('a'), PHP_EOL;
  9. echo charOffset('f', 10), PHP_EOL;
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
d
p