3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $timeTarget = 0.2; $cost = 9; do { $cost++; $start = microtime(true); password_hash("test", PASSWORD_BCRYPT, ["cost" => $cost]); $end = microtime(true); var_dump([$cost, $end-$start]); } while (($end - $start) < $timeTarget); echo "Appropriate Cost Found: " . $cost . "\n";
Output for 7.1.0
array(2) { [0]=> int(10) [1]=> float(0.073235034942627) } array(2) { [0]=> int(11) [1]=> float(0.11585593223572) } array(2) { [0]=> int(12) [1]=> float(0.2145459651947) } Appropriate Cost Found: 12
Output for 7.0.14
array(2) { [0]=> int(10) [1]=> float(0.085554122924805) } array(2) { [0]=> int(11) [1]=> float(0.12273979187012) } array(2) { [0]=> int(12) [1]=> float(0.21395206451416) } Appropriate Cost Found: 12
Output for 7.0.12
array(2) { [0]=> int(10) [1]=> float(0.085129976272583) } array(2) { [0]=> int(11) [1]=> float(0.12403106689453) } array(2) { [0]=> int(12) [1]=> float(0.21397399902344) } Appropriate Cost Found: 12
Output for 7.0.6
array(2) { [0]=> int(10) [1]=> float(0.079009056091309) } array(2) { [0]=> int(11) [1]=> float(0.1231791973114) } array(2) { [0]=> int(12) [1]=> float(0.24400591850281) } Appropriate Cost Found: 12
Output for 7.0.5
array(2) { [0]=> int(10) [1]=> float(0.076001167297363) } array(2) { [0]=> int(11) [1]=> float(0.12261915206909) } array(2) { [0]=> int(12) [1]=> float(0.24318385124207) } Appropriate Cost Found: 12
Output for 7.0.4
array(2) { [0]=> int(10) [1]=> float(0.073233842849731) } array(2) { [0]=> int(11) [1]=> float(0.1221067905426) } array(2) { [0]=> int(12) [1]=> float(0.2432689666748) } Appropriate Cost Found: 12
Output for 7.0.3
array(2) { [0]=> int(10) [1]=> float(0.060398817062378) } array(2) { [0]=> int(11) [1]=> float(0.12037205696106) } array(2) { [0]=> int(12) [1]=> float(0.24048209190369) } Appropriate Cost Found: 12
Output for 7.0.2
array(2) { [0]=> int(10) [1]=> float(0.059451818466187) } array(2) { [0]=> int(11) [1]=> float(0.11863994598389) } array(2) { [0]=> int(12) [1]=> float(0.23789501190186) } Appropriate Cost Found: 12
Output for 7.0.1
array(2) { [0]=> int(10) [1]=> float(0.059584856033325) } array(2) { [0]=> int(11) [1]=> float(0.11893606185913) } array(2) { [0]=> int(12) [1]=> float(0.237380027771) } Appropriate Cost Found: 12
Output for 7.0.0
array(2) { [0]=> int(10) [1]=> float(0.060164928436279) } array(2) { [0]=> int(11) [1]=> float(0.11848497390747) } array(2) { [0]=> int(12) [1]=> float(0.23661303520203) } Appropriate Cost Found: 12
Output for 5.6.28
array(2) { [0]=> int(10) [1]=> float(0.089712858200073) } array(2) { [0]=> int(11) [1]=> float(0.13380312919617) } array(2) { [0]=> int(12) [1]=> float(0.21639204025269) } Appropriate Cost Found: 12
Output for 5.6.21
array(2) { [0]=> int(10) [1]=> float(0.074685096740723) } array(2) { [0]=> int(11) [1]=> float(0.12182402610779) } array(2) { [0]=> int(12) [1]=> float(0.24323201179504) } Appropriate Cost Found: 12
Output for 5.6.20
array(2) { [0]=> int(10) [1]=> float(0.063677072525024) } array(2) { [0]=> int(11) [1]=> float(0.12198710441589) } array(2) { [0]=> int(12) [1]=> float(0.24385714530945) } Appropriate Cost Found: 12
Output for 5.6.19
array(2) { [0]=> int(10) [1]=> float(0.076294898986816) } array(2) { [0]=> int(11) [1]=> float(0.12328886985779) } array(2) { [0]=> int(12) [1]=> float(0.24435305595398) } Appropriate Cost Found: 12
Output for 5.6.18
array(2) { [0]=> int(10) [1]=> float(0.075579166412354) } array(2) { [0]=> int(11) [1]=> float(0.12268781661987) } array(2) { [0]=> int(12) [1]=> float(0.24387502670288) } Appropriate Cost Found: 12
Output for 5.6.17
array(2) { [0]=> int(10) [1]=> float(0.060541868209839) } array(2) { [0]=> int(11) [1]=> float(0.11817407608032) } array(2) { [0]=> int(12) [1]=> float(0.23622679710388) } Appropriate Cost Found: 12
Output for 5.6.16
array(2) { [0]=> int(10) [1]=> float(0.059710025787354) } array(2) { [0]=> int(11) [1]=> float(0.11882710456848) } array(2) { [0]=> int(12) [1]=> float(0.23764586448669) } Appropriate Cost Found: 12
Output for 5.6.15
array(2) { [0]=> int(10) [1]=> float(0.060708045959473) } array(2) { [0]=> int(11) [1]=> float(0.1207709312439) } array(2) { [0]=> int(12) [1]=> float(0.24105715751648) } Appropriate Cost Found: 12
Output for 5.6.14
array(2) { [0]=> int(10) [1]=> float(0.064800977706909) } array(2) { [0]=> int(11) [1]=> float(0.12422299385071) } array(2) { [0]=> int(12) [1]=> float(0.24773716926575) } Appropriate Cost Found: 12
Output for 5.6.13
array(2) { [0]=> int(10) [1]=> float(0.063268184661865) } array(2) { [0]=> int(11) [1]=> float(0.12232899665833) } array(2) { [0]=> int(12) [1]=> float(0.24355411529541) } Appropriate Cost Found: 12
Output for 5.6.12
array(2) { [0]=> int(10) [1]=> float(0.073740005493164) } array(2) { [0]=> int(11) [1]=> float(0.12305092811584) } array(2) { [0]=> int(12) [1]=> float(0.24547004699707) } Appropriate Cost Found: 12
Output for 5.6.11
array(2) { [0]=> int(10) [1]=> float(0.064558982849121) } array(2) { [0]=> int(11) [1]=> float(0.12250685691833) } array(2) { [0]=> int(12) [1]=> float(0.24471306800842) } Appropriate Cost Found: 12
Output for 5.6.10
array(2) { [0]=> int(10) [1]=> float(0.064097881317139) } array(2) { [0]=> int(11) [1]=> float(0.12237906455994) } array(2) { [0]=> int(12) [1]=> float(0.24439096450806) } Appropriate Cost Found: 12
Output for 5.6.9
array(2) { [0]=> int(10) [1]=> float(0.077605962753296) } array(2) { [0]=> int(11) [1]=> float(0.12833285331726) } array(2) { [0]=> int(12) [1]=> float(0.24301505088806) } Appropriate Cost Found: 12
Output for 5.6.8
array(2) { [0]=> int(10) [1]=> float(0.060708999633789) } array(2) { [0]=> int(11) [1]=> float(0.12060689926147) } array(2) { [0]=> int(12) [1]=> float(0.2417619228363) } Appropriate Cost Found: 12
Output for 5.6.7
array(2) { [0]=> int(10) [1]=> float(0.060107946395874) } array(2) { [0]=> int(11) [1]=> float(0.1203761100769) } array(2) { [0]=> int(12) [1]=> float(0.23684692382812) } Appropriate Cost Found: 12
Output for 5.6.6
array(2) { [0]=> int(10) [1]=> float(0.065804958343506) } array(2) { [0]=> int(11) [1]=> float(0.12394905090332) } array(2) { [0]=> int(12) [1]=> float(0.24800491333008) } Appropriate Cost Found: 12
Output for 5.6.5
array(2) { [0]=> int(10) [1]=> float(0.077632188796997) } array(2) { [0]=> int(11) [1]=> float(0.12384605407715) } array(2) { [0]=> int(12) [1]=> float(0.24393606185913) } Appropriate Cost Found: 12
Output for 5.6.4
array(2) { [0]=> int(10) [1]=> float(0.073040962219238) } array(2) { [0]=> int(11) [1]=> float(0.122554063797) } array(2) { [0]=> int(12) [1]=> float(0.24387288093567) } Appropriate Cost Found: 12
Output for 5.6.3
array(2) { [0]=> int(10) [1]=> float(0.063114881515503) } array(2) { [0]=> int(11) [1]=> float(0.12157201766968) } array(2) { [0]=> int(12) [1]=> float(0.24282503128052) } Appropriate Cost Found: 12
Output for 5.6.2
array(2) { [0]=> int(10) [1]=> float(0.069760799407959) } array(2) { [0]=> int(11) [1]=> float(0.12186908721924) } array(2) { [0]=> int(12) [1]=> float(0.24384999275208) } Appropriate Cost Found: 12
Output for 5.6.1
array(2) { [0]=> int(10) [1]=> float(0.060963869094849) } array(2) { [0]=> int(11) [1]=> float(0.12170100212097) } array(2) { [0]=> int(12) [1]=> float(0.24344801902771) } Appropriate Cost Found: 12
Output for 5.6.0
array(2) { [0]=> int(10) [1]=> float(0.072910070419312) } array(2) { [0]=> int(11) [1]=> float(0.12277293205261) } array(2) { [0]=> int(12) [1]=> float(0.24460411071777) } Appropriate Cost Found: 12
Output for 5.5.35
array(2) { [0]=> int(10) [1]=> float(0.11297011375427) } array(2) { [0]=> int(11) [1]=> float(0.13659191131592) } array(2) { [0]=> int(12) [1]=> float(0.24269509315491) } Appropriate Cost Found: 12
Output for 5.5.34
array(2) { [0]=> int(10) [1]=> float(0.085431814193726) } array(2) { [0]=> int(11) [1]=> float(0.12745809555054) } array(2) { [0]=> int(12) [1]=> float(0.2445821762085) } Appropriate Cost Found: 12
Output for 5.5.33
array(2) { [0]=> int(10) [1]=> float(0.075173139572144) } array(2) { [0]=> int(11) [1]=> float(0.14116501808167) } array(2) { [0]=> int(12) [1]=> float(0.28176808357239) } Appropriate Cost Found: 12
Output for 5.5.32
array(2) { [0]=> int(10) [1]=> float(0.063971996307373) } array(2) { [0]=> int(11) [1]=> float(0.12215304374695) } array(2) { [0]=> int(12) [1]=> float(0.24404501914978) } Appropriate Cost Found: 12
Output for 5.5.31
array(2) { [0]=> int(10) [1]=> float(0.060612201690674) } array(2) { [0]=> int(11) [1]=> float(0.11871099472046) } array(2) { [0]=> int(12) [1]=> float(0.23742699623108) } Appropriate Cost Found: 12
Output for 5.5.30
array(2) { [0]=> int(10) [1]=> float(0.059792995452881) } array(2) { [0]=> int(11) [1]=> float(0.1192319393158) } array(2) { [0]=> int(12) [1]=> float(0.23833298683167) } Appropriate Cost Found: 12
Output for 5.5.29
array(2) { [0]=> int(10) [1]=> float(0.069706916809082) } array(2) { [0]=> int(11) [1]=> float(0.12198996543884) } array(2) { [0]=> int(12) [1]=> float(0.24397301673889) } Appropriate Cost Found: 12
Output for 5.5.28
array(2) { [0]=> int(10) [1]=> float(0.07485294342041) } array(2) { [0]=> int(11) [1]=> float(0.12227487564087) } array(2) { [0]=> int(12) [1]=> float(0.24286985397339) } Appropriate Cost Found: 12
Output for 5.5.27
array(2) { [0]=> int(10) [1]=> float(0.075716018676758) } array(2) { [0]=> int(11) [1]=> float(0.12281608581543) } array(2) { [0]=> int(12) [1]=> float(0.24347186088562) } Appropriate Cost Found: 12
Output for 5.5.26
array(2) { [0]=> int(10) [1]=> float(0.068710088729858) } array(2) { [0]=> int(11) [1]=> float(0.12178015708923) } array(2) { [0]=> int(12) [1]=> float(0.24304294586182) } Appropriate Cost Found: 12
Output for 5.5.25
array(2) { [0]=> int(10) [1]=> float(0.067831039428711) } array(2) { [0]=> int(11) [1]=> float(0.12139320373535) } array(2) { [0]=> int(12) [1]=> float(0.24260807037354) } Appropriate Cost Found: 12
Output for 5.5.24
array(2) { [0]=> int(10) [1]=> float(0.060966014862061) } array(2) { [0]=> int(11) [1]=> float(0.12089705467224) } array(2) { [0]=> int(12) [1]=> float(0.23806095123291) } Appropriate Cost Found: 12
Output for 5.5.23
array(2) { [0]=> int(10) [1]=> float(0.071311950683594) } array(2) { [0]=> int(11) [1]=> float(0.11822891235352) } array(2) { [0]=> int(12) [1]=> float(0.23652005195618) } Appropriate Cost Found: 12
Output for 5.5.22
array(2) { [0]=> int(10) [1]=> float(0.065470933914185) } array(2) { [0]=> int(11) [1]=> float(0.12181901931763) } array(2) { [0]=> int(12) [1]=> float(0.24362802505493) } Appropriate Cost Found: 12
Output for 5.5.21
array(2) { [0]=> int(10) [1]=> float(0.077157020568848) } array(2) { [0]=> int(11) [1]=> float(0.12375211715698) } array(2) { [0]=> int(12) [1]=> float(0.24463319778442) } Appropriate Cost Found: 12
Output for 5.5.20
array(2) { [0]=> int(10) [1]=> float(0.071252822875977) } array(2) { [0]=> int(11) [1]=> float(0.12219500541687) } array(2) { [0]=> int(12) [1]=> float(0.24389696121216) } Appropriate Cost Found: 12
Output for 5.5.19
array(2) { [0]=> int(10) [1]=> float(0.064160108566284) } array(2) { [0]=> int(11) [1]=> float(0.12166690826416) } array(2) { [0]=> int(12) [1]=> float(0.24293994903564) } Appropriate Cost Found: 12
Output for 5.5.18
array(2) { [0]=> int(10) [1]=> float(0.075552940368652) } array(2) { [0]=> int(11) [1]=> float(0.13605403900146) } array(2) { [0]=> int(12) [1]=> float(0.27222895622253) } Appropriate Cost Found: 12
Output for 5.5.16
array(2) { [0]=> int(10) [1]=> float(0.071838140487671) } array(2) { [0]=> int(11) [1]=> float(0.12252616882324) } array(2) { [0]=> int(12) [1]=> float(0.24864888191223) } Appropriate Cost Found: 12
Output for 5.5.15
array(2) { [0]=> int(10) [1]=> float(0.078539133071899) } array(2) { [0]=> int(11) [1]=> float(0.12475800514221) } array(2) { [0]=> int(12) [1]=> float(0.24361896514893) } Appropriate Cost Found: 12
Output for 5.5.14
array(2) { [0]=> int(10) [1]=> float(0.073884963989258) } array(2) { [0]=> int(11) [1]=> float(0.12298393249512) } array(2) { [0]=> int(12) [1]=> float(0.24452996253967) } Appropriate Cost Found: 12
Output for 5.5.13
array(2) { [0]=> int(10) [1]=> float(0.073632001876831) } array(2) { [0]=> int(11) [1]=> float(0.1228928565979) } array(2) { [0]=> int(12) [1]=> float(0.24423003196716) } Appropriate Cost Found: 12
Output for 5.5.12
array(2) { [0]=> int(10) [1]=> float(0.07584285736084) } array(2) { [0]=> int(11) [1]=> float(0.1227650642395) } array(2) { [0]=> int(12) [1]=> float(0.24410009384155) } Appropriate Cost Found: 12
Output for 5.5.11
array(2) { [0]=> int(10) [1]=> float(0.061430931091309) } array(2) { [0]=> int(11) [1]=> float(0.12235283851624) } array(2) { [0]=> int(12) [1]=> float(0.24466300010681) } Appropriate Cost Found: 12
Output for 5.5.10
array(2) { [0]=> int(10) [1]=> float(0.065592050552368) } array(2) { [0]=> int(11) [1]=> float(0.12185478210449) } array(2) { [0]=> int(12) [1]=> float(0.24335694313049) } Appropriate Cost Found: 12
Output for 5.5.9
array(2) { [0]=> int(10) [1]=> float(0.07502007484436) } array(2) { [0]=> int(11) [1]=> float(0.12282490730286) } array(2) { [0]=> int(12) [1]=> float(0.24378609657288) } Appropriate Cost Found: 12
Output for 5.5.8
array(2) { [0]=> int(10) [1]=> float(0.059524774551392) } array(2) { [0]=> int(11) [1]=> float(0.11878705024719) } array(2) { [0]=> int(12) [1]=> float(0.23168802261353) } Appropriate Cost Found: 12
Output for 5.5.7
array(2) { [0]=> int(10) [1]=> float(0.065336942672729) } array(2) { [0]=> int(11) [1]=> float(0.12198901176453) } array(2) { [0]=> int(12) [1]=> float(0.24356698989868) } Appropriate Cost Found: 12
Output for 5.5.6
array(2) { [0]=> int(10) [1]=> float(0.075532913208008) } array(2) { [0]=> int(11) [1]=> float(0.1400101184845) } array(2) { [0]=> int(12) [1]=> float(0.27927899360657) } Appropriate Cost Found: 12
Output for 5.5.5
array(2) { [0]=> int(10) [1]=> float(0.071214914321899) } array(2) { [0]=> int(11) [1]=> float(0.12209010124207) } array(2) { [0]=> int(12) [1]=> float(0.24348306655884) } Appropriate Cost Found: 12
Output for 5.5.4
array(2) { [0]=> int(10) [1]=> float(0.064877033233643) } array(2) { [0]=> int(11) [1]=> float(0.12202596664429) } array(2) { [0]=> int(12) [1]=> float(0.24491596221924) } Appropriate Cost Found: 12
Output for 5.5.3
array(2) { [0]=> int(10) [1]=> float(0.07890510559082) } array(2) { [0]=> int(11) [1]=> float(0.12378096580505) } array(2) { [0]=> int(12) [1]=> float(0.24384093284607) } Appropriate Cost Found: 12
Output for 5.5.2
array(2) { [0]=> int(10) [1]=> float(0.078111171722412) } array(2) { [0]=> int(11) [1]=> float(0.12366700172424) } array(2) { [0]=> int(12) [1]=> float(0.24376201629639) } Appropriate Cost Found: 12
Output for 5.5.1
array(2) { [0]=> int(10) [1]=> float(0.080314159393311) } array(2) { [0]=> int(11) [1]=> float(0.12490010261536) } array(2) { [0]=> int(12) [1]=> float(0.24388599395752) } Appropriate Cost Found: 12
Output for 5.5.0
array(2) { [0]=> int(10) [1]=> float(0.071432113647461) } array(2) { [0]=> int(11) [1]=> float(0.12240099906921) } array(2) { [0]=> int(12) [1]=> float(0.24387216567993) } Appropriate Cost Found: 12
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/7RItJ on line 9
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/7RItJ on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/7RItJ on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/7RItJ on line 9
Process exited with code 255.