mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
- Fix argname printing order
This commit is contained in:
parent
50e8a47c90
commit
b655a0bc7e
@ -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);
|
||||
}
|
||||
|
4
test.php
4
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";
|
||||
|
Loading…
Reference in New Issue
Block a user