3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $count = 50; $start = microtime(true); $y = 0; for($i = 0; $i < $count; $i++) { eval('++$y;'); } printf("#1, result is %d, done in %f\n", $y, microtime(true) - $start); $start = microtime(true); $y = 0; for($i = 0; $i < $count; $i++) { $f = function() use (&$y) { return ++$y; }; $f(); } printf("#2, result is %d, done in %f\n", $y, microtime(true) - $start);
Output for 7.1.0
#1, result is 50, done in 0.000075 #2, result is 50, done in 0.000019
Output for 7.0.14
#1, result is 50, done in 0.000091 #2, result is 50, done in 0.000028
Output for 7.0.6
#1, result is 50, done in 0.000072 #2, result is 50, done in 0.000024
Output for 7.0.5
#1, result is 50, done in 0.000047 #2, result is 50, done in 0.000016
Output for 7.0.0, 7.0.4
#1, result is 50, done in 0.000067 #2, result is 50, done in 0.000024
Output for 7.0.3
#1, result is 50, done in 0.000042 #2, result is 50, done in 0.000015
Output for 7.0.2
#1, result is 50, done in 0.000063 #2, result is 50, done in 0.000022
Output for 7.0.1
#1, result is 50, done in 0.000044 #2, result is 50, done in 0.000016
Output for hhvm-3.12.0
#1, result is 50, done in 0.000567 #2, result is 50, done in 0.000028
Output for hhvm-3.10.0
#1, result is 50, done in 0.000547 #2, result is 50, done in 0.000034
Output for 5.6.28
#1, result is 50, done in 0.000108 #2, result is 50, done in 0.000031
Output for 5.6.21
#1, result is 50, done in 0.000074 #2, result is 50, done in 0.000024
Output for 5.6.20
#1, result is 50, done in 0.000082 #2, result is 50, done in 0.000035
Output for 5.6.19
#1, result is 50, done in 0.000074 #2, result is 50, done in 0.000043
Output for 5.6.18
#1, result is 50, done in 0.000053 #2, result is 50, done in 0.000020
Output for 5.6.17
#1, result is 50, done in 0.000050 #2, result is 50, done in 0.000021
Output for 5.6.16
#1, result is 50, done in 0.000050 #2, result is 50, done in 0.000053
Output for 5.6.15
#1, result is 50, done in 0.000089 #2, result is 50, done in 0.000038
Output for 5.6.14
#1, result is 50, done in 0.000054 #2, result is 50, done in 0.000023
Output for 5.6.13
#1, result is 50, done in 0.000073 #2, result is 50, done in 0.000031
Output for 5.6.12
#1, result is 50, done in 0.000080 #2, result is 50, done in 0.000034
Output for 5.6.11
#1, result is 50, done in 0.000057 #2, result is 50, done in 0.000024
Output for 5.6.10
#1, result is 50, done in 0.000078 #2, result is 50, done in 0.000033
Output for 5.6.9
#1, result is 50, done in 0.000062 #2, result is 50, done in 0.000038
Output for 5.6.8
#1, result is 50, done in 0.000081 #2, result is 50, done in 0.000035
Output for 5.6.7
#1, result is 50, done in 0.000105 #2, result is 50, done in 0.000033
Output for 5.5.35
#1, result is 50, done in 0.000093 #2, result is 50, done in 0.000049
Output for 5.5.34
#1, result is 50, done in 0.000071 #2, result is 50, done in 0.000044
Output for 5.5.33
#1, result is 50, done in 0.000067 #2, result is 50, done in 0.000026
Output for 5.5.32
#1, result is 50, done in 0.000061 #2, result is 50, done in 0.000027
Output for 5.5.31
#1, result is 50, done in 0.000082 #2, result is 50, done in 0.000033
Output for 5.5.30
#1, result is 50, done in 0.000082 #2, result is 50, done in 0.000049
Output for 5.5.29
#1, result is 50, done in 0.000053 #2, result is 50, done in 0.000022
Output for 5.5.28
#1, result is 50, done in 0.000053 #2, result is 50, done in 0.000023
Output for 5.5.27
#1, result is 50, done in 0.000050 #2, result is 50, done in 0.000022
Output for 5.5.26
#1, result is 50, done in 0.000072 #2, result is 50, done in 0.000029
Output for 5.5.25
#1, result is 50, done in 0.000071 #2, result is 50, done in 0.000030
Output for 5.5.24
#1, result is 50, done in 0.000080 #2, result is 50, done in 0.000045
Output for 5.4.45
#1, result is 50, done in 0.000223 #2, result is 50, done in 0.000208
Output for 5.4.44
#1, result is 50, done in 0.000103 #2, result is 50, done in 0.000034
Output for 5.4.43
#1, result is 50, done in 0.000213 #2, result is 50, done in 0.000066
Output for 5.4.42
#1, result is 50, done in 0.000135 #2, result is 50, done in 0.000059
Output for 5.4.41
#1, result is 50, done in 0.000106 #2, result is 50, done in 0.000034
Output for 5.4.40
#1, result is 50, done in 0.000096 #2, result is 50, done in 0.000060
Output for 5.4.39
#1, result is 50, done in 0.000182 #2, result is 50, done in 0.000131
Output for 5.4.38
#1, result is 50, done in 0.000119 #2, result is 50, done in 0.000033
Output for 5.4.37
#1, result is 50, done in 0.000098 #2, result is 50, done in 0.000065
Output for 5.4.36
#1, result is 50, done in 0.000099 #2, result is 50, done in 0.000034
Output for 5.4.35
#1, result is 50, done in 0.000088 #2, result is 50, done in 0.000039
Output for 5.4.34
#1, result is 50, done in 0.000089 #2, result is 50, done in 0.000032
Output for 5.4.32
#1, result is 50, done in 0.000062 #2, result is 50, done in 0.000021
Output for 5.4.31
#1, result is 50, done in 0.000060 #2, result is 50, done in 0.000021
Output for 5.4.30
#1, result is 50, done in 0.000071 #2, result is 50, done in 0.000022
Output for 5.4.29
#1, result is 50, done in 0.000070 #2, result is 50, done in 0.000022
Output for 5.4.28
#1, result is 50, done in 0.000065 #2, result is 50, done in 0.000025
Output for 5.4.4, 5.4.27
#1, result is 50, done in 0.000066 #2, result is 50, done in 0.000026
Output for 5.4.26
#1, result is 50, done in 0.000063 #2, result is 50, done in 0.000025
Output for 5.4.25
#1, result is 50, done in 0.000077 #2, result is 50, done in 0.000029
Output for 5.4.24
#1, result is 50, done in 0.000110 #2, result is 50, done in 0.000028
Output for 5.4.23
#1, result is 50, done in 0.000067 #2, result is 50, done in 0.000034
Output for 5.4.22
#1, result is 50, done in 0.000071 #2, result is 50, done in 0.000026
Output for 5.4.21
#1, result is 50, done in 0.000068 #2, result is 50, done in 0.000025
Output for 5.3.4, 5.3.21, 5.4.20
#1, result is 50, done in 0.000065 #2, result is 50, done in 0.000027
Output for 5.4.19
#1, result is 50, done in 0.000082 #2, result is 50, done in 0.000025
Output for 5.4.18
#1, result is 50, done in 0.000084 #2, result is 50, done in 0.000029
Output for 5.4.17
#1, result is 50, done in 0.000062 #2, result is 50, done in 0.000025
Output for 5.4.16
#1, result is 50, done in 0.000064 #2, result is 50, done in 0.000025
Output for 5.4.0, 5.4.15
#1, result is 50, done in 0.000074 #2, result is 50, done in 0.000027
Output for 5.4.14
#1, result is 50, done in 0.000067 #2, result is 50, done in 0.000027
Output for 5.4.13
#1, result is 50, done in 0.000064 #2, result is 50, done in 0.000051
Output for 5.4.12
#1, result is 50, done in 0.000073 #2, result is 50, done in 0.000023
Output for 5.4.11
#1, result is 50, done in 0.000109 #2, result is 50, done in 0.000029
Output for 5.4.10
#1, result is 50, done in 0.000089 #2, result is 50, done in 0.000025
Output for 5.4.9
#1, result is 50, done in 0.000085 #2, result is 50, done in 0.000025
Output for 5.4.8
#1, result is 50, done in 0.000072 #2, result is 50, done in 0.000023
Output for 5.4.7
#1, result is 50, done in 0.000081 #2, result is 50, done in 0.000068
Output for 5.4.6
#1, result is 50, done in 0.000082 #2, result is 50, done in 0.000024
Output for 5.4.5
#1, result is 50, done in 0.000072 #2, result is 50, done in 0.000025
Output for 5.4.3
#1, result is 50, done in 0.000073 #2, result is 50, done in 0.000024
Output for 5.4.2
#1, result is 50, done in 0.000070 #2, result is 50, done in 0.000025
Output for 5.4.1
#1, result is 50, done in 0.000089 #2, result is 50, done in 0.000026
Output for 5.3.29
#1, result is 50, done in 0.000058 #2, result is 50, done in 0.000024
Output for 5.3.28
#1, result is 50, done in 0.000061 #2, result is 50, done in 0.000026
Output for 5.3.27
#1, result is 50, done in 0.000060 #2, result is 50, done in 0.000028
Output for 5.3.26
#1, result is 50, done in 0.000124 #2, result is 50, done in 0.000044
Output for 5.3.25
#1, result is 50, done in 0.000060 #2, result is 50, done in 0.000094
Output for 5.3.24
#1, result is 50, done in 0.000067 #2, result is 50, done in 0.000028
Output for 5.3.23
#1, result is 50, done in 0.000058 #2, result is 50, done in 0.000028
Output for 5.3.22
#1, result is 50, done in 0.000073 #2, result is 50, done in 0.000052
Output for 5.3.20
#1, result is 50, done in 0.000072 #2, result is 50, done in 0.000028
Output for 5.3.19
#1, result is 50, done in 0.000059 #2, result is 50, done in 0.000045
Output for 5.3.18
#1, result is 50, done in 0.000060 #2, result is 50, done in 0.000027
Output for 5.3.17
#1, result is 50, done in 0.000059 #2, result is 50, done in 0.000027
Output for 5.3.16
#1, result is 50, done in 0.000071 #2, result is 50, done in 0.000028
Output for 5.3.15
#1, result is 50, done in 0.000079 #2, result is 50, done in 0.000031
Output for 5.3.14
#1, result is 50, done in 0.000066 #2, result is 50, done in 0.000027
Output for 5.3.13
#1, result is 50, done in 0.000058 #2, result is 50, done in 0.000029
Output for 5.3.1, 5.3.12
#1, result is 50, done in 0.000063 #2, result is 50, done in 0.000028
Output for 5.3.11
#1, result is 50, done in 0.000060 #2, result is 50, done in 0.000029
Output for 5.3.10
#1, result is 50, done in 0.000063 #2, result is 50, done in 0.000030
Output for 5.3.9
#1, result is 50, done in 0.000093 #2, result is 50, done in 0.000035
Output for 5.3.8
#1, result is 50, done in 0.000076 #2, result is 50, done in 0.000040
Output for 5.3.7
#1, result is 50, done in 0.000062 #2, result is 50, done in 0.000034
Output for 5.3.6
#1, result is 50, done in 0.000060 #2, result is 50, done in 0.000030
Output for 5.3.5
#1, result is 50, done in 0.000072 #2, result is 50, done in 0.000027
Output for 5.3.3
#1, result is 50, done in 0.000063 #2, result is 50, done in 0.000039
Output for 5.3.0, 5.3.2
#1, result is 50, done in 0.000059 #2, result is 50, done in 0.000026
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/vDom1 on line 16
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/vDom1 on line 16
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/vDom1 on line 16
Process exited with code 255.