summaryrefslogtreecommitdiff
path: root/Zend/micro_bench.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/micro_bench.php')
-rw-r--r--Zend/micro_bench.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/micro_bench.php b/Zend/micro_bench.php
index e07ee88ce5..0d705e942b 100644
--- a/Zend/micro_bench.php
+++ b/Zend/micro_bench.php
@@ -166,6 +166,14 @@ function create_object($n) {
}
}
+define('TEST', null);
+
+function read_const($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = TEST;
+ }
+}
+
/*****/
function empty_loop($n) {
@@ -272,4 +280,6 @@ $x->read_const(N);
$t = end_test($t, '$x = Foo::TEST', $overhead);
create_object(N);
$t = end_test($t, 'new Foo()', $overhead);
+read_const(N);
+$t = end_test($t, '$x = TEST', $overhead);
total($t0, "Total");