3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $vars['x'] = 10; $vars['y'] = 100; $vars['a'] = '1'; $vars['b'] = 1.1; $iterations = 100000; $start = microtime(true); for ($i = 0; $i<$iterations; $i++) { $foo = sprintf('from %s to %s %s %s', $vars['x'], $vars['y'], $vars['a'], $vars['b']); } var_dump(microtime(true) - $start); $start = microtime(true); for ($i = 0; $i<$iterations; $i++) { $foo = 'from ' . $vars['x'] . ' to ' . $vars['y'] . ' ' . $vars['a'] . ' '. $vars['b']; } var_dump(microtime(true) - $start); $start = microtime(true); for ($i = 0; $i<$iterations; $i++) { $foo = "from {$vars['x']} to {$vars['y']} {$vars['a']} {$vars['b']}"; } var_dump(microtime(true) - $start);
based on qpKIB
Output for 7.1.0
float(0.021585941314697) float(-0.06341814994812) float(-0.039690017700195)
Output for 7.0.14
float(0.062910795211792) float(0.060219049453735) float(0.040546894073486)
Output for 7.0.6
float(0.051558017730713) float(0.049261093139648) float(0.032740831375122)
Output for 7.0.5
float(0.044512987136841) float(0.049481868743896) float(0.033706903457642)
Output for 7.0.4
float(0.054207801818848) float(0.050010919570923) float(0.033946990966797)
Output for 7.0.3
float(0.0367591381073) float(0.047446012496948) float(0.032895088195801)
Output for 7.0.2
float(0.041876077651978) float(0.049211025238037) float(0.033375978469849)
Output for 7.0.1
float(0.052240133285522) float(0.054916858673096) float(0.033328056335449)
Output for 7.0.0
float(0.042340993881226) float(0.0487380027771) float(0.033689975738525)
Output for 5.6.28
float(0.14477109909058) float(0.11272001266479) float(0.089852094650269)
Output for 5.6.21
float(0.07825493812561) float(0.065040111541748) float(0.059094905853271)
Output for 5.6.20
float(0.07338285446167) float(0.064642906188965) float(0.059639930725098)
Output for 5.6.19
float(0.066903114318848) float(0.058432102203369) float(0.053092002868652)
Output for 5.6.18
float(0.069726943969727) float(0.061761856079102) float(0.053478956222534)
Output for 5.6.17
float(0.078259944915771) float(0.063987016677856) float(0.058974981307983)
Output for 5.6.16
float(0.073072910308838) float(0.065291881561279) float(0.058750867843628)
Output for 5.6.15
float(0.083474159240723) float(0.067847967147827) float(0.059793949127197)
Output for 5.6.14
float(0.076233148574829) float(0.069494009017944) float(0.063471078872681)
Output for 5.6.13
float(0.085191965103149) float(0.06644606590271) float(0.0590980052948)
Output for 5.6.12
float(0.08088493347168) float(0.067872047424316) float(0.059610843658447)
Output for 5.6.11
float(0.082502841949463) float(0.066555976867676) float(0.05848217010498)
Output for 5.6.10
float(0.087247133255005) float(0.069795846939087) float(0.06049108505249)
Output for 5.6.9
float(0.072622060775757) float(0.067425012588501) float(0.057764053344727)
Output for 5.6.8
float(0.065632104873657) float(0.062853813171387) float(0.058876037597656)
Output for 5.5.35
float(0.08197283744812) float(0.063212871551514) float(0.058449029922485)
Output for 5.5.34
float(0.06694507598877) float(0.06299090385437) float(0.058911800384521)
Output for 5.5.33
float(0.068445205688477) float(0.05773401260376) float(0.053267002105713)
Output for 5.5.32
float(0.070406198501587) float(0.063429117202759) float(0.060179948806763)
Output for 5.5.31
float(0.066447973251343) float(0.063021183013916) float(0.060187101364136)
Output for 5.5.30
float(0.085247993469238) float(0.063309907913208) float(0.058890104293823)
Output for 5.5.29
float(0.091661214828491) float(0.065490007400513) float(0.059478044509888)
Output for 5.5.28
float(0.091308832168579) float(0.081273078918457) float(0.068916082382202)
Output for 5.5.27
float(0.064093112945557) float(0.061001062393188) float(0.058817148208618)
Output for 5.5.26
float(0.084547996520996) float(0.073466062545776) float(0.06853199005127)
Output for 5.5.25
float(0.078243017196655) float(0.073863983154297) float(0.073248863220215)
Output for 5.5.24
float(0.081932783126831) float(0.063326835632324) float(0.059534072875977)
Output for 5.4.45
float(0.092489004135132) float(0.099199056625366) float(0.21650505065918)
Output for 5.4.44
float(0.12552905082703) float(0.18004393577576) float(0.076134920120239)
Output for 5.4.43
float(0.17898988723755) float(0.19432616233826) float(0.24736285209656)
Output for 5.4.42
float(0.11439990997314) float(0.17721796035767) float(0.18817591667175)
Output for 5.4.41
float(0.095166921615601) float(0.080450057983398) float(0.066606998443604)
Output for 5.4.40
float(0.23125600814819) float(0.18566703796387) float(0.23395609855652)
Output for 5.4.39
float(0.1678900718689) float(0.11999201774597) float(0.21372008323669)
Output for 5.4.38
float(0.22065591812134) float(0.14260292053223) float(0.082716941833496)
Output for 5.4.37
float(0.10540199279785) float(0.12774181365967) float(0.09467601776123)
Output for 5.4.36
float(0.10334920883179) float(0.11170196533203) float(0.089831113815308)
Output for 5.4.35
float(0.10944414138794) float(0.098888158798218) float(0.088420867919922)
Output for 5.4.34
float(0.18137097358704) float(0.10090398788452) float(0.087095975875854)
Output for 5.4.32
float(0.076992034912109) float(0.068457841873169) float(0.083611011505127)
Output for 5.4.31
float(0.077431917190552) float(0.071681022644043) float(0.063112020492554)
Output for 5.4.30
float(0.076146841049194) float(0.068773984909058) float(0.068973064422607)
Output for 5.4.29
float(0.082494020462036) float(0.075054883956909) float(0.065575122833252)
Output for 5.4.28
float(0.085648059844971) float(0.074432849884033) float(0.062633991241455)
Output for 5.4.27
float(0.085546016693115) float(0.070501804351807) float(0.066237926483154)
Output for 5.4.26
float(0.083702087402344) float(0.087126970291138) float(0.084401845932007)
Output for 5.4.25
float(0.079493999481201) float(0.070632934570312) float(0.063295125961304)
Output for 5.4.24
float(0.082247972488403) float(0.077613830566406) float(0.063678026199341)
Output for 5.4.23
float(0.093628168106079) float(0.07163405418396) float(0.063394069671631)
Output for 5.4.22
float(0.087269067764282) float(0.071236848831177) float(0.062441110610962)
Output for 5.4.21
float(0.079970836639404) float(0.070905923843384) float(0.064130067825317)
Output for 5.4.20
float(0.082401037216187) float(0.07253098487854) float(0.067214965820312)
Output for 5.4.19
float(0.086772203445435) float(0.089456081390381) float(0.078978061676025)
Output for 5.4.18
float(0.085031986236572) float(0.075066089630127) float(0.066137790679932)
Output for 5.4.17
float(0.082191944122314) float(0.072480916976929) float(0.065811157226562)
Output for 5.4.16
float(0.081357002258301) float(0.078809976577759) float(0.064461946487427)
Output for 5.4.15
float(0.08211612701416) float(0.086488962173462) float(0.06513786315918)
Output for 5.4.14
float(0.084167957305908) float(0.078932046890259) float(0.071961164474487)
Output for 5.4.13
float(0.080913066864014) float(0.070053100585938) float(0.066493034362793)
Output for 5.4.12
float(0.085989952087402) float(0.076688766479492) float(0.066860198974609)
Output for 5.4.11
float(0.091471910476685) float(0.072668075561523) float(0.06391716003418)
Output for 5.4.10
float(0.08129096031189) float(0.076140880584717) float(0.068657875061035)
Output for 5.4.9
float(0.084787130355835) float(0.086235046386719) float(0.066398143768311)
Output for 5.4.8
float(0.083093881607056) float(0.078052997589111) float(0.080676078796387)
Output for 5.4.7
float(0.084216117858887) float(0.072698831558228) float(0.067079067230225)
Output for 5.4.6
float(0.08195686340332) float(0.074231147766113) float(0.065601110458374)
Output for 5.4.5
float(0.090552091598511) float(0.077704191207886) float(0.068279027938843)
Output for 5.4.4
float(0.08751106262207) float(0.087628126144409) float(0.069354057312012)
Output for 5.4.3
float(0.089982986450195) float(0.082298994064331) float(0.077236890792847)
Output for 5.4.2
float(0.082820892333984) float(0.076668977737427) float(0.085609912872314)
Output for 5.4.1
float(0.08699893951416) float(0.081093072891235) float(0.085032939910889)
Output for 5.4.0
float(0.085596084594727) float(0.075419187545776) float(0.06889009475708)
Output for 5.3.29
float(0.097339868545532) float(0.087482929229736) float(0.072104930877686)
Output for 5.3.28
float(0.096580982208252) float(0.072893142700195) float(0.067627191543579)
Output for 5.3.27
float(0.090969085693359) float(0.077821969985962) float(0.066575050354004)
Output for 5.3.26
float(0.098834037780762) float(0.076679944992065) float(0.067320823669434)
Output for 5.3.25
float(0.091367959976196) float(0.075656890869141) float(0.065956115722656)
Output for 5.3.24
float(0.093255043029785) float(0.073765993118286) float(0.07122802734375)
Output for 5.3.23
float(0.084120988845825) float(0.085741996765137) float(0.074314832687378)
Output for 5.3.22
float(0.10028195381165) float(0.075993061065674) float(0.070720911026001)
Output for 5.3.21
float(0.095585107803345) float(0.072151899337769) float(0.067976951599121)
Output for 5.3.20
float(0.092329025268555) float(0.07724404335022) float(0.066932916641235)
Output for 5.3.19
float(0.10444903373718) float(0.083374977111816) float(0.068892955780029)
Output for 5.3.18
float(0.092870950698853) float(0.078350067138672) float(0.070653915405273)
Output for 5.3.17
float(0.10050988197327) float(0.077877044677734) float(0.067816972732544)
Output for 5.3.16
float(0.091414928436279) float(0.075957059860229) float(0.07716703414917)
Output for 5.3.15
float(0.091436147689819) float(0.075443983078003) float(0.069525957107544)
Output for 5.3.14
float(0.094077825546265) float(0.079353094100952) float(0.066344022750854)
Output for 5.3.13
float(0.094637870788574) float(0.077100992202759) float(0.067896842956543)
Output for 5.3.12
float(0.10279512405396) float(0.074867963790894) float(0.070241212844849)
Output for 5.3.11
float(0.092268943786621) float(0.072151184082031) float(0.068750143051147)
Output for 5.3.10
float(0.093602895736694) float(0.075287103652954) float(0.065451145172119)
Output for 5.3.9
float(0.090956926345825) float(0.075817823410034) float(0.078373908996582)
Output for 5.3.8
float(0.089179039001465) float(0.077903032302856) float(0.069130897521973)
Output for 5.3.7
float(0.090867042541504) float(0.075369834899902) float(0.069253921508789)
Output for 5.3.6
float(0.091801166534424) float(0.076641082763672) float(0.06784200668335)
Output for 5.3.5
float(0.11062002182007) float(0.083005905151367) float(0.07396388053894)
Output for 5.3.4
float(0.093486070632935) float(0.083346843719482) float(0.070636034011841)
Output for 5.3.3
float(0.092264175415039) float(0.074937105178833) float(0.067622900009155)
Output for 5.3.2
float(0.092154026031494) float(0.076064825057983) float(0.079326868057251)
Output for 5.3.1
float(0.088753938674927) float(0.071654081344604) float(0.06463885307312)
Output for 5.3.0
float(0.093483924865723) float(0.079315185546875) float(0.069320201873779)
Output for 5.2.17
float(0.10565304756165) float(0.08632493019104) float(0.080065011978149)
Output for 5.2.16
float(0.10749292373657) float(0.077353000640869) float(0.075397968292236)
Output for 5.2.15
float(0.10358309745789) float(0.076324939727783) float(0.073417901992798)
Output for 5.2.14
float(0.094527006149292) float(0.080538034439087) float(0.073760032653809)
Output for 5.2.13
float(0.093961000442505) float(0.086254119873047) float(0.07342004776001)
Output for 5.2.12
float(0.11360788345337) float(0.076210021972656) float(0.072251081466675)
Output for 5.2.11
float(0.098841905593872) float(0.080682992935181) float(0.071744918823242)
Output for 5.2.10
float(0.10033488273621) float(0.077327013015747) float(0.071335077285767)
Output for 5.2.9
float(0.097250938415527) float(0.080254077911377) float(0.078274965286255)
Output for 5.2.8
float(0.10248208045959) float(0.078652858734131) float(0.071744918823242)
Output for 5.2.7
float(0.10131502151489) float(0.076673030853271) float(0.067615985870361)
Output for 5.2.6
float(0.094083070755005) float(0.081024885177612) float(0.068122148513794)
Output for 5.2.5
float(0.096199989318848) float(0.082274913787842) float(0.069758892059326)
Output for 5.2.4
float(0.091485023498535) float(0.076027154922485) float(0.0694420337677)
Output for 5.2.3
float(0.085924863815308) float(0.073326110839844) float(0.070071935653687)
Output for 5.2.2
float(0.10178208351135) float(0.0816810131073) float(0.080344915390015)
Output for 5.2.1
float(0.13066506385803) float(0.11787295341492) float(0.12689113616943)
Output for 5.2.0
float(0.14127802848816) float(0.13054299354553) float(0.11608004570007)
Output for 5.1.6
float(0.11618280410767) float(0.09331488609314) float(0.11431312561035)
Output for 5.1.5
float(0.1204309463501) float(0.095948934555054) float(0.14249491691589)
Output for 5.1.4
float(0.14112019538879) float(0.096061944961548) float(0.12775588035583)
Output for 5.1.3
float(0.12859702110291) float(0.09626293182373) float(0.12269997596741)
Output for 5.1.2
float(0.1132550239563) float(0.09342098236084) float(0.13896012306213)
Output for 5.1.1
float(0.12990283966064) float(0.097185134887695) float(0.12164998054504)
Output for 5.1.0
float(0.1328980922699) float(0.10452508926392) float(0.13255476951599)
Output for 5.0.5
float(0.18935894966125) float(0.13568806648254) float(0.15256786346436)
Output for 5.0.4
float(0.1567599773407) float(0.13479781150818) float(0.15732192993164)
Output for 5.0.3
float(0.19723510742188) float(0.14042592048645) float(0.18692684173584)
Output for 5.0.2
float(0.15959095954895) float(0.13092994689941) float(0.15289378166199)
Output for 5.0.1
float(0.20974612236023) float(0.1606559753418) float(0.21533298492432)
Output for 5.0.0
float(0.17824101448059) float(0.16456913948059) float(0.16247010231018)
Output for 4.4.9
float(0.168732) float(0.141652) float(0.167335)
Output for 4.4.8
float(-0.83573) float(0.140352) float(0.162141)
Output for 4.4.7
float(0.15934) float(0.131178) float(0.158911)
Output for 4.4.6
float(-0.83452) float(0.139324) float(0.169596)
Output for 4.4.5
float(0.20786) float(0.141872) float(0.174097)
Output for 4.4.4
float(-0.82844) float(0.143192) float(0.171446)
Output for 4.4.3
float(0.168374) float(0.143222) float(0.167716)
Output for 4.4.2
float(-0.831975) float(0.140462) float(0.18808)
Output for 4.4.1
float(0.158536) float(0.13462) float(0.170408)
Output for 4.4.0
float(-0.804275) float(0.160154) float(0.225936)
Output for 4.3.11
float(0.153678) float(0.136025) float(0.183766)
Output for 4.3.10
float(0.155832) float(0.14046) float(0.177356)
Output for 4.3.9
float(0.153125) float(0.142109) float(-0.80122)
Output for 4.3.8
float(0.161854) float(0.13936) float(0.179597)
Output for 4.3.7
float(0.181464) float(0.172891) float(-0.819873)
Output for 4.3.6
float(0.173937) float(0.160837) float(0.169887)
Output for 4.3.5
float(0.179355) float(0.160272) float(-0.830783)
Output for 4.3.4
float(0.162727) float(0.150613) float(0.164791)
Output for 4.3.3
float(0.192208) float(-0.83374) float(0.205549)
Output for 4.3.2
float(0.174006) float(0.143543) float(0.18156)
Output for 4.3.1
float(0.168895) float(-0.86555) float(0.165152)
Output for 4.3.0
float(-0.44706) float(0.412748) float(0.297256)