fork download
  1. <?php
  2. function test($str){
  3. $len = strlen($str);
  4.  
  5. for ($i=0; $i < $len; $i += 2){
  6. $str[$i] = mb_strtoupper($str[$i], "utf-8");
  7. }
  8. echo $str;
  9. }
  10. test("To be or not to be");
  11. ?>
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
To bE Or nOt tO Be