3v4l.org

run code in 300+ PHP versions simultaneously
<?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.2.0
9 0.030815839767456 10 0.061269998550415 11 0.12297391891479 12 0.24733591079712 13 0.48146986961365 14 0.95668792724609
Process exited with code 137.
Output for 7.1.7
9 0.029870986938477 10 0.059343099594116 11 0.11892914772034 12 0.24136400222778 13 0.48031997680664 14 0.96245813369751
Process exited with code 137.
Output for 7.1.6
9 0.033139944076538 10 0.061383008956909 11 0.12370300292969 12 0.24693989753723 13 0.48206210136414 14 0.95665192604065
Process exited with code 137.
Output for 7.1.5
9 0.063323974609375 10 0.090229988098145 11 0.12974500656128 12 0.24068212509155 13 0.48109698295593 14 0.93981003761292
Process exited with code 137.
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.20
9 0.030735969543457 10 0.061209917068481 11 0.12213611602783 12 0.24436187744141 13 0.47533321380615 14 0.94855785369873
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 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.034794092178345 10 0.067179203033447 11 0.13356900215149 12 0.26839113235474 13 0.61053109169006
Process exited with code 137.
Output for 5.4.22
9 0.033315896987915 10 0.070382833480835 11 0.13604784011841 12 0.26680016517639 13 0.53906416893005 14 1.0945110321045
Process exited with code 137.
Output for 5.4.21
9 0.035084962844849 10 0.067739963531494 11 0.13711214065552 12 0.26805710792542 13 0.54194617271423
Process exited with code 137.
Output for 5.4.20
9 0.034314870834351 10 0.066845178604126 11 0.13590693473816 12 0.26760292053223 13 0.59410810470581 14 1.062185049057
Process exited with code 137.
Output for 5.4.19
9 0.033261775970459 10 0.071463108062744 11 0.13367319107056 12 0.26898097991943 13 0.52865099906921 14 1.0559728145599
Process exited with code 137.
Output for 5.4.18
9 0.033228874206543 10 0.067531108856201 11 0.13152718544006 12 0.27255606651306 13 0.56787300109863
Process exited with code 137.
Output for 5.4.17
9 0.032979011535645 10 0.066537857055664 11 0.1342179775238 12 0.27011489868164 13 0.52492499351501 14 1.0582129955292
Process exited with code 137.
Output for 5.4.16
9 0.033308982849121 10 0.068692207336426 11 0.13326096534729 12 0.36156678199768 13 0.52930998802185
Process exited with code 137.
Output for 5.4.15
9 0.034105062484741 10 0.070033073425293 11 0.1350200176239 12 0.27150297164917 13 0.60857701301575
Process exited with code 137.
Output for 5.4.14
9 0.063874006271362 10 0.065733194351196 11 0.13467788696289 12 0.26272201538086 13 0.5291600227356 14 1.0640048980713
Process exited with code 137.
Output for 5.4.13
9 0.034015893936157 10 0.066910982131958 11 0.13435983657837 12 0.27128410339355 13 0.60036396980286 14 1.0693461894989
Process exited with code 137.
Output for 5.4.12
9 0.034471988677979 10 0.068948030471802 11 0.13682007789612 12 0.27475810050964 13 0.5534610748291
Process exited with code 137.
Output for 5.4.11
9 0.09441614151001 10 0.067373037338257 11 0.13470196723938 12 0.26825094223022 13 0.53429985046387 14 1.0827629566193
Process exited with code 137.
Output for 5.4.10
9 0.033177852630615 10 0.067157983779907 11 0.13374185562134 12 0.26942181587219 13 0.54146194458008 14 1.0790889263153
Process exited with code 137.
Output for 5.4.9
9 0.093586921691895 10 0.065690040588379 11 0.13254714012146 12 0.270583152771 13 0.54100203514099
Process exited with code 137.
Output for 5.4.8
9 0.094297885894775 10 0.069756031036377 11 0.17062592506409 12 0.28457093238831 13 0.69011092185974
Process exited with code 137.
Output for 5.4.7
9 0.036862134933472 10 0.066396951675415 11 0.13700413703918 12 0.27280688285828 13 0.53983092308044 14 1.0950748920441
Process exited with code 137.
Output for 5.4.6
9 0.033548831939697 10 0.066941976547241 11 0.13594508171082 12 0.27259206771851 13 0.62147283554077
Process exited with code 137.
Output for 5.4.5
9 0.12604308128357 10 0.16219091415405 11 0.26640105247498 12 0.63714694976807
Process exited with code 137.
Output for 5.4.4
9 0.03441596031189 10 0.36417198181152 11 0.32789492607117 12 0.56114792823792
Process exited with code 137.
Output for 5.4.3
9 0.23556518554688 10 0.066766977310181 11 0.26341199874878 12 0.64474296569824
Process exited with code 137.
Output for 5.4.2
9 0.03481912612915 10 0.14422106742859 11 0.51116299629211
Process exited with code 137.
Output for 5.4.1
9 0.03322696685791 10 0.395339012146 11 0.38987493515015
Process exited with code 137.
Output for 5.4.0
9 0.045441150665283 10 0.069095134735107 11 0.26539516448975 12 0.49328398704529 13 1.1276798248291
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.094162940979004 10 0.067431926727295 11 0.25717496871948 12 0.51681780815125 13 1.0145900249481
Process exited with code 137.
Output for 5.3.27
9 0.037459135055542 10 0.13125395774841 11 0.25788688659668 12 0.50979208946228 13 0.93040299415588
Process exited with code 137.
Output for 5.3.26
9 0.034654855728149 10 0.13030791282654 11 0.25772190093994 12 0.49369502067566 13 1.0306520462036
Process exited with code 137.
Output for 5.3.25
9 0.034590005874634 10 0.12706184387207 11 0.2276759147644 12 0.53940916061401 13 1.0245721340179
Process exited with code 137.
Output for 5.3.24
9 0.032893896102905 10 0.12663412094116 11 0.25699210166931 12 0.44622898101807 13 0.98574209213257
Process exited with code 137.
Output for 5.3.23
9 0.033258199691772 10 0.126708984375 11 0.25987219810486 12 0.50616383552551 13 0.97020506858826
Process exited with code 137.
Output for 5.3.22
9 0.033519983291626 10 0.12834405899048 11 0.25743579864502 12 0.51839113235474 13 0.96530389785767
Process exited with code 137.
Output for 5.3.21
9 0.038916110992432 10 0.13098287582397 11 0.25632405281067 12 0.44812798500061 13 0.98912405967712
Process exited with code 137.
Output for 5.3.20
9 0.033543825149536 10 0.12763810157776 11 0.25562691688538 12 0.54471278190613 13 0.93680596351624
Process exited with code 137.
Output for 5.3.19
9 0.033926963806152 10 0.12829685211182 11 0.25677108764648 12 0.51874804496765 13 1.040629863739
Process exited with code 137.
Output for 5.3.18
9 0.033866167068481 10 0.12587118148804 11 0.25629305839539 12 0.45302414894104 13 1.0242619514465
Process exited with code 137.
Output for 5.3.17
9 0.12400889396667 10 0.06685209274292 11 0.26102209091187 12 0.54255390167236 13 0.96107292175293
Process exited with code 137.
Output for 5.3.16
9 0.03546404838562 10 0.12753510475159 11 0.26528382301331 12 0.48363614082336 13 1.0332269668579
Process exited with code 137.
Output for 5.3.15
9 0.12579703330994 10 0.13732886314392 11 0.2612419128418 12 0.4515700340271 13 0.99739718437195
Process exited with code 137.
Output for 5.3.14
9 0.033051013946533 10 0.1559579372406 11 0.28342390060425 12 0.44744086265564 13 0.96527099609375
Process exited with code 137.
Output for 5.3.13
9 0.033712863922119 10 0.12852096557617 11 0.25628113746643 12 0.78356909751892 13 0.98052000999451
Process exited with code 137.
Output for 5.3.12
9 0.096740961074829 10 0.12880802154541 11 0.25938701629639 12 0.48426103591919 13 0.96828484535217
Process exited with code 137.
Output for 5.3.11
9 0.03439998626709 10 0.12928509712219 11 0.25931406021118 12 0.51144695281982 13 0.97589683532715
Process exited with code 137.
Output for 5.3.10
9 0.094702959060669 10 0.067406177520752 11 0.28706192970276 12 0.50965285301208 13 1.0063090324402
Process exited with code 137.
Output for 5.3.9
9 0.034337043762207 10 0.12669610977173 11 0.28541493415833 12 0.61693906784058 13 1.044016122818
Process exited with code 137.
Output for 5.3.8
9 0.034761190414429 10 0.18883514404297 11 0.23522591590881 12 0.52217411994934 13 1.0639350414276
Process exited with code 137.
Output for 5.3.7
9 0.09595799446106 10 0.13197016716003 11 0.261883020401 12 0.51613783836365 13 1.0077459812164
Process exited with code 137.
Output for 5.3.6
9 0.00035691261291504 10 2.5033950805664E-5 11 9.0599060058594E-6 12 9.0599060058594E-6 13 9.0599060058594E-6 14 9.0599060058594E-6 15 2.6941299438477E-5
Output for 5.3.5
9 0.00028586387634277 10 0.00037097930908203 11 0.00037217140197754 12 0.00037789344787598 13 0.00036811828613281 14 0.00037312507629395 15 0.0003812313079834
Output for 5.3.4
9 0.00027990341186523 10 0.00026798248291016 11 0.00029301643371582 12 0.00027680397033691 13 0.0002748966217041 14 0.00028896331787109 15 0.00027298927307129
Output for 5.3.3
9 0.00028204917907715 10 0.00029206275939941 11 0.00026416778564453 12 0.00027704238891602 13 0.0002901554107666 14 0.0002751350402832 15 0.0002748966217041
Output for 5.3.2
9 0.00029110908508301 10 2.8848648071289E-5 11 7.8678131103516E-6 12 7.1525573730469E-6 13 7.1525573730469E-6 14 1.9073486328125E-5 15 7.8678131103516E-6
Output for 5.3.1
9 0.00028300285339355 10 1.0967254638672E-5 11 9.0599060058594E-6 12 7.8678131103516E-6 13 7.8678131103516E-6 14 8.1062316894531E-6 15 9.0599060058594E-6
Output for 5.3.0
9 0.00027799606323242 10 1.0013580322266E-5 11 7.8678131103516E-6 12 8.1062316894531E-6 13 9.0599060058594E-6 14 9.0599060058594E-6 15 9.0599060058594E-6
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17

Process exited with code 139.

preferences:
127.6 ms | 402 KiB | 174 Q