3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $_field = "abcdefghijklmnopqrstuvwxyz"; public function __construct() {} } class B { public $_field = "abcdefghijklmnopqrstuvwxyz"; } $start = microtime(true); for ($i = 0; $i < 100000; $i++) $r = new A(); $time_taken = microtime(true) - $start; echo 'With construct: ' . $time_taken . 's' . PHP_EOL; $start = microtime(true); for ($i = 0; $i < 100000; $i++) $r = new B(); $time_taken = microtime(true) - $start; echo 'Without construct: ' . $time_taken . 's' . PHP_EOL;
Output for 7.4.0
With construct: 0.013139963150024s Without construct: 0.007875919342041s
Output for 7.3.12
With construct: 0.014451026916504s Without construct: 0.010066986083984s
Output for 7.3.11
With construct: 0.014813899993896s Without construct: 0.0089089870452881s
Output for 7.3.10
With construct: 0.0098309516906738s Without construct: 0.0055568218231201s
Output for 7.3.9
With construct: 0.0072259902954102s Without construct: 0.0052549839019775s
Output for 7.3.8
With construct: 0.0099649429321289s Without construct: 0.0052621364593506s
Output for 7.3.7
With construct: 0.0095920562744141s Without construct: 0.0063469409942627s
Output for 7.3.6
With construct: 0.01145601272583s Without construct: 0.0059728622436523s
Output for 7.3.5
With construct: 0.0092260837554932s Without construct: 0.0057981014251709s
Output for 7.3.4
With construct: 0.0075838565826416s Without construct: 0.0052368640899658s
Output for 7.3.3
With construct: 0.0091121196746826s Without construct: 0.0057969093322754s
Output for 7.3.2
With construct: 0.0079300403594971s Without construct: 0.0051689147949219s
Output for 7.3.1
With construct: 0.0073189735412598s Without construct: 0.0052509307861328s
Output for 7.3.0
With construct: 0.010504007339478s Without construct: 0.0059051513671875s
Output for 7.2.25
With construct: 0.016240835189819s Without construct: 0.0089888572692871s
Output for 7.2.24
With construct: 0.01563286781311s Without construct: 0.010518074035645s
Output for 7.2.23
With construct: 0.010371923446655s Without construct: 0.0069828033447266s
Output for 7.2.22
With construct: 0.010233879089355s Without construct: 0.0068709850311279s
Output for 7.2.21
With construct: 0.011636018753052s Without construct: 0.0061368942260742s
Output for 7.2.20
With construct: 0.011657953262329s Without construct: 0.0062689781188965s
Output for 7.2.19
With construct: 0.0095291137695312s Without construct: 0.0065147876739502s
Output for 7.2.18
With construct: 0.01241397857666s Without construct: 0.0066928863525391s
Output for 7.2.17
With construct: 0.010509014129639s Without construct: 0.0070540904998779s
Output for 7.2.0
With construct: 0.0093729496002197s Without construct: 0.0049581527709961s
Output for 7.1.33
With construct: 0.019458055496216s Without construct: 0.012794971466064s
Output for 7.1.32
With construct: 0.02174711227417s Without construct: 0.013877153396606s
Output for 7.1.31
With construct: 0.021309852600098s Without construct: 0.013142108917236s
Output for 7.1.30
With construct: 0.019011974334717s Without construct: 0.013283967971802s
Output for 7.1.29
With construct: 0.019093036651611s Without construct: 0.013648986816406s
Output for 7.1.28
With construct: 0.019731044769287s Without construct: 0.01334285736084s
Output for 7.1.27
With construct: 0.02048921585083s Without construct: 0.013093948364258s
Output for 7.1.26
With construct: 0.02000617980957s Without construct: 0.013101100921631s
Output for 7.1.7
With construct: 0.010637998580933s Without construct: 0.006173849105835s
Output for 7.1.6
With construct: 0.015024900436401s Without construct: 0.010688066482544s
Output for 7.1.5
With construct: 0.021257877349854s Without construct: 0.011898040771484s
Output for 7.1.0
With construct: 0.011216878890991s Without construct: 0.0079748630523682s
Output for 7.0.20
With construct: 0.0081110000610352s Without construct: 0.0061399936676025s
Output for 7.0.14
With construct: 0.014508962631226s Without construct: 0.010170936584473s
Output for 7.0.11
With construct: 0.0088398456573486s Without construct: 0.0062921047210693s
Output for 7.0.10
With construct: 0.0085439682006836s Without construct: 0.0059909820556641s
Output for 7.0.9
With construct: 0.0089139938354492s Without construct: 0.005864143371582s
Output for 7.0.8
With construct: 0.010416030883789s Without construct: 0.007127046585083s
Output for 7.0.7
With construct: 0.0086979866027832s Without construct: 0.0059709548950195s
Output for 7.0.6
With construct: 0.0085368156433105s Without construct: 0.0060408115386963s
Output for 7.0.5
With construct: 0.019246816635132s Without construct: 0.013375043869019s
Output for 7.0.4
With construct: 0.012479066848755s Without construct: 0.0080149173736572s
Output for 7.0.3
With construct: 0.010066032409668s Without construct: 0.0071651935577393s
Output for 7.0.2
With construct: 0.012836933135986s Without construct: 0.0085251331329346s
Output for 7.0.1
With construct: 0.011098146438599s Without construct: 0.0075411796569824s
Output for 7.0.0
With construct: 0.013537883758545s Without construct: 0.0091760158538818s
Output for 5.6.28
With construct: 0.027760982513428s Without construct: 0.019336938858032s
Output for 5.6.25
With construct: 0.023729085922241s Without construct: 0.014733076095581s
Output for 5.6.24
With construct: 0.019269943237305s Without construct: 0.012701988220215s
Output for 5.6.23
With construct: 0.022661924362183s Without construct: 0.014620065689087s
Output for 5.6.22
With construct: 0.020225048065186s Without construct: 0.01329493522644s
Output for 5.6.21
With construct: 0.021162033081055s Without construct: 0.012102127075195s
Output for 5.6.20
With construct: 0.020592927932739s Without construct: 0.010968923568726s
Output for 5.6.19
With construct: 0.021061897277832s Without construct: 0.011454105377197s
Output for 5.6.18
With construct: 0.020270109176636s Without construct: 0.010954141616821s
Output for 5.6.17
With construct: 0.023782014846802s Without construct: 0.01543116569519s
Output for 5.6.16
With construct: 0.023906946182251s Without construct: 0.015453815460205s
Output for 5.6.15
With construct: 0.019836902618408s Without construct: 0.01343297958374s
Output for 5.6.14
With construct: 0.022934913635254s Without construct: 0.015436172485352s
Output for 5.6.13
With construct: 0.02220892906189s Without construct: 0.013999938964844s
Output for 5.6.12
With construct: 0.018970012664795s Without construct: 0.012539148330688s
Output for 5.6.11
With construct: 0.021487951278687s Without construct: 0.014029026031494s
Output for 5.6.10
With construct: 0.019407033920288s Without construct: 0.013283014297485s
Output for 5.6.9
With construct: 0.022895097732544s Without construct: 0.014990091323853s
Output for 5.6.8
With construct: 0.019706010818481s Without construct: 0.012606859207153s
Output for 5.6.7
With construct: 0.024175882339478s Without construct: 0.012663125991821s
Output for 5.6.6
With construct: 0.022252082824707s Without construct: 0.01389217376709s
Output for 5.6.5
With construct: 0.019597053527832s Without construct: 0.012943029403687s
Output for 5.6.4
With construct: 0.023852109909058s Without construct: 0.014928102493286s
Output for 5.6.3
With construct: 0.020884037017822s Without construct: 0.010642051696777s
Output for 5.6.2
With construct: 0.023745059967041s Without construct: 0.015164852142334s
Output for 5.6.1
With construct: 0.022067070007324s Without construct: 0.014425039291382s
Output for 5.6.0
With construct: 0.02347207069397s Without construct: 0.014928102493286s
Output for 5.5.38
With construct: 0.019941091537476s Without construct: 0.01359486579895s
Output for 5.5.37
With construct: 0.022863864898682s Without construct: 0.015761137008667s
Output for 5.5.36
With construct: 0.023883104324341s Without construct: 0.01600193977356s
Output for 5.5.35
With construct: 0.016623973846436s Without construct: 0.011888980865479s
Output for 5.5.34
With construct: 0.022616863250732s Without construct: 0.012982130050659s
Output for 5.5.33
With construct: 0.023569107055664s Without construct: 0.015875816345215s
Output for 5.5.32
With construct: 0.021179914474487s Without construct: 0.01454496383667s
Output for 5.5.31
With construct: 0.020375967025757s Without construct: 0.014307975769043s
Output for 5.5.30
With construct: 0.022359848022461s Without construct: 0.012868165969849s
Output for 5.5.29
With construct: 0.02487587928772s Without construct: 0.016985893249512s
Output for 5.5.28
With construct: 0.021933078765869s Without construct: 0.014672994613647s
Output for 5.5.27
With construct: 0.018500089645386s Without construct: 0.013854026794434s
Output for 5.5.26
With construct: 0.021085977554321s Without construct: 0.015352010726929s
Output for 5.5.25
With construct: 0.024577140808105s Without construct: 0.016860961914062s
Output for 5.5.24
With construct: 0.020632028579712s Without construct: 0.014750957489014s
Output for 5.5.23
With construct: 0.019550085067749s Without construct: 0.012308120727539s
Output for 5.5.22
With construct: 0.022984981536865s Without construct: 0.015141010284424s
Output for 5.5.21
With construct: 0.025617122650146s Without construct: 0.013970851898193s
Output for 5.5.20
With construct: 0.019921779632568s Without construct: 0.011700868606567s
Output for 5.5.19
With construct: 0.02030611038208s Without construct: 0.01236891746521s
Output for 5.5.18
With construct: 0.025907039642334s Without construct: 0.014373064041138s
Output for 5.5.16
With construct: 0.019931793212891s Without construct: 0.014320850372314s
Output for 5.5.15
With construct: 0.023252964019775s Without construct: 0.013231039047241s
Output for 5.5.14
With construct: 0.023571014404297s Without construct: 0.013789892196655s
Output for 5.5.13
With construct: 0.024122953414917s Without construct: 0.016990184783936s
Output for 5.5.12
With construct: 0.019954919815063s Without construct: 0.014252185821533s
Output for 5.5.11
With construct: 0.025735139846802s Without construct: 0.017315149307251s
Output for 5.5.10
With construct: 0.026132106781006s Without construct: 0.017511129379272s
Output for 5.5.9
With construct: 0.015846014022827s Without construct: 0.011821031570435s
Output for 5.5.8
With construct: 0.022784948348999s Without construct: 0.013255834579468s
Output for 5.5.7
With construct: 0.022160053253174s Without construct: 0.015625s
Output for 5.5.6
With construct: 0.020642042160034s Without construct: 0.015138864517212s
Output for 5.5.5
With construct: 0.021092891693115s Without construct: 0.014788150787354s
Output for 5.5.4
With construct: 0.024403810501099s Without construct: 0.015276908874512s
Output for 5.5.3
With construct: 0.022064924240112s Without construct: 0.015465021133423s
Output for 5.5.2
With construct: 0.019591093063354s Without construct: 0.013946056365967s
Output for 5.5.1
With construct: 0.02035117149353s Without construct: 0.014075040817261s
Output for 5.5.0
With construct: 0.022670984268188s Without construct: 0.016002893447876s
Output for 5.4.45
With construct: 0.019827842712402s Without construct: 0.013962984085083s
Output for 5.4.44
With construct: 0.024186134338379s Without construct: 0.015036106109619s
Output for 5.4.43
With construct: 0.022400140762329s Without construct: 0.016178846359253s
Output for 5.4.42
With construct: 0.025835037231445s Without construct: 0.016726970672607s
Output for 5.4.41
With construct: 0.02171778678894s Without construct: 0.015575885772705s
Output for 5.4.40
With construct: 0.021090030670166s Without construct: 0.011855125427246s
Output for 5.4.39
With construct: 0.026278972625732s Without construct: 0.015643119812012s
Output for 5.4.38
With construct: 0.019220113754272s Without construct: 0.013963937759399s
Output for 5.4.37
With construct: 0.024003982543945s Without construct: 0.016229867935181s
Output for 5.4.36
With construct: 0.018669128417969s Without construct: 0.011672019958496s
Output for 5.4.35
With construct: 0.024786949157715s Without construct: 0.017110824584961s
Output for 5.4.34
With construct: 0.021132946014404s Without construct: 0.013315916061401s
Output for 5.4.32
With construct: 0.023116111755371s Without construct: 0.013598918914795s
Output for 5.4.31
With construct: 0.024691104888916s Without construct: 0.016585111618042s
Output for 5.4.30
With construct: 0.024997234344482s Without construct: 0.017035961151123s
Output for 5.4.29
With construct: 0.023938179016113s Without construct: 0.016546964645386s
Output for 5.4.28
With construct: 0.021955013275146s Without construct: 0.013543128967285s
Output for 5.4.27
With construct: 0.023658990859985s Without construct: 0.015698909759521s
Output for 5.4.26
With construct: 0.022920846939087s Without construct: 0.012858867645264s
Output for 5.4.25
With construct: 0.022730112075806s Without construct: 0.014202833175659s
Output for 5.4.24
With construct: 0.020716905593872s Without construct: 0.016245126724243s
Output for 5.4.23
With construct: 0.022352933883667s Without construct: 0.013939142227173s
Output for 5.4.22
With construct: 0.021919965744019s Without construct: 0.015516996383667s
Output for 5.4.21
With construct: 0.021459102630615s Without construct: 0.014976024627686s
Output for 5.4.20
With construct: 0.024988889694214s Without construct: 0.015841960906982s
Output for 5.4.19
With construct: 0.024338006973267s Without construct: 0.015072107315063s
Output for 5.4.18
With construct: 0.02534008026123s Without construct: 0.017390012741089s
Output for 5.4.17
With construct: 0.021689176559448s Without construct: 0.012271881103516s
Output for 5.4.16
With construct: 0.018370151519775s Without construct: 0.012148141860962s
Output for 5.4.15
With construct: 0.023414134979248s Without construct: 0.016403913497925s
Output for 5.4.14
With construct: 0.022346019744873s Without construct: 0.014078855514526s
Output for 5.4.13
With construct: 0.022541999816895s Without construct: 0.017677068710327s
Output for 5.4.12
With construct: 0.025586128234863s Without construct: 0.0171058177948s
Output for 5.4.11
With construct: 0.019086837768555s Without construct: 0.012676000595093s
Output for 5.4.10
With construct: 0.024852991104126s Without construct: 0.015233039855957s
Output for 5.4.9
With construct: 0.026112079620361s Without construct: 0.017491102218628s
Output for 5.4.8
With construct: 0.021539926528931s Without construct: 0.013266086578369s
Output for 5.4.7
With construct: 0.022952079772949s Without construct: 0.013704061508179s
Output for 5.4.6
With construct: 0.021652936935425s Without construct: 0.015268087387085s
Output for 5.4.5
With construct: 0.020926952362061s Without construct: 0.014898061752319s
Output for 5.4.4
With construct: 0.022402048110962s Without construct: 0.012099981307983s
Output for 5.4.3
With construct: 0.024532794952393s Without construct: 0.014099836349487s
Output for 5.4.2
With construct: 0.024139165878296s Without construct: 0.015964984893799s
Output for 5.4.1
With construct: 0.018841028213501s Without construct: 0.013208866119385s
Output for 5.4.0
With construct: 0.023690938949585s Without construct: 0.013839960098267s
Output for 5.3.29
With construct: 0.03486704826355s Without construct: 0.021485805511475s
Output for 5.3.28
With construct: 0.034940004348755s Without construct: 0.020596027374268s
Output for 5.3.27
With construct: 0.034153938293457s Without construct: 0.024940967559814s
Output for 5.3.26
With construct: 0.030729055404663s Without construct: 0.020756959915161s
Output for 5.3.25
With construct: 0.036704063415527s Without construct: 0.026596069335938s
Output for 5.3.24
With construct: 0.034749031066895s Without construct: 0.025326013565063s
Output for 5.3.23
With construct: 0.036195993423462s Without construct: 0.02632212638855s
Output for 5.3.22
With construct: 0.038190126419067s Without construct: 0.027122974395752s
Output for 5.3.21
With construct: 0.032774925231934s Without construct: 0.020434141159058s
Output for 5.3.20
With construct: 0.039638996124268s Without construct: 0.028695821762085s
Output for 5.3.19
With construct: 0.038250923156738s Without construct: 0.027411937713623s
Output for 5.3.18
With construct: 0.034812927246094s Without construct: 0.025706052780151s
Output for 5.3.17
With construct: 0.032311916351318s Without construct: 0.024072170257568s
Output for 5.3.16
With construct: 0.032201051712036s Without construct: 0.023576021194458s
Output for 5.3.15
With construct: 0.031927824020386s Without construct: 0.024600982666016s
Output for 5.3.14
With construct: 0.033830165863037s Without construct: 0.022602081298828s
Output for 5.3.13
With construct: 0.036046981811523s Without construct: 0.026912927627563s
Output for 5.3.12
With construct: 0.029059886932373s Without construct: 0.021981000900269s
Output for 5.3.11
With construct: 0.037448167800903s Without construct: 0.026319980621338s
Output for 5.3.10
With construct: 0.030431985855103s Without construct: 0.022612810134888s
Output for 5.3.9
With construct: 0.036718130111694s Without construct: 0.026939868927002s
Output for 5.3.8
With construct: 0.039038896560669s Without construct: 0.028228998184204s
Output for 5.3.7
With construct: 0.039160013198853s Without construct: 0.027990102767944s
Output for 5.3.6
With construct: 0.033368825912476s Without construct: 0.025171995162964s
Output for 5.3.5
With construct: 0.026272058486938s Without construct: 0.02013897895813s
Output for 5.3.4
With construct: 0.03416895866394s Without construct: 0.024478197097778s
Output for 5.3.3
With construct: 0.031891107559204s Without construct: 0.020241022109985s
Output for 5.3.2
With construct: 0.035855054855347s Without construct: 0.025007009506226s
Output for 5.3.1
With construct: 0.0385901927948s Without construct: 0.027439832687378s
Output for 5.3.0
With construct: 0.0275559425354s Without construct: 0.020726919174194s
Output for 5.2.17
With construct: 0.043946027755737s Without construct: 0.029815912246704s
Output for 5.2.16
With construct: 0.045408010482788s Without construct: 0.030598878860474s
Output for 5.2.15
With construct: 0.050927877426147s Without construct: 0.034267902374268s
Output for 5.2.14
With construct: 0.040455102920532s Without construct: 0.026036977767944s
Output for 5.2.13
With construct: 0.039409875869751s Without construct: 0.027595043182373s
Output for 5.2.12
With construct: 0.043034791946411s Without construct: 0.029656887054443s
Output for 5.2.11
With construct: 0.045130014419556s Without construct: 0.030338048934937s
Output for 5.2.10
With construct: 0.041639804840088s Without construct: 0.029324054718018s
Output for 5.2.9
With construct: 0.035749197006226s Without construct: 0.028244972229004s
Output for 5.2.8
With construct: 0.036028861999512s Without construct: 0.022788047790527s
Output for 5.2.7
With construct: 0.040860176086426s Without construct: 0.022253036499023s
Output for 5.2.6
With construct: 0.034352779388428s Without construct: 0.022469997406006s
Output for 5.2.5
With construct: 0.038326025009155s Without construct: 0.02778697013855s
Output for 5.2.4
With construct: 0.042047023773193s Without construct: 0.029139995574951s
Output for 5.2.3
With construct: 0.04381799697876s Without construct: 0.029781103134155s
Output for 5.2.2
With construct: 0.039239168167114s Without construct: 0.0225989818573s
Output for 5.2.1
With construct: 0.0435950756073s Without construct: 0.030362129211426s
Output for 5.2.0
With construct: 0.038300037384033s Without construct: 0.022863864898682s
Output for 5.1.6
With construct: 0.039015054702759s Without construct: 0.026785850524902s
Output for 5.1.5
With construct: 0.039838075637817s Without construct: 0.022533893585205s
Output for 5.1.4
With construct: 0.041507959365845s Without construct: 0.027890920639038s
Output for 5.1.3
With construct: 0.036311149597168s Without construct: 0.024060010910034s
Output for 5.1.2
With construct: 0.041581869125366s Without construct: 0.025634050369263s
Output for 5.1.1
With construct: 0.034898042678833s Without construct: 0.022366046905518s
Output for 5.1.0
With construct: 0.025912046432495s Without construct: 0.019106149673462s
Output for 5.0.5
With construct: 0.060232162475586s Without construct: 0.032362222671509s
Output for 5.0.4
With construct: 0.037255048751831s Without construct: 0.026993036270142s
Output for 5.0.3
With construct: 0.057031869888306s Without construct: 0.035597085952759s
Output for 5.0.2
With construct: 0.034990072250366s Without construct: 0.026116847991943s
Output for 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/AXs5N on line 18 With construct: 0.057431936264038sPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/AXs5N on line 24 Without construct: 0.0365149974823sPHP_EOL
Output for 5.0.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/AXs5N on line 18 With construct: 0.036283016204834sPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/AXs5N on line 24 Without construct: 0.026823997497559sPHP_EOL
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/AXs5N on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/AXs5N on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/AXs5N on line 5
Process exited with code 255.

preferences:
205.84 ms | 401 KiB | 248 Q