fork download
  1. <?php
  2.  
  3. $palavra = 'idPergunta-18';
  4. $posicaoDeCorte = strripos($palavra, '-');
  5. echo substr($palavra, 0,$posicaoDeCorte);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
idPergunta