3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function bcryptWithCost($cost) { $cost = str_pad($cost, 2, '0', STR_PAD_LEFT); crypt('password', '$2y$' . $cost . '$thisisasaltthisisasalt'); } $costs = range(9, 15); foreach ($costs as $cost) { $timestamp = microtime(true); bcryptWithCost($cost); $time = microtime(true) - $timestamp; echo $cost . ' ' . $time . PHP_EOL; if (!isset($recommended) && $time >= 0.5) { $recommended = $cost; } if (isset($recommended) && $time < 0.9) { $recommended = $cost; } }
Output for 7.1.0
9 0.047513008117676 10 0.076226949691772 11 0.11575388908386 12 0.054173946380615 13 -0.42802906036377 14 1.1436710357666
Process exited with code 137.
Output for 7.0.14
9 0.046799898147583 10 0.074506998062134 11 0.1148099899292 12 0.21398997306824 13 -0.10120892524719 14 1.1445021629333
Process exited with code 137.
Output for 7.0.6
9 0.030627012252808 10 0.061116933822632 11 0.12217211723328 12 0.23870515823364 13 0.47370195388794 14 0.94924783706665
Process exited with code 137.
Output for 7.0.5
9 0.044697046279907 10 0.070922136306763 11 0.12194108963013 12 0.24322199821472 13 0.48278284072876 14 0.94321799278259
Process exited with code 137.
Output for 7.0.4
9 0.031177997589111 10 0.0610191822052 11 0.12185215950012 12 0.24366307258606 13 0.47830700874329 14 0.94001889228821
Process exited with code 137.
Output for 7.0.3
9 0.029783010482788 10 0.059674024581909 11 0.11897802352905 12 0.23714995384216 13 0.4752779006958 14 0.94915580749512
Process exited with code 137.
Output for 7.0.2
9 0.030848979949951 10 0.061249971389771 11 0.12246298789978 12 0.24459195137024 13 0.47997093200684 14 0.93721914291382
Process exited with code 137.
Output for 7.0.1
9 0.042106866836548 10 0.068248987197876 11 0.12155890464783 12 0.24327397346497 13 0.48239898681641 14 0.94351601600647
Process exited with code 137.
Output for 7.0.0
9 0.044420003890991 10 0.071041822433472 11 0.12205100059509 12 0.2436249256134 13 0.48455119132996 14 0.94287300109863
Process exited with code 137.
Output for hhvm-3.12.0
9 0.040072917938232 10 0.079877138137817 11 0.15904498100281 12 0.32350611686707 13 0.63483309745789
Process exited with code 137.
Output for hhvm-3.10.0
9 0.030956029891968 10 0.061002016067505 11 0.12183403968811 12 0.24334311485291 13 0.47530317306519 14 0.93958401679993
Process exited with code 137.
Output for 5.6.28
9 0.048341035842896 10 0.079416990280151 11 0.12486600875854 12 0.21415400505066 13 0.31377983093262 14 0.96951794624329
Process exited with code 137.
Output for 5.6.21
9 0.040182113647461 10 0.067198991775513 11 0.12323403358459 12 0.24344182014465 13 0.4808521270752 14 0.93921494483948
Process exited with code 137.
Output for 5.6.20
9 0.039819002151489 10 0.063133001327515 11 0.12184190750122 12 0.24394202232361 13 0.48200702667236 14 0.94463801383972
Process exited with code 137.
Output for 5.6.19
9 0.032788038253784 10 0.061125040054321 11 0.12179899215698 12 0.24404001235962 13 0.48288083076477 14 0.94451880455017
Process exited with code 137.
Output for 5.6.18
9 0.031489849090576 10 0.06269907951355 11 0.12637400627136 12 0.24152302742004 13 0.47170114517212 14 1.0348651409149
Process exited with code 137.
Output for 5.6.17
9 0.031200885772705 10 0.061025142669678 11 0.12180614471436 12 0.24332904815674 13 0.47721290588379 14 0.94749689102173
Process exited with code 137.
Output for 5.6.16
9 0.030685901641846 10 0.061253070831299 11 0.12200784683228 12 0.24410486221313 13 0.47729516029358 14 0.95336484909058
Process exited with code 137.
Output for 5.6.15
9 0.029651165008545 10 0.059282064437866 11 0.11844110488892 12 0.23650097846985 13 0.4726300239563 14 0.94294905662537
Process exited with code 137.
Output for 5.6.14
9 0.039791107177734 10 0.065965175628662 11 0.12177896499634 12 0.2434070110321 13 0.48251795768738 14 0.93856000900269
Process exited with code 137.
Output for 5.6.13
9 0.045387983322144 10 0.072007894515991 11 0.12204694747925 12 0.24333214759827 13 0.48620700836182 14 0.93492197990417
Process exited with code 137.
Output for 5.6.12
9 0.029960155487061 10 0.059137105941772 11 0.11809897422791 12 0.23592400550842 13 0.47236204147339 14 0.94334697723389
Process exited with code 137.
Output for 5.6.11
9 0.030581951141357 10 0.061047792434692 11 0.11978197097778 12 0.23701095581055 13 0.47425293922424 14 0.94788002967834
Process exited with code 137.
Output for 5.6.10
9 0.039508104324341 10 0.065155982971191 11 0.12207293510437 12 0.24438309669495 13 0.48016905784607 14 0.93272590637207
Process exited with code 137.
Output for 5.6.9
9 0.03710412979126 10 0.062474012374878 11 0.12232422828674 12 0.24448204040527 13 0.4859139919281 14 0.94992899894714
Process exited with code 137.
Output for 5.6.8
9 0.031121015548706 10 0.06264591217041 11 0.12339115142822 12 0.24686002731323 13 0.46778607368469 14 0.93885207176208
Process exited with code 137.
Output for 5.5.35
9 0.042891025543213 10 0.068928003311157 11 0.12258100509644 12 0.24508595466614 13 0.47679996490479 14 0.8048689365387
Process exited with code 137.
Output for 5.5.34
9 0.071764945983887 10 0.098663806915283 11 0.26845192909241 12 0.51609086990356 13 0.86418414115906
Process exited with code 137.
Output for 5.5.33
9 0.087975025177002 10 0.09748387336731 11 0.18319296836853 12 0.36224699020386 13 0.69545602798462
Process exited with code 137.
Output for 5.5.32
9 0.095708131790161 10 0.17113494873047 11 0.22245788574219 12 0.41649603843689 13 0.72113800048828
Process exited with code 137.
Output for 5.5.31
9 0.094990968704224 10 0.17311191558838 11 0.20099806785583 12 0.43736600875854 13 0.72696280479431
Process exited with code 137.
Output for 5.5.30
9 0.03682804107666 10 0.063165903091431 11 0.12234592437744 12 0.24466013908386 13 0.48335599899292 14 0.94747114181519
Process exited with code 137.
Output for 5.5.29
9 0.0676589012146 10 0.10759210586548 11 0.23895406723022 12 0.4525580406189 13 0.72089600563049
Process exited with code 137.
Output for 5.5.28
9 0.045984983444214 10 0.086201906204224 11 0.17316102981567 12 0.36038398742676 13 0.70370697975159
Process exited with code 137.
Output for 5.5.27
9 0.043070077896118 10 0.08819317817688 11 0.17416310310364 12 0.35095810890198 13 0.70403599739075
Process exited with code 137.
Output for 5.5.26
9 0.044764041900635 10 0.066020011901855 11 0.12164402008057 12 0.24310398101807 13 0.48377203941345 14 0.94955706596375
Process exited with code 137.
Output for 5.5.25
9 0.030495166778564 10 0.060845136642456 11 0.12202000617981 12 0.23673105239868 13 0.47166204452515 14 0.94455003738403
Process exited with code 137.
Output for 5.5.24
9 0.040812969207764 10 0.062896013259888 11 0.12182116508484 12 0.24331498146057 13 0.44897389411926 14 0.80177879333496
Process exited with code 137.
Output for 5.4.45
9 0.092383861541748 10 0.086786985397339 11 0.31031799316406 12 0.40846586227417 13 0.73302412033081
Process exited with code 137.
Output for 5.4.44
9 0.043278932571411 10 0.087451934814453 11 0.1717529296875 12 0.34373712539673 13 0.73920607566833
Process exited with code 137.
Output for 5.4.43
9 0.044281959533691 10 0.087719917297363 11 0.18096804618835 12 0.35037589073181 13 0.6949679851532
Process exited with code 137.
Output for 5.4.42
9 0.043065071105957 10 0.08568286895752 11 0.17137289047241 12 0.34613180160522 13 0.69473004341125
Process exited with code 137.
Output for 5.4.41
9 0.039517164230347 10 0.082391023635864 11 0.15799689292908 12 0.31930112838745 13 0.64342617988586
Process exited with code 137.
Output for 5.4.40
9 0.042636871337891 10 0.087946891784668 11 0.17220282554626 12 0.34436893463135 13 0.68998003005981
Process exited with code 137.
Output for 5.4.39
9 0.039667129516602 10 0.079881906509399 11 0.15781903266907 12 0.31657123565674 13 0.63986086845398
Process exited with code 137.
Output for 5.4.38
9 0.043839931488037 10 0.089773893356323 11 0.17633605003357 12 0.34877109527588 13 0.70215702056885
Process exited with code 137.
Output for 5.4.37
9 0.030376195907593 10 0.060143947601318 11 0.12839913368225 12 0.24626708030701 13 0.48505783081055 14 1.0226700305939
Process exited with code 137.
Output for 5.4.36
9 0.035454034805298 10 0.063292980194092 11 0.13149404525757 12 0.24752306938171 13 0.48536705970764 14 0.97315001487732
Process exited with code 137.
Output for 5.4.35
9 0.04651403427124 10 0.091273069381714 11 0.17439007759094 12 0.34308695793152 13 0.69345688819885
Process exited with code 137.
Output for 5.4.34
9 0.029972076416016 10 0.059835910797119 11 0.11861300468445 12 0.23718118667603 13 0.47616696357727 14 0.94857597351074
Process exited with code 137.
Output for 5.4.32
9 0.044302940368652 10 0.087836980819702 11 0.17752814292908 12 0.3500189781189 13 0.70733308792114
Process exited with code 137.
Output for 5.4.31
9 0.0294349193573 10 0.059118986129761 11 0.11720418930054 12 0.23480296134949 13 0.47596788406372 14 0.95939302444458
Process exited with code 137.
Output for 5.4.30
9 0.031193017959595 10 0.063727855682373 11 0.13813400268555 12 0.27543807029724 13 0.51295804977417
Process exited with code 137.
Output for 5.4.29
9 0.030339002609253 10 0.061690092086792 11 0.12192392349243 12 0.24327111244202 13 0.4983081817627 14 0.96621298789978
Process exited with code 137.
Output for 5.4.28
9 0.047341823577881 10 0.10433506965637 11 0.17406606674194 12 0.35431694984436 13 0.70725893974304
Process exited with code 137.
Output for 5.4.27
9 0.048034906387329 10 0.088785171508789 11 0.18239402770996 12 0.36266207695007 13 0.7043399810791
Process exited with code 137.
Output for 5.4.26
9 0.049998998641968 10 0.097420930862427 11 0.17518091201782 12 0.3484411239624 13 0.74322414398193
Process exited with code 137.
Output for 5.4.25
9 0.033307075500488 10 0.063770055770874 11 0.12479209899902 12 0.25191903114319 13 0.54075121879578 14 1.0102229118347
Process exited with code 137.
Output for 5.4.24
9 0.033262968063354 10 0.065072059631348 11 0.13431000709534 12 0.2567150592804 13 0.5141270160675
Process exited with code 137.
Output for 5.4.23
9 0.031028985977173 10 0.063444137573242 11 0.12398099899292 12 0.25499892234802 13 0.49240398406982 14 0.96213507652283
Process exited with code 137.
Output for 5.4.22
9 0.030294179916382 10 0.059855937957764 11 0.11932897567749 12 0.24724888801575 13 0.54019999504089 14 0.98715305328369
Process exited with code 137.
Output for 5.4.21
9 0.030716180801392 10 0.064827919006348 11 0.12421321868896 12 0.24582099914551 13 0.4961941242218 14 1.0298748016357
Process exited with code 137.
Output for 5.4.20
9 0.029888868331909 10 0.059861898422241 11 0.12119817733765 12 0.25236105918884 13 0.49286794662476 14 1.0138139724731
Process exited with code 137.
Output for 5.4.19
9 0.043435096740723 10 0.089148044586182 11 0.17351913452148 12 0.35287308692932 13 0.69510507583618
Process exited with code 137.
Output for 5.4.18
9 0.044237852096558 10 0.089468955993652 11 0.23469591140747 12 0.35186910629272 13 0.73430705070496
Process exited with code 137.
Output for 5.4.17
9 0.059301853179932 10 0.089708089828491 11 0.18270397186279 12 0.35678601264954 13 0.69545483589172
Process exited with code 137.
Output for 5.4.16
9 0.044116973876953 10 0.10513687133789 11 0.35196900367737 12 0.46792817115784 13 0.77136397361755
Process exited with code 137.
Output for 5.4.15
9 0.10536694526672 10 0.12680387496948 11 0.19454884529114 12 0.457515001297 13 0.70556902885437
Process exited with code 137.
Output for 5.4.14
9 0.030728101730347 10 0.06112003326416 11 0.12085795402527 12 0.24551796913147 13 0.50121998786926 14 1.0135359764099
Process exited with code 137.
Output for 5.4.13
9 0.030596017837524 10 0.061544179916382 11 0.12176489830017 12 0.2463960647583 13 0.48739314079285 14 0.95662307739258
Process exited with code 137.
Output for 5.4.12
9 0.029555797576904 10 0.058869123458862 11 0.11760592460632 12 0.23654913902283 13 0.49477410316467 14 1.0239000320435
Process exited with code 137.
Output for 5.4.11
9 0.093060970306396 10 0.12698793411255 11 0.20536398887634 12 0.45525288581848 13 0.7572181224823
Process exited with code 137.
Output for 5.4.10
9 0.044768095016479 10 0.087197065353394 11 0.17327404022217 12 0.35940194129944 13 0.72831606864929
Process exited with code 137.
Output for 5.4.9
9 0.045406103134155 10 0.086733102798462 11 0.1790759563446 12 0.35443186759949 13 0.70758509635925
Process exited with code 137.
Output for 5.4.8
9 0.043519973754883 10 0.084707021713257 11 0.17068099975586 12 0.34053516387939 13 0.69013381004333
Process exited with code 137.
Output for 5.4.7
9 0.046204090118408 10 0.09028697013855 11 0.1777651309967 12 0.35596704483032 13 0.70553493499756
Process exited with code 137.
Output for 5.4.6
9 0.050549983978271 10 0.092899799346924 11 0.17917084693909 12 0.35485982894897 13 0.705246925354
Process exited with code 137.
Output for 5.4.5
9 0.030539989471436 10 0.06103777885437 11 0.12131309509277 12 0.25020003318787 13 0.50735521316528 14 1.0065279006958
Process exited with code 137.
Output for 5.4.4
9 0.031440019607544 10 0.062283992767334 11 0.12514019012451 12 0.2548611164093 13 0.51915693283081
Process exited with code 137.
Output for 5.4.3
9 0.031314849853516 10 0.061576128005981 11 0.12242293357849 12 0.24913215637207 13 0.50465106964111 14 0.98578190803528
Process exited with code 137.
Output for 5.4.2
9 0.044190883636475 10 0.086449146270752 11 0.17938184738159 12 0.35128402709961 13 0.70763492584229
Process exited with code 137.
Output for 5.4.1
9 0.044363021850586 10 0.096647977828979 11 0.1747579574585 12 0.34763789176941 13 0.6954550743103
Process exited with code 137.
Output for 5.4.0
9 0.029728174209595 10 0.05856990814209 11 0.11891102790833 12 0.23480796813965 13 0.47391796112061 14 0.98834204673767
Process exited with code 137.
Output for 5.3.29
9 0.029717922210693 10 0.059885025024414 11 0.11789107322693 12 0.24099493026733 13 0.46741700172424 14 0.95175385475159
Process exited with code 137.
Output for 5.3.28
9 0.033934116363525 10 0.061665058135986 11 0.1233229637146 12 0.25460004806519 13 0.49529409408569 14 0.99354100227356
Process exited with code 137.
Output for 5.3.27
9 0.044356822967529 10 0.088984966278076 11 0.17126607894897 12 0.3428258895874 13 0.68540000915527
Process exited with code 137.
Output for 5.3.26
9 0.088865041732788 10 0.10517811775208 11 0.17223596572876 12 0.35277485847473 13 0.72796201705933
Process exited with code 137.
Output for 5.3.25
9 0.049528121948242 10 0.059993028640747 11 0.11936497688293 12 0.23976802825928 13 0.48025584220886 14 0.99105596542358
Process exited with code 137.
Output for 5.3.24
9 0.043037891387939 10 0.10446310043335 11 0.19046998023987 12 0.45083808898926 13 0.69922709465027
Process exited with code 137.
Output for 5.3.23
9 0.04128098487854 10 0.065279006958008 11 0.12389898300171 12 0.25124907493591 13 0.49440884590149
Process exited with code 137.
Output for 5.3.22
9 0.089390993118286 10 0.14403104782104 11 0.16884517669678 12 0.49988389015198 13 0.77460789680481
Process exited with code 137.
Output for 5.3.21
9 0.030159950256348 10 0.061311960220337 11 0.12839388847351 12 0.23960995674133 13 0.49283194541931 14 0.96535205841064
Process exited with code 137.
Output for 5.3.20
9 0.042670011520386 10 0.061918973922729 11 0.12700200080872 12 0.26979398727417 13 0.54277586936951
Process exited with code 137.
Output for 5.3.19
9 0.03019905090332 10 0.061631917953491 11 0.12254405021667 12 0.24775314331055 13 0.48867106437683 14 1.0368630886078
Process exited with code 137.
Output for 5.3.18
9 0.03048300743103 10 0.068419933319092 11 0.1211199760437 12 0.24462509155273 13 0.50119400024414 14 0.99624705314636
Process exited with code 137.
Output for 5.3.17
9 0.03014087677002 10 0.060043811798096 11 0.12672400474548 12 0.24335289001465 13 0.48063588142395 14 0.97988200187683
Process exited with code 137.
Output for 5.3.16
9 0.029737949371338 10 0.05948805809021 11 0.12580299377441 12 0.23907899856567 13 0.49188303947449 14 0.97455906867981
Process exited with code 137.
Output for 5.3.15
9 0.046227216720581 10 0.091531991958618 11 0.17857599258423 12 0.38845705986023 13 0.67872285842896
Process exited with code 137.
Output for 5.3.14
9 0.030771017074585 10 0.068870067596436 11 0.1225438117981 12 0.24504399299622 13 0.51847314834595 14 0.97406697273254
Process exited with code 137.
Output for 5.3.13
9 0.042457103729248 10 0.085045099258423 11 0.16845798492432 12 0.36533212661743 13 0.70549011230469
Process exited with code 137.
Output for 5.3.12
9 0.049317836761475 10 0.093053817749023 11 0.19116497039795 12 0.371661901474 13 0.68783116340637
Process exited with code 137.
Output for 5.3.11
9 0.042707920074463 10 0.095993995666504 11 0.17342400550842 12 0.34632182121277 13 0.68752789497375
Process exited with code 137.
Output for 5.3.10
9 0.043195009231567 10 0.088449954986572 11 0.17303681373596 12 0.35199785232544 13 0.74205589294434
Process exited with code 137.
Output for 5.3.9
9 0.029633045196533 10 0.060106039047241 11 0.11989593505859 12 0.23241400718689 13 0.47799801826477 14 0.99884295463562
Process exited with code 137.
Output for 5.3.8
9 0.044973850250244 10 0.088701963424683 11 0.19708395004272 12 0.3523211479187 13 0.68713617324829
Process exited with code 137.
Output for 5.3.7
9 0.029561996459961 10 0.060593843460083 11 0.11774587631226 12 0.23762202262878 13 0.47921299934387 14 0.96718692779541
Process exited with code 137.
Output for 5.3.6
9 0.0003209114074707 10 9.0599060058594E-6 11 7.8678131103516E-6 12 6.9141387939453E-6 13 8.1062316894531E-6 14 6.9141387939453E-6 15 7.1525573730469E-6
Output for 5.3.5
9 0.00026082992553711 10 0.0002591609954834 11 0.00025582313537598 12 0.00020694732666016 13 0.00022196769714355 14 0.0001990795135498 15 0.00023508071899414
Output for 5.3.4
9 0.00034213066101074 10 0.00032877922058105 11 0.00030207633972168 12 0.0002892017364502 13 0.00030207633972168 14 0.00028204917907715 15 0.00028491020202637
Output for 5.3.3
9 0.00034904479980469 10 0.00031685829162598 11 0.00029301643371582 12 0.00028610229492188 13 0.00030994415283203 14 0.00030612945556641 15 0.00028109550476074
Output for 5.3.2
9 0.0003361701965332 10 2.1934509277344E-5 11 5.0067901611328E-6 12 1.1920928955078E-5 13 6.1988830566406E-6 14 1.0013580322266E-5 15 2.0027160644531E-5
Output for 5.3.1
9 0.00032687187194824 10 1.215934753418E-5 11 8.1062316894531E-6 12 8.1062316894531E-6 13 9.0599060058594E-6 14 8.8214874267578E-6 15 9.0599060058594E-6
Output for 5.3.0
9 0.00033402442932129 10 1.2874603271484E-5 11 1.0967254638672E-5 12 1.1920928955078E-5 13 1.0967254638672E-5 14 1.5020370483398E-5 15 1.1920928955078E-5
Output for 4.3.0 - 5.2.17

Process exited with code 139.