3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $info = "autore|||||%tt|||||%aa|||||2.38|||||1.59.59"; $infos = explode('|||||',$info); if(isset($infos['0'])){$at=$infos['0'];}else{$at="";} if(isset($infos['1'])){$tt=$infos['1'];}else{$tt="";} if(isset($infos['2'])){$aa=$infos['2'];}else{$aa="";} if(isset($infos['3'])){ $te_num = explode('.', $te); $td_num = explode('.', $td); $te_num_arr = array(); foreach($te_num as $num){ if(is_numeric($num)){ $te_num_arr = array_push($num); continue; }else{ $tdh = "0.0"; unset($te_num_arr); exit; } } $td_num_arr = array(); foreach($td_num as $num){ if(is_numeric($num)){ $td_num_arr = array_push($num); continue; }else{ $tdh = "0.0"; unset($td_num_arr); exit; } } //Calculate times $te_ex = array_reverse($te_num_arr);// per le tracce superiori a 1 ora e fino alle 23 ore 59 minuti e 59 secondi $td_ex = array_reverse($td_num_arr);// per le tracce superiori a 1 ora e fino alle 23 ore 59 minuti e 59 secondi if(isset($te_ex[1])) {//ricavo -ore minuti e secondi- se i dati ricavati sono validi (ATTENZIONE: in fondo al brano "Sconosciuto") if(isset($td_ex[2])) {$tdh = $td_ex[2] * 3600;} else {$tdh = 0;} if(isset($te_ex[2])) {$teh = $te_ex[2] * 3600;} else {$teh = 0;} $tesec = (($teh) + ($te_ex[1] * 60) + $te_ex[0]); $tdsec = (($tdh) + ($td_ex[1] * 60) + $td_ex[0]); $trsec = $tdsec-$tesec; //tempo restante al termine della canzone }else{ $tesec = $tdsec = $trsec = 0; } echo $info."<br />"; echo $te.": "; print_r($te_ex); echo '<br />'.$td.": "; print_r($td_ex); ?>
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected end of file in /in/48bMW on line 53
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/48bMW on line 53
Process exited with code 255.