3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $iteration = 1e6; $etc = ""; // const $start = microtime(true); const TEST = "test"; for ($i = 0; $i < $iteration; $i++) { $etc = TEST; } printf("const: %0.6f s\n", microtime(true) - $start); // var $start = microtime(true); $TEST = "test"; for ($i = 0; $i < $iteration; $i++) { $etc = $TEST; } printf("var : %0.6f s\n", microtime(true) - $start);
Output for 7.1.0
const: 0.014097 s var : 0.010393 s
Output for 7.0.14
const: 0.023453 s var : 0.017802 s
Output for 7.0.10
const: 0.019395 s var : 0.014288 s
Output for 7.0.9
const: 0.019989 s var : 0.014576 s
Output for 7.0.8
const: 0.019503 s var : 0.014728 s
Output for 7.0.7
const: 0.018333 s var : 0.013111 s
Output for 7.0.6
const: 0.021014 s var : 0.015014 s
Output for 7.0.5
const: 0.014766 s var : 0.011765 s
Output for 7.0.4
const: 0.015379 s var : 0.011370 s
Output for 7.0.3
const: 0.022880 s var : 0.014664 s
Output for 7.0.2
const: 0.021682 s var : 0.014947 s
Output for 7.0.1
const: 0.028774 s var : 0.019359 s
Output for 7.0.0
const: 0.017943 s var : 0.012833 s
Output for hhvm-3.12.0
const: 0.087099 s var : 0.065639 s
Output for hhvm-3.10.0
const: 0.118340 s var : 0.112463 s
Output for 5.6.28
const: 0.079445 s var : 0.017917 s
Output for 5.6.25
const: 0.051416 s var : 0.032116 s
Output for 5.6.24
const: 0.054712 s var : 0.033804 s
Output for 5.6.23
const: 0.047350 s var : 0.030337 s
Output for 5.6.22
const: 0.042273 s var : 0.029651 s
Output for 5.6.21
const: 0.045038 s var : 0.029202 s
Output for 5.6.20
const: 0.044925 s var : 0.032176 s
Output for 5.6.19
const: 0.047207 s var : 0.030181 s
Output for 5.6.18
const: 0.047624 s var : 0.028728 s
Output for 5.6.17
const: 0.043397 s var : 0.028462 s
Output for 5.6.16
const: 0.049649 s var : 0.030120 s
Output for 5.6.15
const: 0.050967 s var : 0.033779 s
Output for 5.6.14
const: 0.050786 s var : 0.032637 s
Output for 5.6.13
const: 0.053391 s var : 0.035583 s
Output for 5.6.12
const: 0.054509 s var : 0.034182 s
Output for 5.6.11
const: 0.074638 s var : 0.040397 s
Output for 5.6.10
const: 0.057846 s var : 0.032518 s
Output for 5.6.9
const: 0.049494 s var : 0.033233 s
Output for 5.6.8
const: 0.050344 s var : 0.032877 s
Output for 5.6.7
const: 0.057504 s var : 0.039303 s
Output for 5.6.6
const: 0.053085 s var : 0.031860 s
Output for 5.6.5
const: 0.044083 s var : 0.030529 s
Output for 5.6.4
const: 0.043389 s var : 0.030450 s
Output for 5.6.3
const: 0.040834 s var : 0.029128 s
Output for 5.6.2
const: 0.058649 s var : 0.037229 s
Output for 5.6.1
const: 0.050376 s var : 0.034016 s
Output for 5.6.0
const: 0.058117 s var : 0.036875 s
Output for 5.5.38
const: 0.055033 s var : 0.035822 s
Output for 5.5.37
const: 0.073564 s var : 0.043340 s
Output for 5.5.36
const: 0.051386 s var : 0.028387 s
Output for 5.5.35
const: 0.044884 s var : 0.030313 s
Output for 5.5.34
const: 0.042523 s var : 0.028841 s
Output for 5.5.33
const: 0.054905 s var : 0.031038 s
Output for 5.5.32
const: 0.055543 s var : 0.036982 s
Output for 5.5.31
const: 0.042942 s var : 0.031466 s
Output for 5.5.30
const: 0.059560 s var : 0.031247 s
Output for 5.5.29
const: 0.053868 s var : 0.034668 s
Output for 5.5.28
const: 0.044261 s var : 0.033827 s
Output for 5.5.27
const: 0.052142 s var : 0.034329 s
Output for 5.5.26
const: 0.045214 s var : 0.028884 s
Output for 5.5.25
const: 0.054420 s var : 0.034971 s
Output for 5.5.24
const: 0.042316 s var : 0.031415 s
Output for 5.5.23
const: 0.047283 s var : 0.029658 s
Output for 5.5.22
const: 0.043551 s var : 0.031919 s
Output for 5.5.21
const: 0.058540 s var : 0.033250 s
Output for 5.5.20
const: 0.060141 s var : 0.037414 s
Output for 5.5.19
const: 0.051551 s var : 0.033678 s
Output for 5.5.18
const: 0.053222 s var : 0.033585 s
Output for 5.5.16
const: 0.050115 s var : 0.032444 s
Output for 5.5.15
const: 0.055303 s var : 0.031769 s
Output for 5.5.14
const: 0.058948 s var : 0.035656 s
Output for 5.5.13
const: 0.059562 s var : 0.035849 s
Output for 5.5.12
const: 0.077608 s var : 0.040382 s
Output for 5.5.11
const: 0.056973 s var : 0.037190 s
Output for 5.5.10
const: 0.049528 s var : 0.033021 s
Output for 5.5.9
const: 0.051502 s var : 0.032198 s
Output for 5.5.8
const: 0.042224 s var : 0.033138 s
Output for 5.5.7
const: 0.043049 s var : 0.032303 s
Output for 5.5.6
const: 0.043730 s var : 0.029935 s
Output for 5.5.5
const: 0.058528 s var : 0.037352 s
Output for 5.5.4
const: 0.038754 s var : 0.028031 s
Output for 5.5.3
const: 0.052500 s var : 0.033989 s
Output for 5.5.2
const: 0.045762 s var : 0.030794 s
Output for 5.5.1
const: 0.058603 s var : 0.037454 s
Output for 5.5.0
const: 0.059110 s var : 0.031012 s
Output for 5.4.45
const: 0.050978 s var : 0.029229 s
Output for 5.4.44
const: 0.042229 s var : 0.031457 s
Output for 5.4.43
const: 0.042411 s var : 0.032943 s
Output for 5.4.42
const: 0.049930 s var : 0.033998 s
Output for 5.4.41
const: 0.052482 s var : 0.035092 s
Output for 5.4.40
const: 0.047602 s var : 0.030790 s
Output for 5.4.39
const: 0.048974 s var : 0.030066 s
Output for 5.4.38
const: 0.047222 s var : 0.028407 s
Output for 5.4.37
const: 0.051624 s var : 0.034707 s
Output for 5.4.36
const: 0.040791 s var : 0.028140 s
Output for 5.4.35
const: 0.047105 s var : 0.031050 s
Output for 5.4.34
const: 0.046196 s var : 0.029824 s
Output for 5.4.32
const: 0.045403 s var : 0.028168 s
Output for 5.4.31
const: 0.055309 s var : 0.034544 s
Output for 5.4.30
const: 0.050484 s var : 0.030112 s
Output for 5.4.29
const: 0.048670 s var : 0.029735 s
Output for 5.4.28
const: 0.051079 s var : 0.031495 s
Output for 5.4.27
const: 0.051167 s var : 0.033696 s
Output for 5.4.26
const: 0.049517 s var : 0.033226 s
Output for 5.4.25
const: 0.053558 s var : 0.031708 s
Output for 5.4.24
const: 0.057592 s var : 0.037611 s
Output for 5.4.23
const: 0.057182 s var : 0.037745 s
Output for 5.4.22
const: 0.044650 s var : 0.030039 s
Output for 5.4.21
const: 0.043941 s var : 0.029425 s
Output for 5.4.20
const: 0.050865 s var : 0.035056 s
Output for 5.4.19
const: 0.040897 s var : 0.028966 s
Output for 5.4.18
const: 0.037426 s var : 0.027846 s
Output for 5.4.17
const: 0.043030 s var : 0.029820 s
Output for 5.4.16
const: 0.042079 s var : 0.029001 s
Output for 5.4.15
const: 0.048004 s var : 0.029567 s
Output for 5.4.14
const: 0.048771 s var : 0.029570 s
Output for 5.4.13
const: 0.049041 s var : 0.030151 s
Output for 5.4.12
const: 0.055964 s var : 0.031831 s
Output for 5.4.11
const: 0.041804 s var : 0.030601 s
Output for 5.4.10
const: 0.047067 s var : 0.034607 s
Output for 5.4.9
const: 0.058508 s var : 0.038047 s
Output for 5.4.8
const: 0.059232 s var : 0.037280 s
Output for 5.4.7
const: 0.057188 s var : 0.037284 s
Output for 5.4.6
const: 0.051867 s var : 0.030159 s
Output for 5.4.5
const: 0.059246 s var : 0.041244 s
Output for 5.4.4
const: 0.050934 s var : 0.034861 s
Output for 5.4.3
const: 0.042152 s var : 0.032198 s
Output for 5.4.2
const: 0.044744 s var : 0.029669 s
Output for 5.4.1
const: 0.052610 s var : 0.032789 s
Output for 5.4.0
const: 0.055944 s var : 0.031947 s
Output for 5.3.29
const: 0.101947 s var : 0.037747 s
Output for 5.3.28
const: 0.111695 s var : 0.039053 s
Output for 5.3.27
const: 0.109180 s var : 0.041665 s
Output for 5.3.26
const: 0.089513 s var : 0.036915 s
Output for 5.3.25
const: 0.091406 s var : 0.036186 s
Output for 5.3.24
const: 0.088319 s var : 0.051137 s
Output for 5.3.23
const: 0.092018 s var : 0.041255 s
Output for 5.3.22
const: 0.103221 s var : 0.039357 s
Output for 5.3.21
const: 0.093018 s var : 0.036401 s
Output for 5.3.20
const: 0.104750 s var : 0.040172 s
Output for 5.3.19
const: 0.111350 s var : 0.037930 s
Output for 5.3.18
const: 0.098986 s var : 0.043106 s
Output for 5.3.17
const: 0.089666 s var : 0.040302 s
Output for 5.3.16
const: 0.101332 s var : 0.039430 s
Output for 5.3.15
const: 0.098697 s var : 0.041197 s
Output for 5.3.14
const: 0.104923 s var : 0.040813 s
Output for 5.3.13
const: 0.092621 s var : 0.037179 s
Output for 5.3.12
const: 0.072535 s var : 0.033031 s
Output for 5.3.11
const: 0.099691 s var : 0.038478 s
Output for 5.3.10
const: 0.101918 s var : 0.040052 s
Output for 5.3.9
const: 0.096466 s var : 0.041388 s
Output for 5.3.8
const: 0.087827 s var : 0.039383 s
Output for 5.3.7
const: 0.085738 s var : 0.037352 s
Output for 5.3.6
const: 0.090325 s var : 0.037211 s
Output for 5.3.5
const: 0.097706 s var : 0.039384 s
Output for 5.3.4
const: 0.106102 s var : 0.041564 s
Output for 5.3.3
const: 0.107624 s var : 0.037410 s
Output for 5.3.2
const: 0.089624 s var : 0.042359 s
Output for 5.3.1
const: 0.089840 s var : 0.037691 s
Output for 5.3.0
const: 0.090967 s var : 0.037272 s
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_CONST in /in/M13D1 on line 8
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_CONST in /in/M13D1 on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/M13D1 on line 8
Process exited with code 255.