com php-src: - Fix argname printing order: phpdbg_frame.c test.php
| From: | Bob Weinand | Date: | Sun, 08 Dec 2013 19:52:14 +0000 |
| Subject: | com php-src: - Fix argname printing order: phpdbg_frame.c test.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75274@lists.php.net to get a copy of this message | ||
Commit: b655a0bc7ef93b1bfc178033b334d1d3c23b6379
Author: Felipe Pena <felipensp@gmail.com> Sun, 8 Dec 2013 17:52:14 -0200
Parents: 50e8a47c901a262eee0ff88677730723ffdd9e25
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b655a0bc7ef93b1bfc178033b334d1d3c23b6379
Log:
- Fix argname printing order
Changed paths:
M phpdbg_frame.c
M test.php
Diff:
diff --git a/phpdbg_frame.c b/phpdbg_frame.c
index 1bc1f9c..88e2824 100644
--- a/phpdbg_frame.c
+++ b/phpdbg_frame.c
@@ -139,13 +139,14 @@ static void phpdbg_dump_prototype(zval **tmp TSRMLS_DC) /* {{{ */
while (zend_hash_get_current_data_ex(Z_ARRVAL_PP(args),
(void **) &argstmp, &iterator) == SUCCESS) {
+ if (j) {
+ phpdbg_write(", ");
+ }
if (m && j < m) {
phpdbg_write("%s=", arginfo[j].name);
}
+ ++j;
- if (j++) {
- phpdbg_write(", ");
- }
zend_print_flat_zval_r(*argstmp TSRMLS_CC);
zend_hash_move_forward_ex(Z_ARRVAL_PP(args), &iterator);
}
diff --git a/test.php b/test.php
index 8ced95e..744ed79 100644
--- a/test.php
+++ b/test.php
@@ -13,7 +13,7 @@ class phpdbg {
}
}
-function test($x) {
+function test($x, $y = 0) {
$var = $x + 1;
$var += 2;
$var <<= 3;
@@ -32,7 +32,7 @@ $dbg = new phpdbg();
var_dump(
$dbg->isGreat("PHP Rocks !!"));
-foreach (test(1) as $gen)
+foreach (test(1,2) as $gen)
continue;
echo "it works!\n";