3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function html($value) { return htmlentities($value); } class Foo { function html($value) { return htmlentities($value); } } $value = '123'; $object = new Foo(); // 1 $start = microtime(true); for ($i = 1; $i <= 100000; $i++) { htmlentities($value); } $end = microtime(true); echo (int) (($end - $start) * 1000); // 2 $start = microtime(true); for ($i = 1; $i <= 100000; $i++) { html($value); } $end = microtime(true); echo (int) (($end - $start) * 1000); // 3 $start = microtime(true); for ($i = 1; $i <= 100000; $i++) { $object->html($value); } $end = microtime(true); echo (int) (($end - $start) * 1000); // 4 $start = microtime(true); for ($i = 1; $i <= 100000; $i++) { call_user_func('html', $value); } $end = microtime(true); echo (int) (($end - $start) * 1000); // 5 $start = microtime(true); for ($i = 1; $i <= 100000; $i++) { call_user_func(array($object, 'html'), $value); } $end = microtime(true); echo (int) (($end - $start) * 1000); // 6 $start = microtime(true); for ($i = 1; $i <= 100000; $i++) { call_user_func_array('html', array($value)); } $end = microtime(true); echo (int) (($end - $start) * 1000); // 7 $start = microtime(true); for ($i = 1; $i <= 100000; $i++) { call_user_func_array(array($object, 'html'), array($value)); } $end = microtime(true); echo (int) (($end - $start) * 1000);
based on bRtME
Output for 7.1.0
11161413241728
Output for 7.0.14
12151412231526
Output for 7.0.10
8101110201321
Output for 7.0.9
9111211221524
Output for 7.0.8
8899181921
Output for 7.0.7
10121312231625
Output for 7.0.6
12131412241626
Output for 7.0.5
7999181523
Output for 7.0.4
10131012191722
Output for 7.0.3
6898181322
Output for 7.0.2
8101110191322
Output for 7.0.1
10121010211423
Output for 7.0.0
9111710201323
Output for hhvm-3.12.0
45555861807496
Output for hhvm-3.10.0
5770759010299111
Output for 5.6.28
32383573926568
Output for 5.6.25
18313667737887
Output for 5.6.24
18313462717590
Output for 5.6.23
25393759616272
Output for 5.6.22
17282853636272
Output for 5.6.21
15272852616273
Output for 5.6.20
20343254606372
Output for 5.6.19
23372853616274
Output for 5.6.18
21323051616073
Output for 5.6.17
23383659616271
Output for 5.6.16
15262853555165
Output for 5.6.15
17272748576173
Output for 5.6.14
11222343495160
Output for 5.6.13
12222443505261
Output for 5.6.12
13242649645766
Output for 5.6.11
13232343505260
Output for 5.6.10
12222342505159
Output for 5.6.9
13293357555761
Output for 5.6.8
16262953596071
Output for 5.6.7
18323560718680
Output for 5.6.6
21333053606273
Output for 5.6.5
22353053616272
Output for 5.6.4
21302853616273
Output for 5.6.3
22364058596071
Output for 5.6.2
25383554616272
Output for 5.6.1
19282953606472
Output for 5.6.0
15262750596070
Output for 5.5.38
17212144525464
Output for 5.5.37
14202145525364
Output for 5.5.36
22272961616571
Output for 5.5.35
14232345535363
Output for 5.5.34
18252446535465
Output for 5.5.33
26242748535464
Output for 5.5.32
18282853565566
Output for 5.5.31
16242547535463
Output for 5.5.30
10161737454652
Output for 5.5.29
11161740504667
Output for 5.5.28
12192145535666
Output for 5.5.27
10161738454554
Output for 5.5.26
10151736434552
Output for 5.5.25
16242449545665
Output for 5.5.24
17262246535464
Output for 5.5.23
11182144505066
Output for 5.5.22
14222346525364
Output for 5.5.21
18182252586475
Output for 5.5.20
23302647535564
Output for 5.5.19
15192144525464
Output for 5.5.18
19252549535463
Output for 5.5.16
17262745545467
Output for 5.5.15
17252548535363
Output for 5.5.14
23262661585974
Output for 5.5.13
17252151525463
Output for 5.5.12
16222044535463
Output for 5.5.11
11192043545663
Output for 5.5.10
19262650546264
Output for 5.5.9
12182043485854
Output for 5.5.8
19262652545464
Output for 5.5.7
17242245535364
Output for 5.5.6
15232348535464
Output for 5.5.5
16202245535465
Output for 5.5.4
20262445525463
Output for 5.5.3
15212245525364
Output for 5.5.2
17222145535464
Output for 5.5.1
20262144525364
Output for 5.5.0
17232557716980
Output for 5.4.45
13202145525463
Output for 5.4.44
18182144474553
Output for 5.4.43
12161841444655
Output for 5.4.42
13171940444452
Output for 5.4.41
19222348695469
Output for 5.4.40
19262652555262
Output for 5.4.39
16201944515262
Output for 5.4.38
17232552646584
Output for 5.4.37
17242449525463
Output for 5.4.36
16212045525463
Output for 5.4.35
19252146545564
Output for 5.4.34
14192045515363
Output for 5.4.32
19272745525363
Output for 5.4.31
17202044515363
Output for 5.4.30
9141637434451
Output for 5.4.29
18212146535463
Output for 5.4.28
12171943525362
Output for 5.4.27
16221943525363
Output for 5.4.26
11182046525363
Output for 5.4.25
19262448525363
Output for 5.4.24
18222245525564
Output for 5.4.23
11171958725763
Output for 5.4.22
12182044526064
Output for 5.4.21
26292754596570
Output for 5.4.20
12191944525463
Output for 5.4.19
19262653545362
Output for 5.4.18
16232449525463
Output for 5.4.17
15212044525363
Output for 5.4.16
13192150585971
Output for 5.4.15
13182043515363
Output for 5.4.14
16232458696684
Output for 5.4.13
12222150585364
Output for 5.4.12
16232145515362
Output for 5.4.11
20262653545363
Output for 5.4.10
13222448545568
Output for 5.4.9
16212046525364
Output for 5.4.8
18252444525363
Output for 5.4.7
14212147515363
Output for 5.4.6
19262850636784
Output for 5.4.5
15222045515364
Output for 5.4.4
19222044525462
Output for 5.4.3
19222347515261
Output for 5.4.2
17252551525463
Output for 5.4.1
14231943576667
Output for 5.4.0
14221944525262
Output for 5.3.29
22353556686979
Output for 5.3.28
27383554686979
Output for 5.3.27
20303353667080
Output for 5.3.26
23404159677993
Output for 5.3.25
24394053666777
Output for 5.3.24
21343657676878
Output for 5.3.23
27373953656676
Output for 5.3.22
26323554676979
Output for 5.3.21
27313555727484
Output for 5.3.20
27404055676879
Output for 5.3.19
32404055696980
Output for 5.3.18
23364166878696
Output for 5.3.17
21353753666878
Output for 5.3.16
26353656687079
Output for 5.3.15
31454159737389
Output for 5.3.14
29434157707081
Output for 5.3.13
22323555686879
Output for 5.3.12
23323554686878
Output for 5.3.11
22343658646373
Output for 5.3.10
22333654656976
Output for 5.3.9
24333552676777
Output for 5.3.8
25394264777883
Output for 5.3.7
19344256717071
Output for 5.3.6
18293145555664
Output for 5.3.5
31403754686980
Output for 5.3.4
25363654686777
Output for 5.3.3
24394054676777
Output for 5.3.2
30434358666877
Output for 5.3.1
22343453676879
Output for 5.3.0
25393754676877
Output for 5.2.17
22444560817493
Output for 5.2.16
33514660847493
Output for 5.2.15
28524760837395
Output for 5.2.14
32474660837594
Output for 5.2.13
35584960837495
Output for 5.2.12
24484660837393
Output for 5.2.11
234851729584109
Output for 5.2.10
254545608777100
Output for 5.2.9
2249527210697119
Output for 5.2.8
20465268957077
Output for 5.2.7
17363850696176
Output for 5.2.6
26514860837493
Output for 5.2.5
17353851706384
Output for 5.2.4
15343650686181
Output for 5.2.3
19424453796882
Output for 5.2.2
16353850706182
Output for 5.2.1
274948578382106
Output for 5.2.0
38524858817298
Output for 5.1.6
45625363857595
Output for 5.1.5
31495367877493
Output for 5.1.4
41585163847696
Output for 5.1.3
294949618174103
Output for 5.1.2
32555162847594
Output for 5.1.1
396457768074103
Output for 5.1.0
39565059817391
Output for 5.0.5
5775688511198128
Output for 5.0.4
6164628410897127
Output for 5.0.3
4867648010594122
Output for 5.0.2
5868638110894122
Output for 5.0.1
4056607711698122
Output for 5.0.0
53696790111103127
Output for 4.4.9
274555659177103
Output for 4.4.8
3966749013182105
Output for 4.4.7
264454649177103
Output for 4.4.6
355055669183112
Output for 4.4.5
6273718011097129
Output for 4.4.4
5167668211197128
Output for 4.4.3
5865687910998128
Output for 4.4.2
4560687910896132
Output for 4.4.1
5966687910895125
Output for 4.4.0
5060678011096126
Output for 4.3.11
5864657710794124
Output for 4.3.10
6372677810793123
Output for 4.3.9
3857658411294122
Output for 4.3.8
4874718211498128
Output for 4.3.7
6173697810895124
Output for 4.3.6
4355657810794125
Output for 4.3.5
5565668111395126
Output for 4.3.4
4456657710993124
Output for 4.3.3
57756883130109138
Output for 4.3.2
5662657710991124
Output for 4.3.1
48687694128111146
Output for 4.3.0
5667647710592122