From 028aafe3c4653f7eba5634a05b2b154c3f06810a Mon Sep 17 00:00:00 2001 From: Xuefer Date: Tue, 27 May 2014 04:53:19 +0000 Subject: [PATCH] improve devel testing git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1485 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- devel/run | 9 ++++++++- devel/sample.cpp.php | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/devel/run b/devel/run index b50ef2e..b8374d7 100755 --- a/devel/run +++ b/devel/run @@ -358,7 +358,14 @@ run() { ;; *) hiecho "$@" - "$@" | tee output.php + case "${tracer[@]}" in + gdb*|val*) + "$@" + ;; + *) + "$@" | tee output.php + ;; + esac ;; esac # }}} diff --git a/devel/sample.cpp.php b/devel/sample.cpp.php index 1fd29d4..1eec32e 100644 --- a/devel/sample.cpp.php +++ b/devel/sample.cpp.php @@ -164,6 +164,7 @@ abstract class ClassName echo __METHOD__; echo __FUNCTION__; $this->method(); + #if PHP_VERSION >= 500 try { throw new _Exception(); @@ -537,8 +538,9 @@ for (; $i < 10; ++$i) { } $array = array( - array('a' => 'b') - ); + array('a' => 'b') + ); + foreach ($array as $value) { foreach ($value as $key => $value) { echo $key . ' = ' . $value . "\n"; @@ -620,10 +622,12 @@ declare (ticks=1) { } $a = true; + while ($a) { declare (ticks=1) { echo 2; } + $a = false; }