fork download
  1. <?php
  2. $nome = 'Wallace de Souza Vizerra';
  3. $allNames = explode(' ', $nome);
  4. $nome = $allNames[0].' '.$allNames[count($allNames)-1];
  5. echo $nome;
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
Wallace Vizerra