3v4l.org

run code in 200+ 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); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
5.4.230.0030.03718.68
5.4.220.0030.03718.97
5.4.210.1270.03719.01
5.4.200.1530.03718.98
5.4.190.1500.04019.14
5.4.180.1600.03319.15
5.4.170.1500.04018.68
5.4.160.1530.03719.00
5.4.150.1530.04018.77
5.4.140.1730.04316.38
5.4.130.1730.04316.26
5.4.120.1670.02016.30
5.4.110.1730.02716.23
5.4.100.1600.04016.39
5.4.90.0900.04316.41
5.4.80.0000.07316.42
5.4.70.0000.08016.34
5.4.60.1600.04316.36
5.4.50.1730.04316.20
5.4.40.1770.04016.47
5.4.30.1730.03316.20
5.4.20.1700.04316.41
5.4.10.1730.04316.36
5.4.00.1530.03015.99
5.3.280.1670.05014.46
5.3.270.1770.04314.48
5.3.260.1630.04714.48
5.3.250.1700.04314.72
5.3.240.1530.03314.48
5.3.230.1700.04314.45
5.3.220.1800.03714.63
5.3.210.1800.05314.50
5.3.200.1700.04014.46
5.3.190.1700.04014.49
5.3.180.1600.04314.52
5.3.170.1770.04314.49
5.3.160.1730.04714.54
5.3.150.1770.04014.52
5.3.140.1700.04014.51
5.3.130.1700.05014.62
5.3.120.1730.04314.41
5.3.110.1670.04714.41
5.3.100.1700.04313.92
5.3.90.1470.04013.98
5.3.80.1470.03714.09
5.3.70.1530.03713.86
5.3.60.1800.04013.96
5.3.50.1500.03313.87
5.3.40.1600.04313.74
5.3.30.1700.04313.82
5.3.20.1600.03313.70
5.3.10.1670.03313.51
5.3.00.0430.03313.59