fork download
  1. <?php
  2. $string = "abcdefghijklmno";
  3.  
  4. $newstring = join("",
  5. (
  6. str_split($string),
  7. function($k) {
  8. return ($k % 2 == 0);
  9. },
  10. ARRAY_FILTER_USE_KEY
  11. )
  12. );
  13. echo $newstring;
  14. ?>
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
acegikmo