php-src/sapi/phpdbg/tests/run_001.phpt
Dmitry Stogov 7cc6f60134 Added "argv" and "argc" as known strings.
Fixed incorrect "argc" update and corresponding phpdbg test.
2017-12-01 01:35:47 +03:00

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);