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) . "\n"; // 2 $start = microtime(true); for ($i = 1; $i <= 100000; $i++) { html($value); } $end = microtime(true); echo (int) (($end - $start) * 1000) . "\n"; // 3 $start = microtime(true); for ($i = 1; $i <= 100000; $i++) { $object->html($value); } $end = microtime(true); echo (int) (($end - $start) * 1000) . "\n"; // 4 $start = microtime(true); for ($i = 1; $i <= 100000; $i++) { call_user_func('html', $value); } $end = microtime(true); echo (int) (($end - $start) * 1000) . "\n"; // 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) . "\n"; // 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) . "\n"; // 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) . "\n";
based on CehZI
Output for 7.1.0
11 16 14 13 24 17 28
Output for 7.0.14
12 16 15 13 23 16 26
Output for 7.0.10
8 10 10 9 19 13 21
Output for 7.0.9
9 10 12 10 21 14 23
Output for 7.0.8
6 8 8 8 17 12 21
Output for 7.0.7
8 9 10 9 19 13 21
Output for 7.0.6
11 13 13 12 23 16 25
Output for 7.0.5
10 13 14 12 23 16 25
Output for 7.0.4
10 13 13 12 24 16 25
Output for 7.0.3
10 12 12 11 20 13 22
Output for 7.0.2
9 11 12 11 21 14 22
Output for 7.0.1
10 12 10 9 18 13 22
Output for 7.0.0
9 11 12 11 21 13 22
Output for 5.6.28
34 39 36 56 59 -43 -67
Output for 5.6.25
23 37 36 70 82 97 100
Output for 5.6.24
19 29 29 52 60 61 70
Output for 5.6.23
19 29 28 52 61 63 73
Output for 5.6.22
19 27 28 53 63 62 72
Output for 5.6.21
23 37 34 57 60 61 71
Output for 5.6.20
23 37 35 58 59 61 71
Output for 5.6.19
23 38 36 58 61 61 71
Output for 5.6.18
19 31 30 52 60 61 71
Output for 5.6.17
23 34 33 64 76 79 94
Output for 5.6.16
19 32 32 60 66 70 79
Output for 5.6.15
20 34 32 53 60 60 71
Output for 5.6.14
20 30 28 51 59 60 71
Output for 5.6.13
19 30 30 52 59 61 71
Output for 5.6.12
17 28 27 51 60 61 71
Output for 5.6.11
19 32 29 53 60 61 71
Output for 5.6.10
21 35 34 55 60 61 71
Output for 5.6.9
18 32 31 52 59 61 70
Output for 5.6.8
23 33 31 53 60 61 72
Output for 5.6.7
37 54 46 61 60 61 71
Output for 5.6.6
23 37 35 59 60 62 71
Output for 5.6.5
22 37 35 57 60 61 71
Output for 5.6.4
24 39 36 56 60 62 71
Output for 5.6.3
19 27 28 51 59 60 69
Output for 5.6.2
22 32 29 51 60 61 70
Output for 5.6.1
22 32 30 51 60 61 71
Output for 5.6.0
21 35 34 55 58 60 69
Output for 5.5.38
19 23 23 46 52 54 63
Output for 5.5.37
17 24 23 48 52 53 63
Output for 5.5.36
17 23 21 44 52 53 64
Output for 5.5.35
19 26 23 45 52 53 62
Output for 5.5.34
18 25 24 45 53 54 63
Output for 5.5.33
16 24 22 45 53 53 64
Output for 5.5.32
15 22 21 45 54 54 64
Output for 5.5.31
18 23 22 45 52 53 63
Output for 5.5.30
17 25 25 48 52 53 63
Output for 5.5.29
19 28 28 52 55 53 63
Output for 5.5.28
16 25 21 44 52 54 63
Output for 5.5.27
17 25 26 54 65 66 80
Output for 5.5.26
16 20 21 44 52 53 63
Output for 5.5.25
15 23 24 47 53 54 64
Output for 5.5.24
18 27 27 51 54 53 63
Output for 5.5.23
15 22 23 48 54 55 64
Output for 5.5.22
19 28 27 51 54 53 63
Output for 5.5.21
19 27 24 45 52 55 64
Output for 5.5.20
19 28 28 52 54 53 63
Output for 5.5.19
18 21 22 44 53 54 64
Output for 5.5.18
18 26 26 51 53 54 64
Output for 5.5.16
13 22 23 45 52 53 63
Output for 5.5.15
14 21 21 44 52 53 63
Output for 5.5.14
19 26 25 46 52 54 63
Output for 5.5.13
19 27 27 53 54 53 62
Output for 5.5.12
17 22 23 46 52 53 63
Output for 5.5.11
18 22 20 43 52 53 63
Output for 5.5.10
12 18 20 44 52 53 63
Output for 5.5.9
12 19 21 48 55 58 70
Output for 5.5.8
12 18 20 44 52 52 55
Output for 5.5.7
15 22 22 45 52 53 63
Output for 5.5.6
13 18 20 45 55 56 65
Output for 5.5.5
16 20 23 52 61 63 74
Output for 5.5.4
13 19 19 40 43 44 52
Output for 5.5.3
13 18 20 43 51 54 59
Output for 5.5.2
19 27 26 50 52 53 64
Output for 5.5.1
13 19 20 42 45 43 51
Output for 5.5.0
16 23 24 46 52 53 65
Output for 5.4.45
19 27 27 54 54 52 62
Output for 5.4.44
18 25 23 44 51 53 62
Output for 5.4.43
15 22 22 46 52 53 62
Output for 5.4.42
16 23 23 47 52 53 62
Output for 5.4.41
16 22 25 57 70 71 84
Output for 5.4.40
17 24 24 48 51 52 62
Output for 5.4.39
20 28 27 54 51 52 62
Output for 5.4.38
19 27 26 46 52 53 62
Output for 5.4.37
15 21 22 44 51 53 62
Output for 5.4.36
19 26 26 53 54 53 62
Output for 5.4.35
17 25 28 58 66 66 80
Output for 5.4.34
15 22 23 45 52 53 62
Output for 5.4.32
18 24 21 46 52 53 63
Output for 5.4.31
17 25 25 51 52 52 62
Output for 5.4.30
17 21 23 47 51 53 62
Output for 5.4.29
17 22 19 44 52 53 63
Output for 5.4.28
19 24 24 50 52 52 63
Output for 5.4.27
18 22 21 46 51 53 62
Output for 5.4.26
18 20 20 44 52 53 62
Output for 5.4.25
15 20 19 44 51 53 63
Output for 5.4.24
13 18 19 44 51 53 63
Output for 5.4.23
9 14 15 35 42 44 52
Output for 5.4.22
10 15 17 37 43 45 52
Output for 5.4.21
10 15 16 36 42 43 52
Output for 5.4.20
11 17 19 44 52 53 62
Output for 5.4.19
12 17 19 43 51 52 60
Output for 5.4.18
11 18 21 45 51 54 57
Output for 5.4.17
15 23 26 55 74 67 79
Output for 5.4.16
16 23 23 47 51 52 62
Output for 5.4.15
20 26 26 51 52 52 62
Output for 5.4.14
19 22 20 44 51 52 62
Output for 5.4.13
16 24 21 45 52 53 62
Output for 5.4.12
18 22 23 47 52 53 63
Output for 5.4.11
17 21 22 45 51 53 62
Output for 5.4.10
19 26 26 54 55 53 62
Output for 5.4.9
16 22 22 44 52 52 62
Output for 5.4.8
19 27 27 54 55 52 62
Output for 5.4.7
18 21 23 48 52 53 63
Output for 5.4.6
20 27 27 54 55 52 62
Output for 5.4.5
19 27 27 54 56 53 62
Output for 5.4.4
18 25 25 50 52 52 62
Output for 5.4.3
16 20 19 44 52 90 61
Output for 5.4.2
19 21 21 45 51 52 62
Output for 5.4.1
14 20 20 43 51 52 61
Output for 5.4.0
17 24 25 51 53 52 61
Output for 5.3.29
23 37 38 54 67 68 78
Output for 5.3.28
15 25 28 43 54 55 63
Output for 5.3.27
24 32 34 52 66 66 80
Output for 5.3.26
25 39 39 53 66 68 77
Output for 5.3.25
22 30 34 52 66 66 77
Output for 5.3.24
24 40 49 71 76 72 83
Output for 5.3.23
24 40 40 51 65 66 76
Output for 5.3.22
22 38 42 65 69 70 80
Output for 5.3.21
21 34 36 54 69 69 80
Output for 5.3.20
28 41 40 55 68 69 79
Output for 5.3.19
26 33 36 55 68 68 79
Output for 5.3.18
23 36 37 54 67 68 78
Output for 5.3.17
25 40 41 57 66 67 77
Output for 5.3.16
26 36 36 54 67 69 79
Output for 5.3.15
26 33 34 53 66 67 77
Output for 5.3.14
27 40 40 56 69 70 79
Output for 5.3.13
26 41 40 54 66 67 78
Output for 5.3.12
24 33 34 54 67 68 78
Output for 5.3.11
28 42 42 58 67 68 78
Output for 5.3.10
30 44 43 58 68 68 78
Output for 5.3.9
27 43 45 58 66 69 76
Output for 5.3.8
26 40 40 55 67 68 77
Output for 5.3.7
24 38 38 54 67 68 80
Output for 5.3.6
28 42 42 57 66 66 77
Output for 5.3.5
29 42 42 57 67 68 78
Output for 5.3.4
24 35 37 53 66 67 77
Output for 5.3.3
27 35 35 53 78 68 76
Output for 5.3.2
28 42 41 56 67 68 78
Output for 5.3.1
18 30 34 52 66 67 77
Output for 5.3.0
25 34 35 53 66 66 77
Output for 5.2.17
25 49 46 58 81 72 92
Output for 5.2.16
31 54 48 60 84 74 93
Output for 5.2.15
34 59 53 62 83 73 110
Output for 5.2.14
34 52 46 59 83 74 94
Output for 5.2.13
29 52 46 60 82 74 94
Output for 5.2.12
31 51 46 61 84 75 95
Output for 5.2.11
30 50 45 59 83 73 92
Output for 5.2.10
22 47 50 69 94 85 104
Output for 5.2.9
29 53 49 60 84 74 93
Output for 5.2.8
35 62 54 62 83 74 93
Output for 5.2.7
31 56 51 60 89 74 92
Output for 5.2.6
34 61 54 61 81 72 91
Output for 5.2.5
33 49 46 61 83 75 98
Output for 5.2.4
30 58 52 61 82 74 97
Output for 5.2.3
27 47 45 59 82 73 97
Output for 5.2.2
32 54 50 60 84 73 98
Output for 5.2.1
30 59 53 60 80 71 97
Output for 5.2.0
31 57 52 59 80 71 96
Output for 5.1.6
42 65 57 62 88 76 95
Output for 5.1.5
44 68 59 62 85 74 92
Output for 5.1.4
60 82 61 62 84 77 96
Output for 5.1.3
40 55 50 61 82 74 93
Output for 5.1.2
32 48 49 64 82 74 91
Output for 5.1.1
39 64 57 62 86 75 95
Output for 5.1.0
30 59 63 80 106 81 95
Output for 5.0.5
65 71 73 98 123 116 146
Output for 5.0.4
64 79 70 86 110 99 127
Output for 5.0.3
42 57 63 82 107 98 124
Output for 5.0.2
56 75 67 81 106 94 121
Output for 5.0.1
53 60 63 83 108 96 123
Output for 5.0.0
49 71 66 88 110 102 126
Output for 4.4.9
59 78 71 78 108 93 124
Output for 4.4.8
48 58 63 78 108 93 125
Output for 4.4.7
50 57 62 77 108 92 124
Output for 4.4.6
58 75 71 78 108 97 127
Output for 4.4.5
64 80 67 78 108 97 126
Output for 4.4.4
52 67 66 80 109 96 127
Output for 4.4.3
52 69 66 80 109 96 126
Output for 4.4.2
59 76 70 78 107 93 124
Output for 4.4.1
52 61 66 80 108 95 124
Output for 4.4.0
43 61 69 86 111 100 132
Output for 4.3.11
56 62 64 77 107 93 122
Output for 4.3.10
53 69 65 78 106 92 121
Output for 4.3.9
57 66 66 78 110 93 125
Output for 4.3.8
45 69 69 82 113 97 128
Output for 4.3.7
60 77 71 78 109 93 122
Output for 4.3.6
33 56 65 80 109 81 103
Output for 4.3.5
37 60 73 86 123 107 132
Output for 4.3.4
52 70 67 77 107 94 125
Output for 4.3.3
32 46 52 64 90 78 103
Output for 4.3.2
36 52 61 76 124 92 122
Output for 4.3.1
32 53 61 75 105 91 121
Output for 4.3.0
31 54 61 75 97 74 99