3v4l.org

run code in 300+ PHP versions simultaneously
<?php $info = "autore|||||titolo|||||album|||||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']) && is_numeric($infos['3'])){$te=$infos['3'];}else{$te="0.0";} if(isset($infos['4']) && is_numeric($infos['4'])){$td=$infos['4'];}else{$td="0.0";} //Calculate times $te_ex = array_reverse(explode('.', $te));// per le tracce superiori a 1 ora e fino alle 23 ore 59 minuti e 59 secondi $td_ex = array_reverse(explode('.', $td));// 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 git.master, git.master_jit, rfc.property-hooks
autore|||||titolo|||||album|||||2.38|||||1.59.59<br />2.38: Array ( [0] => 38 [1] => 2 ) <br />0.0: Array ( [0] => 0 [1] => 0 )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.77 ms | 401 KiB | 8 Q