mirror of
https://github.com/php/php-src.git
synced 2024-12-27 02:39:39 +08:00
7cc6f60134
Fixed incorrect "argc" update and corresponding phpdbg test.
57 lines
659 B
PHP
57 lines
659 B
PHP
--TEST--
|
|
Test argv passing
|
|
--PHPDBG--
|
|
r
|
|
r 1 2 3
|
|
r
|
|
q
|
|
--EXPECTF--
|
|
[Successful compilation of %s]
|
|
prompt> int(5)
|
|
array(5) {
|
|
[0]=>
|
|
string(%d) "%s"
|
|
[1]=>
|
|
string(2) "--"
|
|
[2]=>
|
|
string(1) "1"
|
|
[3]=>
|
|
string(1) "2"
|
|
[4]=>
|
|
string(1) "3"
|
|
}
|
|
[Script ended normally]
|
|
prompt> int(4)
|
|
array(4) {
|
|
[0]=>
|
|
string(%d) "%s"
|
|
[1]=>
|
|
string(1) "1"
|
|
[2]=>
|
|
string(1) "2"
|
|
[3]=>
|
|
string(1) "3"
|
|
}
|
|
[Script ended normally]
|
|
prompt> int(5)
|
|
array(5) {
|
|
[0]=>
|
|
string(%d) "%s"
|
|
[1]=>
|
|
string(2) "--"
|
|
[2]=>
|
|
string(1) "1"
|
|
[3]=>
|
|
string(1) "2"
|
|
[4]=>
|
|
string(1) "3"
|
|
}
|
|
[Script ended normally]
|
|
prompt>
|
|
--ARGS--
|
|
1 2 3
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump($argc, $argv);
|