diff options
Diffstat (limited to 'sapi/cli')
| -rwxr-xr-x[-rw-r--r--] | sapi/cli/generate_mime_type_map.php | 0 | ||||
| -rw-r--r-- | sapi/cli/php_cli.c | 13 | ||||
| -rw-r--r-- | sapi/cli/php_cli_server.c | 4 | ||||
| -rw-r--r-- | sapi/cli/tests/002-unix.phpt (renamed from sapi/cli/tests/002-win32.phpt) | 6 | ||||
| -rw-r--r-- | sapi/cli/tests/002.phpt | 5 | ||||
| -rw-r--r-- | sapi/cli/tests/008.phpt | 4 | ||||
| -rw-r--r-- | sapi/cli/tests/argv_mb.phpt | 3 |
7 files changed, 10 insertions, 25 deletions
diff --git a/sapi/cli/generate_mime_type_map.php b/sapi/cli/generate_mime_type_map.php index 0cea031e37..0cea031e37 100644..100755 --- a/sapi/cli/generate_mime_type_map.php +++ b/sapi/cli/generate_mime_type_map.php diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 3b053e223a..be0f11e431 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -182,14 +182,6 @@ const opt_struct OPTIONS[] = { {'-', 0, NULL} /* end of args */ }; -static int print_module_info(zval *element) /* {{{ */ -{ - zend_module_entry *module = (zend_module_entry*)Z_PTR_P(element); - php_printf("%s\n", module->name); - return ZEND_HASH_APPLY_KEEP; -} -/* }}} */ - static int module_name_cmp(const void *a, const void *b) /* {{{ */ { Bucket *f = (Bucket *) a; @@ -203,11 +195,14 @@ static int module_name_cmp(const void *a, const void *b) /* {{{ */ static void print_modules(void) /* {{{ */ { HashTable sorted_registry; + zend_module_entry *module; zend_hash_init(&sorted_registry, 50, NULL, NULL, 0); zend_hash_copy(&sorted_registry, &module_registry, NULL); zend_hash_sort(&sorted_registry, module_name_cmp, 0); - zend_hash_apply(&sorted_registry, print_module_info); + ZEND_HASH_FOREACH_PTR(&sorted_registry, module) { + php_printf("%s\n", module->name); + } ZEND_HASH_FOREACH_END(); zend_hash_destroy(&sorted_registry); } /* }}} */ diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 5386aa54c6..bcbbab3c01 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -37,10 +37,6 @@ #include <unixlib/local.h> #endif - -#if HAVE_TIME_H -#include <time.h> -#endif #if HAVE_SYS_TIME_H #include <sys/time.h> #endif diff --git a/sapi/cli/tests/002-win32.phpt b/sapi/cli/tests/002-unix.phpt index 2895d15211..2be668f188 100644 --- a/sapi/cli/tests/002-win32.phpt +++ b/sapi/cli/tests/002-unix.phpt @@ -3,8 +3,8 @@ running code with -r --SKIPIF-- <?php include "skipif.inc"; -if (substr(PHP_OS, 0, 3) != 'WIN') { - die ("skip only for Windows"); +if (substr(PHP_OS, 0, 3) == 'WIN') { + die ("skip not for Windows"); } ?> --FILE-- @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { $php = getenv('TEST_PHP_EXECUTABLE'); -var_dump(`$php -n -r "var_dump('hello');"`); +var_dump(`$php -n -r 'var_dump("hello");'`); echo "Done\n"; ?> diff --git a/sapi/cli/tests/002.phpt b/sapi/cli/tests/002.phpt index 2be668f188..9fb2465ee4 100644 --- a/sapi/cli/tests/002.phpt +++ b/sapi/cli/tests/002.phpt @@ -3,16 +3,13 @@ running code with -r --SKIPIF-- <?php include "skipif.inc"; -if (substr(PHP_OS, 0, 3) == 'WIN') { - die ("skip not for Windows"); -} ?> --FILE-- <?php $php = getenv('TEST_PHP_EXECUTABLE'); -var_dump(`$php -n -r 'var_dump("hello");'`); +var_dump(`$php -n -r "var_dump('hello');"`); echo "Done\n"; ?> diff --git a/sapi/cli/tests/008.phpt b/sapi/cli/tests/008.phpt index 429254f4d6..d795c98879 100644 --- a/sapi/cli/tests/008.phpt +++ b/sapi/cli/tests/008.phpt @@ -16,8 +16,8 @@ $filename = dirname(__FILE__).'/008.test.php'; $code =' <?php -class test { - private $pri; +class test { + private $pri; } var_dump(test::$pri); diff --git a/sapi/cli/tests/argv_mb.phpt b/sapi/cli/tests/argv_mb.phpt index 2e14b1a192..3b7c6eac19 100644 --- a/sapi/cli/tests/argv_mb.phpt +++ b/sapi/cli/tests/argv_mb.phpt @@ -3,9 +3,6 @@ Test basic argv multibyte API integration --SKIPIF-- <?php include "skipif.inc"; -if (substr(PHP_OS, 0, 3) != 'WIN') { - die ("skip only for Windows"); -} ?> --FILE-- <?php |
