fork(1) download
  1. <?php
  2.  
  3. $str = 'Mais de - valor: R$3.21 - Tipo: (+05)';
  4. echo strstr( $str , ' - ' , true ) . ' ' . substr( $str , -5 );
  5.  
Success #stdin #stdout 0.02s 24400KB
stdin
Standard input is empty
stdout
Mais de (+05)