Skip to content
This repository has been archived by the owner on Feb 6, 2019. It is now read-only.

Commit

Permalink
- Fix argname printing order
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Dec 8, 2013
1 parent 50e8a47 commit b655a0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions phpdbg_frame.c
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions test.php
Expand Up @@ -13,7 +13,7 @@ public function isGreat($greeting = null) {
}
}

function test($x) {
function test($x, $y = 0) {
$var = $x + 1;
$var += 2;
$var <<= 3;
Expand All @@ -32,7 +32,7 @@ function test($x) {
var_dump(
$dbg->isGreat("PHP Rocks !!"));

foreach (test(1) as $gen)
foreach (test(1,2) as $gen)
continue;

echo "it works!\n";
Expand Down

0 comments on commit b655a0b

Please sign in to comment.