diff --git a/.gitignore b/.gitignore index c0e059714dd2f..8216317abbe77 100644 --- a/.gitignore +++ b/.gitignore @@ -87,7 +87,7 @@ missing mkinstalldirs # RPM specification file generated by `./configure` -/php7.spec +/php.spec # Directories for shared object files and headers generated by `./configure` include/ diff --git a/Makefile.global b/Makefile.global index 29d74d3acbc27..ad3fbac92f603 100644 --- a/Makefile.global +++ b/Makefile.global @@ -119,7 +119,7 @@ clean: distclean: clean rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h - rm -f php7.spec main/build-defs.h scripts/phpize + rm -f php.spec main/build-defs.h scripts/phpize rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1 rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html diff --git a/NEWS b/NEWS index 6e18690ca6d94..538e02d14901d 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,9 @@ PHP NEWS - Intl: . Removed deprecated INTL_IDNA_VARIANT_2003. (cmb) +- LDAP: + . Removed deprecated ldap_sort. (mcmic) + - phpdbg: . Fixed bug #76596 (phpdbg support for display_errors=stderr). (kabel) diff --git a/README.RELEASE_PROCESS b/README.RELEASE_PROCESS index cff4686d264fb..5414978c72273 100644 --- a/README.RELEASE_PROCESS +++ b/README.RELEASE_PROCESS @@ -118,11 +118,11 @@ Getting the non stable release (alpha/beta/RC) announced Note: Remember to update the sha256 checksum information. -2. Update ``web/php.git/include/version.inc`` (x=major version number) +2. Update ``web/php.git/include/version.inc`` (X_Y=major_minor version number) - a. ``$PHP_x_RC`` = "5.4.0RC1" (should be set to "false" before) + a. ``$PHP_X_Y_RC`` = "5.4.0RC1" (should be set to "false" before) - b. ``$PHP_x_RC_DATE`` = "06 September 2007" + b. ``$PHP_X_Y_RC_DATE`` = "06 September 2007" 3. Skip this step for non stable releases after GA of minor or major versions (e.g. announce 7.3.0RC1, but not 7.3.1RC1): @@ -184,7 +184,7 @@ credits files in ext/standard. 8. Push the tag f.e. "``git push origin php-5.4.1``" -9. run: ``PHPROOT=. ./makedist php 5.4.1``, this will export the tag, create configure +9. run: ``PHPROOT=. ./makedist 5.4.1``, this will export the tag, create configure and build three tarballs (gz, bz2 and xz). Check if the pear files are updated (phar). On some systems the behavior of GNU tar can default to produce POSIX compliant archives @@ -224,19 +224,22 @@ Getting the stable release announced b. If that fails for any non-trivially fixable reason, you can manually copy the old information to include/releases.inc -2. Edit ``phpweb/include/version.inc`` and change (X=major release number): +2. Update ``phpweb/include/version.inc`` (X_Y=major_minor release number): - a. ``$PHP_X_VERSION`` to the correct version + a. ``$PHP_X_Y_VERSION`` to the correct version - b. ``$PHP_X_DATE`` to the release date + b. ``$PHP_X_Y_DATE`` to the release date - c. ``$PHP_X_SHA256`` array and update all the SHA256 sums + c. ``$PHP_X_Y_SHA256`` array and update all the SHA256 sums - d. set ``$PHP_X_RC`` to false! + d. set ``$PHP_X_Y_RC`` to false! e. Make sure there are no outdated "notes" or edited "date" keys in the ``$RELEASES[X][$PHP_X_VERSION]["source"]`` array + f. Only for the first revision of a major or minor release bump + ``$PHP_X_VERSION``, ``$PHP_X_DATE`` and ``$PHP_X_RC_DATE``. + 3. Create the release file (releases/x_y_z.php) Usually we use the same content as for point 6, but included in php template instead of the release xml. @@ -295,15 +298,15 @@ Re-releasing the same version (or -pl) 1. Commit the new binaries to ``phpweb/distributions/`` -2. Edit ``phpweb/include/version.inc`` and change (X=major release number): +2. Update ``phpweb/include/version.inc`` (X_Y=major_minor release number): a. If only releasing for one OS, make sure you edit only those variables - b. ``$PHP_X_VERSION`` to the correct version + b. ``$PHP_X_Y_VERSION`` to the correct version - c. ``$PHP_X_DATE`` to the release date + c. ``$PHP_X_Y_DATE`` to the release date - d. ``$PHP_X_SHA256`` array and update all the SHA256 sums + d. ``$PHP_X_Y_SHA256`` array and update all the SHA256 sums e. Make sure there are no outdated "notes" or edited "date" keys in the ``$RELEASES[X][$PHP_X_VERSION]["source"]`` array diff --git a/README.STREAMS b/README.STREAMS index 7c521749bb516..6ef69c733a008 100644 --- a/README.STREAMS +++ b/README.STREAMS @@ -374,5 +374,3 @@ the example above, you need to use mysql_free_result on the rowset, close the connection and then use pefree to dispose of the struct you allocated. You may read the stream->persistent field to determine if your struct was allocated in persistent mode or not. - -vim:tw=78:et diff --git a/README.UNIX-BUILD-SYSTEM b/README.UNIX-BUILD-SYSTEM index a184b909ba374..8db9bcde2f18a 100644 --- a/README.UNIX-BUILD-SYSTEM +++ b/README.UNIX-BUILD-SYSTEM @@ -108,7 +108,7 @@ module, program, etc). For example for APXS: -PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php7.c php_apache.c) +PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php.c php_apache.c) diff --git a/README.WIN32-BUILD-SYSTEM b/README.WIN32-BUILD-SYSTEM index e46d0e4210ff4..32ebc6b691a99 100644 --- a/README.WIN32-BUILD-SYSTEM +++ b/README.WIN32-BUILD-SYSTEM @@ -1,5 +1,3 @@ The Win32 Build System. See https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2 - -vim:tw=78:sw=1:ts=1:et diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 183df2c42002f..63ae6efc23d48 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -794,12 +794,3 @@ TSRM_API const char *tsrm_api_name(void) }/*}}}*/ #endif /* ZTS */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index 0fa2ccb48b0df..061459e77d5e0 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -210,12 +210,3 @@ TSRM_API const char *tsrm_api_name(void); #endif /* ZTS */ #endif /* TSRM_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/TSRM/tsrm_config.w32.h b/TSRM/tsrm_config.w32.h index ab451411797c6..ec5c576298857 100644 --- a/TSRM/tsrm_config.w32.h +++ b/TSRM/tsrm_config.w32.h @@ -12,12 +12,3 @@ #include #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/TSRM/tsrm_config_common.h b/TSRM/tsrm_config_common.h index f70f7a5c41e25..64cecd912ae2c 100644 --- a/TSRM/tsrm_config_common.h +++ b/TSRM/tsrm_config_common.h @@ -69,12 +69,3 @@ char *alloca (); #endif #endif /* TSRM_CONFIG_COMMON_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/TSRM/tsrm_strtok_r.c b/TSRM/tsrm_strtok_r.c index cf0b0e672ceb5..472105b43e08a 100644 --- a/TSRM/tsrm_strtok_r.c +++ b/TSRM/tsrm_strtok_r.c @@ -61,12 +61,3 @@ main() } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 276e5e39304dc..704d30e2091c4 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -820,12 +820,3 @@ TSRM_API int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */ /* }}} */ #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h index 23603ec84b28d..1ae9beaf2c1d5 100644 --- a/TSRM/tsrm_win32.h +++ b/TSRM/tsrm_win32.h @@ -109,12 +109,3 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags); TSRM_API int shmdt(const void *shmaddr); TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/UPGRADING b/UPGRADING index 99d136fbe7d61..b7da98efea9ec 100644 --- a/UPGRADING +++ b/UPGRADING @@ -34,6 +34,7 @@ PHP 8.0 UPGRADE NOTES interpreted as strings. . Removed ability to specify an autoloader using an __autoload() function. spl_autoload_register() should be used instead. + . Removed the $errcontext argument for custom error handlers. . Removed create_function(). Anonymous functions may be used instead. . Removed each(). foreach or ArrayIterator should be used instead. . Removed ability to unbind $this from closures that were created from a @@ -68,6 +69,9 @@ PHP 8.0 UPGRADE NOTES RFC: https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003 . The deprecated Normalizer::NONE constant has been removed. +- LDAP: + . The deprecated function ldap_sort has been removed. + - Mbstring: . The mbstring.func_overload directive has been removed. The related MB_OVERLOAD_MAIL, MB_OVERLOAD_STRING, and MB_OVERLOAD_REGEX constants have @@ -94,6 +98,9 @@ PHP 8.0 UPGRADE NOTES . The 'e' modifier for mb_ereg_replace() has been removed. mb_ereg_replace_callback() should be used instead. + . A non-string pattern argument to mb_ereg_replace() will now be interpreted + as a string instead of an ASCII codepoint. The previous behavior may be + restored with an explicit call to chr(). - SPL: . SplFileObject::fgetss() has been removed. diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 48e166884517c..7dea050f66d5e 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -1,7 +1,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES 1. Internal API changes - a. TBD + a. Object Handlers API 2. Build system changes a. Abstract @@ -14,7 +14,10 @@ PHP 8.0 INTERNALS UPGRADE NOTES 1. Internal API changes ======================== - a. TBD + a. Object Handlers API and some related functions, e.g. zend_call_method() and + zend_objects_clone_obj() were changed to receive zend_object* instead of + zval* and zend_string* instead of zval* for property names. + ======================== 2. Build system changes diff --git a/Zend/tests/bug29890.phpt b/Zend/tests/bug29890.phpt index 1fdcdc4291336..6f1e874882e62 100644 --- a/Zend/tests/bug29890.phpt +++ b/Zend/tests/bug29890.phpt @@ -2,7 +2,7 @@ Bug #29890 (crash if error handler fails) --FILE-- --EXPECTF-- -#0 userErrorHandler(8, Undefined variable: b, %sbug29896.php, 11, Array ([A1] => Test1)) called at [%sbug29896.php:11] +#0 userErrorHandler(8, Undefined variable: b, %sbug29896.php, 11) called at [%sbug29896.php:11] #1 GenerateError1(Test1) called at [%sbug29896.php:16] #2 GenerateError2(Test2) called at [%sbug29896.php:19] diff --git a/Zend/tests/bug35017.phpt b/Zend/tests/bug35017.phpt index 9944df55e026e..8a747be7e1595 100644 --- a/Zend/tests/bug35017.phpt +++ b/Zend/tests/bug35017.phpt @@ -13,7 +13,7 @@ try { } catch(Exception $e) { echo "This Exception should be caught\n"; } -function errorHandler($errno, $errstr, $errfile, $errline, $vars) { +function errorHandler($errno, $errstr, $errfile, $errline) { throw new Exception('Some Exception'); } ?> diff --git a/Zend/tests/bug41209.phpt b/Zend/tests/bug41209.phpt index 3924f99ac85ec..f61df73d20a6a 100644 --- a/Zend/tests/bug41209.phpt +++ b/Zend/tests/bug41209.phpt @@ -41,6 +41,6 @@ echo "Done\n"; --EXPECTF-- Fatal error: Uncaught ErrorException: Undefined variable: id in %s:%d Stack trace: -#0 %s(%d): env::errorHandler(8, '%s', '%s', 34, Array) +#0 %s(%d): env::errorHandler(8, '%s', '%s', 34) #1 {main} thrown in %s on line %d diff --git a/Zend/tests/bug45805.phpt b/Zend/tests/bug45805.phpt index d63e658868a5c..86cea70373190 100644 --- a/Zend/tests/bug45805.phpt +++ b/Zend/tests/bug45805.phpt @@ -38,7 +38,7 @@ $o->bar(); --EXPECTF-- Fatal error: Uncaught RuntimeException in %sbug45805.php:%d Stack trace: -#0 %sbug45805.php(%d): PHPUnit_Util_ErrorHandler::handleError(8, 'Only variables ...', '%s', %d, Array) +#0 %sbug45805.php(%d): PHPUnit_Util_ErrorHandler::handleError(8, 'Only variables ...', '%s', %d) #1 [internal function]: B->foo() #2 %sbug45805.php(%d): ReflectionMethod->invoke(Object(B)) #3 %sbug45805.php(%d): B->bar() diff --git a/Zend/tests/bug48004.phpt b/Zend/tests/bug48004.phpt index 5968876520b9d..c8dd0b388024c 100644 --- a/Zend/tests/bug48004.phpt +++ b/Zend/tests/bug48004.phpt @@ -2,7 +2,7 @@ Bug #48004 (Error handler prevents creation of default object) --FILE-- __invoke(Object(Exception)) #3 {main} diff --git a/Zend/tests/bug69388.phpt b/Zend/tests/bug69388.phpt index bf0c0a3c39c79..3846cca4cafa0 100644 --- a/Zend/tests/bug69388.phpt +++ b/Zend/tests/bug69388.phpt @@ -3,7 +3,7 @@ Bug #69388: Use after free on recursive calls to PHP compiler --FILE-- bar($a, $b, $c); --EXPECTF-- Fatal error: Uncaught Error: Class 'DoesNotExists' not found in %sbug72101.php:61 Stack trace: -#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8, Array) +#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8) #1 %sbug72101.php(27): PHPUnit_Framework_MockObject_Stub_ReturnCallback->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static)) #2 %sbug72101.php(19): PHPUnit_Framework_MockObject_Matcher->invoked(Object(PHPUnit_Framework_MockObject_Invocation_Static)) #3 %sbug72101.php(52): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static)) diff --git a/Zend/tests/bug76025.phpt b/Zend/tests/bug76025.phpt index 2619984d1e34b..c7958bd60e90f 100644 --- a/Zend/tests/bug76025.phpt +++ b/Zend/tests/bug76025.phpt @@ -13,6 +13,6 @@ $c = $b[$a]; --EXPECTF-- Fatal error: Uncaught Exception: blah in %sbug76025.php:%d Stack trace: -#0 %sbug76025.php(%d): handleError(8, 'Undefined varia...', '%s', %d, Array) +#0 %sbug76025.php(%d): handleError(8, 'Undefined varia...', '%s', %d) #1 {main} thrown in %sbug76025.php on line %d diff --git a/Zend/tests/bug76534.phpt b/Zend/tests/bug76534.phpt index 956a29ba2c2fd..457d09f400381 100644 --- a/Zend/tests/bug76534.phpt +++ b/Zend/tests/bug76534.phpt @@ -12,6 +12,6 @@ $y = &$x["bar"]; --EXPECTF-- Fatal error: Uncaught Exception: Illegal string offset 'bar' in %sbug76534.php:%d Stack trace: -#0 %sbug76534.php(%d): {closure}(2, 'Illegal string ...', '%s', %d, Array) +#0 %sbug76534.php(%d): {closure}(2, 'Illegal string ...', '%s', %d) #1 {main} thrown in %sbug76534.php on line %d diff --git a/Zend/tests/function_exists_variation1.phpt b/Zend/tests/function_exists_variation1.phpt deleted file mode 100644 index bd74e2f76258b..0000000000000 --- a/Zend/tests/function_exists_variation1.phpt +++ /dev/null @@ -1,138 +0,0 @@ ---TEST-- -Test function_exists() function : usage variations - test values for $str argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing function_exists() function: with unexpected inputs for 'str' argument *** --- Iteration 1 -- -bool(false) --- Iteration 2 -- -bool(false) --- Iteration 3 -- -bool(false) --- Iteration 4 -- -bool(false) --- Iteration 5 -- -bool(false) --- Iteration 6 -- -bool(false) --- Iteration 7 -- -bool(false) --- Iteration 8 -- -bool(false) --- Iteration 9 -- -bool(false) --- Iteration 10 -- - -Warning: function_exists() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: function_exists() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: function_exists() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -bool(false) --- Iteration 14 -- -bool(false) --- Iteration 15 -- -bool(false) --- Iteration 16 -- -bool(false) --- Iteration 17 -- -bool(false) --- Iteration 18 -- -bool(false) --- Iteration 19 -- -bool(false) --- Iteration 20 -- - -Warning: function_exists() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -bool(false) --- Iteration 22 -- -bool(false) -===Done=== - diff --git a/Zend/tests/nowdoc_015.phpt b/Zend/tests/nowdoc_015.phpt index 9eb83bd063b2c..56de362dd5dc9 100644 --- a/Zend/tests/nowdoc_015.phpt +++ b/Zend/tests/nowdoc_015.phpt @@ -2,7 +2,7 @@ Test nowdoc and line numbering --FILE-- handlers->cast_object(zobj, &obj, IS_STRING) == SUCCESS) { + OBJ_RELEASE(zobj); ZVAL_COPY_VALUE(arg, &obj); *dest = Z_STR_P(arg); return 1; } - } else if (Z_OBJ_HANDLER_P(arg, get)) { + } else if (zobj->handlers->get) { zval rv; - zval *z = Z_OBJ_HANDLER_P(arg, get)(arg, &rv); + zval *z = zobj->handlers->get(zobj, &rv); if (Z_TYPE_P(z) != IS_OBJECT) { - zval_ptr_dtor(arg); + OBJ_RELEASE(zobj); if (Z_TYPE_P(z) == IS_STRING) { ZVAL_COPY_VALUE(arg, z); } else { @@ -1101,7 +1103,8 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args, zval *this * because it may call __set from the uninitialized object otherwise. */ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties) /* {{{ */ { - const zend_object_handlers *obj_ht = Z_OBJ_HT_P(obj); + zend_object *zobj = Z_OBJ_P(obj); + zend_object_write_property_t write_property = zobj->handlers->write_property; zend_class_entry *old_scope = EG(fake_scope); zend_string *key; zval *value; @@ -1109,10 +1112,7 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties) /* {{{ */ EG(fake_scope) = Z_OBJCE_P(obj); ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, value) { if (key) { - zval member; - - ZVAL_STR(&member, key); - obj_ht->write_property(obj, &member, value, NULL); + write_property(zobj, key, value, NULL); } } ZEND_HASH_FOREACH_END(); EG(fake_scope) = old_scope; @@ -1728,11 +1728,11 @@ ZEND_API int add_property_stringl_ex(zval *arg, const char *key, size_t key_len, ZEND_API int add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */ { - zval z_key; + zend_string *str; - ZVAL_STRINGL(&z_key, key, key_len); - Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, value, NULL); - zval_ptr_dtor(&z_key); + str = zend_string_init(key, key_len, 0); + Z_OBJ_HANDLER_P(arg, write_property)(Z_OBJ_P(arg), str, value, NULL); + zend_string_release_ex(str, 0); return SUCCESS; } /* }}} */ @@ -3143,16 +3143,18 @@ ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *obj zend_class_entry *calling_scope; zend_function *fptr; zend_object *object; - if (Z_OBJ_HANDLER_P(callable, get_closure) - && Z_OBJ_HANDLER_P(callable, get_closure)(callable, &calling_scope, &fptr, &object) == SUCCESS) { - zend_class_entry *ce = Z_OBJCE_P(callable); + zend_object *zobj = Z_OBJ_P(callable); + + if (zobj->handlers->get_closure + && zobj->handlers->get_closure(zobj, &calling_scope, &fptr, &object) == SUCCESS) { + zend_class_entry *ce = zobj->ce; zend_string *callable_name = zend_string_alloc( ZSTR_LEN(ce->name) + sizeof("::__invoke") - 1, 0); memcpy(ZSTR_VAL(callable_name), ZSTR_VAL(ce->name), ZSTR_LEN(ce->name)); memcpy(ZSTR_VAL(callable_name) + ZSTR_LEN(ce->name), "::__invoke", sizeof("::__invoke")); return callable_name; } - return zval_get_string(callable); + return zval_get_string_func(callable); } case IS_REFERENCE: callable = Z_REFVAL_P(callable); @@ -3277,7 +3279,7 @@ static zend_always_inline zend_bool zend_is_callable_impl(zval *callable, zend_o } return 0; case IS_OBJECT: - if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(callable, &fcc->calling_scope, &fcc->function_handler, &fcc->object) == SUCCESS) { + if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(Z_OBJ_P(callable), &fcc->calling_scope, &fcc->function_handler, &fcc->object) == SUCCESS) { fcc->called_scope = fcc->calling_scope; return 1; } @@ -3944,13 +3946,11 @@ ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char ZEND_API void zend_update_property_ex(zend_class_entry *scope, zval *object, zend_string *name, zval *value) /* {{{ */ { - zval property; zend_class_entry *old_scope = EG(fake_scope); EG(fake_scope) = scope; - ZVAL_STR(&property, name); - Z_OBJ_HT_P(object)->write_property(object, &property, value, NULL); + Z_OBJ_HT_P(object)->write_property(Z_OBJ_P(object), name, value, NULL); EG(fake_scope) = old_scope; } @@ -3958,14 +3958,14 @@ ZEND_API void zend_update_property_ex(zend_class_entry *scope, zval *object, zen ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length, zval *value) /* {{{ */ { - zval property; + zend_string *property; zend_class_entry *old_scope = EG(fake_scope); EG(fake_scope) = scope; - ZVAL_STRINGL(&property, name, name_length); - Z_OBJ_HT_P(object)->write_property(object, &property, value, NULL); - zval_ptr_dtor(&property); + property = zend_string_init(name, name_length, 0); + Z_OBJ_HT_P(object)->write_property(Z_OBJ_P(object), property, value, NULL); + zend_string_release_ex(property, 0); EG(fake_scope) = old_scope; } @@ -3982,14 +3982,14 @@ ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, c ZEND_API void zend_unset_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length) /* {{{ */ { - zval property; + zend_string *property; zend_class_entry *old_scope = EG(fake_scope); EG(fake_scope) = scope; - ZVAL_STRINGL(&property, name, name_length); - Z_OBJ_HT_P(object)->unset_property(object, &property, 0); - zval_ptr_dtor(&property); + property = zend_string_init(name, name_length, 0); + Z_OBJ_HT_P(object)->unset_property(Z_OBJ_P(object), property, 0); + zend_string_release_ex(property, 0); EG(fake_scope) = old_scope; } @@ -4148,13 +4148,12 @@ ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, const ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zval *object, zend_string *name, zend_bool silent, zval *rv) /* {{{ */ { - zval property, *value; + zval *value; zend_class_entry *old_scope = EG(fake_scope); EG(fake_scope) = scope; - ZVAL_STR(&property, name); - value = Z_OBJ_HT_P(object)->read_property(object, &property, silent?BP_VAR_IS:BP_VAR_R, NULL, rv); + value = Z_OBJ_HT_P(object)->read_property(Z_OBJ_P(object), name, silent?BP_VAR_IS:BP_VAR_R, NULL, rv); EG(fake_scope) = old_scope; return value; @@ -4348,13 +4347,3 @@ ZEND_API zend_bool zend_is_countable(zval *countable) /* {{{ */ } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 7656c2aee18ec..08e2228200ed2 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -632,7 +632,7 @@ END_EXTERN_C() #define RETURN_FALSE { RETVAL_FALSE; return; } #define RETURN_TRUE { RETVAL_TRUE; return; } -#define HASH_OF(p) (Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties((p)) : NULL))) +#define HASH_OF(p) (Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties(Z_OBJ_P(p)) : NULL))) #define ZVAL_IS_NULL(z) (Z_TYPE_P(z) == IS_NULL) /* For compatibility */ @@ -1501,15 +1501,16 @@ static zend_always_inline int zend_parse_arg_array_ht(zval *arg, HashTable **des if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY)) { *dest = Z_ARRVAL_P(arg); } else if (or_object && EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) { + zend_object *zobj = Z_OBJ_P(arg); if (separate - && Z_OBJ_P(arg)->properties - && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(arg)->properties) > 1)) { - if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(arg)->properties) & IS_ARRAY_IMMUTABLE))) { - GC_DELREF(Z_OBJ_P(arg)->properties); + && zobj->properties + && UNEXPECTED(GC_REFCOUNT(zobj->properties) > 1)) { + if (EXPECTED(!(GC_FLAGS(zobj->properties) & IS_ARRAY_IMMUTABLE))) { + GC_DELREF(zobj->properties); } - Z_OBJ_P(arg)->properties = zend_array_dup(Z_OBJ_P(arg)->properties); + zobj->properties = zend_array_dup(zobj->properties); } - *dest = Z_OBJ_HT_P(arg)->get_properties(arg); + *dest = zobj->handlers->get_properties(zobj); } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) { *dest = NULL; } else { @@ -1571,14 +1572,3 @@ static zend_always_inline void zend_parse_arg_zval_deref(zval *arg, zval **dest, END_EXTERN_C() #endif /* ZEND_API_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 9cb48d9006756..505201a98cfb1 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -2948,13 +2948,3 @@ ZEND_API void * __zend_realloc(void *p, size_t len) } zend_out_of_memory(); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index aaa3f12fab62b..abe6ec8e12a65 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -401,13 +401,3 @@ static void apc_init_heap(void) END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_alloc_sizes.h b/Zend/zend_alloc_sizes.h index c0e9790d7e71e..9f1c00eaad568 100644 --- a/Zend/zend_alloc_sizes.h +++ b/Zend/zend_alloc_sizes.h @@ -62,13 +62,3 @@ _(29, 3072, 4, 3, x, y) #endif /* ZEND_ALLOC_SIZES_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_arena.h b/Zend/zend_arena.h index f93294a5fa173..a27d00d34549c 100644 --- a/Zend/zend_arena.h +++ b/Zend/zend_arena.h @@ -111,13 +111,3 @@ static zend_always_inline void zend_arena_release(zend_arena **arena_ptr, void * } #endif /* _ZEND_ARENA_H_ */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 3c8c133c76fc3..2cacd532878bc 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -2044,13 +2044,3 @@ ZEND_API ZEND_COLD zend_string *zend_ast_export(const char *prefix, zend_ast *as smart_str_0(&str); return str.s; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index a3a5ed461d5c6..499b8b4191747 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -335,13 +335,3 @@ static zend_always_inline zend_ast *zend_ast_list_rtrim(zend_ast *ast) { return ast; } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_bitset.h b/Zend/zend_bitset.h index 02c133ded3827..2a227e482277b 100644 --- a/Zend/zend_bitset.h +++ b/Zend/zend_bitset.h @@ -252,13 +252,3 @@ static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) { } #endif /* _ZEND_BITSET_H_ */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_build.h b/Zend/zend_build.h index 11856c3972620..c604fb311a74e 100644 --- a/Zend/zend_build.h +++ b/Zend/zend_build.h @@ -44,13 +44,3 @@ #define ZEND_BUILD_EXTRA #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 0cd3e0c0fe069..e9252a484fc2a 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -811,11 +811,11 @@ ZEND_FUNCTION(define) if (Z_TYPE(val_free) == IS_UNDEF) { if (Z_OBJ_HT_P(val)->get) { zval rv; - val = Z_OBJ_HT_P(val)->get(val, &rv); + val = Z_OBJ_HT_P(val)->get(Z_OBJ_P(val), &rv); ZVAL_COPY_VALUE(&val_free, val); goto repeat; } else if (Z_OBJ_HT_P(val)->cast_object) { - if (Z_OBJ_HT_P(val)->cast_object(val, &val_free, IS_STRING) == SUCCESS) { + if (Z_OBJ_HT_P(val)->cast_object(Z_OBJ_P(val), &val_free, IS_STRING) == SUCCESS) { val = &val_free; break; } @@ -1097,13 +1097,12 @@ ZEND_FUNCTION(get_object_vars) Z_PARAM_OBJECT(obj) ZEND_PARSE_PARAMETERS_END(); - properties = Z_OBJ_HT_P(obj)->get_properties(obj); + zobj = Z_OBJ_P(obj); + properties = zobj->handlers->get_properties(zobj); if (properties == NULL) { RETURN_FALSE; } - zobj = Z_OBJ_P(obj); - if (!zobj->ce->default_properties_count && properties == zobj->properties && !GC_IS_RECURSIVE(properties)) { /* fast copy */ if (EXPECTED(zobj->handlers == &std_object_handlers)) { @@ -1292,7 +1291,6 @@ ZEND_FUNCTION(property_exists) zend_string *property; zend_class_entry *ce; zend_property_info *property_info; - zval property_z; if (zend_parse_parameters(ZEND_NUM_ARGS(), "zS", &object, &property) == FAILURE) { return; @@ -1321,10 +1319,8 @@ ZEND_FUNCTION(property_exists) RETURN_TRUE; } - ZVAL_STR(&property_z, property); - if (Z_TYPE_P(object) == IS_OBJECT && - Z_OBJ_HANDLER_P(object, has_property)(object, &property_z, 2, NULL)) { + Z_OBJ_HANDLER_P(object, has_property)(Z_OBJ_P(object), property, 2, NULL)) { RETURN_TRUE; } RETURN_FALSE; @@ -2582,13 +2578,3 @@ ZEND_FUNCTION(get_extension_funcs) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_builtin_functions.h b/Zend/zend_builtin_functions.h index 25c3cc6b08ccf..cfc347ed41ffc 100644 --- a/Zend/zend_builtin_functions.h +++ b/Zend/zend_builtin_functions.h @@ -27,13 +27,3 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int END_EXTERN_C() #endif /* ZEND_BUILTIN_FUNCTIONS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index f263c2a555ec0..d5f29c0069c5c 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -395,28 +395,28 @@ static zend_function *zend_closure_get_method(zend_object **object, zend_string } /* }}} */ -static zval *zend_closure_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */ +static zval *zend_closure_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) /* {{{ */ { ZEND_CLOSURE_PROPERTY_ERROR(); return &EG(uninitialized_zval); } /* }}} */ -static zval *zend_closure_write_property(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */ +static zval *zend_closure_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) /* {{{ */ { ZEND_CLOSURE_PROPERTY_ERROR(); return value; } /* }}} */ -static zval *zend_closure_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ +static zval *zend_closure_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) /* {{{ */ { ZEND_CLOSURE_PROPERTY_ERROR(); return NULL; } /* }}} */ -static int zend_closure_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */ +static int zend_closure_has_property(zend_object *object, zend_string *member, int has_set_exists, void **cache_slot) /* {{{ */ { if (has_set_exists != ZEND_PROPERTY_EXISTS) { ZEND_CLOSURE_PROPERTY_ERROR(); @@ -425,7 +425,7 @@ static int zend_closure_has_property(zval *object, zval *member, int has_set_exi } /* }}} */ -static void zend_closure_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */ +static void zend_closure_unset_property(zend_object *object, zend_string *member, void **cache_slot) /* {{{ */ { ZEND_CLOSURE_PROPERTY_ERROR(); } @@ -461,9 +461,9 @@ static zend_object *zend_closure_new(zend_class_entry *class_type) /* {{{ */ } /* }}} */ -static zend_object *zend_closure_clone(zval *zobject) /* {{{ */ +static zend_object *zend_closure_clone(zend_object *zobject) /* {{{ */ { - zend_closure *closure = (zend_closure *)Z_OBJ_P(zobject); + zend_closure *closure = (zend_closure *)zobject; zval result; zend_create_closure(&result, &closure->func, @@ -472,9 +472,9 @@ static zend_object *zend_closure_clone(zval *zobject) /* {{{ */ } /* }}} */ -int zend_closure_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr) /* {{{ */ +int zend_closure_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr) /* {{{ */ { - zend_closure *closure = (zend_closure *)Z_OBJ_P(obj); + zend_closure *closure = (zend_closure *)obj; *fptr_ptr = &closure->func; *ce_ptr = closure->called_scope; @@ -488,9 +488,9 @@ int zend_closure_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function } /* }}} */ -static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{ */ +static HashTable *zend_closure_get_debug_info(zend_object *object, int *is_temp) /* {{{ */ { - zend_closure *closure = (zend_closure *)Z_OBJ_P(object); + zend_closure *closure = (zend_closure *)object; zval val; struct _zend_arg_info *arg_info = closure->func.common.arg_info; HashTable *debug_info; @@ -553,9 +553,9 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{ } /* }}} */ -static HashTable *zend_closure_get_gc(zval *obj, zval **table, int *n) /* {{{ */ +static HashTable *zend_closure_get_gc(zend_object *obj, zval **table, int *n) /* {{{ */ { - zend_closure *closure = (zend_closure *)Z_OBJ_P(obj); + zend_closure *closure = (zend_closure *)obj; *table = Z_TYPE(closure->this_ptr) != IS_NULL ? &closure->this_ptr : NULL; *n = Z_TYPE(closure->this_ptr) != IS_NULL ? 1 : 0; @@ -759,13 +759,3 @@ void zend_closure_bind_var_ex(zval *closure_zv, uint32_t offset, zval *val) /* { ZVAL_COPY_VALUE(var, val); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_closures.h b/Zend/zend_closures.h index 620162f00ed34..6e27ddc8dfcef 100644 --- a/Zend/zend_closures.h +++ b/Zend/zend_closures.h @@ -41,13 +41,3 @@ ZEND_API zval* zend_get_closure_this_ptr(zval *obj); END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index b56356660b0dc..a3f5f07e57b7f 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -8643,13 +8643,3 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */ *ast_ptr = zend_ast_create_zval(&result); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 833139eafce6a..62d17b4e11797 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -1065,13 +1065,3 @@ END_EXTERN_C() ZEND_API zend_bool zend_binary_op_produces_numeric_string_error(uint32_t opcode, zval *op1, zval *op2); #endif /* ZEND_COMPILE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_config.w32.h b/Zend/zend_config.w32.h index 0c3a57d051b92..85384f0b0e1b4 100644 --- a/Zend/zend_config.w32.h +++ b/Zend/zend_config.w32.h @@ -85,13 +85,3 @@ extern "C++" { #define ZEND_DLIMPORT __declspec(dllimport) #endif /* ZEND_CONFIG_W32_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index e38dc61fffd69..a7485fd7f5dd8 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -490,14 +490,3 @@ ZEND_API int zend_register_constant(zend_constant *c) } return ret; } - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h index 66c9e1c63cd6e..4d3335a49091c 100644 --- a/Zend/zend_constants.h +++ b/Zend/zend_constants.h @@ -100,13 +100,3 @@ END_EXTERN_C() #define ZEND_CONSTANT_DTOR free_zend_constant #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_cpuinfo.c b/Zend/zend_cpuinfo.c index 4cbd2ac776751..1b53a851bcf42 100644 --- a/Zend/zend_cpuinfo.c +++ b/Zend/zend_cpuinfo.c @@ -107,11 +107,3 @@ ZEND_API int zend_cpu_supports(zend_cpu_feature feature) { return (cpuinfo.ecx & feature); } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/Zend/zend_cpuinfo.h b/Zend/zend_cpuinfo.h index 2cd9626d11c4b..492be74435a25 100644 --- a/Zend/zend_cpuinfo.h +++ b/Zend/zend_cpuinfo.h @@ -203,11 +203,3 @@ static zend_always_inline int zend_cpu_supports_avx2() { #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/Zend/zend_default_classes.c b/Zend/zend_default_classes.c index 8c0998e62e99b..e5ef403c4e082 100644 --- a/Zend/zend_default_classes.c +++ b/Zend/zend_default_classes.c @@ -34,13 +34,3 @@ ZEND_API void zend_register_default_classes(void) zend_register_closure_ce(); zend_register_generator_ce(); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_dtrace.c b/Zend/zend_dtrace.c index 52ceb472f7641..750fb686c8b0e 100644 --- a/Zend/zend_dtrace.c +++ b/Zend/zend_dtrace.c @@ -112,13 +112,3 @@ ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data, zval *ret /* }}} */ #endif /* HAVE_DTRACE */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_dtrace.h b/Zend/zend_dtrace.h index 9276ef7c60bd3..c4fedadd40dfb 100644 --- a/Zend/zend_dtrace.h +++ b/Zend/zend_dtrace.h @@ -44,13 +44,3 @@ ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data, zval *ret #endif #endif /* _ZEND_DTRACE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_errors.h b/Zend/zend_errors.h index 9932b1e47efa9..441458c033afe 100644 --- a/Zend/zend_errors.h +++ b/Zend/zend_errors.h @@ -40,13 +40,3 @@ #define E_CORE (E_CORE_ERROR | E_CORE_WARNING) #endif /* ZEND_ERRORS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index b3086989dae1f..2f59d91953ccb 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -982,7 +982,7 @@ ZEND_API ZEND_COLD void zend_exception_error(zend_object *ex, int severity) /* { zend_string *str, *file = NULL; zend_long line = 0; - zend_call_method_with_0_params(&exception, ce_exception, &ex->ce->__tostring, "__tostring", &tmp); + zend_call_method_with_0_params(Z_OBJ(exception), ce_exception, &ex->ce->__tostring, "__tostring", &tmp); if (!EG(exception)) { if (Z_TYPE(tmp) != IS_STRING) { zend_error(E_WARNING, "%s::__toString() must return a string", ZSTR_VAL(ce_exception->name)); @@ -1046,13 +1046,3 @@ ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */ zend_throw_exception_internal(exception); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index ec73a6e753567..5f31c4b25b313 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -80,13 +80,3 @@ static zend_always_inline void zend_rethrow_exception(zend_execute_data *execute END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 519b295ccae14..edaed2c63f059 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -726,8 +726,8 @@ static zend_never_inline ZEND_COLD zval* ZEND_FASTCALL make_real_object(zval *ob zval_ptr_dtor_nogc(object); object_init(object); - Z_ADDREF_P(object); obj = Z_OBJ_P(object); + GC_ADDREF(obj); zend_error(E_WARNING, "Creating default object from empty value"); if (GC_REFCOUNT(obj) == 1) { /* the enclosing container was deleted, obj is unreferenced */ @@ -737,7 +737,7 @@ static zend_never_inline ZEND_COLD zval* ZEND_FASTCALL make_real_object(zval *ob } return NULL; } - Z_DELREF_P(object); + GC_DELREF(obj); return object; } @@ -1308,7 +1308,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_illegal_offset(void) static zend_never_inline void zend_assign_to_object_dim(zval *object, zval *dim, zval *value OPLINE_DC EXECUTE_DATA_DC) { - Z_OBJ_HT_P(object)->write_dimension(object, dim, value); + Z_OBJ_HT_P(object)->write_dimension(Z_OBJ_P(object), dim, value); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), value); @@ -1320,11 +1320,11 @@ static zend_never_inline void zend_binary_assign_op_obj_dim(zval *object, zval * zval *z; zval rv, res; - if ((z = Z_OBJ_HT_P(object)->read_dimension(object, property, BP_VAR_R, &rv)) != NULL) { + if ((z = Z_OBJ_HT_P(object)->read_dimension(Z_OBJ_P(object), property, BP_VAR_R, &rv)) != NULL) { if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) { zval rv2; - zval *value = Z_OBJ_HT_P(z)->get(z, &rv2); + zval *value = Z_OBJ_HT_P(z)->get(Z_OBJ_P(z), &rv2); if (z == &rv) { zval_ptr_dtor(&rv); @@ -1332,7 +1332,7 @@ static zend_never_inline void zend_binary_assign_op_obj_dim(zval *object, zval * ZVAL_COPY_VALUE(z, value); } if (binary_op(&res, z, value) == SUCCESS) { - Z_OBJ_HT_P(object)->write_dimension(object, property, &res); + Z_OBJ_HT_P(object)->write_dimension(Z_OBJ_P(object), property, &res); } if (z == &rv) { zval_ptr_dtor(&rv); @@ -1793,24 +1793,23 @@ static void zend_post_incdec_property_zval(zval *prop, zend_property_info *prop_ } } -static zend_never_inline void zend_post_incdec_overloaded_property(zval *object, zval *property, void **cache_slot, int inc OPLINE_DC EXECUTE_DATA_DC) +static zend_never_inline void zend_post_incdec_overloaded_property(zend_object *object, zend_string *name, void **cache_slot, int inc OPLINE_DC EXECUTE_DATA_DC) { - zval rv, obj; + zval rv; zval *z; zval z_copy; - ZVAL_OBJ(&obj, Z_OBJ_P(object)); - Z_ADDREF(obj); - z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv); + GC_ADDREF(object); + z =object->handlers->read_property(object, name, BP_VAR_R, cache_slot, &rv); if (UNEXPECTED(EG(exception))) { - OBJ_RELEASE(Z_OBJ(obj)); + OBJ_RELEASE(object); ZVAL_UNDEF(EX_VAR(opline->result.var)); return; } if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) { zval rv2; - zval *value = Z_OBJ_HT_P(z)->get(z, &rv2); + zval *value = Z_OBJ_HT_P(z)->get(Z_OBJ_P(z), &rv2); if (z == &rv) { zval_ptr_dtor(&rv); } @@ -1824,23 +1823,22 @@ static zend_never_inline void zend_post_incdec_overloaded_property(zval *object, } else { decrement_function(&z_copy); } - Z_OBJ_HT(obj)->write_property(&obj, property, &z_copy, cache_slot); - OBJ_RELEASE(Z_OBJ(obj)); + object->handlers->write_property(object, name, &z_copy, cache_slot); + OBJ_RELEASE(object); zval_ptr_dtor(&z_copy); zval_ptr_dtor(z); } -static zend_never_inline void zend_pre_incdec_overloaded_property(zval *object, zval *property, void **cache_slot, int inc OPLINE_DC EXECUTE_DATA_DC) +static zend_never_inline void zend_pre_incdec_overloaded_property(zend_object *object, zend_string *name, void **cache_slot, int inc OPLINE_DC EXECUTE_DATA_DC) { zval rv; - zval *z, obj; + zval *z; zval z_copy; - ZVAL_OBJ(&obj, Z_OBJ_P(object)); - Z_ADDREF(obj); - z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv); + GC_ADDREF(object); + z = object->handlers->read_property(object, name, BP_VAR_R, cache_slot, &rv); if (UNEXPECTED(EG(exception))) { - OBJ_RELEASE(Z_OBJ(obj)); + OBJ_RELEASE(object); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); } @@ -1849,7 +1847,7 @@ static zend_never_inline void zend_pre_incdec_overloaded_property(zval *object, if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) { zval rv2; - zval *value = Z_OBJ_HT_P(z)->get(z, &rv2); + zval *value = Z_OBJ_HT_P(z)->get(Z_OBJ_P(z), &rv2); if (z == &rv) { zval_ptr_dtor(&rv); @@ -1865,22 +1863,21 @@ static zend_never_inline void zend_pre_incdec_overloaded_property(zval *object, if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), &z_copy); } - Z_OBJ_HT(obj)->write_property(&obj, property, &z_copy, cache_slot); - OBJ_RELEASE(Z_OBJ(obj)); + object->handlers->write_property(object, name, &z_copy, cache_slot); + OBJ_RELEASE(object); zval_ptr_dtor(&z_copy); zval_ptr_dtor(z); } -static zend_never_inline void zend_assign_op_overloaded_property(zval *object, zval *property, void **cache_slot, zval *value, binary_op_type binary_op OPLINE_DC EXECUTE_DATA_DC) +static zend_never_inline void zend_assign_op_overloaded_property(zend_object *object, zend_string *name, void **cache_slot, zval *value, binary_op_type binary_op OPLINE_DC EXECUTE_DATA_DC) { zval *z; - zval rv, obj, res; + zval rv, res; - ZVAL_OBJ(&obj, Z_OBJ_P(object)); - Z_ADDREF(obj); - z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv); + GC_ADDREF(object); + z = object->handlers->read_property(object, name, BP_VAR_R, cache_slot, &rv); if (UNEXPECTED(EG(exception))) { - OBJ_RELEASE(Z_OBJ(obj)); + OBJ_RELEASE(object); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_UNDEF(EX_VAR(opline->result.var)); } @@ -1888,7 +1885,7 @@ static zend_never_inline void zend_assign_op_overloaded_property(zval *object, z } if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) { zval rv2; - zval *value = Z_OBJ_HT_P(z)->get(z, &rv2); + zval *value = Z_OBJ_HT_P(z)->get(Z_OBJ_P(z), &rv2); if (z == &rv) { zval_ptr_dtor(&rv); @@ -1896,14 +1893,14 @@ static zend_never_inline void zend_assign_op_overloaded_property(zval *object, z ZVAL_COPY_VALUE(z, value); } if (binary_op(&res, z, value) == SUCCESS) { - Z_OBJ_HT(obj)->write_property(&obj, property, &res, cache_slot); + object->handlers->write_property(object, name, &res, cache_slot); } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), &res); } zval_ptr_dtor(z); zval_ptr_dtor(&res); - OBJ_RELEASE(Z_OBJ(obj)); + OBJ_RELEASE(object); } /* Utility Functions for Extensions */ @@ -2196,7 +2193,7 @@ static zend_always_inline void zend_fetch_dimension_address(zval *result, zval * if (dim_type == IS_CONST && Z_EXTRA_P(dim) == ZEND_EXTRA_VALUE) { dim++; } - retval = Z_OBJ_HT_P(container)->read_dimension(container, dim, type, result); + retval = Z_OBJ_HT_P(container)->read_dimension(Z_OBJ_P(container), dim, type, result); if (UNEXPECTED(retval == &EG(uninitialized_zval))) { zend_class_entry *ce = Z_OBJCE_P(container); @@ -2351,7 +2348,7 @@ static zend_always_inline void zend_fetch_dimension_address_read(zval *result, z if (dim_type == IS_CONST && Z_EXTRA_P(dim) == ZEND_EXTRA_VALUE) { dim++; } - retval = Z_OBJ_HT_P(container)->read_dimension(container, dim, type, result); + retval = Z_OBJ_HT_P(container)->read_dimension(Z_OBJ_P(container), dim, type, result); ZEND_ASSERT(result != NULL); if (retval) { @@ -2439,7 +2436,7 @@ static zend_never_inline int ZEND_FASTCALL zend_isset_dim_slow(zval *container, } if (/*OP1_TYPE != IS_CONST &&*/ EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) { - return Z_OBJ_HT_P(container)->has_dimension(container, offset, 0); + return Z_OBJ_HT_P(container)->has_dimension(Z_OBJ_P(container), offset, 0); } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */ zend_long lval; @@ -2478,7 +2475,7 @@ static zend_never_inline int ZEND_FASTCALL zend_isempty_dim_slow(zval *container } if (/*OP1_TYPE != IS_CONST &&*/ EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) { - return !Z_OBJ_HT_P(container)->has_dimension(container, offset, 1); + return !Z_OBJ_HT_P(container)->has_dimension(Z_OBJ_P(container), offset, 1); } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */ zend_long lval; @@ -2708,8 +2705,10 @@ static zend_never_inline zend_bool zend_handle_fetch_obj_flags( static zend_always_inline void zend_fetch_property_address(zval *result, zval *container, uint32_t container_op_type, zval *prop_ptr, uint32_t prop_op_type, void **cache_slot, int type, uint32_t flags, zend_bool init_undef OPLINE_DC) { zval *ptr; + zend_object *zobj; + zend_string *name, *tmp_name; - if (container_op_type != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) { + if (container_op_type != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) { do { if (Z_ISREF_P(container) && Z_TYPE_P(Z_REFVAL_P(container)) == IS_OBJECT) { container = Z_REFVAL_P(container); @@ -2728,10 +2727,11 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c } } while (0); } + + zobj = Z_OBJ_P(container); if (prop_op_type == IS_CONST && - EXPECTED(Z_OBJCE_P(container) == CACHED_PTR_EX(cache_slot))) { + EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); - zend_object *zobj = Z_OBJ_P(container); if (EXPECTED(IS_VALID_PROPERTY_OFFSET(prop_offset))) { ptr = OBJ_PROP(zobj, prop_offset); @@ -2759,9 +2759,15 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c } } } - ptr = Z_OBJ_HT_P(container)->get_property_ptr_ptr(container, prop_ptr, type, cache_slot); + + if (prop_op_type == IS_CONST) { + name = Z_STR_P(prop_ptr); + } else { + name = zval_get_tmp_string(prop_ptr, &tmp_name); + } + ptr = zobj->handlers->get_property_ptr_ptr(zobj, name, type, cache_slot); if (NULL == ptr) { - ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, cache_slot, result); + ptr = zobj->handlers->read_property(zobj, name, type, cache_slot, result); if (ptr == result) { if (UNEXPECTED(Z_ISREF_P(ptr) && Z_REFCOUNT_P(ptr) == 1)) { ZVAL_UNREF(ptr); @@ -3854,15 +3860,15 @@ static zend_never_inline zend_execute_data *zend_init_dynamic_call_string(zend_s } /* }}} */ -static zend_never_inline zend_execute_data *zend_init_dynamic_call_object(zval *function, uint32_t num_args) /* {{{ */ +static zend_never_inline zend_execute_data *zend_init_dynamic_call_object(zend_object *function, uint32_t num_args) /* {{{ */ { zend_function *fbc; zend_class_entry *called_scope; zend_object *object; uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC; - if (EXPECTED(Z_OBJ_HANDLER_P(function, get_closure)) && - EXPECTED(Z_OBJ_HANDLER_P(function, get_closure)(function, &called_scope, &fbc, &object) == SUCCESS)) { + if (EXPECTED(function->handlers->get_closure) && + EXPECTED(function->handlers->get_closure(function, &called_scope, &fbc, &object) == SUCCESS)) { if (fbc->common.fn_flags & ZEND_ACC_CLOSURE) { /* Delay closure destruction until its invocation */ @@ -4381,13 +4387,3 @@ ZEND_API int ZEND_FASTCALL zend_check_arg_type(zend_function *zf, uint32_t arg_n { return zend_verify_arg_type(zf, arg_num, arg, default_value, cache_slot); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index b5f08bcfe8e1a..a73982ab91193 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -119,7 +119,7 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval } if (Z_TYPE_P(variable_ptr) == IS_OBJECT && UNEXPECTED(Z_OBJ_HANDLER_P(variable_ptr, set) != NULL)) { - Z_OBJ_HANDLER_P(variable_ptr, set)(variable_ptr, value); + Z_OBJ_HANDLER_P(variable_ptr, set)(Z_OBJ_P(variable_ptr), value); return variable_ptr; } if (ZEND_CONST_COND(value_type & (IS_VAR|IS_CV), 1) && variable_ptr == value) { @@ -473,13 +473,3 @@ ZEND_COLD void zend_verify_property_type_error(zend_property_info *info, zval *p END_EXTERN_C() #endif /* ZEND_EXECUTE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 5ed80be6ff4f2..fb6faad8afcc6 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1595,13 +1595,3 @@ ZEND_API int zend_forbid_dynamic_call(const char *func_name) /* {{{ */ return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index 5ebfcc6bf3441..2509daf3180c5 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -329,13 +329,3 @@ ZEND_API size_t zend_extensions_op_array_persist(zend_op_array *op_array, void * } return 0; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index c269d394ac709..87c7748c36012 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -154,13 +154,3 @@ ZEND_API size_t zend_extensions_op_array_persist(zend_op_array *op_array, void * END_EXTERN_C() #endif /* ZEND_EXTENSIONS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_float.c b/Zend/zend_float.c index a062ef7681f0f..90af0c4a5f900 100644 --- a/Zend/zend_float.c +++ b/Zend/zend_float.c @@ -54,13 +54,3 @@ ZEND_API void zend_ensure_fpu_mode(void) /* {{{ */ XPFPA_SWITCH_DOUBLE(); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_float.h b/Zend/zend_float.h index 9db23f4e22204..dc1a451589873 100644 --- a/Zend/zend_float.h +++ b/Zend/zend_float.h @@ -416,13 +416,3 @@ END_EXTERN_C() #endif /* FPU CONTROL */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c index 94787de88ab6b..cebb7b9fb98ae 100644 --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@ -622,10 +622,8 @@ static void gc_scan_black(zend_refcounted *ref) if (EXPECTED(!(OBJ_FLAGS(ref) & IS_OBJ_FREE_CALLED))) { int n; zval *zv, *end; - zval tmp; - ZVAL_OBJ(&tmp, obj); - ht = obj->handlers->get_gc(&tmp, &zv, &n); + ht = obj->handlers->get_gc(obj, &zv, &n); end = zv + n; if (EXPECTED(!ht)) { if (!n) return; @@ -730,10 +728,8 @@ static void gc_mark_grey(zend_refcounted *ref) if (EXPECTED(!(OBJ_FLAGS(ref) & IS_OBJ_FREE_CALLED))) { int n; zval *zv, *end; - zval tmp; - ZVAL_OBJ(&tmp, obj); - ht = obj->handlers->get_gc(&tmp, &zv, &n); + ht = obj->handlers->get_gc(obj, &zv, &n); end = zv + n; if (EXPECTED(!ht)) { if (!n) return; @@ -884,10 +880,8 @@ static void gc_scan(zend_refcounted *ref) if (EXPECTED(!(OBJ_FLAGS(ref) & IS_OBJ_FREE_CALLED))) { int n; zval *zv, *end; - zval tmp; - ZVAL_OBJ(&tmp, obj); - ht = obj->handlers->get_gc(&tmp, &zv, &n); + ht = obj->handlers->get_gc(obj, &zv, &n); end = zv + n; if (EXPECTED(!ht)) { if (!n) return; @@ -1022,7 +1016,6 @@ static int gc_collect_white(zend_refcounted *ref, uint32_t *flags) if (EXPECTED(!(OBJ_FLAGS(ref) & IS_OBJ_FREE_CALLED))) { int n; zval *zv, *end; - zval tmp; /* optimization: color is GC_BLACK (0) */ if (!GC_INFO(ref)) { @@ -1032,8 +1025,7 @@ static int gc_collect_white(zend_refcounted *ref, uint32_t *flags) obj->ce->destructor != NULL) { *flags |= GC_HAS_DESTRUCTORS; } - ZVAL_OBJ(&tmp, obj); - ht = obj->handlers->get_gc(&tmp, &zv, &n); + ht = obj->handlers->get_gc(obj, &zv, &n); end = zv + n; if (EXPECTED(!ht)) { if (!n) return count; @@ -1189,10 +1181,8 @@ static void gc_remove_nested_data_from_buffer(zend_refcounted *ref, gc_root_buff if (EXPECTED(!(OBJ_FLAGS(ref) & IS_OBJ_FREE_CALLED))) { int n; zval *zv, *end; - zval tmp; - ZVAL_OBJ(&tmp, obj); - ht = obj->handlers->get_gc(&tmp, &zv, &n); + ht = obj->handlers->get_gc(obj, &zv, &n); end = zv + n; if (EXPECTED(!ht)) { if (!n) return; @@ -1432,15 +1422,3 @@ ZEND_API void zend_gc_get_status(zend_gc_status *status) status->threshold = GC_G(gc_threshold); status->num_roots = GC_G(num_roots); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - * - * vim:noexpandtab: - */ diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h index c1c6c1b1fce43..377bd4298a259 100644 --- a/Zend/zend_gc.h +++ b/Zend/zend_gc.h @@ -81,13 +81,3 @@ static zend_always_inline void gc_check_possible_root(zend_refcounted *ref) } #endif /* ZEND_GC_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 8e121e3374057..827495c842b6f 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -308,9 +308,9 @@ static uint32_t calc_gc_buffer_size(zend_generator *generator) /* {{{ */ } /* }}} */ -static HashTable *zend_generator_get_gc(zval *object, zval **table, int *n) /* {{{ */ +static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int *n) /* {{{ */ { - zend_generator *generator = (zend_generator*) Z_OBJ_P(object); + zend_generator *generator = (zend_generator*)object; zend_execute_data *execute_data = generator->execute_data; zend_op_array *op_array; zval *gc_buffer; @@ -1225,13 +1225,3 @@ void zend_register_generator_ce(void) /* {{{ */ zend_ce_ClosedGeneratorException = zend_register_internal_class_ex(&ce, zend_ce_exception); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_generators.h b/Zend/zend_generators.h index 950abb8c2382a..abccf3a5294cb 100644 --- a/Zend/zend_generators.h +++ b/Zend/zend_generators.h @@ -134,13 +134,3 @@ static zend_always_inline zend_generator *zend_generator_get_current(zend_genera END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h index 5135093636e2c..07d13f65b425d 100644 --- a/Zend/zend_globals.h +++ b/Zend/zend_globals.h @@ -296,13 +296,3 @@ struct _zend_php_scanner_globals { }; #endif /* ZEND_GLOBALS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_globals_macros.h b/Zend/zend_globals_macros.h index 4064cb794af6d..18181a433e06c 100644 --- a/Zend/zend_globals_macros.h +++ b/Zend/zend_globals_macros.h @@ -67,13 +67,3 @@ extern ZEND_API zend_ini_scanner_globals ini_scanner_globals; END_EXTERN_C() #endif /* ZEND_GLOBALS_MACROS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 4b02913f18aef..f95034a60ffc5 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -2818,13 +2818,3 @@ ZEND_API HashTable* ZEND_FASTCALL zend_proptable_to_symtable(HashTable *ht, zend return new_ht; } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index f1f64b50c7481..6cfa7e88219de 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -1161,13 +1161,3 @@ static zend_always_inline void _zend_hash_append_ind(HashTable *ht, zend_string } #endif /* ZEND_HASH_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c index d97cfd2b6b370..5e94df0a9911c 100644 --- a/Zend/zend_highlight.c +++ b/Zend/zend_highlight.c @@ -228,13 +228,3 @@ ZEND_API void zend_strip(void) /* Discard parse errors thrown during tokenization */ zend_clear_exception(); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_highlight.h b/Zend/zend_highlight.h index beb272678d5c0..92a4dbccd3ca8 100644 --- a/Zend/zend_highlight.h +++ b/Zend/zend_highlight.h @@ -48,13 +48,3 @@ END_EXTERN_C() extern zend_syntax_highlighter_ini syntax_highlighter_ini; #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c index 6ada3bf4ca73c..d585edfde243d 100644 --- a/Zend/zend_inheritance.c +++ b/Zend/zend_inheritance.c @@ -2004,13 +2004,3 @@ ZEND_API void zend_do_link_class(zend_class_entry *ce, zend_class_entry *parent) zend_build_properties_info_table(ce); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_inheritance.h b/Zend/zend_inheritance.h index 9b776afdbd82c..eb68a6d278dc6 100644 --- a/Zend/zend_inheritance.h +++ b/Zend/zend_inheritance.h @@ -35,13 +35,3 @@ void zend_build_properties_info_table(zend_class_entry *ce); END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 0fdaf95ab50ac..e4b9e6bc5e846 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -698,13 +698,3 @@ ZEND_API ZEND_INI_MH(OnUpdateStringUnempty) /* {{{ */ return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h index 2db667ae8e933..0b7f1480836c5 100644 --- a/Zend/zend_ini.h +++ b/Zend/zend_ini.h @@ -195,13 +195,3 @@ typedef struct _zend_ini_parser_param { } zend_ini_parser_param; #endif /* ZEND_INI_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index e5a28d2bdcdac..6245dc5e0a1d3 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -417,13 +417,3 @@ constant_string: | TC_STRING { $$ = $1; /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ } | TC_WHITESPACE { $$ = $1; /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ } ; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_ini_scanner.h b/Zend/zend_ini_scanner.h index 9887b82e53d0e..ddb9247d3721d 100644 --- a/Zend/zend_ini_scanner.h +++ b/Zend/zend_ini_scanner.h @@ -35,13 +35,3 @@ void shutdown_ini_scanner(void); END_EXTERN_C() #endif /* _ZEND_INI_SCANNER_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 4717ea4090c1e..e2138e0ce32e0 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -30,7 +30,7 @@ ZEND_API zend_class_entry *zend_ce_countable; /* {{{ zend_call_method Only returns the returned zval if retval_ptr != NULL */ -ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_function **fn_proxy, const char *function_name, size_t function_name_len, zval *retval_ptr, int param_count, zval* arg1, zval* arg2) +ZEND_API zval* zend_call_method(zend_object *object, zend_class_entry *obj_ce, zend_function **fn_proxy, const char *function_name, size_t function_name_len, zval *retval_ptr, int param_count, zval* arg1, zval* arg2) { int result; zend_fcall_info fci; @@ -45,7 +45,7 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun } fci.size = sizeof(fci); - fci.object = object ? Z_OBJ_P(object) : NULL; + fci.object = object; fci.retval = retval_ptr ? retval_ptr : &retval; fci.param_count = param_count; fci.params = params; @@ -62,7 +62,7 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun ZVAL_UNDEF(&fci.function_name); /* Unused */ if (!obj_ce) { - obj_ce = object ? Z_OBJCE_P(object) : NULL; + obj_ce = object ? object->ce : NULL; } if (!fn_proxy || !*fn_proxy) { if (EXPECTED(obj_ce)) { @@ -87,7 +87,7 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun } if (object) { - fcic.called_scope = Z_OBJCE_P(object); + fcic.called_scope = object->ce; } else { zend_class_entry *called_scope = zend_get_called_scope(EG(current_execute_data)); @@ -99,13 +99,13 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun fcic.called_scope = called_scope; } } - fcic.object = object ? Z_OBJ_P(object) : NULL; + fcic.object = object; result = zend_call_function(&fci, &fcic); } if (result == FAILURE) { /* error at c-level */ if (!obj_ce) { - obj_ce = object ? Z_OBJCE_P(object) : NULL; + obj_ce = object ? object->ce : NULL; } if (!EG(exception)) { zend_error_noreturn(E_CORE_ERROR, "Couldn't execute method %s%s%s", obj_ce ? ZSTR_VAL(obj_ce->name) : "", obj_ce ? "::" : "", function_name); @@ -124,7 +124,7 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun /* {{{ zend_user_it_new_iterator */ ZEND_API void zend_user_it_new_iterator(zend_class_entry *ce, zval *object, zval *retval) { - zend_call_method_with_0_params(object, ce, &ce->iterator_funcs_ptr->zf_new_iterator, "getiterator", retval); + zend_call_method_with_0_params(Z_OBJ_P(object), ce, &ce->iterator_funcs_ptr->zf_new_iterator, "getiterator", retval); } /* }}} */ @@ -160,7 +160,7 @@ ZEND_API int zend_user_it_valid(zend_object_iterator *_iter) zval more; int result; - zend_call_method_with_0_params(object, iter->ce, &iter->ce->iterator_funcs_ptr->zf_valid, "valid", &more); + zend_call_method_with_0_params(Z_OBJ_P(object), iter->ce, &iter->ce->iterator_funcs_ptr->zf_valid, "valid", &more); result = i_zend_is_true(&more); zval_ptr_dtor(&more); return result ? SUCCESS : FAILURE; @@ -176,7 +176,7 @@ ZEND_API zval *zend_user_it_get_current_data(zend_object_iterator *_iter) zval *object = &iter->it.data; if (Z_ISUNDEF(iter->value)) { - zend_call_method_with_0_params(object, iter->ce, &iter->ce->iterator_funcs_ptr->zf_current, "current", &iter->value); + zend_call_method_with_0_params(Z_OBJ_P(object), iter->ce, &iter->ce->iterator_funcs_ptr->zf_current, "current", &iter->value); } return &iter->value; } @@ -189,7 +189,7 @@ ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *ke zval *object = &iter->it.data; zval retval; - zend_call_method_with_0_params(object, iter->ce, &iter->ce->iterator_funcs_ptr->zf_key, "key", &retval); + zend_call_method_with_0_params(Z_OBJ_P(object), iter->ce, &iter->ce->iterator_funcs_ptr->zf_key, "key", &retval); if (Z_TYPE(retval) != IS_UNDEF) { ZVAL_ZVAL(key, &retval, 1, 1); @@ -210,7 +210,7 @@ ZEND_API void zend_user_it_move_forward(zend_object_iterator *_iter) zval *object = &iter->it.data; zend_user_it_invalidate_current(_iter); - zend_call_method_with_0_params(object, iter->ce, &iter->ce->iterator_funcs_ptr->zf_next, "next", NULL); + zend_call_method_with_0_params(Z_OBJ_P(object), iter->ce, &iter->ce->iterator_funcs_ptr->zf_next, "next", NULL); } /* }}} */ @@ -221,7 +221,7 @@ ZEND_API void zend_user_it_rewind(zend_object_iterator *_iter) zval *object = &iter->it.data; zend_user_it_invalidate_current(_iter); - zend_call_method_with_0_params(object, iter->ce, &iter->ce->iterator_funcs_ptr->zf_rewind, "rewind", NULL); + zend_call_method_with_0_params(Z_OBJ_P(object), iter->ce, &iter->ce->iterator_funcs_ptr->zf_rewind, "rewind", NULL); } /* }}} */ @@ -425,7 +425,7 @@ ZEND_API int zend_user_serialize(zval *object, unsigned char **buffer, size_t *b zval retval; int result; - zend_call_method_with_0_params(object, ce, &ce->serialize_func, "serialize", &retval); + zend_call_method_with_0_params(Z_OBJ_P(object), ce, &ce->serialize_func, "serialize", &retval); if (Z_TYPE(retval) == IS_UNDEF || EG(exception)) { @@ -466,7 +466,7 @@ ZEND_API int zend_user_unserialize(zval *object, zend_class_entry *ce, const uns ZVAL_STRINGL(&zdata, (char*)buf, buf_len); - zend_call_method_with_1_params(object, ce, &ce->unserialize_func, "unserialize", NULL, &zdata); + zend_call_method_with_1_params(Z_OBJ_P(object), ce, &ce->unserialize_func, "unserialize", NULL, &zdata); zval_ptr_dtor(&zdata); @@ -593,13 +593,3 @@ ZEND_API void zend_register_interfaces(void) REGISTER_MAGIC_INTERFACE(countable, Countable); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h index 20d9e13ab41b2..e7d0315ac5d00 100644 --- a/Zend/zend_interfaces.h +++ b/Zend/zend_interfaces.h @@ -37,7 +37,7 @@ typedef struct _zend_user_iterator { zval value; } zend_user_iterator; -ZEND_API zval* zend_call_method(zval *object_pp, zend_class_entry *obj_ce, zend_function **fn_proxy, const char *function_name, size_t function_name_len, zval *retval, int param_count, zval* arg1, zval* arg2); +ZEND_API zval* zend_call_method(zend_object *object, zend_class_entry *obj_ce, zend_function **fn_proxy, const char *function_name, size_t function_name_len, zval *retval, int param_count, zval* arg1, zval* arg2); #define zend_call_method_with_0_params(obj, obj_ce, fn_proxy, function_name, retval) \ zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 0, NULL, NULL) @@ -80,13 +80,3 @@ ZEND_API int zend_class_unserialize_deny(zval *object, zend_class_entry *ce, con END_EXTERN_C() #endif /* ZEND_INTERFACES_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_istdiostream.h b/Zend/zend_istdiostream.h index 66a5ff4991ddd..74470d2ae5882 100644 --- a/Zend/zend_istdiostream.h +++ b/Zend/zend_istdiostream.h @@ -32,13 +32,3 @@ class istdiostream : public istream #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c index 1339afbbc7c7d..bb3cf1b6a25af 100644 --- a/Zend/zend_iterators.c +++ b/Zend/zend_iterators.c @@ -24,7 +24,7 @@ static zend_class_entry zend_iterator_class_entry; static void iter_wrapper_free(zend_object *object); static void iter_wrapper_dtor(zend_object *object); -static HashTable *iter_wrapper_get_gc(zval *object, zval **table, int *n); +static HashTable *iter_wrapper_get_gc(zend_object *object, zval **table, int *n); static const zend_object_handlers iterator_object_handlers = { 0, @@ -72,7 +72,7 @@ static void iter_wrapper_dtor(zend_object *object) { } -static HashTable *iter_wrapper_get_gc(zval *object, zval **table, int *n) { +static HashTable *iter_wrapper_get_gc(zend_object *object, zval **table, int *n) { /* TODO: We need a get_gc iterator handler */ *table = NULL; *n = 0; @@ -102,13 +102,3 @@ ZEND_API zend_object_iterator* zend_iterator_unwrap(zval *array_ptr) } return NULL; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_iterators.h b/Zend/zend_iterators.h index f026851306ad5..941b260885f8e 100644 --- a/Zend/zend_iterators.h +++ b/Zend/zend_iterators.h @@ -78,13 +78,3 @@ ZEND_API void zend_iterator_dtor(zend_object_iterator *iter); ZEND_API void zend_register_iterator_wrapper(void); END_EXTERN_C() - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 7d5efb64347f8..8e0728f4b559f 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -1369,13 +1369,3 @@ static YYSIZE_T zend_yytnamerr(char *yyres, const char *yystr) yystpcpy(yyres, yystr); return strlen(yystr); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_language_scanner.h b/Zend/zend_language_scanner.h index 64af4e2d9acb5..3640b9a5ea946 100644 --- a/Zend/zend_language_scanner.h +++ b/Zend/zend_language_scanner.h @@ -74,13 +74,3 @@ ZEND_API void zend_lex_tstring(zval *zv); END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_list.c b/Zend/zend_list.c index 7d48c3fe6b7cf..293eeadd04a1f 100644 --- a/Zend/zend_list.c +++ b/Zend/zend_list.c @@ -349,13 +349,3 @@ ZEND_API zend_resource* zend_register_persistent_resource(const char *key, size_ zend_string_release_ex(str, 1); return ret; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_list.h b/Zend/zend_list.h index 83522c0bce197..0bec20a280e8a 100644 --- a/Zend/zend_list.h +++ b/Zend/zend_list.h @@ -74,13 +74,3 @@ extern ZEND_API int le_index_ptr; /* list entry type for index pointers */ END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_llist.c b/Zend/zend_llist.c index 268dbc36fa49b..4a2c22e632123 100644 --- a/Zend/zend_llist.c +++ b/Zend/zend_llist.c @@ -307,13 +307,3 @@ ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos) } return NULL; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_llist.h b/Zend/zend_llist.h index ce6abe8df5fa7..b9155ce6cb195 100644 --- a/Zend/zend_llist.h +++ b/Zend/zend_llist.h @@ -74,13 +74,3 @@ ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos); END_EXTERN_C() #endif /* ZEND_LLIST_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_long.h b/Zend/zend_long.h index fb48913e0cb73..3b651e69d0a28 100644 --- a/Zend/zend_long.h +++ b/Zend/zend_long.h @@ -127,13 +127,3 @@ static const char long_min_digits[] = LONG_MIN_DIGITS; #endif #endif /* ZEND_LONG_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_map_ptr.h b/Zend/zend_map_ptr.h index 5543894d3a9bb..5c88ce0bc4ad2 100644 --- a/Zend/zend_map_ptr.h +++ b/Zend/zend_map_ptr.h @@ -83,13 +83,3 @@ ZEND_API void *zend_map_ptr_new(void); ZEND_API void zend_map_ptr_extend(size_t last); #endif /* ZEND_MAP_PTR_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h index 3e34cf4b77d24..047d9d77cee29 100644 --- a/Zend/zend_modules.h +++ b/Zend/zend_modules.h @@ -129,13 +129,3 @@ int module_registry_unload_temp(const zend_module_entry *module); END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c index 2bd74a727810f..956ffbb74f841 100644 --- a/Zend/zend_multibyte.c +++ b/Zend/zend_multibyte.c @@ -210,12 +210,3 @@ ZEND_API int zend_multibyte_set_script_encoding_by_string(const char *new_value, return SUCCESS; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_multibyte.h b/Zend/zend_multibyte.h index 51202e5edd2db..19444eda83592 100644 --- a/Zend/zend_multibyte.h +++ b/Zend/zend_multibyte.h @@ -77,12 +77,3 @@ ZEND_API int zend_multibyte_set_script_encoding_by_string(const char *new_value, END_EXTERN_C() #endif /* ZEND_MULTIBYTE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h index 5cb7136623237..a3827d25d128d 100644 --- a/Zend/zend_multiply.h +++ b/Zend/zend_multiply.h @@ -341,13 +341,3 @@ static zend_always_inline size_t zend_safe_addmult(size_t nmemb, size_t size, si } #endif /* ZEND_MULTIPLY_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 36e8d40ec29e7..eb853064c2bb9 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -104,10 +104,8 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */ } /* }}} */ -ZEND_API HashTable *zend_std_get_properties(zval *object) /* {{{ */ +ZEND_API HashTable *zend_std_get_properties(zend_object *zobj) /* {{{ */ { - zend_object *zobj; - zobj = Z_OBJ_P(object); if (!zobj->properties) { rebuild_object_properties(zobj); } @@ -115,15 +113,13 @@ ZEND_API HashTable *zend_std_get_properties(zval *object) /* {{{ */ } /* }}} */ -ZEND_API HashTable *zend_std_get_gc(zval *object, zval **table, int *n) /* {{{ */ +ZEND_API HashTable *zend_std_get_gc(zend_object *zobj, zval **table, int *n) /* {{{ */ { - if (Z_OBJ_HANDLER_P(object, get_properties) != zend_std_get_properties) { + if (zobj->handlers->get_properties != zend_std_get_properties) { *table = NULL; *n = 0; - return Z_OBJ_HANDLER_P(object, get_properties)(object); + return zobj->handlers->get_properties(zobj); } else { - zend_object *zobj = Z_OBJ_P(object); - if (zobj->properties) { *table = NULL; *n = 0; @@ -137,15 +133,15 @@ ZEND_API HashTable *zend_std_get_gc(zval *object, zval **table, int *n) /* {{{ * } /* }}} */ -ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp) /* {{{ */ +ZEND_API HashTable *zend_std_get_debug_info(zend_object *object, int *is_temp) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); + zend_class_entry *ce = object->ce; zval retval; HashTable *ht; if (!ce->__debugInfo) { *is_temp = 0; - return Z_OBJ_HANDLER_P(object, get_properties)(object); + return object->handlers->get_properties(object); } zend_call_method_with_0_params(object, ce, &ce->__debugInfo, ZEND_DEBUGINFO_FUNC_NAME, &retval); @@ -647,20 +643,16 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe } /* }}} */ -ZEND_API zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */ +ZEND_API zval *zend_std_read_property(zend_object *zobj, zend_string *name, int type, void **cache_slot, zval *rv) /* {{{ */ { - zend_object *zobj; - zend_string *name, *tmp_name; zval *retval; uintptr_t property_offset; zend_property_info *prop_info = NULL; uint32_t *guard = NULL; - - zobj = Z_OBJ_P(object); - name = zval_get_tmp_string(member, &tmp_name); + zend_string *tmp_name = NULL; #if DEBUG_OBJECT_HANDLERS - fprintf(stderr, "Read object #%d property: %s\n", Z_OBJ_HANDLE_P(object), ZSTR_VAL(name)); + fprintf(stderr, "Read object #%d property: %s\n", zobj->handle, ZSTR_VAL(name)); #endif /* make zend_get_property_info silent if we have getter - we may want to use it */ @@ -792,18 +784,13 @@ ZEND_API zval *zend_std_read_property(zval *object, zval *member, int type, void } /* }}} */ -ZEND_API zval *zend_std_write_property(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */ +ZEND_API zval *zend_std_write_property(zend_object *zobj, zend_string *name, zval *value, void **cache_slot) /* {{{ */ { - zend_object *zobj; - zend_string *name, *tmp_name; zval *variable_ptr, tmp; uintptr_t property_offset; zend_property_info *prop_info = NULL; ZEND_ASSERT(!Z_ISREF_P(value)); - zobj = Z_OBJ_P(object); - name = zval_get_tmp_string(member, &tmp_name); - property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__set != NULL), cache_slot, &prop_info); if (EXPECTED(IS_VALID_PROPERTY_OFFSET(property_offset))) { @@ -891,7 +878,6 @@ ZEND_API zval *zend_std_write_property(zval *object, zval *member, zval *value, } exit: - zend_tmp_string_release(tmp_name); return variable_ptr; } /* }}} */ @@ -902,10 +888,10 @@ static ZEND_COLD zend_never_inline void zend_bad_array_access(zend_class_entry * } /* }}} */ -ZEND_API zval *zend_std_read_dimension(zval *object, zval *offset, int type, zval *rv) /* {{{ */ +ZEND_API zval *zend_std_read_dimension(zend_object *object, zval *offset, int type, zval *rv) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zval tmp_offset, tmp_object; + zend_class_entry *ce = object->ce; + zval tmp_offset; if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) { if (offset == NULL) { @@ -915,16 +901,16 @@ ZEND_API zval *zend_std_read_dimension(zval *object, zval *offset, int type, zva ZVAL_COPY_DEREF(&tmp_offset, offset); } - ZVAL_COPY(&tmp_object, object); + GC_ADDREF(object); if (type == BP_VAR_IS) { - zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetexists", rv, &tmp_offset); + zend_call_method_with_1_params(object, ce, NULL, "offsetexists", rv, &tmp_offset); if (UNEXPECTED(Z_ISUNDEF_P(rv))) { - zval_ptr_dtor(&tmp_object); + OBJ_RELEASE(object); zval_ptr_dtor(&tmp_offset); return NULL; } if (!i_zend_is_true(rv)) { - zval_ptr_dtor(&tmp_object); + OBJ_RELEASE(object); zval_ptr_dtor(&tmp_offset); zval_ptr_dtor(rv); return &EG(uninitialized_zval); @@ -932,9 +918,9 @@ ZEND_API zval *zend_std_read_dimension(zval *object, zval *offset, int type, zva zval_ptr_dtor(rv); } - zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetget", rv, &tmp_offset); + zend_call_method_with_1_params(object, ce, NULL, "offsetget", rv, &tmp_offset); - zval_ptr_dtor(&tmp_object); + OBJ_RELEASE(object); zval_ptr_dtor(&tmp_offset); if (UNEXPECTED(Z_TYPE_P(rv) == IS_UNDEF)) { @@ -951,10 +937,10 @@ ZEND_API zval *zend_std_read_dimension(zval *object, zval *offset, int type, zva } /* }}} */ -ZEND_API void zend_std_write_dimension(zval *object, zval *offset, zval *value) /* {{{ */ +ZEND_API void zend_std_write_dimension(zend_object *object, zval *offset, zval *value) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zval tmp_offset, tmp_object; + zend_class_entry *ce = object->ce; + zval tmp_offset; if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) { if (!offset) { @@ -962,9 +948,9 @@ ZEND_API void zend_std_write_dimension(zval *object, zval *offset, zval *value) } else { ZVAL_COPY_DEREF(&tmp_offset, offset); } - ZVAL_COPY(&tmp_object, object); - zend_call_method_with_2_params(&tmp_object, ce, NULL, "offsetset", NULL, &tmp_offset, value); - zval_ptr_dtor(&tmp_object); + GC_ADDREF(object); + zend_call_method_with_2_params(object, ce, NULL, "offsetset", NULL, &tmp_offset, value); + OBJ_RELEASE(object); zval_ptr_dtor(&tmp_offset); } else { zend_bad_array_access(ce); @@ -972,24 +958,24 @@ ZEND_API void zend_std_write_dimension(zval *object, zval *offset, zval *value) } /* }}} */ -ZEND_API int zend_std_has_dimension(zval *object, zval *offset, int check_empty) /* {{{ */ +ZEND_API int zend_std_has_dimension(zend_object *object, zval *offset, int check_empty) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zval retval, tmp_offset, tmp_object; + zend_class_entry *ce = object->ce; + zval retval, tmp_offset; int result; if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1) != 0)) { ZVAL_COPY_DEREF(&tmp_offset, offset); - ZVAL_COPY(&tmp_object, object); - zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetexists", &retval, &tmp_offset); + GC_ADDREF(object); + zend_call_method_with_1_params(object, ce, NULL, "offsetexists", &retval, &tmp_offset); result = i_zend_is_true(&retval); zval_ptr_dtor(&retval); if (check_empty && result && EXPECTED(!EG(exception))) { - zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetget", &retval, &tmp_offset); + zend_call_method_with_1_params(object, ce, NULL, "offsetget", &retval, &tmp_offset); result = i_zend_is_true(&retval); zval_ptr_dtor(&retval); } - zval_ptr_dtor(&tmp_object); + OBJ_RELEASE(object); zval_ptr_dtor(&tmp_offset); } else { zend_bad_array_access(ce); @@ -999,19 +985,14 @@ ZEND_API int zend_std_has_dimension(zval *object, zval *offset, int check_empty) } /* }}} */ -ZEND_API zval *zend_std_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ +ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *zobj, zend_string *name, int type, void **cache_slot) /* {{{ */ { - zend_object *zobj; - zend_string *name, *tmp_name; zval *retval = NULL; uintptr_t property_offset; zend_property_info *prop_info = NULL; - zobj = Z_OBJ_P(object); - name = zval_get_tmp_string(member, &tmp_name); - #if DEBUG_OBJECT_HANDLERS - fprintf(stderr, "Ptr object #%d property: %s\n", Z_OBJ_HANDLE_P(object), ZSTR_VAL(name)); + fprintf(stderr, "Ptr object #%d property: %s\n", object->handle, ZSTR_VAL(name)); #endif property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__get != NULL), cache_slot, &prop_info); @@ -1039,7 +1020,6 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zval *object, zval *member, int typ zobj->properties = zend_array_dup(zobj->properties); } if (EXPECTED((retval = zend_hash_find(zobj->properties, name)) != NULL)) { - zend_tmp_string_release(tmp_name); return retval; } } @@ -1057,21 +1037,15 @@ ZEND_API zval *zend_std_get_property_ptr_ptr(zval *object, zval *member, int typ } } - zend_tmp_string_release(tmp_name); return retval; } /* }}} */ -ZEND_API void zend_std_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */ +ZEND_API void zend_std_unset_property(zend_object *zobj, zend_string *name, void **cache_slot) /* {{{ */ { - zend_object *zobj; - zend_string *name, *tmp_name; uintptr_t property_offset; zend_property_info *prop_info = NULL; - zobj = Z_OBJ_P(object); - name = zval_get_tmp_string(member, &tmp_name); - property_offset = zend_get_property_offset(zobj->ce, name, (zobj->ce->__unset != NULL), cache_slot, &prop_info); if (EXPECTED(IS_VALID_PROPERTY_OFFSET(property_offset))) { @@ -1089,7 +1063,7 @@ ZEND_API void zend_std_unset_property(zval *object, zval *member, void **cache_s if (zobj->properties) { HT_FLAGS(zobj->properties) |= HASH_FLAG_HAS_EMPTY_IND; } - goto exit; + return; } } else if (EXPECTED(IS_DYNAMIC_PROPERTY_OFFSET(property_offset)) && EXPECTED(zobj->properties != NULL)) { @@ -1100,10 +1074,10 @@ ZEND_API void zend_std_unset_property(zval *object, zval *member, void **cache_s zobj->properties = zend_array_dup(zobj->properties); } if (EXPECTED(zend_hash_del(zobj->properties, name) != FAILURE)) { - goto exit; + return; } } else if (UNEXPECTED(EG(exception))) { - goto exit; + return; } /* magic unset */ @@ -1118,27 +1092,24 @@ ZEND_API void zend_std_unset_property(zval *object, zval *member, void **cache_s /* Trigger the correct error */ zend_wrong_offset(zobj->ce, name); ZEND_ASSERT(EG(exception)); - goto exit; + return; } else { /* Nothing to do: The property already does not exist. */ } } - -exit: - zend_tmp_string_release(tmp_name); } /* }}} */ -ZEND_API void zend_std_unset_dimension(zval *object, zval *offset) /* {{{ */ +ZEND_API void zend_std_unset_dimension(zend_object *object, zval *offset) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zval tmp_offset, tmp_object; + zend_class_entry *ce = object->ce; + zval tmp_offset; if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1)) { ZVAL_COPY_DEREF(&tmp_offset, offset); - ZVAL_COPY(&tmp_object, object); - zend_call_method_with_1_params(&tmp_object, ce, NULL, "offsetunset", NULL, &tmp_offset); - zval_ptr_dtor(&tmp_object); + GC_ADDREF(object); + zend_call_method_with_1_params(object, ce, NULL, "offsetunset", NULL, &tmp_offset); + OBJ_RELEASE(object); zval_ptr_dtor(&tmp_offset); } else { zend_bad_array_access(ce); @@ -1237,6 +1208,11 @@ ZEND_API zend_function *zend_get_call_trampoline_func(zend_class_entry *ce, zend func->function_name = zend_string_copy(method_name); } + func->prototype = NULL; + func->num_args = 0; + func->required_num_args = 0; + func->arg_info = 0; + return (zend_function*)func; } /* }}} */ @@ -1621,17 +1597,13 @@ ZEND_API int zend_std_compare_objects(zval *o1, zval *o2) /* {{{ */ } /* }}} */ -ZEND_API int zend_std_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */ +ZEND_API int zend_std_has_property(zend_object *zobj, zend_string *name, int has_set_exists, void **cache_slot) /* {{{ */ { - zend_object *zobj; int result; zval *value = NULL; - zend_string *name, *tmp_name; uintptr_t property_offset; zend_property_info *prop_info = NULL; - - zobj = Z_OBJ_P(object); - name = zval_get_tmp_string(member, &tmp_name); + zend_string *tmp_name = NULL; property_offset = zend_get_property_offset(zobj->ce, name, 1, cache_slot, &prop_info); @@ -1728,14 +1700,14 @@ ZEND_API zend_string *zend_std_get_class_name(const zend_object *zobj) /* {{{ */ } /* }}} */ -ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int type) /* {{{ */ +ZEND_API int zend_std_cast_object_tostring(zend_object *readobj, zval *writeobj, int type) /* {{{ */ { zval retval; zend_class_entry *ce; switch (type) { case IS_STRING: - ce = Z_OBJCE_P(readobj); + ce = readobj->ce; if (ce->__tostring && (zend_call_method_with_0_params(readobj, ce, &ce->__tostring, "__tostring", &retval) || EG(exception))) { if (UNEXPECTED(EG(exception) != NULL)) { @@ -1768,17 +1740,17 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty ZVAL_TRUE(writeobj); return SUCCESS; case IS_LONG: - ce = Z_OBJCE_P(readobj); + ce = readobj->ce; zend_error(E_NOTICE, "Object of class %s could not be converted to int", ZSTR_VAL(ce->name)); ZVAL_LONG(writeobj, 1); return SUCCESS; case IS_DOUBLE: - ce = Z_OBJCE_P(readobj); + ce = readobj->ce; zend_error(E_NOTICE, "Object of class %s could not be converted to float", ZSTR_VAL(ce->name)); ZVAL_DOUBLE(writeobj, 1); return SUCCESS; case _IS_NUMBER: - ce = Z_OBJCE_P(readobj); + ce = readobj->ce; zend_error(E_NOTICE, "Object of class %s could not be converted to number", ZSTR_VAL(ce->name)); ZVAL_LONG(writeobj, 1); return SUCCESS; @@ -1790,10 +1762,10 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty } /* }}} */ -ZEND_API int zend_std_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr) /* {{{ */ +ZEND_API int zend_std_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr) /* {{{ */ { zval *func; - zend_class_entry *ce = Z_OBJCE_P(obj); + zend_class_entry *ce = obj->ce; if ((func = zend_hash_find_ex(&ce->function_table, ZSTR_KNOWN(ZEND_STR_MAGIC_INVOKE), 1)) == NULL) { return FAILURE; @@ -1807,20 +1779,20 @@ ZEND_API int zend_std_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_fun } } else { if (obj_ptr) { - *obj_ptr = Z_OBJ_P(obj); + *obj_ptr = obj; } } return SUCCESS; } /* }}} */ -ZEND_API HashTable *zend_std_get_properties_for(zval *obj, zend_prop_purpose purpose) { +ZEND_API HashTable *zend_std_get_properties_for(zend_object *obj, zend_prop_purpose purpose) { HashTable *ht; switch (purpose) { case ZEND_PROP_PURPOSE_DEBUG: - if (Z_OBJ_HT_P(obj)->get_debug_info) { + if (obj->handlers->get_debug_info) { int is_temp; - ht = Z_OBJ_HT_P(obj)->get_debug_info(obj, &is_temp); + ht = obj->handlers->get_debug_info(obj, &is_temp); if (ht && !is_temp && !(GC_FLAGS(ht) & GC_IMMUTABLE)) { GC_ADDREF(ht); } @@ -1832,7 +1804,7 @@ ZEND_API HashTable *zend_std_get_properties_for(zval *obj, zend_prop_purpose pur case ZEND_PROP_PURPOSE_VAR_EXPORT: case ZEND_PROP_PURPOSE_JSON: case _ZEND_PROP_PURPOSE_ARRAY_KEY_EXISTS: - ht = Z_OBJ_HT_P(obj)->get_properties(obj); + ht = obj->handlers->get_properties(obj); if (ht && !(GC_FLAGS(ht) & GC_IMMUTABLE)) { GC_ADDREF(ht); } @@ -1844,11 +1816,13 @@ ZEND_API HashTable *zend_std_get_properties_for(zval *obj, zend_prop_purpose pur } ZEND_API HashTable *zend_get_properties_for(zval *obj, zend_prop_purpose purpose) { - if (Z_OBJ_HT_P(obj)->get_properties_for) { - return Z_OBJ_HT_P(obj)->get_properties_for(obj, purpose); + zend_object *zobj = Z_OBJ_P(obj); + + if (zobj->handlers->get_properties_for) { + return zobj->handlers->get_properties_for(zobj, purpose); } - return zend_std_get_properties_for(obj, purpose); + return zend_std_get_properties_for(zobj, purpose); } ZEND_API const zend_object_handlers std_object_handlers = { @@ -1884,13 +1858,3 @@ ZEND_API const zend_object_handlers std_object_handlers = { NULL, /* compare */ NULL, /* get_properties_for */ }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index 59ce69fecda66..64356bcb04ae8 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -41,10 +41,10 @@ struct _zend_property_info; symbol table, its reference count should be 0. */ /* Used to fetch property from the object, read-only */ -typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, int type, void **cache_slot, zval *rv); +typedef zval *(*zend_object_read_property_t)(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv); /* Used to fetch dimension from the object, read-only */ -typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset, int type, zval *rv); +typedef zval *(*zend_object_read_dimension_t)(zend_object *object, zval *offset, int type, zval *rv); /* The following rule applies to write_property() and write_dimension() implementations: @@ -54,23 +54,23 @@ typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset, int ty You must return the final value of the assigned property. */ /* Used to set property of the object */ -typedef zval *(*zend_object_write_property_t)(zval *object, zval *member, zval *value, void **cache_slot); +typedef zval *(*zend_object_write_property_t)(zend_object *object, zend_string *member, zval *value, void **cache_slot); /* Used to set dimension of the object */ -typedef void (*zend_object_write_dimension_t)(zval *object, zval *offset, zval *value); +typedef void (*zend_object_write_dimension_t)(zend_object *object, zval *offset, zval *value); /* Used to create pointer to the property of the object, for future direct r/w access */ -typedef zval *(*zend_object_get_property_ptr_ptr_t)(zval *object, zval *member, int type, void **cache_slot); +typedef zval *(*zend_object_get_property_ptr_ptr_t)(zend_object *object, zend_string *member, int type, void **cache_slot); /* Used to set object value. Can be used to override assignments and scalar write ops (like ++, +=) on the object */ -typedef void (*zend_object_set_t)(zval *object, zval *value); +typedef void (*zend_object_set_t)(zend_object *object, zval *value); /* Used to get object value. Can be used when converting object value to * one of the basic types and when using scalar ops (like ++, +=) on the object */ -typedef zval* (*zend_object_get_t)(zval *object, zval *rv); +typedef zval* (*zend_object_get_t)(zend_object *object, zval *rv); /* Used to check if a property of the object exists */ /* param has_set_exists: @@ -78,21 +78,21 @@ typedef zval* (*zend_object_get_t)(zval *object, zval *rv); * 1 (set) whether property exists and is true * 2 (exists) whether property exists */ -typedef int (*zend_object_has_property_t)(zval *object, zval *member, int has_set_exists, void **cache_slot); +typedef int (*zend_object_has_property_t)(zend_object *object, zend_string *member, int has_set_exists, void **cache_slot); /* Used to check if a dimension of the object exists */ -typedef int (*zend_object_has_dimension_t)(zval *object, zval *member, int check_empty); +typedef int (*zend_object_has_dimension_t)(zend_object *object, zval *member, int check_empty); /* Used to remove a property of the object */ -typedef void (*zend_object_unset_property_t)(zval *object, zval *member, void **cache_slot); +typedef void (*zend_object_unset_property_t)(zend_object *object, zend_string *member, void **cache_slot); /* Used to remove a dimension of the object */ -typedef void (*zend_object_unset_dimension_t)(zval *object, zval *offset); +typedef void (*zend_object_unset_dimension_t)(zend_object *object, zval *offset); /* Used to get hash of the properties of the object, as hash of zval's */ -typedef HashTable *(*zend_object_get_properties_t)(zval *object); +typedef HashTable *(*zend_object_get_properties_t)(zend_object *object); -typedef HashTable *(*zend_object_get_debug_info_t)(zval *object, int *is_temp); +typedef HashTable *(*zend_object_get_debug_info_t)(zend_object *object, int *is_temp); typedef enum _zend_prop_purpose { /* Used for debugging. Supersedes get_debug_info handler. */ @@ -114,7 +114,7 @@ typedef enum _zend_prop_purpose { } zend_prop_purpose; /* The return value must be released using zend_release_properties(). */ -typedef zend_array *(*zend_object_get_properties_for_t)(zval *object, zend_prop_purpose purpose); +typedef zend_array *(*zend_object_get_properties_for_t)(zend_object *object, zend_prop_purpose purpose); /* Used to call methods */ /* args on stack! */ @@ -127,7 +127,7 @@ typedef zend_function *(*zend_object_get_constructor_t)(zend_object *object); /* Object maintenance/destruction */ typedef void (*zend_object_dtor_obj_t)(zend_object *object); typedef void (*zend_object_free_obj_t)(zend_object *object); -typedef zend_object* (*zend_object_clone_obj_t)(zval *object); +typedef zend_object* (*zend_object_clone_obj_t)(zend_object *object); /* Get class name for display in var_dump and other debugging functions. * Must be defined and must return a non-NULL value. */ @@ -139,15 +139,15 @@ typedef int (*zend_object_compare_zvals_t)(zval *resul, zval *op1, zval *op2); /* Cast an object to some other type. * readobj and retval must point to distinct zvals. */ -typedef int (*zend_object_cast_t)(zval *readobj, zval *retval, int type); +typedef int (*zend_object_cast_t)(zend_object *readobj, zval *retval, int type); /* updates *count to hold the number of elements present and returns SUCCESS. * Returns FAILURE if the object does not have any sense of overloaded dimensions */ -typedef int (*zend_object_count_elements_t)(zval *object, zend_long *count); +typedef int (*zend_object_count_elements_t)(zend_object *object, zend_long *count); -typedef int (*zend_object_get_closure_t)(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr); +typedef int (*zend_object_get_closure_t)(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr); -typedef HashTable *(*zend_object_get_gc_t)(zval *object, zval **table, int *n); +typedef HashTable *(*zend_object_get_gc_t)(zend_object *object, zval **table, int *n); typedef int (*zend_object_do_operation_t)(zend_uchar opcode, zval *result, zval *op1, zval *op2); @@ -205,23 +205,23 @@ ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *p ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name); ZEND_API zend_function *zend_std_get_constructor(zend_object *object); ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_string *member, int silent); -ZEND_API HashTable *zend_std_get_properties(zval *object); -ZEND_API HashTable *zend_std_get_gc(zval *object, zval **table, int *n); -ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp); -ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int type); -ZEND_API zval *zend_std_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot); -ZEND_API zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv); -ZEND_API zval *zend_std_write_property(zval *object, zval *member, zval *value, void **cache_slot); -ZEND_API int zend_std_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot); -ZEND_API void zend_std_unset_property(zval *object, zval *member, void **cache_slot); -ZEND_API zval *zend_std_read_dimension(zval *object, zval *offset, int type, zval *rv); -ZEND_API void zend_std_write_dimension(zval *object, zval *offset, zval *value); -ZEND_API int zend_std_has_dimension(zval *object, zval *offset, int check_empty); -ZEND_API void zend_std_unset_dimension(zval *object, zval *offset); +ZEND_API HashTable *zend_std_get_properties(zend_object *object); +ZEND_API HashTable *zend_std_get_gc(zend_object *object, zval **table, int *n); +ZEND_API HashTable *zend_std_get_debug_info(zend_object *object, int *is_temp); +ZEND_API int zend_std_cast_object_tostring(zend_object *object, zval *writeobj, int type); +ZEND_API zval *zend_std_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot); +ZEND_API zval *zend_std_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv); +ZEND_API zval *zend_std_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot); +ZEND_API int zend_std_has_property(zend_object *object, zend_string *member, int has_set_exists, void **cache_slot); +ZEND_API void zend_std_unset_property(zend_object *object, zend_string *member, void **cache_slot); +ZEND_API zval *zend_std_read_dimension(zend_object *object, zval *offset, int type, zval *rv); +ZEND_API void zend_std_write_dimension(zend_object *object, zval *offset, zval *value); +ZEND_API int zend_std_has_dimension(zend_object *object, zval *offset, int check_empty); +ZEND_API void zend_std_unset_dimension(zend_object *object, zval *offset); ZEND_API zend_function *zend_std_get_method(zend_object **obj_ptr, zend_string *method_name, const zval *key); ZEND_API zend_string *zend_std_get_class_name(const zend_object *zobj); ZEND_API int zend_std_compare_objects(zval *o1, zval *o2); -ZEND_API int zend_std_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr); +ZEND_API int zend_std_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr); ZEND_API void rebuild_object_properties(zend_object *zobj); ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope); @@ -234,7 +234,7 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe /* Default behavior for get_properties_for. For use as a fallback in custom * get_properties_for implementations. */ -ZEND_API HashTable *zend_std_get_properties_for(zval *obj, zend_prop_purpose purpose); +ZEND_API HashTable *zend_std_get_properties_for(zend_object *obj, zend_prop_purpose purpose); /* Will call get_properties_for handler or use default behavior. For use by * consumers of the get_properties_for API. */ @@ -257,13 +257,3 @@ ZEND_API HashTable *zend_get_properties_for(zval *obj, zend_prop_purpose purpose END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index 151557cd9e14f..f73ef911786f8 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -283,14 +283,12 @@ ZEND_API void ZEND_FASTCALL zend_objects_clone_members(zend_object *new_object, } } -ZEND_API zend_object *zend_objects_clone_obj(zval *zobject) +ZEND_API zend_object *zend_objects_clone_obj(zend_object *old_object) { - zend_object *old_object; zend_object *new_object; /* assume that create isn't overwritten, so when clone depends on the * overwritten one then it must itself be overwritten */ - old_object = Z_OBJ_P(zobject); new_object = zend_objects_new(old_object->ce); /* zend_objects_clone_members() expect the properties to be initialized. */ @@ -307,13 +305,3 @@ ZEND_API zend_object *zend_objects_clone_obj(zval *zobject) return new_object; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_objects.h b/Zend/zend_objects.h index 6f11ee7a1045a..91d388154dd13 100644 --- a/Zend/zend_objects.h +++ b/Zend/zend_objects.h @@ -29,17 +29,7 @@ ZEND_API void ZEND_FASTCALL zend_objects_clone_members(zend_object *new_object, ZEND_API void zend_object_std_dtor(zend_object *object); ZEND_API void zend_objects_destroy_object(zend_object *object); -ZEND_API zend_object *zend_objects_clone_obj(zval *object); +ZEND_API zend_object *zend_objects_clone_obj(zend_object *object); END_EXTERN_C() #endif /* ZEND_OBJECTS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 33ffa2e86665b..efd8492c7bf16 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -194,13 +194,3 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_del(zend_object *object) /* {{{ * } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h index 633662f27fc88..b9a838e7bbcc1 100644 --- a/Zend/zend_objects_API.h +++ b/Zend/zend_objects_API.h @@ -115,13 +115,3 @@ static inline zend_property_info *zend_get_typed_property_info_for_slot(zend_obj #endif /* ZEND_OBJECTS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index c46f3dacbd1c3..1093909c83f98 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -1075,13 +1075,3 @@ ZEND_API binary_op_type get_binary_op(int opcode) return (binary_op_type) NULL; } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index d4f13cc6cc5e2..832e715da136a 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -138,13 +138,13 @@ ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, size_t str_len) /* { #define convert_object_to_type(op, dst, ctype, conv_func) \ ZVAL_UNDEF(dst); \ if (Z_OBJ_HT_P(op)->cast_object) { \ - if (Z_OBJ_HT_P(op)->cast_object(op, dst, ctype) == FAILURE) { \ + if (Z_OBJ_HT_P(op)->cast_object(Z_OBJ_P(op), dst, ctype) == FAILURE) { \ zend_error(E_RECOVERABLE_ERROR, \ "Object of class %s could not be converted to %s", ZSTR_VAL(Z_OBJCE_P(op)->name),\ zend_get_type_by_const(ctype)); \ } \ } else if (Z_OBJ_HT_P(op)->get) { \ - zval *newop = Z_OBJ_HT_P(op)->get(op, dst); \ + zval *newop = Z_OBJ_HT_P(op)->get(Z_OBJ_P(op), dst); \ if (Z_TYPE_P(newop) != IS_OBJECT) { \ /* for safety - avoid loop */ \ ZVAL_COPY_VALUE(dst, newop); \ @@ -863,11 +863,11 @@ ZEND_API zend_string* ZEND_FASTCALL zval_get_string_func(zval *op) /* {{{ */ case IS_OBJECT: { zval tmp; if (Z_OBJ_HT_P(op)->cast_object) { - if (Z_OBJ_HT_P(op)->cast_object(op, &tmp, IS_STRING) == SUCCESS) { + if (Z_OBJ_HT_P(op)->cast_object(Z_OBJ_P(op), &tmp, IS_STRING) == SUCCESS) { return Z_STR(tmp); } } else if (Z_OBJ_HT_P(op)->get) { - zval *z = Z_OBJ_HT_P(op)->get(op, &tmp); + zval *z = Z_OBJ_HT_P(op)->get(Z_OBJ_P(op), &tmp); if (Z_TYPE_P(z) != IS_OBJECT) { zend_string *str = zval_get_string(z); zval_ptr_dtor(z); @@ -2078,13 +2078,13 @@ ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) if (Z_TYPE_P(op1) == IS_OBJECT) { if (Z_OBJ_HT_P(op1)->get) { zval rv; - op_free = Z_OBJ_HT_P(op1)->get(op1, &rv); + op_free = Z_OBJ_HT_P(op1)->get(Z_OBJ_P(op1), &rv); ret = compare_function(result, op_free, op2); zend_free_obj_get_result(op_free); return ret; } else if (Z_TYPE_P(op2) != IS_OBJECT && Z_OBJ_HT_P(op1)->cast_object) { ZVAL_UNDEF(&tmp_free); - if (Z_OBJ_HT_P(op1)->cast_object(op1, &tmp_free, ((Z_TYPE_P(op2) == IS_FALSE || Z_TYPE_P(op2) == IS_TRUE) ? _IS_BOOL : Z_TYPE_P(op2))) == FAILURE) { + if (Z_OBJ_HT_P(op1)->cast_object(Z_OBJ_P(op1), &tmp_free, ((Z_TYPE_P(op2) == IS_FALSE || Z_TYPE_P(op2) == IS_TRUE) ? _IS_BOOL : Z_TYPE_P(op2))) == FAILURE) { ZVAL_LONG(result, 1); zend_free_obj_get_result(&tmp_free); return SUCCESS; @@ -2097,13 +2097,13 @@ ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) if (Z_TYPE_P(op2) == IS_OBJECT) { if (Z_OBJ_HT_P(op2)->get) { zval rv; - op_free = Z_OBJ_HT_P(op2)->get(op2, &rv); + op_free = Z_OBJ_HT_P(op2)->get(Z_OBJ_P(op2), &rv); ret = compare_function(result, op1, op_free); zend_free_obj_get_result(op_free); return ret; } else if (Z_TYPE_P(op1) != IS_OBJECT && Z_OBJ_HT_P(op2)->cast_object) { ZVAL_UNDEF(&tmp_free); - if (Z_OBJ_HT_P(op2)->cast_object(op2, &tmp_free, ((Z_TYPE_P(op1) == IS_FALSE || Z_TYPE_P(op1) == IS_TRUE) ? _IS_BOOL : Z_TYPE_P(op1))) == FAILURE) { + if (Z_OBJ_HT_P(op2)->cast_object(Z_OBJ_P(op2), &tmp_free, ((Z_TYPE_P(op1) == IS_FALSE || Z_TYPE_P(op1) == IS_TRUE) ? _IS_BOOL : Z_TYPE_P(op1))) == FAILURE) { ZVAL_LONG(result, -1); zend_free_obj_get_result(&tmp_free); return SUCCESS; @@ -2467,10 +2467,10 @@ ZEND_API int ZEND_FASTCALL increment_function(zval *op1) /* {{{ */ zval rv; zval *val; - val = Z_OBJ_HANDLER_P(op1, get)(op1, &rv); + val = Z_OBJ_HANDLER_P(op1, get)(Z_OBJ_P(op1), &rv); Z_TRY_ADDREF_P(val); increment_function(val); - Z_OBJ_HANDLER_P(op1, set)(op1, val); + Z_OBJ_HANDLER_P(op1, set)(Z_OBJ_P(op1), val); zval_ptr_dtor(val); } else if (Z_OBJ_HANDLER_P(op1, do_operation)) { zval op2; @@ -2534,10 +2534,10 @@ ZEND_API int ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ zval rv; zval *val; - val = Z_OBJ_HANDLER_P(op1, get)(op1, &rv); + val = Z_OBJ_HANDLER_P(op1, get)(Z_OBJ_P(op1), &rv); Z_TRY_ADDREF_P(val); decrement_function(val); - Z_OBJ_HANDLER_P(op1, set)(op1, val); + Z_OBJ_HANDLER_P(op1, set)(Z_OBJ_P(op1), val); zval_ptr_dtor(val); } else if (Z_OBJ_HANDLER_P(op1, do_operation)) { zval op2; @@ -2568,16 +2568,18 @@ ZEND_API int ZEND_FASTCALL zend_is_true(zval *op) /* {{{ */ ZEND_API int ZEND_FASTCALL zend_object_is_true(zval *op) /* {{{ */ { - if (Z_OBJ_HT_P(op)->cast_object) { + zend_object *zobj = Z_OBJ_P(op); + + if (zobj->handlers->cast_object) { zval tmp; - if (Z_OBJ_HT_P(op)->cast_object(op, &tmp, _IS_BOOL) == SUCCESS) { + if (zobj->handlers->cast_object(zobj, &tmp, _IS_BOOL) == SUCCESS) { return Z_TYPE(tmp) == IS_TRUE; } - zend_error(E_RECOVERABLE_ERROR, "Object of class %s could not be converted to bool", ZSTR_VAL(Z_OBJ_P(op)->ce->name)); - } else if (Z_OBJ_HT_P(op)->get) { + zend_error(E_RECOVERABLE_ERROR, "Object of class %s could not be converted to bool", ZSTR_VAL(zobj->ce->name)); + } else if (zobj->handlers->get) { int result; zval rv; - zval *tmp = Z_OBJ_HT_P(op)->get(op, &rv); + zval *tmp = zobj->handlers->get(zobj, &rv); if (Z_TYPE_P(tmp) != IS_OBJECT) { /* for safety - avoid loop */ @@ -3246,13 +3248,3 @@ ZEND_API zend_long ZEND_FASTCALL zend_dval_to_lval_slow(double d) } #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 9ad996dad5a1d..1a2d1cf81c74b 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -801,14 +801,14 @@ static zend_always_inline int fast_is_not_identical_function(zval *op1, zval *op #define ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(opcode, binary_op) \ if (UNEXPECTED(Z_TYPE_P(op1) == IS_OBJECT) \ && op1 == result \ - && UNEXPECTED(Z_OBJ_HANDLER_P(op1, get)) \ - && EXPECTED(Z_OBJ_HANDLER_P(op1, set))) { \ + && UNEXPECTED(Z_OBJ_HANDLER_P(op1, get)) \ + && EXPECTED(Z_OBJ_HANDLER_P(op1, set))) { \ int ret; \ zval rv; \ - zval *objval = Z_OBJ_HANDLER_P(op1, get)(op1, &rv); \ - Z_TRY_ADDREF_P(objval); \ - ret = binary_op(objval, objval, op2); \ - Z_OBJ_HANDLER_P(op1, set)(op1, objval); \ + zval *objval = Z_OBJ_HANDLER_P(op1, get)(Z_OBJ_P(op1), &rv); \ + Z_TRY_ADDREF_P(objval); \ + ret = binary_op(objval, objval, op2); \ + Z_OBJ_HANDLER_P(op1, set)(Z_OBJ_P(op1), objval); \ zval_ptr_dtor(objval); \ return ret; \ } else if (UNEXPECTED(Z_TYPE_P(op1) == IS_OBJECT) \ @@ -875,13 +875,3 @@ static zend_always_inline void zend_unwrap_reference(zval *op) /* {{{ */ END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index 9aab49bfdac5b..cc11bb4b403c9 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -642,13 +642,3 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */ #endif #endif /* ZEND_PORTABILITY_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c index f80341a2b54cb..2030cc132b405 100644 --- a/Zend/zend_ptr_stack.c +++ b/Zend/zend_ptr_stack.c @@ -115,12 +115,3 @@ ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack) { return stack->top; } -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h index 30e8f2086092f..2298e4f211434 100644 --- a/Zend/zend_ptr_stack.h +++ b/Zend/zend_ptr_stack.h @@ -116,13 +116,3 @@ static zend_always_inline void *zend_ptr_stack_top(zend_ptr_stack *stack) } #endif /* ZEND_PTR_STACK_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_range_check.h b/Zend/zend_range_check.h index 2181eb9b2e433..9c822493fa3ef 100644 --- a/Zend/zend_range_check.h +++ b/Zend/zend_range_check.h @@ -65,13 +65,3 @@ #define ZEND_SIZE_T_LTE_ZEND_LONG(size, zlong) ((zlong) >= 0 && (size) <= (size_t)(zlong)) #endif /* ZEND_RANGE_CHECK_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c index e9d364dca1e79..5d8da648cd436 100644 --- a/Zend/zend_signal.c +++ b/Zend/zend_signal.c @@ -437,13 +437,3 @@ ZEND_API void zend_signal_startup(void) #endif /* ZEND_SIGNALS */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_signal.h b/Zend/zend_signal.h index 449f4f0a8a796..0ec533cc5e89b 100644 --- a/Zend/zend_signal.h +++ b/Zend/zend_signal.h @@ -111,13 +111,3 @@ ZEND_API int zend_sigaction(int signo, const struct sigaction *act, struct sigac #endif /* ZEND_SIGNALS */ #endif /* ZEND_SIGNAL_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_smart_str.c b/Zend/zend_smart_str.c index e16c65ea2e244..1a5eb455ad803 100644 --- a/Zend/zend_smart_str.c +++ b/Zend/zend_smart_str.c @@ -155,7 +155,12 @@ ZEND_API void ZEND_FASTCALL _smart_string_alloc(smart_string *str, size_t len) str->c = emalloc(SMART_STRING_START_LEN + 1); } else { str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OVERHEAD; - str->c = emalloc_large(str->a + 1); + if (EXPECTED(str->a < (ZEND_MM_CHUNK_SIZE - SMART_STRING_OVERHEAD))) { + str->c = emalloc_large(str->a + 1); + } else { + /* allocate a huge chunk */ + str->c = emalloc(str->a + 1); + } } } else { if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { @@ -166,13 +171,3 @@ ZEND_API void ZEND_FASTCALL _smart_string_alloc(smart_string *str, size_t len) str->c = erealloc2(str->c, str->a + 1, str->len); } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_smart_str.h b/Zend/zend_smart_str.h index 5cfde449d4c56..2dab1f809a2d5 100644 --- a/Zend/zend_smart_str.h +++ b/Zend/zend_smart_str.h @@ -150,13 +150,3 @@ static zend_always_inline void smart_str_setl(smart_str *dest, const char *src, } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_smart_str_public.h b/Zend/zend_smart_str_public.h index 397009641c5c1..ba0b399881522 100644 --- a/Zend/zend_smart_str_public.h +++ b/Zend/zend_smart_str_public.h @@ -25,13 +25,3 @@ typedef struct { } smart_str; #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_smart_string.h b/Zend/zend_smart_string.h index 403843d462f54..4580e43769017 100644 --- a/Zend/zend_smart_string.h +++ b/Zend/zend_smart_string.h @@ -113,13 +113,3 @@ static zend_always_inline void smart_string_reset(smart_string *str) { } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_smart_string_public.h b/Zend/zend_smart_string_public.h index 1d8496ccf49d7..e39d67c16e3b9 100644 --- a/Zend/zend_smart_string_public.h +++ b/Zend/zend_smart_string_public.h @@ -29,13 +29,3 @@ typedef struct { } smart_string; #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_sort.c b/Zend/zend_sort.c index 1a7c639cdcb94..4fe3835edb0bb 100644 --- a/Zend/zend_sort.c +++ b/Zend/zend_sort.c @@ -372,12 +372,3 @@ ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp } } /* }}} */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_sort.h b/Zend/zend_sort.h index c65dc1d21b22d..e2ef938df753f 100644 --- a/Zend/zend_sort.h +++ b/Zend/zend_sort.h @@ -27,13 +27,3 @@ ZEND_API void zend_insert_sort(void *base, size_t nmemb, size_t siz, compare_fun END_EXTERN_C() #endif /* ZEND_SORT_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_sprintf.c b/Zend/zend_sprintf.c index ab139e96f4ea6..8259a52830c53 100644 --- a/Zend/zend_sprintf.c +++ b/Zend/zend_sprintf.c @@ -36,13 +36,3 @@ int zend_sprintf(char *buffer, const char *format, ...) return len; } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_stack.c b/Zend/zend_stack.c index 904f9a4f679b7..51f68b5c9a2c9 100644 --- a/Zend/zend_stack.c +++ b/Zend/zend_stack.c @@ -162,13 +162,3 @@ ZEND_API void zend_stack_clean(zend_stack *stack, void (*func)(void *), zend_boo stack->top = stack->max = 0; } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_stack.h b/Zend/zend_stack.h index e19c7974ec069..912850a25e4c6 100644 --- a/Zend/zend_stack.h +++ b/Zend/zend_stack.h @@ -47,13 +47,3 @@ END_EXTERN_C() #define ZEND_STACK_APPLY_BOTTOMUP 2 #endif /* ZEND_STACK_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c index 6de9344f35c2a..4b32203cbb732 100644 --- a/Zend/zend_stream.c +++ b/Zend/zend_stream.c @@ -342,13 +342,3 @@ ZEND_API int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle * } return 0; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h index d153d3babc723..c98969a3b4f1b 100644 --- a/Zend/zend_stream.h +++ b/Zend/zend_stream.h @@ -103,13 +103,3 @@ typedef struct stat zend_stat_t; #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_string.c b/Zend/zend_string.c index 98514310c1bce..b94d4d533403f 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -447,13 +447,3 @@ ZEND_API zend_bool ZEND_FASTCALL I_WRAP_SONAME_FNNAME_ZU(NONE,zend_string_equal_ #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 970420668431c..0d259d0c361f4 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -450,13 +450,3 @@ ZEND_KNOWN_STRINGS(_ZEND_STR_ID) } zend_known_string_id; #endif /* ZEND_STRING_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 3aa99f8d98537..a6648978c4926 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -4543,11 +4543,3 @@ static void destroy_freelist(void) #ifdef __cplusplus } #endif -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_strtod.h b/Zend/zend_strtod.h index 6db9a3324ee01..ea81827df2885 100644 --- a/Zend/zend_strtod.h +++ b/Zend/zend_strtod.h @@ -34,13 +34,3 @@ ZEND_API int zend_shutdown_strtod(void); END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_strtod_int.h b/Zend/zend_strtod_int.h index 99649f8cddf94..5fe31f940d38d 100644 --- a/Zend/zend_strtod_int.h +++ b/Zend/zend_strtod_int.h @@ -145,13 +145,3 @@ typedef unsigned long int uint32_t; #endif #endif /* ZEND_STRTOD_INT_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_ts_hash.c b/Zend/zend_ts_hash.c index bcc679ac6afd3..3cff54bf6cebf 100644 --- a/Zend/zend_ts_hash.c +++ b/Zend/zend_ts_hash.c @@ -353,11 +353,3 @@ ZEND_API zval *zend_ts_hash_str_add(TsHashTable *ht, const char *key, size_t len return retval; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/Zend/zend_ts_hash.h b/Zend/zend_ts_hash.h index 53ebd18a5a1b5..f719e25a88de4 100644 --- a/Zend/zend_ts_hash.h +++ b/Zend/zend_ts_hash.h @@ -136,13 +136,3 @@ END_EXTERN_C() zend_ts_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent) #endif /* ZEND_HASH_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_type_info.h b/Zend/zend_type_info.h index a27f35e6f86ba..72550b6fc3a93 100644 --- a/Zend/zend_type_info.h +++ b/Zend/zend_type_info.h @@ -56,13 +56,3 @@ #define MAY_BE_CLASS (1<<24) #endif /* ZEND_TYPE_INFO_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_types.h b/Zend/zend_types.h index b96e8ba0ac875..b1a3215894afc 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -707,7 +707,7 @@ static zend_always_inline uint32_t zval_gc_info(uint32_t gc_type_info) { #define Z_OBJCE(zval) (Z_OBJ(zval)->ce) #define Z_OBJCE_P(zval_p) Z_OBJCE(*(zval_p)) -#define Z_OBJPROP(zval) Z_OBJ_HT((zval))->get_properties(&(zval)) +#define Z_OBJPROP(zval) Z_OBJ_HT((zval))->get_properties(Z_OBJ(zval)) #define Z_OBJPROP_P(zval_p) Z_OBJPROP(*(zval_p)) #define Z_RES(zval) (zval).value.res @@ -1255,13 +1255,3 @@ static zend_always_inline uint32_t zval_delref_p(zval* pz) { } while (0) #endif /* ZEND_TYPES_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index d758a46222070..810866a1be23c 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -131,11 +131,3 @@ ZEND_API void ZEND_FASTCALL zval_copy_ctor_func(zval *zvalue) ZVAL_NEW_STR(zvalue, zend_string_dup(Z_STR_P(zvalue), 0)); } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h index ddd3403f59c5a..bdee8b1879d5b 100644 --- a/Zend/zend_variables.h +++ b/Zend/zend_variables.h @@ -94,13 +94,3 @@ END_EXTERN_C() #define ZVAL_INTERNAL_PTR_DTOR zval_internal_ptr_dtor #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index bd5fe48186de7..3998b46aa1c5b 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -1690,10 +1690,3 @@ CWD_API char *tsrm_realpath(const char *path, char *real_path) /* {{{ */ } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/Zend/zend_virtual_cwd.h b/Zend/zend_virtual_cwd.h index 51bbfc6aebf52..c6c06f63325ee 100644 --- a/Zend/zend_virtual_cwd.h +++ b/Zend/zend_virtual_cwd.h @@ -365,13 +365,3 @@ extern void virtual_cwd_main_cwd_init(uint8_t); #endif #endif /* VIRTUAL_CWD_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_vm.h b/Zend/zend_vm.h index 45630690b3881..f246e7fb7752a 100644 --- a/Zend/zend_vm.h +++ b/Zend/zend_vm.h @@ -38,13 +38,3 @@ END_EXTERN_C() #define ZEND_VM_SET_OPCODE_HANDLER(opline) zend_vm_set_opcode_handler(opline) #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 745d4a5a64d25..9b808a6e120cc 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -801,6 +801,8 @@ ZEND_VM_HELPER(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW); @@ -827,8 +829,14 @@ ZEND_VM_HELPER(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, ZEND_VM_C_LABEL(assign_op_object): /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (OP2_TYPE == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (OP2_TYPE == IS_CONST) ? CACHE_ADDR((opline+1)->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -865,7 +873,10 @@ ZEND_VM_C_LABEL(assign_op_object): } } } else { - zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + zend_assign_op_overloaded_property(zobj, name, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + } + if (OP2_TYPE != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -1165,6 +1176,8 @@ ZEND_VM_HELPER(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW); @@ -1189,8 +1202,14 @@ ZEND_VM_HELPER(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, ZEND_VM_C_LABEL(pre_incdec_object): /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (OP2_TYPE == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -1204,7 +1223,10 @@ ZEND_VM_C_LABEL(pre_incdec_object): zend_pre_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_pre_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_pre_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (OP2_TYPE != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -1232,6 +1254,8 @@ ZEND_VM_HELPER(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW); @@ -1256,8 +1280,14 @@ ZEND_VM_HELPER(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV, ZEND_VM_C_LABEL(post_incdec_object): /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (OP2_TYPE == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { ZVAL_NULL(EX_VAR(opline->result.var)); } else { @@ -1270,7 +1300,10 @@ ZEND_VM_C_LABEL(post_incdec_object): zend_post_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_post_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_post_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (OP2_TYPE != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -1921,9 +1954,11 @@ ZEND_VM_HOT_OBJ_HANDLER(82, ZEND_FETCH_OBJ_R, CONST|TMPVAR|UNUSED|THIS|CV, CONST /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (OP2_TYPE == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -1942,17 +1977,17 @@ ZEND_VM_HOT_OBJ_HANDLER(82, ZEND_FETCH_OBJ_R, CONST|TMPVAR|UNUSED|THIS|CV, CONST Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; ZEND_VM_C_GOTO(fetch_obj_r_copy); } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -1960,11 +1995,18 @@ ZEND_VM_HOT_OBJ_HANDLER(82, ZEND_FETCH_OBJ_R, CONST|TMPVAR|UNUSED|THIS|CV, CONST } } } - } else if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if (OP2_TYPE == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if (OP2_TYPE != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { ZEND_VM_C_LABEL(fetch_obj_r_copy): @@ -2063,9 +2105,11 @@ ZEND_VM_COLD_CONST_HANDLER(91, ZEND_FETCH_OBJ_IS, CONST|TMPVAR|UNUSED|THIS|CV, C /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (OP2_TYPE == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -2084,17 +2128,17 @@ ZEND_VM_COLD_CONST_HANDLER(91, ZEND_FETCH_OBJ_IS, CONST|TMPVAR|UNUSED|THIS|CV, C Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; ZEND_VM_C_GOTO(fetch_obj_is_copy); } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -2102,9 +2146,15 @@ ZEND_VM_COLD_CONST_HANDLER(91, ZEND_FETCH_OBJ_IS, CONST|TMPVAR|UNUSED|THIS|CV, C } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if (OP2_TYPE != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { ZEND_VM_C_LABEL(fetch_obj_is_copy): @@ -2196,6 +2246,8 @@ ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, CACHE USE_OPLINE zend_free_op free_op1, free_op2, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_W); @@ -2220,8 +2272,9 @@ ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, CACHE } ZEND_VM_C_LABEL(assign_object): + zobj = Z_OBJ_P(object); if (OP2_TYPE == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -2311,7 +2364,17 @@ ZEND_VM_C_LABEL(fast_assign_obj): ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (OP2_TYPE == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (OP2_TYPE != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -3595,7 +3658,7 @@ ZEND_VM_C_LABEL(try_function_name): if (OP2_TYPE != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) { call = zend_init_dynamic_call_string(Z_STR_P(function_name), opline->extended_value); } else if (OP2_TYPE != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT)) { - call = zend_init_dynamic_call_object(function_name, opline->extended_value); + call = zend_init_dynamic_call_object(Z_OBJ_P(function_name), opline->extended_value); } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY)) { call = zend_init_dynamic_call_array(Z_ARRVAL_P(function_name), opline->extended_value); } else if ((OP2_TYPE & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(function_name) == IS_REFERENCE)) { @@ -5258,6 +5321,7 @@ ZEND_VM_COLD_CONST_HANDLER(110, ZEND_CLONE, CONST|TMPVAR|UNUSED|THIS|CV, ANY) USE_OPLINE zend_free_op free_op1; zval *obj; + zend_object *zobj; zend_class_entry *ce, *scope; zend_function *clone; zend_object_clone_obj_t clone_call; @@ -5291,9 +5355,10 @@ ZEND_VM_COLD_CONST_HANDLER(110, ZEND_CLONE, CONST|TMPVAR|UNUSED|THIS|CV, ANY) } } while (0); - ce = Z_OBJCE_P(obj); + zobj = Z_OBJ_P(obj); + ce = zobj->ce; clone = ce->clone; - clone_call = Z_OBJ_HT_P(obj)->clone_obj; + clone_call = zobj->handlers->clone_obj; if (UNEXPECTED(clone_call == NULL)) { zend_throw_error(NULL, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name)); FREE_OP1(); @@ -5314,7 +5379,7 @@ ZEND_VM_COLD_CONST_HANDLER(110, ZEND_CLONE, CONST|TMPVAR|UNUSED|THIS|CV, ANY) } } - ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj)); + ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(zobj)); FREE_OP1(); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); @@ -5874,7 +5939,7 @@ ZEND_VM_C_LABEL(num_index_dim): if (OP2_TYPE == IS_CONST && Z_EXTRA_P(offset) == ZEND_EXTRA_VALUE) { offset++; } - Z_OBJ_HT_P(container)->unset_dimension(container, offset); + Z_OBJ_HT_P(container)->unset_dimension(Z_OBJ_P(container), offset); } else if (OP1_TYPE != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) { zend_throw_error(NULL, "Cannot unset string offsets"); } @@ -5891,6 +5956,7 @@ ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, CACHE_S zend_free_op free_op1, free_op2; zval *container; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET); @@ -5910,7 +5976,15 @@ ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, CACHE_S break; } } - Z_OBJ_HT_P(container)->unset_property(container, offset, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (OP2_TYPE == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + Z_OBJ_HT_P(container)->unset_property(Z_OBJ_P(container), name, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (OP2_TYPE != IS_CONST) { + zend_tmp_string_release(tmp_name); + } } while (0); FREE_OP2(); @@ -5938,20 +6012,27 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, JMP_ADDR) FREE_OP1_IF_VAR(); ZEND_VM_NEXT_OPCODE(); } else if (OP1_TYPE != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) { - if (!Z_OBJCE_P(array_ptr)->get_iterator) { + zend_object *zobj = Z_OBJ_P(array_ptr); + if (!zobj->ce->get_iterator) { + HashTable *properties; + result = EX_VAR(opline->result.var); - ZVAL_COPY_VALUE(result, array_ptr); + ZVAL_OBJ(result, zobj); if (OP1_TYPE != IS_TMP_VAR) { - Z_ADDREF_P(array_ptr); + GC_ADDREF(zobj); } - if (Z_OBJ_P(array_ptr)->properties - && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) { - if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) { - GC_DELREF(Z_OBJ_P(array_ptr)->properties); + properties = zobj->properties; + if (properties) { + if (UNEXPECTED(GC_REFCOUNT(properties) > 1)) { + if (EXPECTED(!(GC_FLAGS(properties) & IS_ARRAY_IMMUTABLE))) { + GC_DELREF(properties); + } + properties = zobj->properties = zend_array_dup(properties); } - Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties); + } else { + properties = zobj->handlers->get_properties(zobj); } - Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(Z_OBJPROP_P(array_ptr), 0); + Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(properties, 0); FREE_OP1_IF_VAR(); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); @@ -6574,6 +6655,7 @@ ZEND_VM_COLD_CONST_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, CONST|TMPVAR|UNUSED zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_IS); @@ -6598,9 +6680,19 @@ ZEND_VM_COLD_CONST_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, CONST|TMPVAR|UNUSED } } + if (OP2_TYPE == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if (OP2_TYPE != IS_CONST) { + zend_tmp_string_release(tmp_name); + } ZEND_VM_C_LABEL(isset_object_finish): FREE_OP2(); @@ -8257,18 +8349,20 @@ ZEND_VM_COLD_CONST_HANDLER(190, ZEND_COUNT, CONST|TMP|VAR|CV, UNUSED) count = zend_array_count(Z_ARRVAL_P(op1)); break; } else if (Z_TYPE_P(op1) == IS_OBJECT) { + zend_object *zobj = Z_OBJ_P(op1); + /* first, we check if the handler is defined */ - if (Z_OBJ_HT_P(op1)->count_elements) { - if (SUCCESS == Z_OBJ_HT_P(op1)->count_elements(op1, &count)) { + if (zobj->handlers->count_elements) { + if (SUCCESS == zobj->handlers->count_elements(zobj, &count)) { break; } } /* if not and the object implements Countable we call its count() method */ - if (instanceof_function(Z_OBJCE_P(op1), zend_ce_countable)) { + if (instanceof_function(zobj->ce, zend_ce_countable)) { zval retval; - zend_call_method_with_0_params(op1, NULL, NULL, "count", &retval); + zend_call_method_with_0_params(zobj, NULL, NULL, "count", &retval); count = zval_get_long(&retval); zval_ptr_dtor(&retval); break; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 0ed4d27203f71..f08bb0d3f38f3 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2055,7 +2055,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_DYNAMIC_CALL_SPEC_CONST_H if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) { call = zend_init_dynamic_call_string(Z_STR_P(function_name), opline->extended_value); } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT)) { - call = zend_init_dynamic_call_object(function_name, opline->extended_value); + call = zend_init_dynamic_call_object(Z_OBJ_P(function_name), opline->extended_value); } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY)) { call = zend_init_dynamic_call_array(Z_ARRVAL_P(function_name), opline->extended_value); } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(function_name) == IS_REFERENCE)) { @@ -2224,7 +2224,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_ if ((IS_TMP_VAR|IS_VAR) != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) { call = zend_init_dynamic_call_string(Z_STR_P(function_name), opline->extended_value); } else if ((IS_TMP_VAR|IS_VAR) != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT)) { - call = zend_init_dynamic_call_object(function_name, opline->extended_value); + call = zend_init_dynamic_call_object(Z_OBJ_P(function_name), opline->extended_value); } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY)) { call = zend_init_dynamic_call_array(Z_ARRVAL_P(function_name), opline->extended_value); } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(function_name) == IS_REFERENCE)) { @@ -2342,7 +2342,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_DYNAMIC_CALL_SPEC_CV_HAND if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) { call = zend_init_dynamic_call_string(Z_STR_P(function_name), opline->extended_value); } else if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT)) { - call = zend_init_dynamic_call_object(function_name, opline->extended_value); + call = zend_init_dynamic_call_object(Z_OBJ_P(function_name), opline->extended_value); } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY)) { call = zend_init_dynamic_call_array(Z_ARRVAL_P(function_name), opline->extended_value); } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(function_name) == IS_REFERENCE)) { @@ -3008,6 +3008,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_ USE_OPLINE zval *obj; + zend_object *zobj; zend_class_entry *ce, *scope; zend_function *clone; zend_object_clone_obj_t clone_call; @@ -3041,9 +3042,10 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_ } } while (0); - ce = Z_OBJCE_P(obj); + zobj = Z_OBJ_P(obj); + ce = zobj->ce; clone = ce->clone; - clone_call = Z_OBJ_HT_P(obj)->clone_obj; + clone_call = zobj->handlers->clone_obj; if (UNEXPECTED(clone_call == NULL)) { zend_throw_error(NULL, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name)); @@ -3064,7 +3066,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_ } } - ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj)); + ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(zobj)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -3248,20 +3250,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER( ZEND_VM_NEXT_OPCODE(); } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) { - if (!Z_OBJCE_P(array_ptr)->get_iterator) { + zend_object *zobj = Z_OBJ_P(array_ptr); + if (!zobj->ce->get_iterator) { + HashTable *properties; + result = EX_VAR(opline->result.var); - ZVAL_COPY_VALUE(result, array_ptr); + ZVAL_OBJ(result, zobj); if (IS_CONST != IS_TMP_VAR) { - Z_ADDREF_P(array_ptr); + GC_ADDREF(zobj); } - if (Z_OBJ_P(array_ptr)->properties - && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) { - if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) { - GC_DELREF(Z_OBJ_P(array_ptr)->properties); + properties = zobj->properties; + if (properties) { + if (UNEXPECTED(GC_REFCOUNT(properties) > 1)) { + if (EXPECTED(!(GC_FLAGS(properties) & IS_ARRAY_IMMUTABLE))) { + GC_DELREF(properties); + } + properties = zobj->properties = zend_array_dup(properties); } - Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties); + } else { + properties = zobj->handlers->get_properties(zobj); } - Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(Z_OBJPROP_P(array_ptr), 0); + Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(properties, 0); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { @@ -4795,9 +4804,11 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_ /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -4816,17 +4827,17 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_ Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -4834,11 +4845,18 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_ } } } - } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -4889,9 +4907,11 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -4910,17 +4930,17 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -4928,9 +4948,15 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -5944,6 +5970,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PRO zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = RT_CONSTANT(opline, opline->op1); @@ -5968,9 +5995,19 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PRO } } + if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: @@ -7245,9 +7282,11 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_ /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -7266,17 +7305,17 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_ Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -7284,11 +7323,18 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_ } } } - } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -7339,9 +7385,11 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -7360,17 +7408,17 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -7378,9 +7426,15 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -8071,6 +8125,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PRO zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = RT_CONSTANT(opline, opline->op1); @@ -8095,9 +8150,19 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PRO } } + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: zval_ptr_dtor_nogc(free_op2); @@ -10059,18 +10124,20 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CONST_ count = zend_array_count(Z_ARRVAL_P(op1)); break; } else if (Z_TYPE_P(op1) == IS_OBJECT) { + zend_object *zobj = Z_OBJ_P(op1); + /* first, we check if the handler is defined */ - if (Z_OBJ_HT_P(op1)->count_elements) { - if (SUCCESS == Z_OBJ_HT_P(op1)->count_elements(op1, &count)) { + if (zobj->handlers->count_elements) { + if (SUCCESS == zobj->handlers->count_elements(zobj, &count)) { break; } } /* if not and the object implements Countable we call its count() method */ - if (instanceof_function(Z_OBJCE_P(op1), zend_ce_countable)) { + if (instanceof_function(zobj->ce, zend_ce_countable)) { zval retval; - zend_call_method_with_0_params(op1, NULL, NULL, "count", &retval); + zend_call_method_with_0_params(zobj, NULL, NULL, "count", &retval); count = zval_get_long(&retval); zval_ptr_dtor(&retval); break; @@ -10706,9 +10773,11 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_ /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -10727,17 +10796,17 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_ Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -10745,11 +10814,18 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_ } } } - } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -10800,9 +10876,11 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -10821,17 +10899,17 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -10839,9 +10917,15 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -11531,6 +11615,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PRO zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = RT_CONSTANT(opline, opline->op1); @@ -11555,9 +11640,19 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PRO } } + if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: @@ -13313,6 +13408,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_TMPVAR_HANDLER(ZEND USE_OPLINE zend_free_op free_op1; zval *obj; + zend_object *zobj; zend_class_entry *ce, *scope; zend_function *clone; zend_object_clone_obj_t clone_call; @@ -13346,9 +13442,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_TMPVAR_HANDLER(ZEND } } while (0); - ce = Z_OBJCE_P(obj); + zobj = Z_OBJ_P(obj); + ce = zobj->ce; clone = ce->clone; - clone_call = Z_OBJ_HT_P(obj)->clone_obj; + clone_call = zobj->handlers->clone_obj; if (UNEXPECTED(clone_call == NULL)) { zend_throw_error(NULL, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name)); zval_ptr_dtor_nogc(free_op1); @@ -13369,7 +13466,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_TMPVAR_HANDLER(ZEND } } - ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj)); + ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(zobj)); zval_ptr_dtor_nogc(free_op1); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); @@ -14450,9 +14547,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMPVAR_CONST_ /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -14471,17 +14570,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMPVAR_CONST_ Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -14489,11 +14588,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMPVAR_CONST_ } } } - } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -14544,9 +14650,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CONST /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -14565,17 +14673,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CONST Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -14583,9 +14691,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CONST } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -15242,6 +15356,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TM zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -15266,9 +15381,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TM } } + if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: @@ -16202,9 +16327,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMPVAR_TMPVAR /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -16223,17 +16350,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMPVAR_TMPVAR Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -16241,11 +16368,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMPVAR_TMPVAR } } } - } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -16296,9 +16430,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVA /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -16317,17 +16453,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVA Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -16335,9 +16471,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_TMPVA } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -16741,6 +16883,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TM zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -16765,9 +16908,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TM } } + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: zval_ptr_dtor_nogc(free_op2); @@ -18331,9 +18484,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMPVAR_CV_HAN /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -18352,17 +18507,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMPVAR_CV_HAN Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -18370,11 +18525,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_TMPVAR_CV_HAN } } } - } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -18425,9 +18587,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CV_HA /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -18446,17 +18610,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CV_HA Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -18464,9 +18628,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_TMPVAR_CV_HA } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -18870,6 +19040,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TM zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -18894,9 +19065,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_TM } } + if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: @@ -19338,20 +19519,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZE ZEND_VM_NEXT_OPCODE(); } else if (IS_TMP_VAR != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) { - if (!Z_OBJCE_P(array_ptr)->get_iterator) { + zend_object *zobj = Z_OBJ_P(array_ptr); + if (!zobj->ce->get_iterator) { + HashTable *properties; + result = EX_VAR(opline->result.var); - ZVAL_COPY_VALUE(result, array_ptr); + ZVAL_OBJ(result, zobj); if (IS_TMP_VAR != IS_TMP_VAR) { - Z_ADDREF_P(array_ptr); + GC_ADDREF(zobj); } - if (Z_OBJ_P(array_ptr)->properties - && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) { - if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) { - GC_DELREF(Z_OBJ_P(array_ptr)->properties); + properties = zobj->properties; + if (properties) { + if (UNEXPECTED(GC_REFCOUNT(properties) > 1)) { + if (EXPECTED(!(GC_FLAGS(properties) & IS_ARRAY_IMMUTABLE))) { + GC_DELREF(properties); + } + properties = zobj->properties = zend_array_dup(properties); } - Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties); + } else { + properties = zobj->handlers->get_properties(zobj); } - Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(Z_OBJPROP_P(array_ptr), 0); + Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(properties, 0); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { @@ -21424,18 +21612,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_TMP_UNUSED_HANDLER( count = zend_array_count(Z_ARRVAL_P(op1)); break; } else if (Z_TYPE_P(op1) == IS_OBJECT) { + zend_object *zobj = Z_OBJ_P(op1); + /* first, we check if the handler is defined */ - if (Z_OBJ_HT_P(op1)->count_elements) { - if (SUCCESS == Z_OBJ_HT_P(op1)->count_elements(op1, &count)) { + if (zobj->handlers->count_elements) { + if (SUCCESS == zobj->handlers->count_elements(zobj, &count)) { break; } } /* if not and the object implements Countable we call its count() method */ - if (instanceof_function(Z_OBJCE_P(op1), zend_ce_countable)) { + if (instanceof_function(zobj->ce, zend_ce_countable)) { zval retval; - zend_call_method_with_0_params(op1, NULL, NULL, "count", &retval); + zend_call_method_with_0_params(zobj, NULL, NULL, "count", &retval); count = zval_get_long(&retval); zval_ptr_dtor(&retval); break; @@ -22836,20 +23026,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZE zval_ptr_dtor_nogc(free_op1); ZEND_VM_NEXT_OPCODE(); } else if (IS_VAR != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) { - if (!Z_OBJCE_P(array_ptr)->get_iterator) { + zend_object *zobj = Z_OBJ_P(array_ptr); + if (!zobj->ce->get_iterator) { + HashTable *properties; + result = EX_VAR(opline->result.var); - ZVAL_COPY_VALUE(result, array_ptr); + ZVAL_OBJ(result, zobj); if (IS_VAR != IS_TMP_VAR) { - Z_ADDREF_P(array_ptr); + GC_ADDREF(zobj); } - if (Z_OBJ_P(array_ptr)->properties - && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) { - if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) { - GC_DELREF(Z_OBJ_P(array_ptr)->properties); + properties = zobj->properties; + if (properties) { + if (UNEXPECTED(GC_REFCOUNT(properties) > 1)) { + if (EXPECTED(!(GC_FLAGS(properties) & IS_ARRAY_IMMUTABLE))) { + GC_DELREF(properties); + } + properties = zobj->properties = zend_array_dup(properties); } - Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties); + } else { + properties = zobj->handlers->get_properties(zobj); } - Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(Z_OBJPROP_P(array_ptr), 0); + Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(properties, 0); zval_ptr_dtor_nogc(free_op1); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); @@ -23583,6 +23780,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -23609,8 +23808,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP assign_op_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CONST == IS_CONST) ? CACHE_ADDR((opline+1)->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -23647,7 +23852,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP } } } else { - zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + zend_assign_op_overloaded_property(zobj, name, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -24227,6 +24435,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -24251,8 +24461,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE pre_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -24266,7 +24482,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zend_pre_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_pre_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_pre_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -24293,6 +24512,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -24317,8 +24538,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP post_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { ZVAL_NULL(EX_VAR(opline->result.var)); } else { @@ -24331,7 +24558,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zend_post_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_post_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_post_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -24527,6 +24757,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D USE_OPLINE zend_free_op free_op1; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -24551,8 +24783,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -24642,7 +24875,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -24660,6 +24903,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D USE_OPLINE zend_free_op free_op1, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -24684,8 +24929,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -24775,7 +25021,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -24793,6 +25049,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D USE_OPLINE zend_free_op free_op1, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -24817,8 +25075,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -24908,7 +25167,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -24926,6 +25195,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D USE_OPLINE zend_free_op free_op1; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -24950,8 +25221,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -25041,7 +25313,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -26153,7 +26435,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDL if (IS_CONST == IS_CONST && Z_EXTRA_P(offset) == ZEND_EXTRA_VALUE) { offset++; } - Z_OBJ_HT_P(container)->unset_dimension(container, offset); + Z_OBJ_HT_P(container)->unset_dimension(Z_OBJ_P(container), offset); } else if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) { zend_throw_error(NULL, "Cannot unset string offsets"); } @@ -26169,6 +26451,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDL zend_free_op free_op1; zval *container; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -26188,7 +26471,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDL break; } } - Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + Z_OBJ_HT_P(container)->unset_property(Z_OBJ_P(container), name, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } } while (0); if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);}; @@ -26383,6 +26674,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -26409,8 +26702,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP assign_op_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR((opline+1)->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -26447,7 +26746,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP } } } else { - zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + zend_assign_op_overloaded_property(zobj, name, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + } + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -27029,6 +27331,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -27053,8 +27357,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE pre_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -27068,7 +27378,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zend_pre_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_pre_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_pre_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -27096,6 +27409,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -27120,8 +27435,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP post_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { ZVAL_NULL(EX_VAR(opline->result.var)); } else { @@ -27134,7 +27455,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zend_post_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_post_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_post_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -27332,6 +27656,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ USE_OPLINE zend_free_op free_op1, free_op2; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -27356,8 +27682,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -27447,7 +27774,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -27465,6 +27802,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ USE_OPLINE zend_free_op free_op1, free_op2, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -27489,8 +27828,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -27580,7 +27920,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -27598,6 +27948,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ USE_OPLINE zend_free_op free_op1, free_op2, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -27622,8 +27974,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -27713,7 +28066,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -27731,6 +28094,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ USE_OPLINE zend_free_op free_op1, free_op2; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -27755,8 +28120,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -27846,7 +28212,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMPVAR_OP_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -28831,7 +29207,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMPVAR_HAND if ((IS_TMP_VAR|IS_VAR) == IS_CONST && Z_EXTRA_P(offset) == ZEND_EXTRA_VALUE) { offset++; } - Z_OBJ_HT_P(container)->unset_dimension(container, offset); + Z_OBJ_HT_P(container)->unset_dimension(Z_OBJ_P(container), offset); } else if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) { zend_throw_error(NULL, "Cannot unset string offsets"); } @@ -28848,6 +29224,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HAND zend_free_op free_op1, free_op2; zval *container; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -28867,7 +29244,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMPVAR_HAND break; } } - Z_OBJ_HT_P(container)->unset_property(container, offset, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + Z_OBJ_HT_P(container)->unset_property(Z_OBJ_P(container), name, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } } while (0); zval_ptr_dtor_nogc(free_op2); @@ -30811,18 +31196,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_VAR_UNUSED_HANDLER( count = zend_array_count(Z_ARRVAL_P(op1)); break; } else if (Z_TYPE_P(op1) == IS_OBJECT) { + zend_object *zobj = Z_OBJ_P(op1); + /* first, we check if the handler is defined */ - if (Z_OBJ_HT_P(op1)->count_elements) { - if (SUCCESS == Z_OBJ_HT_P(op1)->count_elements(op1, &count)) { + if (zobj->handlers->count_elements) { + if (SUCCESS == zobj->handlers->count_elements(zobj, &count)) { break; } } /* if not and the object implements Countable we call its count() method */ - if (instanceof_function(Z_OBJCE_P(op1), zend_ce_countable)) { + if (instanceof_function(zobj->ce, zend_ce_countable)) { zval retval; - zend_call_method_with_0_params(op1, NULL, NULL, "count", &retval); + zend_call_method_with_0_params(zobj, NULL, NULL, "count", &retval); count = zval_get_long(&retval); zval_ptr_dtor(&retval); break; @@ -30903,6 +31290,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -30929,8 +31318,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP assign_op_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CV == IS_CONST) ? CACHE_ADDR((opline+1)->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -30967,7 +31362,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP } } } else { - zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + zend_assign_op_overloaded_property(zobj, name, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -31405,6 +31803,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -31429,8 +31829,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE pre_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -31444,7 +31850,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zend_pre_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_pre_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_pre_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -31471,6 +31880,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -31495,8 +31906,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP post_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { ZVAL_NULL(EX_VAR(opline->result.var)); } else { @@ -31509,7 +31926,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zend_post_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_post_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_post_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -31705,6 +32125,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA USE_OPLINE zend_free_op free_op1; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -31729,8 +32151,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -31820,7 +32243,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -31838,6 +32271,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA USE_OPLINE zend_free_op free_op1, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -31862,8 +32297,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -31953,7 +32389,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -31971,6 +32417,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA USE_OPLINE zend_free_op free_op1, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -31995,8 +32443,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -32086,7 +32535,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -32104,6 +32563,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA USE_OPLINE zend_free_op free_op1; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -32128,8 +32589,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -32219,7 +32681,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_OP_DATA ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -33299,7 +33771,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER( if (IS_CV == IS_CONST && Z_EXTRA_P(offset) == ZEND_EXTRA_VALUE) { offset++; } - Z_OBJ_HT_P(container)->unset_dimension(container, offset); + Z_OBJ_HT_P(container)->unset_dimension(Z_OBJ_P(container), offset); } else if (IS_VAR != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) { zend_throw_error(NULL, "Cannot unset string offsets"); } @@ -33315,6 +33787,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER( zend_free_op free_op1; zval *container; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_ptr_var(opline->op1.var, &free_op1 EXECUTE_DATA_CC); @@ -33334,7 +33807,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER( break; } } - Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + Z_OBJ_HT_P(container)->unset_property(Z_OBJ_P(container), name, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } } while (0); if (UNEXPECTED(free_op1)) {zval_ptr_dtor_nogc(free_op1);}; @@ -33626,6 +34107,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND USE_OPLINE zval *obj; + zend_object *zobj; zend_class_entry *ce, *scope; zend_function *clone; zend_object_clone_obj_t clone_call; @@ -33659,9 +34141,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND } } while (0); - ce = Z_OBJCE_P(obj); + zobj = Z_OBJ_P(obj); + ce = zobj->ce; clone = ce->clone; - clone_call = Z_OBJ_HT_P(obj)->clone_obj; + clone_call = zobj->handlers->clone_obj; if (UNEXPECTED(clone_call == NULL)) { zend_throw_error(NULL, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name)); @@ -33682,7 +34165,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND } } - ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj)); + ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(zobj)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -33771,6 +34254,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -33797,8 +34282,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP assign_op_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CONST == IS_CONST) ? CACHE_ADDR((opline+1)->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -33835,7 +34326,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP } } } else { - zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + zend_assign_op_overloaded_property(zobj, name, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -33949,6 +34443,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -33973,8 +34469,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE pre_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -33988,7 +34490,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zend_pre_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_pre_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_pre_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -34015,6 +34520,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -34039,8 +34546,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP post_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { ZVAL_NULL(EX_VAR(opline->result.var)); } else { @@ -34053,7 +34566,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zend_post_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_post_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_post_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -34113,9 +34629,11 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_U /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -34134,17 +34652,17 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_U Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -34152,11 +34670,18 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_U } } } - } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -34255,9 +34780,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CONST /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -34276,17 +34803,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CONST Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -34294,9 +34821,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CONST } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -34351,6 +34884,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O USE_OPLINE zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -34375,8 +34910,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -34466,7 +35002,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -34484,6 +35030,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O USE_OPLINE zend_free_op free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -34508,8 +35056,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -34599,7 +35148,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -34617,6 +35176,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O USE_OPLINE zend_free_op free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -34641,8 +35202,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -34732,7 +35294,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -34750,6 +35322,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O USE_OPLINE zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -34774,8 +35348,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -34865,7 +35440,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_O ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -35490,6 +36075,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HA zval *container; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = &EX(This); @@ -35509,7 +36095,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HA break; } } - Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + Z_OBJ_HT_P(container)->unset_property(Z_OBJ_P(container), name, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } } while (0); @@ -35523,6 +36117,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UN zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = &EX(This); @@ -35547,9 +36142,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UN } } + if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: @@ -35706,6 +36311,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -35732,8 +36339,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP assign_op_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR((opline+1)->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -35770,7 +36383,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP } } } else { - zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + zend_assign_op_overloaded_property(zobj, name, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + } + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -35884,6 +36500,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -35908,8 +36526,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE pre_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -35923,7 +36547,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zend_pre_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_pre_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_pre_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -35951,6 +36578,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -35975,8 +36604,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP post_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { ZVAL_NULL(EX_VAR(opline->result.var)); } else { @@ -35989,7 +36624,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zend_post_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_post_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_post_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -36050,9 +36688,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -36071,17 +36711,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -36089,11 +36729,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMPVAR } } } - } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -36192,9 +36839,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMPVA /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -36213,17 +36862,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMPVA Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -36231,9 +36880,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMPVA } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -36288,6 +36943,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ USE_OPLINE zend_free_op free_op2; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -36312,8 +36969,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -36403,7 +37061,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -36421,6 +37089,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ USE_OPLINE zend_free_op free_op2, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -36445,8 +37115,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -36536,7 +37207,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -36554,6 +37235,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ USE_OPLINE zend_free_op free_op2, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -36578,8 +37261,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -36669,7 +37353,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -36687,6 +37381,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ USE_OPLINE zend_free_op free_op2; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -36711,8 +37407,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -36802,7 +37499,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMPVAR_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -37341,6 +38048,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_TMPVAR_H zend_free_op free_op2; zval *container; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = &EX(This); @@ -37360,7 +38068,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_TMPVAR_H break; } } - Z_OBJ_HT_P(container)->unset_property(container, offset, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + Z_OBJ_HT_P(container)->unset_property(Z_OBJ_P(container), name, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } } while (0); zval_ptr_dtor_nogc(free_op2); @@ -37375,6 +38091,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UN zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = &EX(This); @@ -37399,9 +38116,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UN } } + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: zval_ptr_dtor_nogc(free_op2); @@ -38290,6 +39017,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -38316,8 +39045,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP assign_op_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CV == IS_CONST) ? CACHE_ADDR((opline+1)->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -38354,7 +39089,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP } } } else { - zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + zend_assign_op_overloaded_property(zobj, name, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -38468,6 +39206,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -38492,8 +39232,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE pre_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -38507,7 +39253,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zend_pre_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_pre_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_pre_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -38534,6 +39283,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -38558,8 +39309,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP post_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { ZVAL_NULL(EX_VAR(opline->result.var)); } else { @@ -38572,7 +39329,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zend_post_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_post_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_post_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -38632,9 +39392,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HAN /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -38653,17 +39415,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HAN Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -38671,11 +39433,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HAN } } } - } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -38774,9 +39543,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CV_HA /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -38795,17 +39566,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CV_HA Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -38813,9 +39584,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CV_HA } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -38870,6 +39647,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D USE_OPLINE zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -38894,8 +39673,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -38985,7 +39765,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -39003,6 +39793,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D USE_OPLINE zend_free_op free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -39027,8 +39819,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -39118,7 +39911,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -39136,6 +39939,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D USE_OPLINE zend_free_op free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -39160,8 +39965,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -39251,7 +40057,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -39269,6 +40085,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D USE_OPLINE zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = &EX(This); @@ -39293,8 +40111,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -39384,7 +40203,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -39922,6 +40751,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDL zval *container; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = &EX(This); @@ -39941,7 +40771,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDL break; } } - Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + Z_OBJ_HT_P(container)->unset_property(Z_OBJ_P(container), name, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } } while (0); @@ -39955,6 +40793,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UN zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = &EX(This); @@ -39979,9 +40818,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UN } } + if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: @@ -41070,6 +41919,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPC USE_OPLINE zval *obj; + zend_object *zobj; zend_class_entry *ce, *scope; zend_function *clone; zend_object_clone_obj_t clone_call; @@ -41103,9 +41953,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPC } } while (0); - ce = Z_OBJCE_P(obj); + zobj = Z_OBJ_P(obj); + ce = zobj->ce; clone = ce->clone; - clone_call = Z_OBJ_HT_P(obj)->clone_obj; + clone_call = zobj->handlers->clone_obj; if (UNEXPECTED(clone_call == NULL)) { zend_throw_error(NULL, "Trying to clone an uncloneable object of class %s", ZSTR_VAL(ce->name)); @@ -41126,7 +41977,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPC } } - ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj)); + ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(zobj)); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } @@ -41310,20 +42161,27 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEN ZEND_VM_NEXT_OPCODE(); } else if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) { - if (!Z_OBJCE_P(array_ptr)->get_iterator) { + zend_object *zobj = Z_OBJ_P(array_ptr); + if (!zobj->ce->get_iterator) { + HashTable *properties; + result = EX_VAR(opline->result.var); - ZVAL_COPY_VALUE(result, array_ptr); + ZVAL_OBJ(result, zobj); if (IS_CV != IS_TMP_VAR) { - Z_ADDREF_P(array_ptr); + GC_ADDREF(zobj); } - if (Z_OBJ_P(array_ptr)->properties - && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) { - if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) { - GC_DELREF(Z_OBJ_P(array_ptr)->properties); + properties = zobj->properties; + if (properties) { + if (UNEXPECTED(GC_REFCOUNT(properties) > 1)) { + if (EXPECTED(!(GC_FLAGS(properties) & IS_ARRAY_IMMUTABLE))) { + GC_DELREF(properties); + } + properties = zobj->properties = zend_array_dup(properties); } - Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties); + } else { + properties = zobj->handlers->get_properties(zobj); } - Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(Z_OBJPROP_P(array_ptr), 0); + Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(properties, 0); ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } else { @@ -42519,6 +43377,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC); @@ -42545,8 +43405,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP assign_op_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CONST == IS_CONST) ? CACHE_ADDR((opline+1)->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -42583,7 +43449,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP } } } else { - zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + zend_assign_op_overloaded_property(zobj, name, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -43163,6 +44032,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC); @@ -43187,8 +44058,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE pre_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -43202,7 +44079,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zend_pre_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_pre_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_pre_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -43229,6 +44109,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC); @@ -43253,8 +44135,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP post_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { ZVAL_NULL(EX_VAR(opline->result.var)); } else { @@ -43267,7 +44155,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zend_post_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_post_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_post_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -43557,9 +44448,11 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_C /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -43578,17 +44471,17 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_C Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -43596,11 +44489,18 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_C } } } - } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -43699,9 +44599,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CONST_HAN /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -43720,17 +44622,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CONST_HAN Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -43738,9 +44640,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CONST_HAN } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -43795,6 +44703,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA USE_OPLINE zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -43819,8 +44729,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -43910,7 +44821,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -43928,6 +44849,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA USE_OPLINE zend_free_op free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -43952,8 +44875,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -44043,7 +44967,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -44061,6 +44995,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA USE_OPLINE zend_free_op free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -44085,8 +45021,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -44176,7 +45113,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -44194,6 +45141,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA USE_OPLINE zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -44218,8 +45167,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA } assign_object: + zobj = Z_OBJ_P(object); if (IS_CONST == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -44309,7 +45259,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DA ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -45696,7 +46656,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLE if (IS_CONST == IS_CONST && Z_EXTRA_P(offset) == ZEND_EXTRA_VALUE) { offset++; } - Z_OBJ_HT_P(container)->unset_dimension(container, offset); + Z_OBJ_HT_P(container)->unset_dimension(Z_OBJ_P(container), offset); } else if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) { zend_throw_error(NULL, "Cannot unset string offsets"); } @@ -45712,6 +46672,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLE zval *container; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_cv_BP_VAR_UNSET(opline->op1.var EXECUTE_DATA_CC); @@ -45731,7 +46692,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLE break; } } - Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + Z_OBJ_HT_P(container)->unset_property(Z_OBJ_P(container), name, ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } } while (0); @@ -45839,6 +46808,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_cv_BP_VAR_IS(opline->op1.var EXECUTE_DATA_CC); @@ -45863,9 +46833,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV } } + if (IS_CONST == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), ((IS_CONST == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if (IS_CONST != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: @@ -46977,6 +47957,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC); @@ -47003,8 +47985,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP assign_op_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR((opline+1)->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -47041,7 +48029,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP } } } else { - zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + zend_assign_op_overloaded_property(zobj, name, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + } + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -47623,6 +48614,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC); @@ -47647,8 +48640,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE pre_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -47662,7 +48661,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zend_pre_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_pre_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_pre_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -47690,6 +48692,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC); @@ -47714,8 +48718,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP post_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { ZVAL_NULL(EX_VAR(opline->result.var)); } else { @@ -47728,7 +48738,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zend_post_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_post_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_post_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -47905,9 +48918,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HAN /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -47926,17 +48941,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HAN Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -47944,11 +48959,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_TMPVAR_HAN } } } - } else if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -48047,9 +49069,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_TMPVAR_HA /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -48068,17 +49092,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_TMPVAR_HA Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -48086,9 +49110,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_TMPVAR_HA } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -48143,6 +49173,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D USE_OPLINE zend_free_op free_op2; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -48167,8 +49199,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -48258,7 +49291,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -48276,6 +49319,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D USE_OPLINE zend_free_op free_op2, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -48300,8 +49345,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -48391,7 +49437,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -48409,6 +49465,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D USE_OPLINE zend_free_op free_op2, free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -48433,8 +49491,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -48524,7 +49583,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -48542,6 +49611,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D USE_OPLINE zend_free_op free_op2; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -48566,8 +49637,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D } assign_object: + zobj = Z_OBJ_P(object); if ((IS_TMP_VAR|IS_VAR) == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -48657,7 +49729,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMPVAR_OP_D ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, ((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -49757,7 +50839,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMPVAR_HANDL if ((IS_TMP_VAR|IS_VAR) == IS_CONST && Z_EXTRA_P(offset) == ZEND_EXTRA_VALUE) { offset++; } - Z_OBJ_HT_P(container)->unset_dimension(container, offset); + Z_OBJ_HT_P(container)->unset_dimension(Z_OBJ_P(container), offset); } else if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) { zend_throw_error(NULL, "Cannot unset string offsets"); } @@ -49774,6 +50856,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_TMPVAR_HANDL zend_free_op free_op2; zval *container; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_cv_BP_VAR_UNSET(opline->op1.var EXECUTE_DATA_CC); @@ -49793,7 +50876,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_TMPVAR_HANDL break; } } - Z_OBJ_HT_P(container)->unset_property(container, offset, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + Z_OBJ_HT_P(container)->unset_property(Z_OBJ_P(container), name, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } } while (0); zval_ptr_dtor_nogc(free_op2); @@ -49880,6 +50971,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_cv_BP_VAR_IS(opline->op1.var EXECUTE_DATA_CC); @@ -49904,9 +50996,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV } } + if ((IS_TMP_VAR|IS_VAR) == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if ((IS_TMP_VAR|IS_VAR) != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: zval_ptr_dtor_nogc(free_op2); @@ -52828,18 +53930,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CV_UNUSED_HANDLER(Z count = zend_array_count(Z_ARRVAL_P(op1)); break; } else if (Z_TYPE_P(op1) == IS_OBJECT) { + zend_object *zobj = Z_OBJ_P(op1); + /* first, we check if the handler is defined */ - if (Z_OBJ_HT_P(op1)->count_elements) { - if (SUCCESS == Z_OBJ_HT_P(op1)->count_elements(op1, &count)) { + if (zobj->handlers->count_elements) { + if (SUCCESS == zobj->handlers->count_elements(zobj, &count)) { break; } } /* if not and the object implements Countable we call its count() method */ - if (instanceof_function(Z_OBJCE_P(op1), zend_ce_countable)) { + if (instanceof_function(zobj->ce, zend_ce_countable)) { zval retval; - zend_call_method_with_0_params(op1, NULL, NULL, "count", &retval); + zend_call_method_with_0_params(zobj, NULL, NULL, "count", &retval); count = zval_get_long(&retval); zval_ptr_dtor(&retval); break; @@ -53599,6 +54703,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC); @@ -53625,8 +54731,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP assign_op_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CV == IS_CONST) ? CACHE_ADDR((opline+1)->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -53663,7 +54775,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP } } } else { - zend_assign_op_overloaded_property(object, property, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + zend_assign_op_overloaded_property(zobj, name, cache_slot, value, binary_op OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -54101,6 +55216,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC); @@ -54125,8 +55242,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE pre_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); @@ -54140,7 +55263,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE zend_pre_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_pre_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_pre_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -54167,6 +55293,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zval *zptr; void **cache_slot; zend_property_info *prop_info; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = _get_zval_ptr_cv_BP_VAR_RW(opline->op1.var EXECUTE_DATA_CC); @@ -54191,8 +55319,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP post_incdec_object: /* here we are sure we are dealing with an object */ + zobj = Z_OBJ_P(object); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } cache_slot = (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL; - if (EXPECTED((zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, cache_slot)) != NULL)) { + if (EXPECTED((zptr = zobj->handlers->get_property_ptr_ptr(zobj, name, BP_VAR_RW, cache_slot)) != NULL)) { if (UNEXPECTED(Z_ISERROR_P(zptr))) { ZVAL_NULL(EX_VAR(opline->result.var)); } else { @@ -54205,7 +55339,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP zend_post_incdec_property_zval(zptr, prop_info, inc OPLINE_CC EXECUTE_DATA_CC); } } else { - zend_post_incdec_overloaded_property(object, property, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + zend_post_incdec_overloaded_property(zobj, name, cache_slot, inc OPLINE_CC EXECUTE_DATA_CC); + } + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); } } while (0); @@ -54381,9 +55518,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF /* FUNC_ARG fetch may contain it */); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -54402,17 +55541,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_r_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -54420,11 +55559,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER } } } - } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { - ZVAL_UNDEFINED_OP2(); + } else { + if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(offset) == IS_UNDEF)) { + ZVAL_UNDEFINED_OP2(); + } + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_R, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_r_copy: @@ -54523,9 +55669,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CV_HANDLE /* here we are sure we are dealing with an object */ do { zend_object *zobj = Z_OBJ_P(container); + zend_string *name, *tmp_name; zval *retval; if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); cache_slot = CACHE_ADDR(opline->extended_value); if (EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) { @@ -54544,17 +55692,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CV_HANDLE Bucket *p = (Bucket*)((char*)zobj->properties->arData + idx); if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) && - (EXPECTED(p->key == Z_STR_P(offset)) || - (EXPECTED(p->h == ZSTR_H(Z_STR_P(offset))) && + (EXPECTED(p->key == name) || + (EXPECTED(p->h == ZSTR_H(name)) && EXPECTED(p->key != NULL) && - EXPECTED(zend_string_equal_content(p->key, Z_STR_P(offset)))))) { + EXPECTED(zend_string_equal_content(p->key, name))))) { retval = &p->val; goto fetch_obj_is_copy; } } CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_DYNAMIC_PROPERTY_OFFSET); } - retval = zend_hash_find_ex(zobj->properties, Z_STR_P(offset), 1); + retval = zend_hash_find_ex(zobj->properties, name, 1); if (EXPECTED(retval)) { uintptr_t idx = (char*)retval - (char*)zobj->properties->arData; CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx)); @@ -54562,9 +55710,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CV_HANDLE } } } + } else { + name = zval_get_tmp_string(offset, &tmp_name); } - retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + retval = zobj->handlers->read_property(zobj, name, BP_VAR_IS, cache_slot, EX_VAR(opline->result.var)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (retval != EX_VAR(opline->result.var)) { fetch_obj_is_copy: @@ -54619,6 +55773,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ USE_OPLINE zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -54643,8 +55799,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -54734,7 +55891,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -54752,6 +55919,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ USE_OPLINE zend_free_op free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -54776,8 +55945,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -54867,7 +56037,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -54885,6 +56065,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ USE_OPLINE zend_free_op free_op_data; zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -54909,8 +56091,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -55000,7 +56183,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -55018,6 +56211,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ USE_OPLINE zval *object, *property, *value, tmp; + zend_object *zobj; + zend_string *name, *tmp_name; SAVE_OPLINE(); object = EX_VAR(opline->op1.var); @@ -55042,8 +56237,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ } assign_object: + zobj = Z_OBJ_P(object); if (IS_CV == IS_CONST && - EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(opline->extended_value))) { + EXPECTED(zobj->ce == CACHED_PTR(opline->extended_value))) { void **cache_slot = CACHE_ADDR(opline->extended_value); uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1); zend_object *zobj = Z_OBJ_P(object); @@ -55133,7 +56329,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_OP_DATA_ ZVAL_DEREF(value); } - property = Z_OBJ_HT_P(object)->write_property(object, property, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + if (IS_CV == IS_CONST) { + name = Z_STR_P(property); + } else { + name = zval_get_tmp_string(property, &tmp_name); + } + + property = zobj->handlers->write_property(zobj, name, value, (IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_COPY(EX_VAR(opline->result.var), property); @@ -56328,7 +57534,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(Z if (IS_CV == IS_CONST && Z_EXTRA_P(offset) == ZEND_EXTRA_VALUE) { offset++; } - Z_OBJ_HT_P(container)->unset_dimension(container, offset); + Z_OBJ_HT_P(container)->unset_dimension(Z_OBJ_P(container), offset); } else if (IS_CV != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) { zend_throw_error(NULL, "Cannot unset string offsets"); } @@ -56344,6 +57550,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(Z zval *container; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_cv_BP_VAR_UNSET(opline->op1.var EXECUTE_DATA_CC); @@ -56363,7 +57570,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(Z break; } } - Z_OBJ_HT_P(container)->unset_property(container, offset, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + Z_OBJ_HT_P(container)->unset_property(Z_OBJ_P(container), name, ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value) : NULL)); + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } } while (0); @@ -56449,6 +57664,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV zval *container; int result; zval *offset; + zend_string *name, *tmp_name; SAVE_OPLINE(); container = _get_zval_ptr_cv_BP_VAR_IS(opline->op1.var EXECUTE_DATA_CC); @@ -56473,9 +57689,19 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV } } + if (IS_CV == IS_CONST) { + name = Z_STR_P(offset); + } else { + name = zval_get_tmp_string(offset, &tmp_name); + } + result = (opline->extended_value & ZEND_ISEMPTY) ^ - Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY), ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + Z_OBJ_HT_P(container)->has_property(Z_OBJ_P(container), name, (opline->extended_value & ZEND_ISEMPTY), ((IS_CV == IS_CONST) ? CACHE_ADDR(opline->extended_value & ~ZEND_ISEMPTY) : NULL)); + + if (IS_CV != IS_CONST) { + zend_tmp_string_release(tmp_name); + } isset_object_finish: diff --git a/configure.ac b/configure.ac index 1ed2839b0b01a..55b4f37302ef0 100644 --- a/configure.ac +++ b/configure.ac @@ -1550,7 +1550,7 @@ AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ]) $php_shtool mkdir -p scripts $php_shtool mkdir -p scripts/man1 -ALL_OUTPUT_FILES="php7.spec main/build-defs.h \ +ALL_OUTPUT_FILES="php.spec main/build-defs.h \ scripts/phpize scripts/man1/phpize.1 \ scripts/php-config scripts/man1/php-config.1 \ $PHP_OUTPUT_FILES" @@ -1696,7 +1696,3 @@ Check '[$]0 --help' for available options fi ]) AC_OUTPUT - -dnl ## Local Variables: -dnl ## tab-width: 4 -dnl ## End: diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index 1c5d41ecb6e3f..33be8465c2d84 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -560,12 +560,3 @@ PHP_FUNCTION(bcscale) #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 9b790669bedc7..cf1029f4d0825 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -671,12 +671,3 @@ static void php_bz2_error(INTERNAL_FUNCTION_PARAMETERS, int opt) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c index 7488ceab6dee3..e7d7c3334f92b 100644 --- a/ext/bz2/bz2_filter.c +++ b/ext/bz2/bz2_filter.c @@ -401,12 +401,3 @@ const php_stream_filter_factory php_bz2_filter_factory = { php_bz2_filter_create }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/bz2/php_bz2.h b/ext/bz2/php_bz2.h index f8367cf0f26ba..9523f32e141f4 100644 --- a/ext/bz2/php_bz2.h +++ b/ext/bz2/php_bz2.h @@ -65,11 +65,3 @@ extern const php_stream_ops php_stream_bz2io_ops; #define PHP_BZ2_FILTER_DEFAULT_WORKFACTOR 0 #endif - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c index 0f5769b44232c..e24ac56a25aa1 100644 --- a/ext/calendar/cal_unix.c +++ b/ext/calendar/cal_unix.c @@ -66,12 +66,3 @@ PHP_FUNCTION(jdtounix) RETURN_LONG(uday * 24 * 3600); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index 666097bbee118..721311316f67d 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -750,12 +750,3 @@ PHP_FUNCTION(jdmonthname) RETURN_STRING(monthname); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/calendar/dow.c b/ext/calendar/dow.c index 2e47bb352d416..38da7e157c279 100644 --- a/ext/calendar/dow.c +++ b/ext/calendar/dow.c @@ -64,12 +64,3 @@ const char * const DayNameLong[7] = "Friday", "Saturday" }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/calendar/easter.c b/ext/calendar/easter.c index c33fdda2daa33..2b9a2562e1d48 100644 --- a/ext/calendar/easter.c +++ b/ext/calendar/easter.c @@ -132,10 +132,3 @@ PHP_FUNCTION(easter_days) _cal_easter(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/calendar/french.c b/ext/calendar/french.c index 3d52efec8abc1..0707e27ed8d19 100644 --- a/ext/calendar/french.c +++ b/ext/calendar/french.c @@ -148,13 +148,3 @@ const char * const FrenchMonthName[14] = "Fructidor", "Extra" }; - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/calendar/jewish.c b/ext/calendar/jewish.c index 399fcf9100209..11318bd5bc619 100644 --- a/ext/calendar/jewish.c +++ b/ext/calendar/jewish.c @@ -793,12 +793,3 @@ zend_long JewishToSdn( } return (sdn + JEWISH_SDN_OFFSET); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/calendar/julian.c b/ext/calendar/julian.c index 6ab0854c3be77..ac580aa08e061 100644 --- a/ext/calendar/julian.c +++ b/ext/calendar/julian.c @@ -252,12 +252,3 @@ zend_long JulianToSdn( + inputDay - JULIAN_SDN_OFFSET); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 995fe035ece4c..936896966f342 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -847,14 +847,3 @@ PHP_FUNCTION(com_load_typelib) } } /* }}} */ - - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c index 812b497340bb9..e4545ec94891e 100644 --- a/ext/com_dotnet/com_extension.c +++ b/ext/com_dotnet/com_extension.c @@ -472,12 +472,3 @@ PHP_MINFO_FUNCTION(com_dotnet) DISPLAY_INI_ENTRIES(); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index cd377184304b3..6e5cc8c4d8bb4 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -27,7 +27,7 @@ #include "php_com_dotnet_internal.h" #include "Zend/zend_exceptions.h" -static zval *com_property_read(zval *object, zval *member, int type, void **cahce_slot, zval *rv) +static zval *com_property_read(zend_object *object, zend_string *member, int type, void **cahce_slot, zval *rv) { php_com_dotnet_object *obj; VARIANT v; @@ -35,21 +35,22 @@ static zval *com_property_read(zval *object, zval *member, int type, void **cahc ZVAL_NULL(rv); - obj = CDNO_FETCH(object); + obj = (php_com_dotnet_object*) object; if (V_VT(&obj->v) == VT_DISPATCH) { VariantInit(&v); - convert_to_string_ex(member); - - res = php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), + res = php_com_do_invoke(obj, ZSTR_VAL(member), ZSTR_LEN(member), DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, 0, NULL, 1); if (res == SUCCESS) { php_com_zval_from_variant(rv, &v, obj->code_page); VariantClear(&v); } else if (res == DISP_E_BADPARAMCOUNT) { - php_com_saproxy_create(object, rv, member); + zval zv; + + ZVAL_STR(&zv, member); + php_com_saproxy_create(object, rv, &zv); } } else { php_com_throw_exception(E_INVALIDARG, "this variant has no properties"); @@ -58,18 +59,17 @@ static zval *com_property_read(zval *object, zval *member, int type, void **cahc return rv; } -static zval *com_property_write(zval *object, zval *member, zval *value, void **cache_slot) +static zval *com_property_write(zend_object *object, zend_string *member, zval *value, void **cache_slot) { php_com_dotnet_object *obj; VARIANT v; - obj = CDNO_FETCH(object); + obj = (php_com_dotnet_object*) object; if (V_VT(&obj->v) == VT_DISPATCH) { VariantInit(&v); - convert_to_string_ex(member); - if (SUCCESS == php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), + if (SUCCESS == php_com_do_invoke(obj, ZSTR_VAL(member), ZSTR_LEN(member), DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF, &v, 1, value, 0)) { VariantClear(&v); } @@ -79,14 +79,14 @@ static zval *com_property_write(zval *object, zval *member, zval *value, void ** return value; } -static zval *com_read_dimension(zval *object, zval *offset, int type, zval *rv) +static zval *com_read_dimension(zend_object *object, zval *offset, int type, zval *rv) { php_com_dotnet_object *obj; VARIANT v; ZVAL_NULL(rv); - obj = CDNO_FETCH(object); + obj = (php_com_dotnet_object*) object; if (V_VT(&obj->v) == VT_DISPATCH) { VariantInit(&v); @@ -115,14 +115,14 @@ static zval *com_read_dimension(zval *object, zval *offset, int type, zval *rv) return rv; } -static void com_write_dimension(zval *object, zval *offset, zval *value) +static void com_write_dimension(zend_object *object, zval *offset, zval *value) { php_com_dotnet_object *obj; zval args[2]; VARIANT v; HRESULT res; - obj = CDNO_FETCH(object); + obj = (php_com_dotnet_object*) object; if (V_VT(&obj->v) == VT_DISPATCH) { ZVAL_COPY_VALUE(&args[0], offset); @@ -187,16 +187,15 @@ static zval *com_object_get(zval *property) } #endif -static int com_property_exists(zval *object, zval *member, int check_empty, void **cache_slot) +static int com_property_exists(zend_object *object, zend_string *member, int check_empty, void **cache_slot) { DISPID dispid; php_com_dotnet_object *obj; - obj = CDNO_FETCH(object); + obj = (php_com_dotnet_object*) object; if (V_VT(&obj->v) == VT_DISPATCH) { - convert_to_string_ex(member); - if (SUCCEEDED(php_com_get_id_of_name(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), &dispid))) { + if (SUCCEEDED(php_com_get_id_of_name(obj, ZSTR_VAL(member), ZSTR_LEN(member), &dispid))) { /* TODO: distinguish between property and method! */ return 1; } @@ -207,23 +206,23 @@ static int com_property_exists(zval *object, zval *member, int check_empty, void return 0; } -static int com_dimension_exists(zval *object, zval *member, int check_empty) +static int com_dimension_exists(zend_object *object, zval *member, int check_empty) { php_error_docref(NULL, E_WARNING, "Operation not yet supported on a COM object"); return 0; } -static void com_property_delete(zval *object, zval *member, void **cache_slot) +static void com_property_delete(zend_object *object, zend_string *member, void **cache_slot) { php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object"); } -static void com_dimension_delete(zval *object, zval *offset) +static void com_dimension_delete(zend_object *object, zval *offset) { php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object"); } -static HashTable *com_properties_get(zval *object) +static HashTable *com_properties_get(zend_object *object) { /* TODO: use type-info to get all the names and values ? * DANGER: if we do that, there is a strong possibility for @@ -461,14 +460,14 @@ static int com_objects_compare(zval *object1, zval *object2) return ret; } -static int com_object_cast(zval *readobj, zval *writeobj, int type) +static int com_object_cast(zend_object *readobj, zval *writeobj, int type) { php_com_dotnet_object *obj; VARIANT v; VARTYPE vt = VT_EMPTY; HRESULT res = S_OK; - obj = CDNO_FETCH(readobj); + obj = (php_com_dotnet_object*) readobj; ZVAL_NULL(writeobj); VariantInit(&v); @@ -518,12 +517,12 @@ static int com_object_cast(zval *readobj, zval *writeobj, int type) return zend_std_cast_object_tostring(readobj, writeobj, type); } -static int com_object_count(zval *object, zend_long *count) +static int com_object_count(zend_object *object, zend_long *count) { php_com_dotnet_object *obj; LONG ubound = 0, lbound = 0; - obj = CDNO_FETCH(object); + obj = (php_com_dotnet_object*) object; if (!V_ISARRAY(&obj->v)) { return FAILURE; @@ -617,11 +616,11 @@ void php_com_object_free_storage(zend_object *object) } } -zend_object* php_com_object_clone(zval *object) +zend_object* php_com_object_clone(zend_object *object) { php_com_dotnet_object *cloneobj, *origobject; - origobject = (php_com_dotnet_object*)Z_OBJ_P(object); + origobject = (php_com_dotnet_object*) object; cloneobj = (php_com_dotnet_object*)emalloc(sizeof(php_com_dotnet_object)); memcpy(cloneobj, origobject, sizeof(*cloneobj)); diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c index 57538d2faa9ee..e78503be3c924 100644 --- a/ext/com_dotnet/com_persist.c +++ b/ext/com_dotnet/com_persist.c @@ -709,9 +709,9 @@ static void helper_free_storage(zend_object *obj) } -static zend_object* helper_clone(zval *obj) +static zend_object* helper_clone(zend_object *obj) { - php_com_persist_helper *clone, *object = (php_com_persist_helper*)Z_OBJ_P(obj); + php_com_persist_helper *clone, *object = (php_com_persist_helper*) obj; clone = emalloc(sizeof(*object)); memcpy(clone, object, sizeof(*object)); @@ -764,12 +764,3 @@ int php_com_persist_minit(INIT_FUNC_ARGS) return SUCCESS; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c index 170f2018e2ce5..7ce57ce915dc4 100644 --- a/ext/com_dotnet/com_saproxy.c +++ b/ext/com_dotnet/com_saproxy.c @@ -37,7 +37,6 @@ typedef struct { zend_object std; /* the object we a proxying for; we hold a refcount to it */ - zval *zobj; php_com_dotnet_object *obj; /* how many dimensions we are indirecting to get into this element */ @@ -69,7 +68,7 @@ static inline void clone_indices(php_com_saproxy *dest, php_com_saproxy *src, in } } -static zval *saproxy_property_read(zval *object, zval *member, int type, void **cache_slot, zval *rv) +static zval *saproxy_property_read(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) { ZVAL_NULL(rv); @@ -78,14 +77,14 @@ static zval *saproxy_property_read(zval *object, zval *member, int type, void ** return rv; } -static void saproxy_property_write(zval *object, zval *member, zval *value, void **cache_slot) +static void saproxy_property_write(zend_object *object, zend_string *member, zval *value, void **cache_slot) { php_com_throw_exception(E_INVALIDARG, "safearray has no properties"); } -static zval *saproxy_read_dimension(zval *object, zval *offset, int type, zval *rv) +static zval *saproxy_read_dimension(zend_object *object, zval *offset, int type, zval *rv) { - php_com_saproxy *proxy = SA_FETCH(object); + php_com_saproxy *proxy = (php_com_saproxy*) object; UINT dims, i; SAFEARRAY *sa; LONG ubound, lbound; @@ -201,9 +200,9 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type, zval * return rv; } -static void saproxy_write_dimension(zval *object, zval *offset, zval *value) +static void saproxy_write_dimension(zend_object *object, zval *offset, zval *value) { - php_com_saproxy *proxy = SA_FETCH(object); + php_com_saproxy *proxy = (php_com_saproxy*) object; UINT dims, i; HRESULT res; VARIANT v; @@ -286,29 +285,29 @@ static zval *saproxy_object_get(zval *property) } #endif -static int saproxy_property_exists(zval *object, zval *member, int check_empty, void **cache_slot) +static int saproxy_property_exists(zend_object *object, zend_string *member, int check_empty, void **cache_slot) { /* no properties */ return 0; } -static int saproxy_dimension_exists(zval *object, zval *member, int check_empty) +static int saproxy_dimension_exists(zend_object *object, zval *member, int check_empty) { php_error_docref(NULL, E_WARNING, "Operation not yet supported on a COM object"); return 0; } -static void saproxy_property_delete(zval *object, zval *member, void **cache_slot) +static void saproxy_property_delete(zend_object *object, zend_string *member, void **cache_slot) { php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object"); } -static void saproxy_dimension_delete(zval *object, zval *offset) +static void saproxy_dimension_delete(zend_object *object, zval *offset) { php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object"); } -static HashTable *saproxy_properties_get(zval *object) +static HashTable *saproxy_properties_get(zend_object *object) { /* no properties */ return NULL; @@ -341,14 +340,14 @@ static int saproxy_objects_compare(zval *object1, zval *object2) return -1; } -static int saproxy_object_cast(zval *readobj, zval *writeobj, int type) +static int saproxy_object_cast(zend_object *readobj, zval *writeobj, int type) { return FAILURE; } -static int saproxy_count_elements(zval *object, zend_long *count) +static int saproxy_count_elements(zend_object *object, zend_long *count) { - php_com_saproxy *proxy = SA_FETCH(object); + php_com_saproxy *proxy = (php_com_saproxy*) object; LONG ubound, lbound; if (!V_ISARRAY(&proxy->obj->v)) { @@ -374,19 +373,19 @@ static void saproxy_free_storage(zend_object *object) //??? } //??? } - zval_ptr_dtor(proxy->zobj); + OBJ_RELEASE(&proxy->obj->zo); efree(proxy->indices); } -static zend_object* saproxy_clone(zval *object) +static zend_object* saproxy_clone(zend_object *object) { - php_com_saproxy *proxy = (php_com_saproxy *)Z_OBJ_P(object); + php_com_saproxy *proxy = (php_com_saproxy *) object; php_com_saproxy *cloneproxy; cloneproxy = emalloc(sizeof(*cloneproxy)); memcpy(cloneproxy, proxy, sizeof(*cloneproxy)); - Z_ADDREF_P(cloneproxy->zobj); + GC_ADDREF(&cloneproxy->obj->zo); cloneproxy->indices = safe_emalloc(cloneproxy->dimensions, sizeof(zval *), 0); clone_indices(cloneproxy, proxy, proxy->dimensions); @@ -419,24 +418,22 @@ zend_object_handlers php_com_saproxy_handlers = { saproxy_count_elements }; -int php_com_saproxy_create(zval *com_object, zval *proxy_out, zval *index) +int php_com_saproxy_create(zend_object *com_object, zval *proxy_out, zval *index) { php_com_saproxy *proxy, *rel = NULL; proxy = ecalloc(1, sizeof(*proxy)); proxy->dimensions = 1; - if (Z_OBJCE_P(com_object) == php_com_saproxy_class_entry) { - rel = SA_FETCH(com_object); + if (com_object->ce == php_com_saproxy_class_entry) { + rel = (php_com_saproxy*) com_object; proxy->obj = rel->obj; - proxy->zobj = rel->zobj; proxy->dimensions += rel->dimensions; } else { - proxy->obj = CDNO_FETCH(com_object); - proxy->zobj = com_object; + proxy->obj = (php_com_dotnet_object*) com_object; } - Z_ADDREF_P(proxy->zobj); + GC_ADDREF(&proxy->obj->zo); proxy->indices = safe_emalloc(proxy->dimensions, sizeof(zval *), 0); if (rel) { diff --git a/ext/com_dotnet/php_com_dotnet.h b/ext/com_dotnet/php_com_dotnet.h index fd81e3d6d53ef..50894158f5f92 100644 --- a/ext/com_dotnet/php_com_dotnet.h +++ b/ext/com_dotnet/php_com_dotnet.h @@ -55,12 +55,3 @@ extern ZEND_DECLARE_MODULE_GLOBALS(com_dotnet); #define COMG(v) ZEND_MODULE_GLOBALS_ACCESSOR(com_dotnet, v) #endif /* PHP_COM_DOTNET_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h index e41b7ffdd1e7b..611220b7295dc 100644 --- a/ext/com_dotnet/php_com_dotnet_internal.h +++ b/ext/com_dotnet/php_com_dotnet_internal.h @@ -75,14 +75,14 @@ zend_class_entry *php_com_variant_class_entry, *php_com_exception_class_entry, * /* com_handlers.c */ zend_object* php_com_object_new(zend_class_entry *ce); -zend_object* php_com_object_clone(zval *object); +zend_object* php_com_object_clone(zend_object *object); void php_com_object_free_storage(zend_object *object); zend_object_handlers php_com_object_handlers; void php_com_object_enable_event_sink(php_com_dotnet_object *obj, int enable); /* com_saproxy.c */ zend_object_iterator *php_com_saproxy_iter_get(zend_class_entry *ce, zval *object, int by_ref); -int php_com_saproxy_create(zval *com_object, zval *proxy_out, zval *index); +int php_com_saproxy_create(zend_object *com_object, zval *proxy_out, zval *index); /* com_olechar.c */ PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring, diff --git a/ext/com_dotnet/tests/27974.phpt b/ext/com_dotnet/tests/27974.phpt index bdce5cbb749ca..960a630304112 100644 --- a/ext/com_dotnet/tests/27974.phpt +++ b/ext/com_dotnet/tests/27974.phpt @@ -1,7 +1,7 @@ --TEST-- COM: mapping a safearray --SKIPIF-- - --FILE-- --FILE-- --FILE-- diff --git a/ext/com_dotnet/tests/bug73679.phpt b/ext/com_dotnet/tests/bug73679.phpt index b5b884553fade..b21f9db10ddf4 100644 --- a/ext/com_dotnet/tests/bug73679.phpt +++ b/ext/com_dotnet/tests/bug73679.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #73679 DOTNET read access violation using invalid codepage --SKIPIF-- - --FILE-- --FILE-- diff --git a/ext/com_dotnet/tests/variants_x64.phpt b/ext/com_dotnet/tests/variants_x64.phpt index 8816fc6a2b1b9..e9e7c23b97655 100644 --- a/ext/com_dotnet/tests/variants_x64.phpt +++ b/ext/com_dotnet/tests/variants_x64.phpt @@ -1,7 +1,7 @@ --TEST-- COM: General variant tests --SKIPIF-- - ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing curl_version() function: with unexpected inputs for 'age' argument *** --- Iteration 1 -- -bool(true) --- Iteration 2 -- -bool(true) --- Iteration 3 -- -bool(true) --- Iteration 4 -- -bool(true) --- Iteration 5 -- -bool(true) --- Iteration 6 -- -bool(true) --- Iteration 7 -- -bool(true) --- Iteration 8 -- -bool(true) --- Iteration 9 -- -bool(true) --- Iteration 10 -- - -Warning: curl_version() expects parameter 1 to be int, array given in %s on line %d -bool(false) --- Iteration 11 -- - -Warning: curl_version() expects parameter 1 to be int, array given in %s on line %d -bool(false) --- Iteration 12 -- - -Warning: curl_version() expects parameter 1 to be int, array given in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: curl_version() expects parameter 1 to be int, string given in %s on line %d -bool(false) --- Iteration 14 -- - -Warning: curl_version() expects parameter 1 to be int, string given in %s on line %d -bool(false) --- Iteration 15 -- - -Notice: A non well formed numeric value encountered in %s on line %d -bool(true) --- Iteration 16 -- -bool(true) --- Iteration 17 -- -bool(true) --- Iteration 18 -- -bool(true) --- Iteration 19 -- -bool(true) --- Iteration 20 -- -bool(true) --- Iteration 21 -- -bool(true) --- Iteration 22 -- - -Warning: curl_version() expects parameter 1 to be int, object given in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: curl_version() expects parameter 1 to be int, resource given in %s on line %d -bool(false) --- Iteration 24 -- -bool(true) --- Iteration 25 -- -bool(true) -===Done=== diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 2249adb12d42c..0c1ad6da70a06 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -642,28 +642,28 @@ static zend_object *date_object_new_timezone(zend_class_entry *class_type); static zend_object *date_object_new_interval(zend_class_entry *class_type); static zend_object *date_object_new_period(zend_class_entry *class_type); -static zend_object *date_object_clone_date(zval *this_ptr); -static zend_object *date_object_clone_timezone(zval *this_ptr); -static zend_object *date_object_clone_interval(zval *this_ptr); -static zend_object *date_object_clone_period(zval *this_ptr); +static zend_object *date_object_clone_date(zend_object *this_ptr); +static zend_object *date_object_clone_timezone(zend_object *this_ptr); +static zend_object *date_object_clone_interval(zend_object *this_ptr); +static zend_object *date_object_clone_period(zend_object *this_ptr); static int date_object_compare_date(zval *d1, zval *d2); -static HashTable *date_object_get_gc(zval *object, zval **table, int *n); -static HashTable *date_object_get_properties_for(zval *object, zend_prop_purpose purpose); -static HashTable *date_object_get_gc_interval(zval *object, zval **table, int *n); -static HashTable *date_object_get_properties_interval(zval *object); -static HashTable *date_object_get_gc_period(zval *object, zval **table, int *n); -static HashTable *date_object_get_properties_period(zval *object); -static HashTable *date_object_get_properties_for_timezone(zval *object, zend_prop_purpose purpose); -static HashTable *date_object_get_gc_timezone(zval *object, zval **table, int *n); -static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp); +static HashTable *date_object_get_gc(zend_object *object, zval **table, int *n); +static HashTable *date_object_get_properties_for(zend_object *object, zend_prop_purpose purpose); +static HashTable *date_object_get_gc_interval(zend_object *object, zval **table, int *n); +static HashTable *date_object_get_properties_interval(zend_object *object); +static HashTable *date_object_get_gc_period(zend_object *object, zval **table, int *n); +static HashTable *date_object_get_properties_period(zend_object *object); +static HashTable *date_object_get_properties_for_timezone(zend_object *object, zend_prop_purpose purpose); +static HashTable *date_object_get_gc_timezone(zend_object *object, zval **table, int *n); +static HashTable *date_object_get_debug_info_timezone(zend_object *object, int *is_temp); static void php_timezone_to_string(php_timezone_obj *tzobj, zval *zv); -zval *date_interval_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv); -zval *date_interval_write_property(zval *object, zval *member, zval *value, void **cache_slot); -static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot); -static zval *date_period_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv); -static zval *date_period_write_property(zval *object, zval *member, zval *value, void **cache_slot); +zval *date_interval_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv); +zval *date_interval_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot); +static zval *date_interval_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot); +static zval *date_period_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv); +static zval *date_period_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot); /* {{{ Module struct */ zend_module_entry date_module_entry = { @@ -2022,31 +2022,21 @@ static int implement_date_interface_handler(zend_class_entry *interface, zend_cl return SUCCESS; } /* }}} */ -static int date_interval_has_property(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ +static int date_interval_has_property(zend_object *object, zend_string *name, int type, void **cache_slot) /* {{{ */ { php_interval_obj *obj; - zval tmp_member; zval rv; zval *prop; int retval = 0; - if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - cache_slot = NULL; - } - - obj = Z_PHPINTERVAL_P(object); + obj = php_interval_obj_from_obj(object); if (!obj->initialized) { - retval = zend_std_has_property(object, member, type, cache_slot); - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); - } + retval = zend_std_has_property(object, name, type, cache_slot); return retval; } - prop = date_interval_read_property(object, member, BP_VAR_IS, cache_slot, &rv); + prop = date_interval_read_property(object, name, BP_VAR_IS, cache_slot, &rv); if (prop != &EG(uninitialized_zval)) { if (type == 2) { @@ -2057,11 +2047,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void retval = (Z_TYPE_P(prop) != IS_NULL); } } else { - retval = zend_std_has_property(object, member, type, cache_slot); - } - - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); + retval = zend_std_has_property(object, name, type, cache_slot); } return retval; @@ -2191,9 +2177,9 @@ static zend_object *date_object_new_date(zend_class_entry *class_type) /* {{{ */ return &intern->std; } /* }}} */ -static zend_object *date_object_clone_date(zval *this_ptr) /* {{{ */ +static zend_object *date_object_clone_date(zend_object *this_ptr) /* {{{ */ { - php_date_obj *old_obj = Z_PHPDATE_P(this_ptr); + php_date_obj *old_obj = php_date_obj_from_obj(this_ptr); php_date_obj *new_obj = php_date_obj_from_obj(date_object_new_date(old_obj->std.ce)); zend_objects_clone_members(&new_obj->std, &old_obj->std); @@ -2216,7 +2202,7 @@ static zend_object *date_object_clone_date(zval *this_ptr) /* {{{ */ static void date_clone_immutable(zval *object, zval *new_object) /* {{{ */ { - ZVAL_OBJ(new_object, date_object_clone_date(object)); + ZVAL_OBJ(new_object, date_object_clone_date(Z_OBJ_P(object))); } /* }}} */ static int date_object_compare_date(zval *d1, zval *d2) /* {{{ */ @@ -2238,21 +2224,21 @@ static int date_object_compare_date(zval *d1, zval *d2) /* {{{ */ return timelib_time_compare(o1->time, o2->time); } /* }}} */ -static HashTable *date_object_get_gc(zval *object, zval **table, int *n) /* {{{ */ +static HashTable *date_object_get_gc(zend_object *object, zval **table, int *n) /* {{{ */ { *table = NULL; *n = 0; return zend_std_get_properties(object); } /* }}} */ -static HashTable *date_object_get_gc_timezone(zval *object, zval **table, int *n) /* {{{ */ +static HashTable *date_object_get_gc_timezone(zend_object *object, zval **table, int *n) /* {{{ */ { *table = NULL; *n = 0; return zend_std_get_properties(object); } /* }}} */ -static HashTable *date_object_get_properties_for(zval *object, zend_prop_purpose purpose) /* {{{ */ +static HashTable *date_object_get_properties_for(zend_object *object, zend_prop_purpose purpose) /* {{{ */ { HashTable *props; zval zv; @@ -2268,7 +2254,7 @@ static HashTable *date_object_get_properties_for(zval *object, zend_prop_purpose return zend_std_get_properties_for(object, purpose); } - dateobj = Z_PHPDATE_P(object); + dateobj = php_date_obj_from_obj(object); props = zend_array_dup(zend_std_get_properties(object)); if (!dateobj->time) { return props; @@ -2320,9 +2306,9 @@ static zend_object *date_object_new_timezone(zend_class_entry *class_type) /* {{ return &intern->std; } /* }}} */ -static zend_object *date_object_clone_timezone(zval *this_ptr) /* {{{ */ +static zend_object *date_object_clone_timezone(zend_object *this_ptr) /* {{{ */ { - php_timezone_obj *old_obj = Z_PHPTIMEZONE_P(this_ptr); + php_timezone_obj *old_obj = php_timezone_obj_from_obj(this_ptr); php_timezone_obj *new_obj = php_timezone_obj_from_obj(date_object_new_timezone(old_obj->std.ce)); zend_objects_clone_members(&new_obj->std, &old_obj->std); @@ -2373,7 +2359,7 @@ static void php_timezone_to_string(php_timezone_obj *tzobj, zval *zv) } } -static HashTable *date_object_get_properties_for_timezone(zval *object, zend_prop_purpose purpose) /* {{{ */ +static HashTable *date_object_get_properties_for_timezone(zend_object *object, zend_prop_purpose purpose) /* {{{ */ { HashTable *props; zval zv; @@ -2389,7 +2375,7 @@ static HashTable *date_object_get_properties_for_timezone(zval *object, zend_pro return zend_std_get_properties_for(object, purpose); } - tzobj = Z_PHPTIMEZONE_P(object); + tzobj = php_timezone_obj_from_obj(object); props = zend_array_dup(zend_std_get_properties(object)); if (!tzobj->initialized) { return props; @@ -2404,13 +2390,13 @@ static HashTable *date_object_get_properties_for_timezone(zval *object, zend_pro return props; } /* }}} */ -static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp) /* {{{ */ +static HashTable *date_object_get_debug_info_timezone(zend_object *object, int *is_temp) /* {{{ */ { HashTable *ht, *props; zval zv; php_timezone_obj *tzobj; - tzobj = Z_PHPTIMEZONE_P(object); + tzobj = php_timezone_obj_from_obj(object); props = zend_std_get_properties(object); *is_temp = 1; @@ -2436,9 +2422,9 @@ static zend_object *date_object_new_interval(zend_class_entry *class_type) /* {{ return &intern->std; } /* }}} */ -static zend_object *date_object_clone_interval(zval *this_ptr) /* {{{ */ +static zend_object *date_object_clone_interval(zend_object *this_ptr) /* {{{ */ { - php_interval_obj *old_obj = Z_PHPINTERVAL_P(this_ptr); + php_interval_obj *old_obj = php_interval_obj_from_obj(this_ptr); php_interval_obj *new_obj = php_interval_obj_from_obj(date_object_new_interval(old_obj->std.ce)); zend_objects_clone_members(&new_obj->std, &old_obj->std); @@ -2450,7 +2436,7 @@ static zend_object *date_object_clone_interval(zval *this_ptr) /* {{{ */ return &new_obj->std; } /* }}} */ -static HashTable *date_object_get_gc_interval(zval *object, zval **table, int *n) /* {{{ */ +static HashTable *date_object_get_gc_interval(zend_object *object, zval **table, int *n) /* {{{ */ { *table = NULL; @@ -2458,13 +2444,13 @@ static HashTable *date_object_get_gc_interval(zval *object, zval **table, int *n return zend_std_get_properties(object); } /* }}} */ -static HashTable *date_object_get_properties_interval(zval *object) /* {{{ */ +static HashTable *date_object_get_properties_interval(zend_object *object) /* {{{ */ { HashTable *props; zval zv; php_interval_obj *intervalobj; - intervalobj = Z_PHPINTERVAL_P(object); + intervalobj = php_interval_obj_from_obj(object); props = zend_std_get_properties(object); if (!intervalobj->initialized) { return props; @@ -2512,9 +2498,9 @@ static zend_object *date_object_new_period(zend_class_entry *class_type) /* {{{ return &intern->std; } /* }}} */ -static zend_object *date_object_clone_period(zval *this_ptr) /* {{{ */ +static zend_object *date_object_clone_period(zend_object *this_ptr) /* {{{ */ { - php_period_obj *old_obj = Z_PHPPERIOD_P(this_ptr); + php_period_obj *old_obj = php_period_obj_from_obj(this_ptr); php_period_obj *new_obj = php_period_obj_from_obj(date_object_new_period(old_obj->std.ce)); zend_objects_clone_members(&new_obj->std, &old_obj->std); @@ -4137,34 +4123,24 @@ static int date_interval_initialize(timelib_rel_time **rt, /*const*/ char *forma } /* }}} */ /* {{{ date_interval_read_property */ -zval *date_interval_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) +zval *date_interval_read_property(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) { php_interval_obj *obj; zval *retval; - zval tmp_member; timelib_sll value = -1; double fvalue = -1; - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - cache_slot = NULL; - } - - obj = Z_PHPINTERVAL_P(object); + obj = php_interval_obj_from_obj(object); if (!obj->initialized) { - retval = zend_std_read_property(object, member, type, cache_slot, rv); - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); - } + retval = zend_std_read_property(object, name, type, cache_slot, rv); return retval; } #define GET_VALUE_FROM_STRUCT(n,m) \ - if (strcmp(Z_STRVAL_P(member), m) == 0) { \ - value = obj->diff->n; \ - break; \ + if (strcmp(ZSTR_VAL(name), m) == 0) { \ + value = obj->diff->n; \ + break; \ } do { GET_VALUE_FROM_STRUCT(y, "y"); @@ -4173,18 +4149,14 @@ zval *date_interval_read_property(zval *object, zval *member, int type, void **c GET_VALUE_FROM_STRUCT(h, "h"); GET_VALUE_FROM_STRUCT(i, "i"); GET_VALUE_FROM_STRUCT(s, "s"); - if (strcmp(Z_STRVAL_P(member), "f") == 0) { + if (strcmp(ZSTR_VAL(name), "f") == 0) { fvalue = obj->diff->us / 1000000.0; break; } GET_VALUE_FROM_STRUCT(invert, "invert"); GET_VALUE_FROM_STRUCT(days, "days"); /* didn't find any */ - retval = zend_std_read_property(object, member, type, cache_slot, rv); - - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); - } + retval = zend_std_read_property(object, name, type, cache_slot, rv); return retval; } while(0); @@ -4199,38 +4171,23 @@ zval *date_interval_read_property(zval *object, zval *member, int type, void **c ZVAL_FALSE(retval); } - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); - } - return retval; } /* }}} */ /* {{{ date_interval_write_property */ -zval *date_interval_write_property(zval *object, zval *member, zval *value, void **cache_slot) +zval *date_interval_write_property(zend_object *object, zend_string *name, zval *value, void **cache_slot) { php_interval_obj *obj; - zval tmp_member; - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - cache_slot = NULL; - } - - obj = Z_PHPINTERVAL_P(object); + obj = php_interval_obj_from_obj(object); if (!obj->initialized) { - value = zend_std_write_property(object, member, value, cache_slot); - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); - } - return value; + return zend_std_write_property(object, name, value, cache_slot); } -#define SET_VALUE_FROM_STRUCT(n,m) \ - if (strcmp(Z_STRVAL_P(member), m) == 0) { \ +#define SET_VALUE_FROM_STRUCT(n,m) \ + if (strcmp(ZSTR_VAL(name), m) == 0) { \ obj->diff->n = zval_get_long(value); \ break; \ } @@ -4242,51 +4199,37 @@ zval *date_interval_write_property(zval *object, zval *member, zval *value, void SET_VALUE_FROM_STRUCT(h, "h"); SET_VALUE_FROM_STRUCT(i, "i"); SET_VALUE_FROM_STRUCT(s, "s"); - if (strcmp(Z_STRVAL_P(member), "f") == 0) { + if (strcmp(ZSTR_VAL(name), "f") == 0) { obj->diff->us = zval_get_double(value) * 1000000; break; } SET_VALUE_FROM_STRUCT(invert, "invert"); /* didn't find any */ - value = zend_std_write_property(object, member, value, cache_slot); + value = zend_std_write_property(object, name, value, cache_slot); } while(0); - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); - } - return value; } /* }}} */ /* {{{ date_interval_get_property_ptr_ptr */ -static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) -{ - zval tmp_member, *ret; - - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - cache_slot = NULL; - } - - if(zend_binary_strcmp("y", sizeof("y") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 || - zend_binary_strcmp("m", sizeof("m") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 || - zend_binary_strcmp("d", sizeof("d") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 || - zend_binary_strcmp("h", sizeof("h") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 || - zend_binary_strcmp("i", sizeof("i") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 || - zend_binary_strcmp("s", sizeof("s") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 || - zend_binary_strcmp("f", sizeof("f") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 || - zend_binary_strcmp("days", sizeof("days") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 || - zend_binary_strcmp("invert", sizeof("invert") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) { +static zval *date_interval_get_property_ptr_ptr(zend_object *object, zend_string *name, int type, void **cache_slot) +{ + zval *ret; + + if(zend_binary_strcmp("y", sizeof("y") - 1, ZSTR_VAL(name), ZSTR_LEN(name)) == 0 || + zend_binary_strcmp("m", sizeof("m") - 1, ZSTR_VAL(name), ZSTR_LEN(name)) == 0 || + zend_binary_strcmp("d", sizeof("d") - 1, ZSTR_VAL(name), ZSTR_LEN(name)) == 0 || + zend_binary_strcmp("h", sizeof("h") - 1, ZSTR_VAL(name), ZSTR_LEN(name)) == 0 || + zend_binary_strcmp("i", sizeof("i") - 1, ZSTR_VAL(name), ZSTR_LEN(name)) == 0 || + zend_binary_strcmp("s", sizeof("s") - 1, ZSTR_VAL(name), ZSTR_LEN(name)) == 0 || + zend_binary_strcmp("f", sizeof("f") - 1, ZSTR_VAL(name), ZSTR_LEN(name)) == 0 || + zend_binary_strcmp("days", sizeof("days") - 1, ZSTR_VAL(name), ZSTR_LEN(name)) == 0 || + zend_binary_strcmp("invert", sizeof("invert") - 1, ZSTR_VAL(name), ZSTR_LEN(name)) == 0) { /* Fallback to read_property. */ ret = NULL; } else { - ret = zend_std_get_property_ptr_ptr(object, member, type, cache_slot); - } - - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); + ret = zend_std_get_property_ptr_ptr(object, name, type, cache_slot); } return ret; @@ -5082,20 +5025,20 @@ PHP_FUNCTION(date_sun_info) } /* }}} */ -static HashTable *date_object_get_gc_period(zval *object, zval **table, int *n) /* {{{ */ +static HashTable *date_object_get_gc_period(zend_object *object, zval **table, int *n) /* {{{ */ { *table = NULL; *n = 0; return zend_std_get_properties(object); } /* }}} */ -static HashTable *date_object_get_properties_period(zval *object) /* {{{ */ +static HashTable *date_object_get_properties_period(zend_object *object) /* {{{ */ { HashTable *props; zval zv; php_period_obj *period_obj; - period_obj = Z_PHPPERIOD_P(object); + period_obj = php_period_obj_from_obj(object); props = zend_std_get_properties(object); if (!period_obj->start) { return props; @@ -5273,7 +5216,7 @@ PHP_METHOD(DatePeriod, __wakeup) /* }}} */ /* {{{ date_period_read_property */ -static zval *date_period_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) +static zval *date_period_read_property(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) { zval *zv; if (type != BP_VAR_IS && type != BP_VAR_R) { @@ -5281,12 +5224,12 @@ static zval *date_period_read_property(zval *object, zval *member, int type, voi return &EG(uninitialized_zval); } - Z_OBJPROP_P(object); /* build properties hash table */ + object->handlers->get_properties(object); /* build properties hash table */ - zv = zend_std_read_property(object, member, type, cache_slot, rv); + zv = zend_std_read_property(object, name, type, cache_slot, rv); if (Z_TYPE_P(zv) == IS_OBJECT && Z_OBJ_HANDLER_P(zv, clone_obj)) { /* defensive copy */ - ZVAL_OBJ(zv, Z_OBJ_HANDLER_P(zv, clone_obj)(zv)); + ZVAL_OBJ(zv, Z_OBJ_HANDLER_P(zv, clone_obj)(Z_OBJ_P(zv))); } return zv; @@ -5294,18 +5237,9 @@ static zval *date_period_read_property(zval *object, zval *member, int type, voi /* }}} */ /* {{{ date_period_write_property */ -static zval *date_period_write_property(zval *object, zval *member, zval *value, void **cache_slot) +static zval *date_period_write_property(zend_object *object, zend_string *name, zval *value, void **cache_slot) { zend_throw_error(NULL, "Writing to DatePeriod properties is unsupported"); return value; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/date/tests/DateTimeZone_construct_variation1.phpt b/ext/date/tests/DateTimeZone_construct_variation1.phpt deleted file mode 100644 index abc85bf0b88a5..0000000000000 --- a/ext/date/tests/DateTimeZone_construct_variation1.phpt +++ /dev/null @@ -1,192 +0,0 @@ ---TEST-- -Test DateTime::__construct() function : usage variation - Passing unexpected values to first argument $timezone. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - - // float data - 'float 10.5' => 10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -foreach($inputs as $variation =>$timezone) { - echo "\n-- $variation --\n"; - try { - var_dump( new DateTimezone($timezone) ); - } catch (Throwable $e) { - $msg = $e->getMessage(); - echo "FAILED: " . $msg . "\n"; - } - -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECT-- -*** Testing DateTime::__construct() : usage variation - unexpected values to first argument $timezone*** - --- int 0 -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (0) - --- int 1 -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (1) - --- int 12345 -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (12345) - --- float 10.5 -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (10.5) - --- float .5 -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (0.5) - --- empty array -- -FAILED: DateTimeZone::__construct() expects parameter 1 to be string, array given - --- int indexed array -- -FAILED: DateTimeZone::__construct() expects parameter 1 to be string, array given - --- associative array -- -FAILED: DateTimeZone::__construct() expects parameter 1 to be string, array given - --- nested arrays -- -FAILED: DateTimeZone::__construct() expects parameter 1 to be string, array given - --- uppercase NULL -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone () - --- lowercase null -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone () - --- lowercase true -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (1) - --- lowercase false -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone () - --- uppercase TRUE -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (1) - --- uppercase FALSE -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone () - --- empty string DQ -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone () - --- empty string SQ -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone () - --- string DQ -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (string) - --- string SQ -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (string) - --- mixed case string -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (sTrInG) - --- heredoc -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (hello world) - --- instance of classWithToString -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone (Class A object) - --- instance of classWithoutToString -- -FAILED: DateTimeZone::__construct() expects parameter 1 to be string, object given - --- undefined var -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone () - --- unset var -- -FAILED: DateTimeZone::__construct(): Unknown or bad timezone () - --- resource -- -FAILED: DateTimeZone::__construct() expects parameter 1 to be string, resource given -===DONE=== diff --git a/ext/date/tests/DateTimeZone_getOffset_variation1.phpt b/ext/date/tests/DateTimeZone_getOffset_variation1.phpt deleted file mode 100644 index 3270566b5ae3f..0000000000000 --- a/ext/date/tests/DateTimeZone_getOffset_variation1.phpt +++ /dev/null @@ -1,252 +0,0 @@ ---TEST-- -Test DateTimeZone::getOffset() function : usage variation - Passing unexpected values to first argument $datetime. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$timezone = new DateTimezone("Europe/London"); - -foreach($inputs as $variation =>$datetime) { - echo "\n-- $variation --\n"; - var_dump( $timezone->getOffset($datetime) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTimeZone::getOffset() : usage variation - unexpected values to first argument $datetime*** - --- int 0 -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- resource -- - -Warning: DateTimeZone::getOffset() expects parameter 1 to be DateTimeInterface, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_construct_variation1.phpt b/ext/date/tests/DateTime_construct_variation1.phpt deleted file mode 100644 index 964d0ffc6936f..0000000000000 --- a/ext/date/tests/DateTime_construct_variation1.phpt +++ /dev/null @@ -1,377 +0,0 @@ ---TEST-- -Test new DateTime() function : usage variation - Passing unexpected values to first argument $time. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$timezone = new DateTimeZone("Europe/London"); - -foreach($inputs as $variation =>$time) { - echo "\n-- $variation --\n"; - - try { - var_dump( new DateTime($time) ); - } catch (Throwable $e) { - $msg = $e->getMessage(); - echo "FAILED: " . $msg . "\n"; - } - - try { - var_dump( new DateTime($time, $timezone) ); - } catch (Throwable $e) { - $msg = $e->getMessage(); - echo "FAILED: " . $msg . "\n"; - } -}; - -// closing the resource -fclose( $file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing new DateTime(): usage variation - unexpected values to first argument $time*** - --- int 0 -- -FAILED: DateTime::__construct(): Failed to parse time string (0) at position 0 (0): Unexpected character -FAILED: DateTime::__construct(): Failed to parse time string (0) at position 0 (0): Unexpected character - --- int 1 -- -FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character -FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character - --- int 12345 -- -FAILED: DateTime::__construct(): Failed to parse time string (12345) at position 4 (5): Unexpected character -FAILED: DateTime::__construct(): Failed to parse time string (12345) at position 4 (5): Unexpected character - --- int -12345 -- -FAILED: DateTime::__construct(): Failed to parse time string (-12345) at position 5 (5): Unexpected character -FAILED: DateTime::__construct(): Failed to parse time string (-12345) at position 5 (5): Unexpected character - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -FAILED: DateTime::__construct(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character -FAILED: DateTime::__construct(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- -FAILED: DateTime::__construct() expects parameter 1 to be string, array given -FAILED: DateTime::__construct() expects parameter 1 to be string, array given - --- int indexed array -- -FAILED: DateTime::__construct() expects parameter 1 to be string, array given -FAILED: DateTime::__construct() expects parameter 1 to be string, array given - --- associative array -- -FAILED: DateTime::__construct() expects parameter 1 to be string, array given -FAILED: DateTime::__construct() expects parameter 1 to be string, array given - --- nested arrays -- -FAILED: DateTime::__construct() expects parameter 1 to be string, array given -FAILED: DateTime::__construct() expects parameter 1 to be string, array given - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character -FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character -FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string SQ -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- string DQ -- -FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database -FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database - --- string SQ -- -FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database -FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database - --- mixed case string -- -FAILED: DateTime::__construct(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database -FAILED: DateTime::__construct(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database - --- heredoc -- -FAILED: DateTime::__construct(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database -FAILED: DateTime::__construct(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database - --- instance of classWithToString -- -FAILED: DateTime::__construct(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database -FAILED: DateTime::__construct(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database - --- instance of classWithoutToString -- -FAILED: DateTime::__construct() expects parameter 1 to be string, object given -FAILED: DateTime::__construct() expects parameter 1 to be string, object given - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- -FAILED: DateTime::__construct() expects parameter 1 to be string, resource given -FAILED: DateTime::__construct() expects parameter 1 to be string, resource given -===DONE=== diff --git a/ext/date/tests/DateTime_construct_variation2.phpt b/ext/date/tests/DateTime_construct_variation2.phpt deleted file mode 100644 index 2e39f32715b02..0000000000000 --- a/ext/date/tests/DateTime_construct_variation2.phpt +++ /dev/null @@ -1,231 +0,0 @@ ---TEST-- -Test new DateTime() function : usage variation - Passing unexpected values to second argument $timezone. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$time = "2005-07-14 22:30:41"; - -foreach($inputs as $variation =>$timezone) { - echo "\n-- $variation --\n"; - - try { - var_dump( new DateTime($time, $timezone) ); - } catch (Throwable $e) { - $msg = $e->getMessage(); - echo "FAILED: " . $msg . "\n"; - } - -}; - -// closing the resource -fclose( $file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing new DateTime() : usage variation - unexpected values to second argument $timezone*** - --- int 0 -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, int given - --- int 1 -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, int given - --- int 12345 -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, int given - --- int -12345 -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, int given - --- float 10.5 -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, float given - --- float -10.5 -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, float given - --- float .5 -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, float given - --- empty array -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array given - --- int indexed array -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array given - --- associative array -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array given - --- nested arrays -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array given - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2005-07-14 22:30:41.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2005-07-14 22:30:41.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, bool given - --- lowercase false -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, bool given - --- uppercase TRUE -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, bool given - --- uppercase FALSE -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, bool given - --- empty string DQ -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given - --- empty string SQ -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given - --- string DQ -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given - --- string SQ -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given - --- mixed case string -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given - --- heredoc -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, string given - --- instance of classWithToString -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, object given - --- instance of classWithoutToString -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, object given - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2005-07-14 22:30:41.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2005-07-14 22:30:41.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- -FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, resource given -===DONE=== diff --git a/ext/date/tests/DateTime_format_variation1.phpt b/ext/date/tests/DateTime_format_variation1.phpt deleted file mode 100644 index 68bbd56caa790..0000000000000 --- a/ext/date/tests/DateTime_format_variation1.phpt +++ /dev/null @@ -1,208 +0,0 @@ ---TEST-- -Test DateTime::format() function : usage variation - Passing unexpected values to first argument $format. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTime("2005-07-14 22:30:41"); - -foreach($inputs as $variation =>$format) { - echo "\n-- $variation --\n"; - var_dump( $object->format($format) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::format() : usage variation - unexpected values to first argument $format*** - --- int 0 -- -string(1) "0" - --- int 1 -- -string(1) "1" - --- int 12345 -- -string(5) "12345" - --- int -12345 -- -string(6) "-12345" - --- float 10.5 -- -string(4) "10.5" - --- float -10.5 -- -string(5) "-10.5" - --- float .5 -- -string(3) "0.5" - --- empty array -- - -Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::format() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- uppercase NULL -- -string(0) "" - --- lowercase null -- -string(0) "" - --- lowercase true -- -string(1) "1" - --- lowercase false -- -string(0) "" - --- uppercase TRUE -- -string(1) "1" - --- uppercase FALSE -- -string(0) "" - --- empty string DQ -- -string(0) "" - --- empty string SQ -- -string(0) "" - --- string DQ -- -string(40) "4131Thu, 14 Jul 2005 22:30:41 +010030710" - --- string SQ -- -string(40) "4131Thu, 14 Jul 2005 22:30:41 +010030710" - --- mixed case string -- -string(40) "41BSTThu, 14 Jul 2005 22:30:41 +01001722" - --- heredoc -- -string(82) "10Europe/LondonThursdayThursday2005 42005Thu, 14 Jul 2005 22:30:41 +0100Thursday14" - --- instance of classWithToString -- -string(66) "CThursdaypm4141 PM 2005b14Europe/London2005-07-14T22:30:41+01:0031" - --- instance of classWithoutToString -- - -Warning: DateTime::format() expects parameter 1 to be string, object given in %s on line %d -bool(false) - --- undefined var -- -string(0) "" - --- unset var -- -string(0) "" - --- resource -- - -Warning: DateTime::format() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_modify_variation1.phpt b/ext/date/tests/DateTime_modify_variation1.phpt deleted file mode 100644 index d442243ead05d..0000000000000 --- a/ext/date/tests/DateTime_modify_variation1.phpt +++ /dev/null @@ -1,262 +0,0 @@ ---TEST-- -Test DateTime::modify() function : usage variation - Passing unexpected values to first argument $modify. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTime("2009-01-31 14:28:41"); - -foreach($inputs as $variation =>$format) { - echo "\n-- $variation --\n"; - var_dump( $object->modify($format) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::modify() : usage variation - unexpected values to first argument $modify*** - --- int 0 -- - -Warning: DateTime::modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- int 1 -- - -Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- int 12345 -- - -Warning: DateTime::modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- int -12345 -- - -Warning: DateTime::modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- float 10.5 -- -object(DateTime)#3 (3) { - ["date"]=> - string(26) "2009-01-31 10:05:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- - -Warning: DateTime::modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- float .5 -- -object(DateTime)#3 (3) { - ["date"]=> - string(26) "2009-01-31 00:05:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: DateTime::modify() expects parameter 1 to be string, array given in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- int indexed array -- - -Warning: DateTime::modify() expects parameter 1 to be string, array given in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- associative array -- - -Warning: DateTime::modify() expects parameter 1 to be string, array given in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- nested arrays -- - -Warning: DateTime::modify() expects parameter 1 to be string, array given in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- uppercase NULL -- - -Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- lowercase null -- - -Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- lowercase true -- - -Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- lowercase false -- - -Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- uppercase TRUE -- - -Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- uppercase FALSE -- - -Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- empty string DQ -- - -Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- empty string SQ -- - -Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- string DQ -- - -Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- string SQ -- - -Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- mixed case string -- - -Warning: DateTime::modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- heredoc -- - -Warning: DateTime::modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::modify() expects parameter 1 to be string, object given in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- undefined var -- - -Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- unset var -- - -Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in %sDateTime_modify_variation1.php on line 99 -bool(false) - --- resource -- - -Warning: DateTime::modify() expects parameter 1 to be string, resource given in %sDateTime_modify_variation1.php on line 99 -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_setDate_variation1.phpt b/ext/date/tests/DateTime_setDate_variation1.phpt deleted file mode 100644 index a25bdee54fe0a..0000000000000 --- a/ext/date/tests/DateTime_setDate_variation1.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test DateTime::setDate() function : usage variation - Passing unexpected values to first argument $year. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTime("2009-02-27 08:34:10"); -$day = 2; -$month = 7; - -foreach($inputs as $variation =>$year) { - echo "\n-- $variation --\n"; - var_dump( $object->setDate($year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::setDate() : usage variation - unexpected values to first argument $year*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(27) "12345-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(28) "-12345-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0010-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(27) "-0010-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: DateTime::setDate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::setDate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::setDate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::setDate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTime::setDate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::setDate() expects parameter 1 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::setDate() expects parameter 1 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: DateTime::setDate() expects parameter 1 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_setDate_variation2.phpt b/ext/date/tests/DateTime_setDate_variation2.phpt deleted file mode 100644 index b3fbf46f4ff98..0000000000000 --- a/ext/date/tests/DateTime_setDate_variation2.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test DateTime::setDate() function : usage variation - Passing unexpected values to second argument $month. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTime("2009-02-27 08:34:10"); -$day = 2; -$year = 1963; - -foreach($inputs as $variation =>$month) { - echo "\n-- $variation --\n"; - var_dump( $object->setDate($year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::setDate() : usage variation - unexpected values to second argument $month*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2991-09-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0934-03-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-10-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-02-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: DateTime::setDate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::setDate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::setDate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::setDate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTime::setDate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::setDate() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::setDate() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: DateTime::setDate() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_setDate_variation3.phpt b/ext/date/tests/DateTime_setDate_variation3.phpt deleted file mode 100644 index b1f7aab961752..0000000000000 --- a/ext/date/tests/DateTime_setDate_variation3.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test DateTime::setDate() function : usage variation - Passing unexpected values to third argument $day. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTime("2009-02-27 08:34:10"); -$month = 7; -$year = 1963; - -foreach($inputs as $variation =>$day) { - echo "\n-- $variation --\n"; - var_dump( $object->setDate($year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::setDate() : usage variation - unexpected values to third argument $day*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-07-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1997-04-17 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1929-09-11 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-07-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-20 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: DateTime::setDate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::setDate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::setDate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::setDate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-07-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-07-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTime::setDate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::setDate() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::setDate() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: DateTime::setDate() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_setISODate_variation1.phpt b/ext/date/tests/DateTime_setISODate_variation1.phpt deleted file mode 100644 index 4d2a32b1f7af2..0000000000000 --- a/ext/date/tests/DateTime_setISODate_variation1.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test DateTime::setISODate() function : usage variation - Passing unexpected values to first argument $year. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTime("2009-02-27 08:34:10"); -$day = 2; -$month = 7; - -foreach($inputs as $variation =>$year) { - echo "\n-- $variation --\n"; - var_dump( $object->setISODate($year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::setISODate() : usage variation - unexpected values to first argument $year*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-02-13 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(27) "12345-02-13 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(28) "-12345-02-11 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0010-02-16 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(27) "-0010-02-14 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-02-13 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-02-13 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: DateTime::setISODate() expects parameter 1 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_setISODate_variation2.phpt b/ext/date/tests/DateTime_setISODate_variation2.phpt deleted file mode 100644 index 01c335991f347..0000000000000 --- a/ext/date/tests/DateTime_setISODate_variation2.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test DateTime::setISODate() function : usage variation - Passing unexpected values to second argument $week. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-02-27 08:34:10"); -$day = 2; -$year = 1963; - -foreach($inputs as $variation =>$month) { - echo "\n-- $variation --\n"; - var_dump( $object->setISODate($year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::setISODate() : usage variation - unexpected values to second argument $week*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2199-07-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1726-05-21 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-03-05 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-10-16 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: DateTime::setISODate() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_setISODate_variation3.phpt b/ext/date/tests/DateTime_setISODate_variation3.phpt deleted file mode 100644 index 3f0b43d7ff912..0000000000000 --- a/ext/date/tests/DateTime_setISODate_variation3.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test DateTime::setISODate() function : usage variation - Passing unexpected values to third argument $day. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-02-27 08:34:10"); -$year = 1963; -$month = 7; - -foreach($inputs as $variation =>$day) { - echo "\n-- $variation --\n"; - var_dump( $object->setISODate($year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::setISODate() : usage variation - unexpected values to third argument $day*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-11 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1996-11-28 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1929-04-24 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-20 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-31 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-11 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-11 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: DateTime::setISODate() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_setTime_variation1.phpt b/ext/date/tests/DateTime_setTime_variation1.phpt deleted file mode 100644 index dc067a48c346a..0000000000000 --- a/ext/date/tests/DateTime_setTime_variation1.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test DateTime::setTime() function : usage variation - Passing unexpected values to first argument $hour. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTime("2009-01-31 15:14:10"); -$minute = 13; -$sec = 45; - -foreach($inputs as $variation =>$hour) { - echo "\n-- $variation --\n"; - var_dump( $object->setTime($hour, $minute, $sec) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::setTime() : usage variation - unexpected values to first argument $hour*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 01:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2010-06-29 09:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 15:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 14:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: DateTime::setTime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::setTime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::setTime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::setTime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 01:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 01:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTime::setTime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::setTime() expects parameter 1 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::setTime() expects parameter 1 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: DateTime::setTime() expects parameter 1 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_setTime_variation2.phpt b/ext/date/tests/DateTime_setTime_variation2.phpt deleted file mode 100644 index f65966b014c92..0000000000000 --- a/ext/date/tests/DateTime_setTime_variation2.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test DateTime::setTime() function : usage variation - Passing unexpected values to second argument $minute. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTime("2009-01-31 15:14:10"); -$hour = 10; -$sec = 45; - -foreach($inputs as $variation =>$minute) { - echo "\n-- $variation --\n"; - var_dump( $object->setTime($hour, $minute, $sec) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::setTime() : usage variation - unexpected values to second argument $minute*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:01:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-02-08 23:45:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 20:15:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:10:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 09:50:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: DateTime::setTime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::setTime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::setTime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::setTime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:01:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:01:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTime::setTime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::setTime() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::setTime() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: DateTime::setTime() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_setTime_variation3.phpt b/ext/date/tests/DateTime_setTime_variation3.phpt deleted file mode 100644 index a2cbff9f1bb68..0000000000000 --- a/ext/date/tests/DateTime_setTime_variation3.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test DateTime::setTime() function : usage variation - Passing unexpected values to third argument $second. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTime("2009-01-31 15:14:10"); -$hour = 10; -$minute = 13; - -foreach($inputs as $variation =>$sec) { - echo "\n-- $variation --\n"; - var_dump( $object->setTime($hour, $minute, $sec) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::setTime() : usage variation - unexpected values to third argument $second*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:01.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 13:38:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 06:47:15.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:12:50.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: DateTime::setTime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::setTime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::setTime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::setTime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:01.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:01.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTime::setTime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::setTime() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::setTime() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: DateTime::setTime() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/DateTime_setTimezone_variation1.phpt b/ext/date/tests/DateTime_setTimezone_variation1.phpt deleted file mode 100644 index 6eace15116efc..0000000000000 --- a/ext/date/tests/DateTime_setTimezone_variation1.phpt +++ /dev/null @@ -1,252 +0,0 @@ ---TEST-- -Test DateTime::setTimezone() function : usage variation - Passing unexpected values to first argument $timezone. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTime("2009-01-30 17:57:32"); - -foreach($inputs as $variation =>$timezone) { - echo "\n-- $variation --\n"; - var_dump( $object->setTimezone($timezone) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing DateTime::setTimezone() : usage variation - unexpected values to first argument $timezone*** - --- int 0 -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, null given in %s on line %d -bool(false) - --- resource -- - -Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/checkdate_variation1.phpt b/ext/date/tests/checkdate_variation1.phpt deleted file mode 100644 index 8913963de03fc..0000000000000 --- a/ext/date/tests/checkdate_variation1.phpt +++ /dev/null @@ -1,201 +0,0 @@ ---TEST-- -Test checkdate() function : usage variation - Passing unexpected values to first argument $month. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$day = 2; -$year = 1963; - -foreach($inputs as $variation =>$month) { - echo "\n-- $variation --\n"; - var_dump( checkdate($month, $day, $year) ); -}; - -// closing the resource -fclose( $file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing checkdate() : usage variation - unexpected values to first argument $month*** - --- float 10.5 -- -bool(true) - --- float -10.5 -- -bool(false) - --- float .5 -- -bool(false) - --- empty array -- - -Warning: checkdate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: checkdate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: checkdate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: checkdate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -bool(false) - --- lowercase null -- -bool(false) - --- lowercase true -- -bool(true) - --- lowercase false -- -bool(false) - --- uppercase TRUE -- -bool(true) - --- uppercase FALSE -- -bool(false) - --- empty string DQ -- - -Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: checkdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: checkdate() expects parameter 1 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: checkdate() expects parameter 1 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -bool(false) - --- unset var -- -bool(false) - --- resource -- - -Warning: checkdate() expects parameter 1 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/checkdate_variation2.phpt b/ext/date/tests/checkdate_variation2.phpt deleted file mode 100644 index 8f555314bd7b7..0000000000000 --- a/ext/date/tests/checkdate_variation2.phpt +++ /dev/null @@ -1,201 +0,0 @@ ---TEST-- -Test checkdate() function : usage variation - Passing unexpected values to second argument $day. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$month = 7; -$year = 1963; - -foreach($inputs as $variation =>$day) { - echo "\n-- $variation --\n"; - var_dump( checkdate($month, $day, $year) ); -}; - -// closing the resource -fclose( $file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing checkdate() : usage variation - unexpected values to second argument $day*** - --- float 10.5 -- -bool(true) - --- float -10.5 -- -bool(false) - --- float .5 -- -bool(false) - --- empty array -- - -Warning: checkdate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: checkdate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: checkdate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: checkdate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -bool(false) - --- lowercase null -- -bool(false) - --- lowercase true -- -bool(true) - --- lowercase false -- -bool(false) - --- uppercase TRUE -- -bool(true) - --- uppercase FALSE -- -bool(false) - --- empty string DQ -- - -Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: checkdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: checkdate() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: checkdate() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -bool(false) - --- unset var -- -bool(false) - --- resource -- - -Warning: checkdate() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/checkdate_variation3.phpt b/ext/date/tests/checkdate_variation3.phpt deleted file mode 100644 index 87b7fdac63c3b..0000000000000 --- a/ext/date/tests/checkdate_variation3.phpt +++ /dev/null @@ -1,201 +0,0 @@ ---TEST-- -Test checkdate() function : usage variation - Passing unexpected values to third argument $year. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$day = 2; -$month = 7; - -foreach($inputs as $variation =>$year) { - echo "\n-- $variation --\n"; - var_dump( checkdate($month, $day, $year) ); -}; - -// closing the resource -fclose( $file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing checkdate() : usage variation - unexpected values to third argument $year*** - --- float 10.5 -- -bool(true) - --- float -10.5 -- -bool(false) - --- float .5 -- -bool(false) - --- empty array -- - -Warning: checkdate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: checkdate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: checkdate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: checkdate() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -bool(false) - --- lowercase null -- -bool(false) - --- lowercase true -- -bool(true) - --- lowercase false -- -bool(false) - --- uppercase TRUE -- -bool(true) - --- uppercase FALSE -- -bool(false) - --- empty string DQ -- - -Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: checkdate() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: checkdate() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: checkdate() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -bool(false) - --- unset var -- -bool(false) - --- resource -- - -Warning: checkdate() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_create_variation1.phpt b/ext/date/tests/date_create_variation1.phpt deleted file mode 100644 index 8166ffa01970e..0000000000000 --- a/ext/date/tests/date_create_variation1.phpt +++ /dev/null @@ -1,389 +0,0 @@ ---TEST-- -Test date_create() function : usage variation - Passing unexpected values to first argument $time. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$timezone = new DateTimeZone("Europe/London"); - -foreach($inputs as $variation =>$time) { - echo "\n-- $variation --\n"; - var_dump( date_create($time) ); - var_dump( date_create($time, $timezone) ); -}; - -// closing the resource -fclose( $file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_create() : usage variation - unexpected values to first argument $time*** - --- int 0 -- -bool(false) -bool(false) - --- int 1 -- -bool(false) -bool(false) - --- int 12345 -- -bool(false) -bool(false) - --- int -12345 -- -bool(false) -bool(false) - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -bool(false) -bool(false) - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: date_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: date_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: date_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: date_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -bool(false) -bool(false) - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -bool(false) -bool(false) - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string SQ -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- string DQ -- -bool(false) -bool(false) - --- string SQ -- -bool(false) -bool(false) - --- mixed case string -- -bool(false) -bool(false) - --- heredoc -- -bool(false) -bool(false) - --- instance of classWithToString -- -bool(false) -bool(false) - --- instance of classWithoutToString -- - -Warning: date_create() expects parameter 1 to be string, object given in %s on line %d -bool(false) - -Warning: date_create() expects parameter 1 to be string, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} -object(DateTime)#%d (3) { - ["date"]=> - string(26) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_create() expects parameter 1 to be string, resource given in %s on line %d -bool(false) - -Warning: date_create() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_create_variation2.phpt b/ext/date/tests/date_create_variation2.phpt deleted file mode 100644 index 32495913b7fc6..0000000000000 --- a/ext/date/tests/date_create_variation2.phpt +++ /dev/null @@ -1,272 +0,0 @@ ---TEST-- -Test date_create() function : usage variation - Passing unexpected values to second argument $timezone. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$time = "2005-07-14 22:30:41"; - -foreach($inputs as $variation =>$timezone) { - echo "\n-- $variation --\n"; - var_dump( date_create($time, $timezone) ); -}; - -// closing the resource -fclose( $file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_create() : usage variation - unexpected values to second argument $timezone*** - --- int 0 -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2005-07-14 22:30:41.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2005-07-14 22:30:41.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2005-07-14 22:30:41.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2005-07-14 22:30:41.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_create() expects parameter 2 to be DateTimeZone, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_date_set_variation1.phpt b/ext/date/tests/date_date_set_variation1.phpt deleted file mode 100644 index cdfc56cfad0d4..0000000000000 --- a/ext/date/tests/date_date_set_variation1.phpt +++ /dev/null @@ -1,254 +0,0 @@ ---TEST-- -Test date_date_set() function : usage variation - Passing unexpected values to first argument $object. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$day = 2; -$month = 7; -$year = 1963; - -foreach($inputs as $variation =>$object) { - echo "\n-- $variation --\n"; - var_dump( date_date_set($object, $year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_date_set() : usage variation - unexpected values to first argument $object*** - --- int 0 -- - -Warning: date_date_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: date_date_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: date_date_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: date_date_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: date_date_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: date_date_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: date_date_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: date_date_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_date_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_date_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_date_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: date_date_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: date_date_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: date_date_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: date_date_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: date_date_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: date_date_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_date_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_date_set() expects parameter 1 to be DateTime, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_date_set() expects parameter 1 to be DateTime, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: date_date_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: date_date_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- resource -- - -Warning: date_date_set() expects parameter 1 to be DateTime, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_date_set_variation2.phpt b/ext/date/tests/date_date_set_variation2.phpt deleted file mode 100644 index 6522b7a7e81da..0000000000000 --- a/ext/date/tests/date_date_set_variation2.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test date_date_set() function : usage variation - Passing unexpected values to second argument $year. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-02-27 08:34:10"); -$day = 2; -$month = 7; - -foreach($inputs as $variation =>$year) { - echo "\n-- $variation --\n"; - var_dump( date_date_set($object, $year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_date_set() : usage variation - unexpected values to second argument $year*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(%d) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(27) "12345-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(28) "-12345-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0010-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(27) "-0010-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(%d) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_date_set() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_date_set() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_date_set() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_date_set() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(%d) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(%d) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(%d) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-07-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(%d) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_date_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_date_set() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_date_set() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(%d) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(%d) "%s" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_date_set() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_date_set_variation3.phpt b/ext/date/tests/date_date_set_variation3.phpt deleted file mode 100644 index c63a339cc76f6..0000000000000 --- a/ext/date/tests/date_date_set_variation3.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test date_date_set() function : usage variation - Passing unexpected values to third argument $month. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-02-27 08:34:10"); -$day = 2; -$year = 1963; - -foreach($inputs as $variation =>$month) { - echo "\n-- $variation --\n"; - var_dump( date_date_set($object, $year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_date_set() : usage variation - unexpected values to third argument $month*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2991-09-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0934-03-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-10-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-02-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_date_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_date_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_date_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_date_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_date_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_date_set() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_date_set() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-02 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_date_set() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_date_set_variation4.phpt b/ext/date/tests/date_date_set_variation4.phpt deleted file mode 100644 index de02a2a42c650..0000000000000 --- a/ext/date/tests/date_date_set_variation4.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test date_date_set() function : usage variation - Passing unexpected values to forth argument $day. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-02-27 08:34:10"); -$month = 7; -$year = 1963; - -foreach($inputs as $variation =>$day) { - echo "\n-- $variation --\n"; - var_dump( date_date_set($object, $year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_date_set() : usage variation - unexpected values to forth argument $day*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-07-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1997-04-17 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1929-09-11 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-07-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-20 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_date_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_date_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_date_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_date_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-07-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-07-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_date_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_date_set() expects parameter 4 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_date_set() expects parameter 4 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-06-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_date_set() expects parameter 4 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_default_timezone_set_variation1.phpt b/ext/date/tests/date_default_timezone_set_variation1.phpt deleted file mode 100644 index ea6057b6ce229..0000000000000 --- a/ext/date/tests/date_default_timezone_set_variation1.phpt +++ /dev/null @@ -1,200 +0,0 @@ ---TEST-- -Test date_default_timezone_set() function : usage variations - Passing unexpected values for time_zone identifier ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing date_default_timezone_set() : usage variations *** - --- Iteration 1 -- - -Notice: date_default_timezone_set(): Timezone ID '0' is invalid in %s on line %d -bool(false) - --- Iteration 2 -- - -Notice: date_default_timezone_set(): Timezone ID '1' is invalid in %s on line %d -bool(false) - --- Iteration 3 -- - -Notice: date_default_timezone_set(): Timezone ID '12345' is invalid in %s on line %d -bool(false) - --- Iteration 4 -- - -Notice: date_default_timezone_set(): Timezone ID '-2345' is invalid in %s on line %d -bool(false) - --- Iteration 5 -- - -Notice: date_default_timezone_set(): Timezone ID '10.5' is invalid in %s on line %d -bool(false) - --- Iteration 6 -- - -Notice: date_default_timezone_set(): Timezone ID '-10.5' is invalid in %s on line %d -bool(false) - --- Iteration 7 -- - -Notice: date_default_timezone_set(): Timezone ID '123456789000' is invalid in %s on line %d -bool(false) - --- Iteration 8 -- - -Notice: date_default_timezone_set(): Timezone ID '1.23456789E-9' is invalid in %s on line %d -bool(false) - --- Iteration 9 -- - -Notice: date_default_timezone_set(): Timezone ID '0.5' is invalid in %s on line %d -bool(false) - --- Iteration 10 -- - -Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d -bool(false) - --- Iteration 11 -- - -Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d -bool(false) - --- Iteration 12 -- - -Notice: date_default_timezone_set(): Timezone ID '1' is invalid in %s on line %d -bool(false) - --- Iteration 13 -- - -Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d -bool(false) - --- Iteration 14 -- - -Notice: date_default_timezone_set(): Timezone ID '1' is invalid in %s on line %d -bool(false) - --- Iteration 15 -- - -Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d -bool(false) - --- Iteration 16 -- - -Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d -bool(false) - --- Iteration 17 -- - -Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: date_default_timezone_set() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- Iteration 19 -- - -Notice: date_default_timezone_set(): Timezone ID 'abcxyz' is invalid in %s on line %d -bool(false) - --- Iteration 20 -- - -Notice: date_default_timezone_set(): Timezone ID 'abcxyz' is invalid in %s on line %d -bool(false) - --- Iteration 21 -- - -Notice: date_default_timezone_set(): Timezone ID 'abc -xyz' is invalid in %s on line %d -bool(false) - --- Iteration 22 -- - -Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d -bool(false) - --- Iteration 23 -- - -Notice: date_default_timezone_set(): Timezone ID '' is invalid in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: date_default_timezone_set() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -===Done=== diff --git a/ext/date/tests/date_format_variation1.phpt b/ext/date/tests/date_format_variation1.phpt deleted file mode 100644 index a4add9854bfe7..0000000000000 --- a/ext/date/tests/date_format_variation1.phpt +++ /dev/null @@ -1,252 +0,0 @@ ---TEST-- -Test date_format() function : usage variation - Passing unexpected values to first argument $object. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$format = 'H:m:s \m \i\s\ \m\o\n\t\h'; - -foreach($inputs as $variation =>$object) { - echo "\n-- $variation --\n"; - var_dump( date_format($object, $format) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_format() : usage variation - unexpected values to first argument $object*** - --- int 0 -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- resource -- - -Warning: date_format() expects parameter 1 to be DateTimeInterface, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_format_variation2.phpt b/ext/date/tests/date_format_variation2.phpt deleted file mode 100644 index 136d3d4558ed5..0000000000000 --- a/ext/date/tests/date_format_variation2.phpt +++ /dev/null @@ -1,208 +0,0 @@ ---TEST-- -Test date_format() function : usage variation - Passing unexpected values to second argument $format. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2005-07-14 22:30:41"); - -foreach($inputs as $variation =>$format) { - echo "\n-- $variation --\n"; - var_dump( date_format($object, $format) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_format() : usage variation - unexpected values to second argument $format*** - --- int 0 -- -string(1) "0" - --- int 1 -- -string(1) "1" - --- int 12345 -- -string(5) "12345" - --- int -12345 -- -string(6) "-12345" - --- float 10.5 -- -string(4) "10.5" - --- float -10.5 -- -string(5) "-10.5" - --- float .5 -- -string(3) "0.5" - --- empty array -- - -Warning: date_format() expects parameter 2 to be string, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_format() expects parameter 2 to be string, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_format() expects parameter 2 to be string, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_format() expects parameter 2 to be string, array given in %s on line %d -bool(false) - --- uppercase NULL -- -string(0) "" - --- lowercase null -- -string(0) "" - --- lowercase true -- -string(1) "1" - --- lowercase false -- -string(0) "" - --- uppercase TRUE -- -string(1) "1" - --- uppercase FALSE -- -string(0) "" - --- empty string DQ -- -string(0) "" - --- empty string SQ -- -string(0) "" - --- string DQ -- -string(40) "4131Thu, 14 Jul 2005 22:30:41 +010030710" - --- string SQ -- -string(40) "4131Thu, 14 Jul 2005 22:30:41 +010030710" - --- mixed case string -- -string(40) "41BSTThu, 14 Jul 2005 22:30:41 +01001722" - --- heredoc -- -string(82) "10Europe/LondonThursdayThursday2005 42005Thu, 14 Jul 2005 22:30:41 +0100Thursday14" - --- instance of classWithToString -- -string(66) "CThursdaypm4141 PM 2005b14Europe/London2005-07-14T22:30:41+01:0031" - --- instance of classWithoutToString -- - -Warning: date_format() expects parameter 2 to be string, object given in %s on line %d -bool(false) - --- undefined var -- -string(0) "" - --- unset var -- -string(0) "" - --- resource -- - -Warning: date_format() expects parameter 2 to be string, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_isodate_set_variation1.phpt b/ext/date/tests/date_isodate_set_variation1.phpt deleted file mode 100644 index 42e94fe02f9e4..0000000000000 --- a/ext/date/tests/date_isodate_set_variation1.phpt +++ /dev/null @@ -1,254 +0,0 @@ ---TEST-- -Test date_isodate_set() function : usage variation - Passing unexpected values to first argument $object. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$day = 2; -$month = 7; -$year = 1963; - -foreach($inputs as $variation =>$object) { - echo "\n-- $variation --\n"; - var_dump( date_isodate_set($object, $year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_isodate_set() : usage variation - unexpected values to first argument $object*** - --- int 0 -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- resource -- - -Warning: date_isodate_set() expects parameter 1 to be DateTime, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_isodate_set_variation2.phpt b/ext/date/tests/date_isodate_set_variation2.phpt deleted file mode 100644 index adb4c5d34dcae..0000000000000 --- a/ext/date/tests/date_isodate_set_variation2.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test date_isodate_set() function : usage variation - Passing unexpected values to second argument $year. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-02-27 08:34:10"); -$day = 2; -$month = 7; - -foreach($inputs as $variation =>$year) { - echo "\n-- $variation --\n"; - var_dump( date_isodate_set($object, $year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_isodate_set() : usage variation - unexpected values to second argument $year*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-02-13 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(27) "12345-02-13 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(28) "-12345-02-11 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0010-02-16 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(27) "-0010-02-14 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_isodate_set() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_isodate_set() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_isodate_set() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_isodate_set() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-02-13 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0001-02-13 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_isodate_set() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_isodate_set() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_isodate_set() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "0000-02-15 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_isodate_set() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_isodate_set_variation3.phpt b/ext/date/tests/date_isodate_set_variation3.phpt deleted file mode 100644 index 61e973efc4df9..0000000000000 --- a/ext/date/tests/date_isodate_set_variation3.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test date_isodate_set() function : usage variation - Passing unexpected values to third argument $week. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-02-27 08:34:10"); -$day = 2; -$year = 1963; - -foreach($inputs as $variation =>$month) { - echo "\n-- $variation --\n"; - var_dump( date_isodate_set($object, $year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_isodate_set() : usage variation - unexpected values to third argument $week*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2199-07-30 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1726-05-21 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-03-05 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-10-16 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_isodate_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_isodate_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_isodate_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_isodate_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-01 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_isodate_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_isodate_set() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_isodate_set() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1962-12-25 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_isodate_set() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_isodate_set_variation4.phpt b/ext/date/tests/date_isodate_set_variation4.phpt deleted file mode 100644 index 61de2be6cd0bb..0000000000000 --- a/ext/date/tests/date_isodate_set_variation4.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test date_isodate_set() function : usage variation - Passing unexpected values to forth argument $day. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-02-27 08:34:10"); -$year = 1963; -$month = 7; - -foreach($inputs as $variation =>$day) { - echo "\n-- $variation --\n"; - var_dump( date_isodate_set($object, $year, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_isodate_set() : usage variation - unexpected values to forth argument $day*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-11 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1996-11-28 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1929-04-24 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-20 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-01-31 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_isodate_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_isodate_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_isodate_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_isodate_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-11 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-11 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_isodate_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_isodate_set() expects parameter 4 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_isodate_set() expects parameter 4 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "1963-02-10 08:34:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_isodate_set() expects parameter 4 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_modify_variation1.phpt b/ext/date/tests/date_modify_variation1.phpt deleted file mode 100644 index 79de83b34cdad..0000000000000 --- a/ext/date/tests/date_modify_variation1.phpt +++ /dev/null @@ -1,252 +0,0 @@ ---TEST-- -Test date_modify() function : usage variation - Passing unexpected values to first argument $object. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$format = "D, d M Y"; - -foreach($inputs as $variation =>$object) { - echo "\n-- $variation --\n"; - var_dump( date_modify($object, $format) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_modify() : usage variation - unexpected values to first argument $object*** - --- int 0 -- - -Warning: date_modify() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: date_modify() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: date_modify() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: date_modify() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: date_modify() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: date_modify() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: date_modify() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: date_modify() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_modify() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_modify() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_modify() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: date_modify() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: date_modify() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: date_modify() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: date_modify() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: date_modify() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: date_modify() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_modify() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_modify() expects parameter 1 to be DateTime, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_modify() expects parameter 1 to be DateTime, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: date_modify() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: date_modify() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- resource -- - -Warning: date_modify() expects parameter 1 to be DateTime, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_modify_variation2.phpt b/ext/date/tests/date_modify_variation2.phpt deleted file mode 100644 index f2a87ce7255d3..0000000000000 --- a/ext/date/tests/date_modify_variation2.phpt +++ /dev/null @@ -1,262 +0,0 @@ ---TEST-- -Test date_modify() function : usage variation - Passing unexpected values to second argument $format. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-01-31 14:28:41"); - -foreach($inputs as $variation =>$format) { - echo "\n-- $variation --\n"; - var_dump( date_modify($object, $format) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_modify() : usage variation - unexpected values to second argument $format*** - --- int 0 -- - -Warning: date_modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in %sdate_modify_variation2.php on line 99 -bool(false) - --- int 1 -- - -Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sdate_modify_variation2.php on line 99 -bool(false) - --- int 12345 -- - -Warning: date_modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in %sdate_modify_variation2.php on line 99 -bool(false) - --- int -12345 -- - -Warning: date_modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in %sdate_modify_variation2.php on line 99 -bool(false) - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:05:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- - -Warning: date_modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in %sdate_modify_variation2.php on line 99 -bool(false) - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 00:05:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_modify() expects parameter 2 to be string, array given in %sdate_modify_variation2.php on line 99 -bool(false) - --- int indexed array -- - -Warning: date_modify() expects parameter 2 to be string, array given in %sdate_modify_variation2.php on line 99 -bool(false) - --- associative array -- - -Warning: date_modify() expects parameter 2 to be string, array given in %sdate_modify_variation2.php on line 99 -bool(false) - --- nested arrays -- - -Warning: date_modify() expects parameter 2 to be string, array given in %sdate_modify_variation2.php on line 99 -bool(false) - --- uppercase NULL -- - -Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99 -bool(false) - --- lowercase null -- - -Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99 -bool(false) - --- lowercase true -- - -Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sdate_modify_variation2.php on line 99 -bool(false) - --- lowercase false -- - -Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99 -bool(false) - --- uppercase TRUE -- - -Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in %sdate_modify_variation2.php on line 99 -bool(false) - --- uppercase FALSE -- - -Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99 -bool(false) - --- empty string DQ -- - -Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99 -bool(false) - --- empty string SQ -- - -Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99 -bool(false) - --- string DQ -- - -Warning: date_modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in %sdate_modify_variation2.php on line 99 -bool(false) - --- string SQ -- - -Warning: date_modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in %sdate_modify_variation2.php on line 99 -bool(false) - --- mixed case string -- - -Warning: date_modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in %sdate_modify_variation2.php on line 99 -bool(false) - --- heredoc -- - -Warning: date_modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in %sdate_modify_variation2.php on line 99 -bool(false) - --- instance of classWithToString -- - -Warning: date_modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in %sdate_modify_variation2.php on line 99 -bool(false) - --- instance of classWithoutToString -- - -Warning: date_modify() expects parameter 2 to be string, object given in %sdate_modify_variation2.php on line 99 -bool(false) - --- undefined var -- - -Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99 -bool(false) - --- unset var -- - -Warning: date_modify(): Failed to parse time string () at position 0 ( in %sdate_modify_variation2.php on line 99 -bool(false) - --- resource -- - -Warning: date_modify() expects parameter 2 to be string, resource given in %sdate_modify_variation2.php on line 99 -bool(false) -===DONE=== diff --git a/ext/date/tests/date_offset_get_variation1.phpt b/ext/date/tests/date_offset_get_variation1.phpt deleted file mode 100644 index 6b4b9a682f338..0000000000000 --- a/ext/date/tests/date_offset_get_variation1.phpt +++ /dev/null @@ -1,250 +0,0 @@ ---TEST-- -Test date_offset_get() function : usage variation - Passing unexpected values to first argument $object. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -foreach($inputs as $variation =>$object) { - echo "\n-- $variation --\n"; - var_dump( date_offset_get($object) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_offset_get() : usage variation - unexpected values to first argument $object*** - --- int 0 -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- resource -- - -Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_parse_variation1.phpt b/ext/date/tests/date_parse_variation1.phpt deleted file mode 100644 index d40a75f8aae9d..0000000000000 --- a/ext/date/tests/date_parse_variation1.phpt +++ /dev/null @@ -1,274 +0,0 @@ ---TEST-- -Test date_parse() function : usage variation - Passing unexpected values to first argument $date. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -foreach($inputs as $variation =>$date) { - echo "\n-- $variation --\n"; - $result = date_parse($date); - if (is_array($result)) { - var_dump($result["errors"]); - } else { - var_dump($result); - } -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_parse() : usage variation - unexpected values to first argument $date*** - --- int 0 -- -array(1) { - [0]=> - string(20) "Unexpected character" -} - --- int 1 -- -array(1) { - [0]=> - string(20) "Unexpected character" -} - --- int 12345 -- -array(1) { - [4]=> - string(20) "Unexpected character" -} - --- int -12345 -- -array(1) { - [5]=> - string(20) "Unexpected character" -} - --- float 10.5 -- -array(0) { -} - --- float -10.5 -- -array(1) { - [4]=> - string(20) "Unexpected character" -} - --- float .5 -- -array(0) { -} - --- empty array -- - -Warning: date_parse() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_parse() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_parse() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_parse() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- uppercase NULL -- -array(1) { - [0]=> - string(12) "Empty string" -} - --- lowercase null -- -array(1) { - [0]=> - string(12) "Empty string" -} - --- lowercase true -- -array(1) { - [0]=> - string(20) "Unexpected character" -} - --- lowercase false -- -array(1) { - [0]=> - string(12) "Empty string" -} - --- uppercase TRUE -- -array(1) { - [0]=> - string(20) "Unexpected character" -} - --- uppercase FALSE -- -array(1) { - [0]=> - string(12) "Empty string" -} - --- empty string DQ -- -array(1) { - [0]=> - string(12) "Empty string" -} - --- empty string SQ -- -array(1) { - [0]=> - string(12) "Empty string" -} - --- string DQ -- -array(1) { - [0]=> - string(47) "The timezone could not be found in the database" -} - --- string SQ -- -array(1) { - [0]=> - string(47) "The timezone could not be found in the database" -} - --- mixed case string -- -array(1) { - [0]=> - string(47) "The timezone could not be found in the database" -} - --- heredoc -- -array(1) { - [0]=> - string(47) "The timezone could not be found in the database" -} - --- instance of classWithToString -- -array(2) { - [0]=> - string(47) "The timezone could not be found in the database" - [8]=> - string(29) "Double timezone specification" -} - --- instance of classWithoutToString -- - -Warning: date_parse() expects parameter 1 to be string, object given in %s on line %d -bool(false) - --- undefined var -- -array(1) { - [0]=> - string(12) "Empty string" -} - --- unset var -- -array(1) { - [0]=> - string(12) "Empty string" -} - --- resource -- - -Warning: date_parse() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_sun_info_variation1.phpt b/ext/date/tests/date_sun_info_variation1.phpt deleted file mode 100644 index 76ae077f73a95..0000000000000 --- a/ext/date/tests/date_sun_info_variation1.phpt +++ /dev/null @@ -1,492 +0,0 @@ ---TEST-- -Test date_sun_info() function : error variations - Pass unexpected values for time argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing date_sun_info() : usage variations *** - --- Iteration 1 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 2 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 3 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 4 -- -array(9) { - ["sunrise"]=> - int(-69672) - ["sunset"]=> - int(-33281) - ["transit"]=> - int(-51476) - ["civil_twilight_begin"]=> - int(-71277) - ["civil_twilight_end"]=> - int(-31675) - ["nautical_twilight_begin"]=> - int(-73100) - ["nautical_twilight_end"]=> - int(-29852) - ["astronomical_twilight_begin"]=> - int(-74883) - ["astronomical_twilight_end"]=> - int(-28069) -} - --- Iteration 5 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 6 -- -array(9) { - ["sunrise"]=> - int(-69672) - ["sunset"]=> - int(-33281) - ["transit"]=> - int(-51476) - ["civil_twilight_begin"]=> - int(-71277) - ["civil_twilight_end"]=> - int(-31675) - ["nautical_twilight_begin"]=> - int(-73100) - ["nautical_twilight_end"]=> - int(-29852) - ["astronomical_twilight_begin"]=> - int(-74883) - ["astronomical_twilight_end"]=> - int(-28069) -} - --- Iteration 7 -- -array(9) { - ["sunrise"]=> - int(1226368) - ["sunset"]=> - int(1263442) - ["transit"]=> - int(1244905) - ["civil_twilight_begin"]=> - int(1224792) - ["civil_twilight_end"]=> - int(1265019) - ["nautical_twilight_begin"]=> - int(1222996) - ["nautical_twilight_end"]=> - int(1266815) - ["astronomical_twilight_begin"]=> - int(1221234) - ["astronomical_twilight_end"]=> - int(1268576) -} - --- Iteration 8 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 9 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 10 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 11 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 12 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 13 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 14 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 15 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 16 -- - -Warning: date_sun_info() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: date_sun_info() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: date_sun_info() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: date_sun_info() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- Iteration 20 -- - -Warning: date_sun_info() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- Iteration 21 -- - -Warning: date_sun_info() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- Iteration 22 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 23 -- -array(9) { - ["sunrise"]=> - int(16742) - ["sunset"]=> - int(53161) - ["transit"]=> - int(34951) - ["civil_twilight_begin"]=> - int(15138) - ["civil_twilight_end"]=> - int(54765) - ["nautical_twilight_begin"]=> - int(13316) - ["nautical_twilight_end"]=> - int(56587) - ["astronomical_twilight_begin"]=> - int(11534) - ["astronomical_twilight_end"]=> - int(58369) -} - --- Iteration 24 -- - -Warning: date_sun_info() expects parameter 1 to be int, resource given in %s on line %d -bool(false) -===Done=== diff --git a/ext/date/tests/date_sun_info_variation2.phpt b/ext/date/tests/date_sun_info_variation2.phpt deleted file mode 100644 index 42254d55864bc..0000000000000 --- a/ext/date/tests/date_sun_info_variation2.phpt +++ /dev/null @@ -1,492 +0,0 @@ ---TEST-- -Test date_sun_info() function : error variations - Pass unexpected values for latitude argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing date_sun_info() : usage variations *** - --- Iteration 1 -- -array(9) { - ["sunrise"]=> - int(1165894138) - ["sunset"]=> - int(1165937784) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892795) - ["civil_twilight_end"]=> - int(1165939127) - ["nautical_twilight_begin"]=> - int(1165891226) - ["nautical_twilight_end"]=> - int(1165940696) - ["astronomical_twilight_begin"]=> - int(1165889650) - ["astronomical_twilight_end"]=> - int(1165942271) -} - --- Iteration 2 -- -array(9) { - ["sunrise"]=> - int(1165894240) - ["sunset"]=> - int(1165937681) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892898) - ["civil_twilight_end"]=> - int(1165939024) - ["nautical_twilight_begin"]=> - int(1165891330) - ["nautical_twilight_end"]=> - int(1165940591) - ["astronomical_twilight_begin"]=> - int(1165889758) - ["astronomical_twilight_end"]=> - int(1165942164) -} - --- Iteration 3 -- -array(9) { - ["sunrise"]=> - bool(true) - ["sunset"]=> - bool(true) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - bool(true) - ["civil_twilight_end"]=> - bool(true) - ["nautical_twilight_begin"]=> - int(1165883368) - ["nautical_twilight_end"]=> - int(1165948554) - ["astronomical_twilight_begin"]=> - int(1165890281) - ["astronomical_twilight_end"]=> - int(1165941641) -} - --- Iteration 4 -- -array(9) { - ["sunrise"]=> - int(1165894072) - ["sunset"]=> - int(1165937850) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165895418) - ["civil_twilight_end"]=> - int(1165936504) - ["nautical_twilight_begin"]=> - int(1165896984) - ["nautical_twilight_end"]=> - int(1165934938) - ["astronomical_twilight_begin"]=> - int(1165898549) - ["astronomical_twilight_end"]=> - int(1165933372) -} - --- Iteration 5 -- -array(9) { - ["sunrise"]=> - int(1165895221) - ["sunset"]=> - int(1165936701) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165893858) - ["civil_twilight_end"]=> - int(1165938064) - ["nautical_twilight_begin"]=> - int(1165892278) - ["nautical_twilight_end"]=> - int(1165939643) - ["astronomical_twilight_begin"]=> - int(1165890706) - ["astronomical_twilight_end"]=> - int(1165941215) -} - --- Iteration 6 -- -array(9) { - ["sunrise"]=> - int(1165893046) - ["sunset"]=> - int(1165938875) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165891669) - ["civil_twilight_end"]=> - int(1165940253) - ["nautical_twilight_begin"]=> - int(1165890044) - ["nautical_twilight_end"]=> - int(1165941878) - ["astronomical_twilight_begin"]=> - int(1165888392) - ["astronomical_twilight_end"]=> - int(1165943530) -} - --- Iteration 7 -- -array(9) { - ["sunrise"]=> - int(1165894138) - ["sunset"]=> - int(1165937784) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892795) - ["civil_twilight_end"]=> - int(1165939127) - ["nautical_twilight_begin"]=> - int(1165891226) - ["nautical_twilight_end"]=> - int(1165940696) - ["astronomical_twilight_begin"]=> - int(1165889650) - ["astronomical_twilight_end"]=> - int(1165942271) -} - --- Iteration 8 -- -array(9) { - ["sunrise"]=> - int(1165894138) - ["sunset"]=> - int(1165937784) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892795) - ["civil_twilight_end"]=> - int(1165939127) - ["nautical_twilight_begin"]=> - int(1165891226) - ["nautical_twilight_end"]=> - int(1165940696) - ["astronomical_twilight_begin"]=> - int(1165889650) - ["astronomical_twilight_end"]=> - int(1165942271) -} - --- Iteration 9 -- -array(9) { - ["sunrise"]=> - int(1165894189) - ["sunset"]=> - int(1165937733) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892846) - ["civil_twilight_end"]=> - int(1165939075) - ["nautical_twilight_begin"]=> - int(1165891278) - ["nautical_twilight_end"]=> - int(1165940643) - ["astronomical_twilight_begin"]=> - int(1165889704) - ["astronomical_twilight_end"]=> - int(1165942217) -} - --- Iteration 10 -- -array(9) { - ["sunrise"]=> - int(1165894138) - ["sunset"]=> - int(1165937784) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892795) - ["civil_twilight_end"]=> - int(1165939127) - ["nautical_twilight_begin"]=> - int(1165891226) - ["nautical_twilight_end"]=> - int(1165940696) - ["astronomical_twilight_begin"]=> - int(1165889650) - ["astronomical_twilight_end"]=> - int(1165942271) -} - --- Iteration 11 -- -array(9) { - ["sunrise"]=> - int(1165894138) - ["sunset"]=> - int(1165937784) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892795) - ["civil_twilight_end"]=> - int(1165939127) - ["nautical_twilight_begin"]=> - int(1165891226) - ["nautical_twilight_end"]=> - int(1165940696) - ["astronomical_twilight_begin"]=> - int(1165889650) - ["astronomical_twilight_end"]=> - int(1165942271) -} - --- Iteration 12 -- -array(9) { - ["sunrise"]=> - int(1165894240) - ["sunset"]=> - int(1165937681) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892898) - ["civil_twilight_end"]=> - int(1165939024) - ["nautical_twilight_begin"]=> - int(1165891330) - ["nautical_twilight_end"]=> - int(1165940591) - ["astronomical_twilight_begin"]=> - int(1165889758) - ["astronomical_twilight_end"]=> - int(1165942164) -} - --- Iteration 13 -- -array(9) { - ["sunrise"]=> - int(1165894138) - ["sunset"]=> - int(1165937784) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892795) - ["civil_twilight_end"]=> - int(1165939127) - ["nautical_twilight_begin"]=> - int(1165891226) - ["nautical_twilight_end"]=> - int(1165940696) - ["astronomical_twilight_begin"]=> - int(1165889650) - ["astronomical_twilight_end"]=> - int(1165942271) -} - --- Iteration 14 -- -array(9) { - ["sunrise"]=> - int(1165894240) - ["sunset"]=> - int(1165937681) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892898) - ["civil_twilight_end"]=> - int(1165939024) - ["nautical_twilight_begin"]=> - int(1165891330) - ["nautical_twilight_end"]=> - int(1165940591) - ["astronomical_twilight_begin"]=> - int(1165889758) - ["astronomical_twilight_end"]=> - int(1165942164) -} - --- Iteration 15 -- -array(9) { - ["sunrise"]=> - int(1165894138) - ["sunset"]=> - int(1165937784) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892795) - ["civil_twilight_end"]=> - int(1165939127) - ["nautical_twilight_begin"]=> - int(1165891226) - ["nautical_twilight_end"]=> - int(1165940696) - ["astronomical_twilight_begin"]=> - int(1165889650) - ["astronomical_twilight_end"]=> - int(1165942271) -} - --- Iteration 16 -- - -Warning: date_sun_info() expects parameter 2 to be float, string given in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: date_sun_info() expects parameter 2 to be float, string given in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: date_sun_info() expects parameter 2 to be float, array given in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: date_sun_info() expects parameter 2 to be float, string given in %s on line %d -bool(false) - --- Iteration 20 -- - -Warning: date_sun_info() expects parameter 2 to be float, string given in %s on line %d -bool(false) - --- Iteration 21 -- - -Warning: date_sun_info() expects parameter 2 to be float, string given in %s on line %d -bool(false) - --- Iteration 22 -- -array(9) { - ["sunrise"]=> - int(1165894138) - ["sunset"]=> - int(1165937784) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892795) - ["civil_twilight_end"]=> - int(1165939127) - ["nautical_twilight_begin"]=> - int(1165891226) - ["nautical_twilight_end"]=> - int(1165940696) - ["astronomical_twilight_begin"]=> - int(1165889650) - ["astronomical_twilight_end"]=> - int(1165942271) -} - --- Iteration 23 -- -array(9) { - ["sunrise"]=> - int(1165894138) - ["sunset"]=> - int(1165937784) - ["transit"]=> - int(1165915961) - ["civil_twilight_begin"]=> - int(1165892795) - ["civil_twilight_end"]=> - int(1165939127) - ["nautical_twilight_begin"]=> - int(1165891226) - ["nautical_twilight_end"]=> - int(1165940696) - ["astronomical_twilight_begin"]=> - int(1165889650) - ["astronomical_twilight_end"]=> - int(1165942271) -} - --- Iteration 24 -- - -Warning: date_sun_info() expects parameter 2 to be float, resource given in %s on line %d -bool(false) -===Done=== diff --git a/ext/date/tests/date_sun_info_variation3.phpt b/ext/date/tests/date_sun_info_variation3.phpt deleted file mode 100644 index 69396e4ee2786..0000000000000 --- a/ext/date/tests/date_sun_info_variation3.phpt +++ /dev/null @@ -1,493 +0,0 @@ ---TEST-- -Test date_sun_info() function : usage variations - Pass unexpected values for longitude argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing date_sun_info() : usage variations *** - --- Iteration 1 -- -array(9) { - ["sunrise"]=> - int(1165906221) - ["sunset"]=> - int(1165942618) - ["transit"]=> - int(1165924420) - ["civil_twilight_begin"]=> - int(1165904616) - ["civil_twilight_end"]=> - int(1165944223) - ["nautical_twilight_begin"]=> - int(1165902793) - ["nautical_twilight_end"]=> - int(1165946046) - ["astronomical_twilight_begin"]=> - int(1165901011) - ["astronomical_twilight_end"]=> - int(1165947828) -} - --- Iteration 2 -- -array(9) { - ["sunrise"]=> - int(1165905981) - ["sunset"]=> - int(1165942378) - ["transit"]=> - int(1165924179) - ["civil_twilight_begin"]=> - int(1165904376) - ["civil_twilight_end"]=> - int(1165943983) - ["nautical_twilight_begin"]=> - int(1165902553) - ["nautical_twilight_end"]=> - int(1165945806) - ["astronomical_twilight_begin"]=> - int(1165900771) - ["astronomical_twilight_end"]=> - int(1165947588) -} - --- Iteration 3 -- -array(9) { - ["sunrise"]=> - int(1165879309) - ["sunset"]=> - int(1165917937) - ["transit"]=> - int(1165898623) - ["civil_twilight_begin"]=> - int(1165877787) - ["civil_twilight_end"]=> - int(1165919460) - ["nautical_twilight_begin"]=> - int(1165876041) - ["nautical_twilight_end"]=> - int(1165921205) - ["astronomical_twilight_begin"]=> - int(1165874319) - ["astronomical_twilight_end"]=> - int(1165922928) -} - --- Iteration 4 -- -array(9) { - ["sunrise"]=> - int(1165864467) - ["sunset"]=> - int(1165900749) - ["transit"]=> - int(1165882608) - ["civil_twilight_begin"]=> - int(1165862856) - ["civil_twilight_end"]=> - int(1165902359) - ["nautical_twilight_begin"]=> - int(1165861029) - ["nautical_twilight_end"]=> - int(1165904187) - ["astronomical_twilight_begin"]=> - int(1165859242) - ["astronomical_twilight_end"]=> - int(1165905973) -} - --- Iteration 5 -- -array(9) { - ["sunrise"]=> - int(1165903700) - ["sunset"]=> - int(1165940097) - ["transit"]=> - int(1165921899) - ["civil_twilight_begin"]=> - int(1165902095) - ["civil_twilight_end"]=> - int(1165941702) - ["nautical_twilight_begin"]=> - int(1165900272) - ["nautical_twilight_end"]=> - int(1165943525) - ["astronomical_twilight_begin"]=> - int(1165898490) - ["astronomical_twilight_end"]=> - int(1165945308) -} - --- Iteration 6 -- -array(9) { - ["sunrise"]=> - int(1165908743) - ["sunset"]=> - int(1165945138) - ["transit"]=> - int(1165926940) - ["civil_twilight_begin"]=> - int(1165907137) - ["civil_twilight_end"]=> - int(1165946743) - ["nautical_twilight_begin"]=> - int(1165905315) - ["nautical_twilight_end"]=> - int(1165948566) - ["astronomical_twilight_begin"]=> - int(1165903532) - ["astronomical_twilight_end"]=> - int(1165950349) -} - --- Iteration 7 -- -array(9) { - ["sunrise"]=> - int(1165920008) - ["sunset"]=> - int(1165970177) - ["transit"]=> - int(1165945092) - ["civil_twilight_begin"]=> - int(1165918353) - ["civil_twilight_end"]=> - int(1165971832) - ["nautical_twilight_begin"]=> - int(1165916371) - ["nautical_twilight_end"]=> - int(1165973814) - ["astronomical_twilight_begin"]=> - int(1165914258) - ["astronomical_twilight_end"]=> - int(1165975927) -} - --- Iteration 8 -- -array(9) { - ["sunrise"]=> - int(1165906221) - ["sunset"]=> - int(1165942618) - ["transit"]=> - int(1165924420) - ["civil_twilight_begin"]=> - int(1165904616) - ["civil_twilight_end"]=> - int(1165944223) - ["nautical_twilight_begin"]=> - int(1165902793) - ["nautical_twilight_end"]=> - int(1165946046) - ["astronomical_twilight_begin"]=> - int(1165901011) - ["astronomical_twilight_end"]=> - int(1165947828) -} - --- Iteration 9 -- -array(9) { - ["sunrise"]=> - int(1165906101) - ["sunset"]=> - int(1165942498) - ["transit"]=> - int(1165924300) - ["civil_twilight_begin"]=> - int(1165904496) - ["civil_twilight_end"]=> - int(1165944103) - ["nautical_twilight_begin"]=> - int(1165902673) - ["nautical_twilight_end"]=> - int(1165945926) - ["astronomical_twilight_begin"]=> - int(1165900891) - ["astronomical_twilight_end"]=> - int(1165947708) -} - --- Iteration 10 -- -array(9) { - ["sunrise"]=> - int(1165906221) - ["sunset"]=> - int(1165942618) - ["transit"]=> - int(1165924420) - ["civil_twilight_begin"]=> - int(1165904616) - ["civil_twilight_end"]=> - int(1165944223) - ["nautical_twilight_begin"]=> - int(1165902793) - ["nautical_twilight_end"]=> - int(1165946046) - ["astronomical_twilight_begin"]=> - int(1165901011) - ["astronomical_twilight_end"]=> - int(1165947828) -} - --- Iteration 11 -- -array(9) { - ["sunrise"]=> - int(1165906221) - ["sunset"]=> - int(1165942618) - ["transit"]=> - int(1165924420) - ["civil_twilight_begin"]=> - int(1165904616) - ["civil_twilight_end"]=> - int(1165944223) - ["nautical_twilight_begin"]=> - int(1165902793) - ["nautical_twilight_end"]=> - int(1165946046) - ["astronomical_twilight_begin"]=> - int(1165901011) - ["astronomical_twilight_end"]=> - int(1165947828) -} - --- Iteration 12 -- -array(9) { - ["sunrise"]=> - int(1165905981) - ["sunset"]=> - int(1165942378) - ["transit"]=> - int(1165924179) - ["civil_twilight_begin"]=> - int(1165904376) - ["civil_twilight_end"]=> - int(1165943983) - ["nautical_twilight_begin"]=> - int(1165902553) - ["nautical_twilight_end"]=> - int(1165945806) - ["astronomical_twilight_begin"]=> - int(1165900771) - ["astronomical_twilight_end"]=> - int(1165947588) -} - --- Iteration 13 -- -array(9) { - ["sunrise"]=> - int(1165906221) - ["sunset"]=> - int(1165942618) - ["transit"]=> - int(1165924420) - ["civil_twilight_begin"]=> - int(1165904616) - ["civil_twilight_end"]=> - int(1165944223) - ["nautical_twilight_begin"]=> - int(1165902793) - ["nautical_twilight_end"]=> - int(1165946046) - ["astronomical_twilight_begin"]=> - int(1165901011) - ["astronomical_twilight_end"]=> - int(1165947828) -} - --- Iteration 14 -- -array(9) { - ["sunrise"]=> - int(1165905981) - ["sunset"]=> - int(1165942378) - ["transit"]=> - int(1165924179) - ["civil_twilight_begin"]=> - int(1165904376) - ["civil_twilight_end"]=> - int(1165943983) - ["nautical_twilight_begin"]=> - int(1165902553) - ["nautical_twilight_end"]=> - int(1165945806) - ["astronomical_twilight_begin"]=> - int(1165900771) - ["astronomical_twilight_end"]=> - int(1165947588) -} - --- Iteration 15 -- -array(9) { - ["sunrise"]=> - int(1165906221) - ["sunset"]=> - int(1165942618) - ["transit"]=> - int(1165924420) - ["civil_twilight_begin"]=> - int(1165904616) - ["civil_twilight_end"]=> - int(1165944223) - ["nautical_twilight_begin"]=> - int(1165902793) - ["nautical_twilight_end"]=> - int(1165946046) - ["astronomical_twilight_begin"]=> - int(1165901011) - ["astronomical_twilight_end"]=> - int(1165947828) -} - --- Iteration 16 -- - -Warning: date_sun_info() expects parameter 3 to be float, string given in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: date_sun_info() expects parameter 3 to be float, string given in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: date_sun_info() expects parameter 3 to be float, array given in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: date_sun_info() expects parameter 3 to be float, string given in %s on line %d -bool(false) - --- Iteration 20 -- - -Warning: date_sun_info() expects parameter 3 to be float, string given in %s on line %d -bool(false) - --- Iteration 21 -- - -Warning: date_sun_info() expects parameter 3 to be float, string given in %s on line %d -bool(false) - --- Iteration 22 -- -array(9) { - ["sunrise"]=> - int(1165906221) - ["sunset"]=> - int(1165942618) - ["transit"]=> - int(1165924420) - ["civil_twilight_begin"]=> - int(1165904616) - ["civil_twilight_end"]=> - int(1165944223) - ["nautical_twilight_begin"]=> - int(1165902793) - ["nautical_twilight_end"]=> - int(1165946046) - ["astronomical_twilight_begin"]=> - int(1165901011) - ["astronomical_twilight_end"]=> - int(1165947828) -} - --- Iteration 23 -- -array(9) { - ["sunrise"]=> - int(1165906221) - ["sunset"]=> - int(1165942618) - ["transit"]=> - int(1165924420) - ["civil_twilight_begin"]=> - int(1165904616) - ["civil_twilight_end"]=> - int(1165944223) - ["nautical_twilight_begin"]=> - int(1165902793) - ["nautical_twilight_end"]=> - int(1165946046) - ["astronomical_twilight_begin"]=> - int(1165901011) - ["astronomical_twilight_end"]=> - int(1165947828) -} - --- Iteration 24 -- - -Warning: date_sun_info() expects parameter 3 to be float, resource given in %s on line %d -bool(false) -===Done=== diff --git a/ext/date/tests/date_sunrise_variation1.phpt b/ext/date/tests/date_sunrise_variation1.phpt deleted file mode 100644 index 7bb7be0c28d69..0000000000000 --- a/ext/date/tests/date_sunrise_variation1.phpt +++ /dev/null @@ -1,316 +0,0 @@ ---TEST-- -Test date_sunrise() function : usage variation - Passing unexpected values to first argument time. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for time - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunrise($value, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $gmt_offset) ); - var_dump( date_sunrise($value, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $gmt_offset) ); - var_dump( date_sunrise($value, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $gmt_offset) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunrise() : usage variation *** - ---int 0-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---int 1-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---int 12345-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---int -12345-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---float 10.5-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---float -10.5-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---float .5-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---empty array-- - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---lowercase null-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---lowercase true-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---lowercase false-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---uppercase TRUE-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---uppercase FALSE-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---empty string DQ-- - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 1 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -string(5) "08:56" -float(8.943%d) -int(28596) - ---unset var-- -string(5) "08:56" -float(8.943%d) -int(28596) -===DONE=== diff --git a/ext/date/tests/date_sunrise_variation2.phpt b/ext/date/tests/date_sunrise_variation2.phpt deleted file mode 100644 index 27a5272b4bce6..0000000000000 --- a/ext/date/tests/date_sunrise_variation2.phpt +++ /dev/null @@ -1,213 +0,0 @@ ---TEST-- -Test date_sunrise() function : usage variation - Passing unexpected values to second argument format. ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for format - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunrise($time, $value, $latitude, $longitude, $zenith, $gmt_offset) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunrise() : usage variation *** - ---float 10.5-- - -Warning: date_sunrise(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d -bool(false) - ---float -10.5-- - -Warning: date_sunrise(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d -bool(false) - ---float 12.3456789000e10-- - -Warning: date_sunrise() expects parameter 2 to be int, float given in %s on line %d -bool(false) - ---float -12.3456789000e10-- - -Warning: date_sunrise() expects parameter 2 to be int, float given in %s on line %d -bool(false) - ---float .5-- -int(1218174468) - ---empty array-- - -Warning: date_sunrise() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunrise() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunrise() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunrise() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -int(1218174468) - ---lowercase null-- -int(1218174468) - ---lowercase true-- -string(5) "06:47" - ---lowercase false-- -int(1218174468) - ---uppercase TRUE-- -string(5) "06:47" - ---uppercase FALSE-- -int(1218174468) - ---empty string DQ-- - -Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunrise() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunrise() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunrise() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -int(1218174468) - ---unset var-- -int(1218174468) -===DONE=== diff --git a/ext/date/tests/date_sunrise_variation3.phpt b/ext/date/tests/date_sunrise_variation3.phpt deleted file mode 100644 index 32287db24376b..0000000000000 --- a/ext/date/tests/date_sunrise_variation3.phpt +++ /dev/null @@ -1,294 +0,0 @@ ---TEST-- -Test date_sunrise() function : usage variation - Passing unexpected values to third argument latitude. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for latitude - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $value, $longitude, $zenith, $gmt_offset) ); - var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $value, $longitude, $zenith, $gmt_offset) ); - var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $value, $longitude, $zenith, $gmt_offset) ); -}; -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunrise() : usage variation *** - ---int 0-- -string(5) "01:10" -float(1.174%d) -int(1218177629) - ---int 1-- -string(5) "01:09" -float(1.155%d) -int(1218177560) - ---int 12345-- -bool(false) -bool(false) -bool(false) - ---int -12345-- -bool(false) -bool(false) -bool(false) - ---empty array-- - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(5) "01:10" -float(1.174%d) -int(1218177629) - ---lowercase null-- -string(5) "01:10" -float(1.174%d) -int(1218177629) - ---lowercase true-- -string(5) "01:09" -float(1.155%d) -int(1218177560) - ---lowercase false-- -string(5) "01:10" -float(1.174%d) -int(1218177629) - ---uppercase TRUE-- -string(5) "01:09" -float(1.155%d) -int(1218177560) - ---uppercase FALSE-- -string(5) "01:10" -float(1.174%d) -int(1218177629) - ---empty string DQ-- - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 3 to be float, object given in %s on line %d -bool(false) - ---undefined var-- -string(5) "01:10" -float(1.174%d) -int(1218177629) - ---unset var-- -string(5) "01:10" -float(1.174%d) -int(1218177629) -===DONE=== diff --git a/ext/date/tests/date_sunrise_variation4.phpt b/ext/date/tests/date_sunrise_variation4.phpt deleted file mode 100644 index 00fb15837ba04..0000000000000 --- a/ext/date/tests/date_sunrise_variation4.phpt +++ /dev/null @@ -1,296 +0,0 @@ ---TEST-- -Test date_sunrise() function : usage variation - Passing unexpected values to fourth argument longitude. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for longitude - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $latitude, $value, $zenith, $gmt_offset) ); - var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $latitude, $value, $zenith, $gmt_offset) ); - var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $value, $zenith, $gmt_offset) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunrise() : usage variation *** - ---int 0-- -string(5) "05:11" -float(5.196%d) -int(1218172307) - ---int 1-- -string(5) "05:07" -float(5.129%d) -int(1218172067) - ---int 12345-- -string(5) "21:45" -float(21.757%d) -int(1218145525) - ---int -12345-- -string(5) "12:41" -float(12.694%d) -int(1218199301) - ---empty array-- - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(5) "05:11" -float(5.196%d) -int(1218172307) - ---lowercase null-- -string(5) "05:11" -float(5.196%d) -int(1218172307) - ---lowercase true-- -string(5) "05:07" -float(5.129%d) -int(1218172067) - ---lowercase false-- -string(5) "05:11" -float(5.196%d) -int(1218172307) - ---uppercase TRUE-- -string(5) "05:07" -float(5.129%d) -int(1218172067) - ---uppercase FALSE-- -string(5) "05:11" -float(5.196%d) -int(1218172307) - ---empty string DQ-- - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 4 to be float, object given in %s on line %d -bool(false) - ---undefined var-- -string(5) "05:11" -float(5.196%d) -int(1218172307) - ---unset var-- -string(5) "05:11" -float(5.196%d) -int(1218172307) -===DONE=== diff --git a/ext/date/tests/date_sunrise_variation5.phpt b/ext/date/tests/date_sunrise_variation5.phpt deleted file mode 100644 index 7e44590a7dbf7..0000000000000 --- a/ext/date/tests/date_sunrise_variation5.phpt +++ /dev/null @@ -1,296 +0,0 @@ ---TEST-- -Test date_sunrise() function : usage variation - Passing unexpected values to fifth argument zenith ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for zenith - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $value, $gmt_offset) ); - var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $value, $gmt_offset) ); - var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $value, $gmt_offset) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunrise() : usage variation *** - ---int 0-- -bool(false) -bool(false) -bool(false) - ---int 1-- -bool(false) -bool(false) -bool(false) - ---int 12345-- -string(5) "09:50" -float(9.849%d) -int(1218169259) - ---int -12345-- -string(5) "09:54" -float(9.904%d) -int(1218169455) - ---empty array-- - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, array given in %s on line %d -bool(false) - ---uppercase NULL-- -bool(false) -bool(false) -bool(false) - ---lowercase null-- -bool(false) -bool(false) -bool(false) - ---lowercase true-- -bool(false) -bool(false) -bool(false) - ---lowercase false-- -bool(false) -bool(false) -bool(false) - ---uppercase TRUE-- -bool(false) -bool(false) -bool(false) - ---uppercase FALSE-- -bool(false) -bool(false) -bool(false) - ---empty string DQ-- - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 5 to be float, object given in %s on line %d -bool(false) - ---undefined var-- -bool(false) -bool(false) -bool(false) - ---unset var-- -bool(false) -bool(false) -bool(false) -===DONE=== diff --git a/ext/date/tests/date_sunrise_variation6.phpt b/ext/date/tests/date_sunrise_variation6.phpt deleted file mode 100644 index 0a9e776a61399..0000000000000 --- a/ext/date/tests/date_sunrise_variation6.phpt +++ /dev/null @@ -1,295 +0,0 @@ ---TEST-- -Test date_sunrise() function : usage variation - Passing unexpected values to sixth argument gmt_offset. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for gmt_offset - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $value) ); - var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $value) ); - var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunrise() : usage variation *** - ---int 0-- -string(5) "05:47" -float(5.796%d) -int(1218174468) - ---int 1-- -string(5) "06:47" -float(6.796%d) -int(1218174468) - ---int 12345-- -string(5) "14:47" -float(14.796%d) -int(1218174468) - ---int -12345-- -string(5) "12:47" -float(12.796%d) -int(1218174468) - ---empty array-- - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(5) "05:47" -float(5.796%d) -int(1218174468) - ---lowercase null-- -string(5) "05:47" -float(5.796%d) -int(1218174468) - ---lowercase true-- -string(5) "06:47" -float(6.796%d) -int(1218174468) - ---lowercase false-- -string(5) "05:47" -float(5.796%d) -int(1218174468) - ---uppercase TRUE-- -string(5) "06:47" -float(6.796%d) -int(1218174468) - ---uppercase FALSE-- -string(5) "05:47" -float(5.796%d) -int(1218174468) - ---empty string DQ-- - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunrise() expects parameter 6 to be float, object given in %s on line %d -bool(false) - ---undefined var-- -string(5) "05:47" -float(5.796%d) -int(1218174468) - ---unset var-- -string(5) "05:47" -float(5.796%d) -int(1218174468) -===DONE=== diff --git a/ext/date/tests/date_sunset_variation1.phpt b/ext/date/tests/date_sunset_variation1.phpt deleted file mode 100644 index e128d1c4045b0..0000000000000 --- a/ext/date/tests/date_sunset_variation1.phpt +++ /dev/null @@ -1,316 +0,0 @@ ---TEST-- -Test date_sunset() function : usage variation - Passing unexpected values to first argument time. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for time - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunset($value, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $gmt_offset) ); - var_dump( date_sunset($value, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $gmt_offset) ); - var_dump( date_sunset($value, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $gmt_offset) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunset() : usage variation *** - ---int 0-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---int 1-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---int 12345-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---int -12345-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---float 10.5-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---float -10.5-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---float .5-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---empty array-- - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---lowercase null-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---lowercase true-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---lowercase false-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---uppercase TRUE-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---uppercase FALSE-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---empty string DQ-- - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 1 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -string(5) "18:22" -float(18.373%d) -int(62545) - ---unset var-- -string(5) "18:22" -float(18.373%d) -int(62545) -===DONE=== diff --git a/ext/date/tests/date_sunset_variation2.phpt b/ext/date/tests/date_sunset_variation2.phpt deleted file mode 100644 index 51ad39570e1dd..0000000000000 --- a/ext/date/tests/date_sunset_variation2.phpt +++ /dev/null @@ -1,213 +0,0 @@ ---TEST-- -Test date_sunset() function : usage variation - Passing unexpected values to second argument format. ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for format - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunset($time, $value, $latitude, $longitude, $zenith, $gmt_offset) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunset() : usage variation *** - ---float 10.5-- - -Warning: date_sunset(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d -bool(false) - ---float -10.5-- - -Warning: date_sunset(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d -bool(false) - ---float 12.3456789000e10-- - -Warning: date_sunset() expects parameter 2 to be int, float given in %s on line %d -bool(false) - ---float -12.3456789000e10-- - -Warning: date_sunset() expects parameter 2 to be int, float given in %s on line %d -bool(false) - ---float .5-- -int(1218199264) - ---empty array-- - -Warning: date_sunset() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunset() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunset() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunset() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -int(1218199264) - ---lowercase null-- -int(1218199264) - ---lowercase true-- -string(5) "18:11" - ---lowercase false-- -int(1218199264) - ---uppercase TRUE-- -string(5) "18:11" - ---uppercase FALSE-- -int(1218199264) - ---empty string DQ-- - -Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunset() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunset() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunset() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -int(1218199264) - ---unset var-- -int(1218199264) -===DONE=== diff --git a/ext/date/tests/date_sunset_variation3.phpt b/ext/date/tests/date_sunset_variation3.phpt deleted file mode 100644 index ca91e639d0b23..0000000000000 --- a/ext/date/tests/date_sunset_variation3.phpt +++ /dev/null @@ -1,297 +0,0 @@ ---TEST-- -Test date_sunset() function : usage variation - Passing unexpected values to third argument latitude. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for latitude - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $value, $longitude, $zenith, $gmt_offset) ); - var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $value, $longitude, $zenith, $gmt_offset) ); - var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $value, $longitude, $zenith, $gmt_offset) ); - -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunset() : usage variation *** - ---int 0-- -string(5) "17:43" -float(17.731%d) -int(1218197632) - ---int 1-- -string(5) "17:45" -float(17.750%d) -int(1218197701) - ---int 12345-- -bool(false) -bool(false) -bool(false) - ---int -12345-- -string(5) "17:35" -float(17.598%d) -int(1218197155) - ---empty array-- - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(5) "17:43" -float(17.731%d) -int(1218197632) - ---lowercase null-- -string(5) "17:43" -float(17.731%d) -int(1218197632) - ---lowercase true-- -string(5) "17:45" -float(17.750%d) -int(1218197701) - ---lowercase false-- -string(5) "17:43" -float(17.731%d) -int(1218197632) - ---uppercase TRUE-- -string(5) "17:45" -float(17.750%d) -int(1218197701) - ---uppercase FALSE-- -string(5) "17:43" -float(17.731%d) -int(1218197632) - ---empty string DQ-- - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 3 to be float, object given in %s on line %d -bool(false) - ---undefined var-- -string(5) "17:43" -float(17.731%d) -int(1218197632) - ---unset var-- -string(5) "17:43" -float(17.731%d) -int(1218197632) -===DONE=== diff --git a/ext/date/tests/date_sunset_variation4.phpt b/ext/date/tests/date_sunset_variation4.phpt deleted file mode 100644 index 75fc64cc92a53..0000000000000 --- a/ext/date/tests/date_sunset_variation4.phpt +++ /dev/null @@ -1,296 +0,0 @@ ---TEST-- -Test date_sunset() function : usage variation - Passing unexpected values to fourth argument longitude. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for longitude - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $value, $zenith, $gmt_offset) ); - var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $value, $zenith, $gmt_offset) ); - var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $value, $zenith, $gmt_offset) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunset() : usage variation *** - ---int 0-- -string(5) "00:03" -float(0.062%d) -int(1218220425) - ---int 1-- -string(5) "23:59" -float(23.995%d) -int(1218220185) - ---int 12345-- -string(5) "17:15" -float(17.259%d) -int(1218195932) - ---int -12345-- -string(5) "12:19" -float(12.319%d) -int(1218178151) - ---empty array-- - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(5) "00:03" -float(0.062%d) -int(1218220425) - ---lowercase null-- -string(5) "00:03" -float(0.062%d) -int(1218220425) - ---lowercase true-- -string(5) "23:59" -float(23.995%d) -int(1218220185) - ---lowercase false-- -string(5) "00:03" -float(0.062%d) -int(1218220425) - ---uppercase TRUE-- -string(5) "23:59" -float(23.995%d) -int(1218220185) - ---uppercase FALSE-- -string(5) "00:03" -float(0.062%d) -int(1218220425) - ---empty string DQ-- - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 4 to be float, object given in %s on line %d -bool(false) - ---undefined var-- -string(5) "00:03" -float(0.062%d) -int(1218220425) - ---unset var-- -string(5) "00:03" -float(0.062%d) -int(1218220425) -===DONE=== diff --git a/ext/date/tests/date_sunset_variation5.phpt b/ext/date/tests/date_sunset_variation5.phpt deleted file mode 100644 index 54ea07a8c47dc..0000000000000 --- a/ext/date/tests/date_sunset_variation5.phpt +++ /dev/null @@ -1,296 +0,0 @@ ---TEST-- -Test date_sunset() function : usage variation - Passing unexpected values to fifth argument zenith. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for zenith - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $value, $gmt_offset) ); - var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $value, $gmt_offset) ); - var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $value, $gmt_offset) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunset() : usage variation *** - ---int 0-- -bool(false) -bool(false) -bool(false) - ---int 1-- -bool(false) -bool(false) -bool(false) - ---int 12345-- -string(5) "19:20" -float(19.343%d) -int(1218203437) - ---int -12345-- -bool(false) -bool(false) -bool(false) - ---empty array-- - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, array given in %s on line %d -bool(false) - ---uppercase NULL-- -bool(false) -bool(false) -bool(false) - ---lowercase null-- -bool(false) -bool(false) -bool(false) - ---lowercase true-- -bool(false) -bool(false) -bool(false) - ---lowercase false-- -bool(false) -bool(false) -bool(false) - ---uppercase TRUE-- -bool(false) -bool(false) -bool(false) - ---uppercase FALSE-- -bool(false) -bool(false) -bool(false) - ---empty string DQ-- - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 5 to be float, object given in %s on line %d -bool(false) - ---undefined var-- -bool(false) -bool(false) -bool(false) - ---unset var-- -bool(false) -bool(false) -bool(false) -===DONE=== diff --git a/ext/date/tests/date_sunset_variation6.phpt b/ext/date/tests/date_sunset_variation6.phpt deleted file mode 100644 index 933f634036dc7..0000000000000 --- a/ext/date/tests/date_sunset_variation6.phpt +++ /dev/null @@ -1,296 +0,0 @@ ---TEST-- -Test date_sunset() function : usage variation - Passing unexpected values to sixth argument gmt_offset. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for gmt_offset - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $value) ); - var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $value) ); - var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing date_sunset() : usage variation *** - ---int 0-- -string(5) "12:41" -float(12.684%d) -int(1218199264) - ---int 1-- -string(5) "13:41" -float(13.684%d) -int(1218199264) - ---int 12345-- -string(5) "21:41" -float(21.684%d) -int(1218199264) - ---int -12345-- -string(5) "19:41" -float(19.684%d) -int(1218199264) - ---empty array-- - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(5) "12:41" -float(12.684%d) -int(1218199264) - ---lowercase null-- -string(5) "12:41" -float(12.684%d) -int(1218199264) - ---lowercase true-- -string(5) "13:41" -float(13.684%d) -int(1218199264) - ---lowercase false-- -string(5) "12:41" -float(12.684%d) -int(1218199264) - ---uppercase TRUE-- -string(5) "13:41" -float(13.684%d) -int(1218199264) - ---uppercase FALSE-- -string(5) "12:41" -float(12.684%d) -int(1218199264) - ---empty string DQ-- - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d -bool(false) - -Warning: date_sunset() expects parameter 6 to be float, object given in %s on line %d -bool(false) - ---undefined var-- -string(5) "12:41" -float(12.684%d) -int(1218199264) - ---unset var-- -string(5) "12:41" -float(12.684%d) -int(1218199264) -===DONE=== diff --git a/ext/date/tests/date_time_set_variation1.phpt b/ext/date/tests/date_time_set_variation1.phpt deleted file mode 100644 index d3999207e9736..0000000000000 --- a/ext/date/tests/date_time_set_variation1.phpt +++ /dev/null @@ -1,254 +0,0 @@ ---TEST-- -Test date_time_set() function : usage variation - Passing unexpected values to first argument $object. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$hour = 10; -$minute = 13; -$sec = 45; - -foreach($inputs as $variation =>$object) { - echo "\n-- $variation --\n"; - var_dump( date_time_set($object, $hour, $minute, $sec) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_time_set() : usage variation - unexpected values to first argument $object*** - --- int 0 -- - -Warning: date_time_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: date_time_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: date_time_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: date_time_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: date_time_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: date_time_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: date_time_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: date_time_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_time_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_time_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_time_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: date_time_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: date_time_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: date_time_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: date_time_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: date_time_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: date_time_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_time_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_time_set() expects parameter 1 to be DateTime, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_time_set() expects parameter 1 to be DateTime, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: date_time_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: date_time_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- resource -- - -Warning: date_time_set() expects parameter 1 to be DateTime, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_time_set_variation2.phpt b/ext/date/tests/date_time_set_variation2.phpt deleted file mode 100644 index 6892a1b7472b6..0000000000000 --- a/ext/date/tests/date_time_set_variation2.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test date_time_set() function : usage variation - Passing unexpected values to second argument $hour. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-01-31 15:14:10"); -$minute = 13; -$sec = 45; - -foreach($inputs as $variation =>$hour) { - echo "\n-- $variation --\n"; - var_dump( date_time_set($object, $hour, $minute, $sec) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_time_set() : usage variation - unexpected values to second argument $hour*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 01:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2010-06-29 09:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 15:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 14:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_time_set() expects parameter 2 to be int, array given in %s -bool(false) - --- int indexed array -- - -Warning: date_time_set() expects parameter 2 to be int, array given in %s -bool(false) - --- associative array -- - -Warning: date_time_set() expects parameter 2 to be int, array given in %s -bool(false) - --- nested arrays -- - -Warning: date_time_set() expects parameter 2 to be int, array given in %s -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 01:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 01:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: date_time_set() expects parameter 2 to be int, string given in %s -bool(false) - --- empty string SQ -- - -Warning: date_time_set() expects parameter 2 to be int, string given in %s -bool(false) - --- string DQ -- - -Warning: date_time_set() expects parameter 2 to be int, string given in %s -bool(false) - --- string SQ -- - -Warning: date_time_set() expects parameter 2 to be int, string given in %s -bool(false) - --- mixed case string -- - -Warning: date_time_set() expects parameter 2 to be int, string given in %s -bool(false) - --- heredoc -- - -Warning: date_time_set() expects parameter 2 to be int, string given in %s -bool(false) - --- instance of classWithToString -- - -Warning: date_time_set() expects parameter 2 to be int, object given in %s -bool(false) - --- instance of classWithoutToString -- - -Warning: date_time_set() expects parameter 2 to be int, object given in %s -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-29 00:13:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_time_set() expects parameter 2 to be int, resource given in %s -bool(false) -===DONE=== diff --git a/ext/date/tests/date_time_set_variation3.phpt b/ext/date/tests/date_time_set_variation3.phpt deleted file mode 100644 index 0d1315d8e3781..0000000000000 --- a/ext/date/tests/date_time_set_variation3.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test date_time_set() function : usage variation - Passing unexpected values to third argument $minute. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-01-31 15:14:10"); -$hour = 10; -$sec = 45; - -foreach($inputs as $variation =>$minute) { - echo "\n-- $variation --\n"; - var_dump( date_time_set($object, $hour, $minute, $sec) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_time_set() : usage variation - unexpected values to third argument $minute*** - --- int 0 -- -object(DateTime)#3 (3) { - ["date"]=> - string(26) "2009-01-31 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#3 (3) { - ["date"]=> - string(26) "2009-01-31 10:01:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#3 (3) { - ["date"]=> - string(26) "2009-02-08 23:45:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#3 (3) { - ["date"]=> - string(26) "2009-01-30 20:15:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#3 (3) { - ["date"]=> - string(26) "2009-01-30 10:10:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#3 (3) { - ["date"]=> - string(26) "2009-01-30 09:50:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#3 (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_time_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_time_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_time_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_time_set() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:01:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:01:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_time_set() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_time_set() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_time_set() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-30 10:00:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_time_set() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_time_set_variation4.phpt b/ext/date/tests/date_time_set_variation4.phpt deleted file mode 100644 index 8f8fdd7de6918..0000000000000 --- a/ext/date/tests/date_time_set_variation4.phpt +++ /dev/null @@ -1,329 +0,0 @@ ---TEST-- -Test date_time_set() function : usage variation - Passing unexpected values to forth argument $sec. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-01-31 15:14:10"); -$hour = 10; -$minute = 13; - -foreach($inputs as $variation =>$sec) { - echo "\n-- $variation --\n"; - var_dump( date_time_set($object, $hour, $minute, $sec) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_time_set() : usage variation - unexpected values to forth argument $sec*** - --- int 0 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 1 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:01.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int 12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 13:38:45.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- int -12345 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 06:47:15.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float 10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:10.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float -10.5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:12:50.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- float .5 -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty array -- - -Warning: date_time_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_time_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_time_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_time_set() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase null -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase true -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:01.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- lowercase false -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase TRUE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:01.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- uppercase FALSE -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- empty string DQ -- - -Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_time_set() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_time_set() expects parameter 4 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_time_set() expects parameter 4 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- unset var -- -object(DateTime)#%d (3) { - ["date"]=> - string(26) "2009-01-31 10:13:00.000000" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(13) "Europe/London" -} - --- resource -- - -Warning: date_time_set() expects parameter 4 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_timezone_get_variation1.phpt b/ext/date/tests/date_timezone_get_variation1.phpt deleted file mode 100644 index a9e995fa78bc5..0000000000000 --- a/ext/date/tests/date_timezone_get_variation1.phpt +++ /dev/null @@ -1,250 +0,0 @@ ---TEST-- -Test date_timezone_get() function : usage variation - Passing unexpected values to first argument $object. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -foreach($inputs as $variation =>$object) { - echo "\n-- $variation --\n"; - var_dump( date_timezone_get($object) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_timezone_get() : usage variation - unexpected values to first argument $object*** - --- int 0 -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d -bool(false) - --- resource -- - -Warning: date_timezone_get() expects parameter 1 to be DateTimeInterface, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_timezone_set_variation1.phpt b/ext/date/tests/date_timezone_set_variation1.phpt deleted file mode 100644 index 549993b53223e..0000000000000 --- a/ext/date/tests/date_timezone_set_variation1.phpt +++ /dev/null @@ -1,253 +0,0 @@ ---TEST-- -Test date_timezone_set() function : usage variation - Passing unexpected values to first argument $object. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$timezone = timezone_open("America/Los_Angeles"); - -foreach($inputs as $variation =>$object) { - echo "\n-- $variation --\n"; - var_dump( date_timezone_set($object, $timezone) ); -}; - - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_timezone_set() : usage variation - unexpected values to first argument $object*** - --- int 0 -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, null given in %s on line %d -bool(false) - --- resource -- - -Warning: date_timezone_set() expects parameter 1 to be DateTime, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_timezone_set_variation2.phpt b/ext/date/tests/date_timezone_set_variation2.phpt deleted file mode 100644 index 2c17c255b03e8..0000000000000 --- a/ext/date/tests/date_timezone_set_variation2.phpt +++ /dev/null @@ -1,252 +0,0 @@ ---TEST-- -Test date_timezone_set() function : usage variation - Passing unexpected values to second argument $timezone. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = date_create("2009-01-30 17:57:32"); - -foreach($inputs as $variation =>$timezone) { - echo "\n-- $variation --\n"; - var_dump( date_timezone_set($object, $timezone) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date_timezone_set() : usage variation - unexpected values to second argument $timezone*** - --- int 0 -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, null given in %s on line %d -bool(false) - --- resource -- - -Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_variation1.phpt b/ext/date/tests/date_variation1.phpt deleted file mode 100644 index 533d0d3d7c8e1..0000000000000 --- a/ext/date/tests/date_variation1.phpt +++ /dev/null @@ -1,207 +0,0 @@ ---TEST-- -Test date() function : usage variation - Passing unexpected values to first argument $format. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$timestamp = mktime(10, 44, 30, 2, 27, 2009); - -foreach($inputs as $variation =>$format) { - echo "\n-- $variation --\n"; - var_dump( date($format, $timestamp) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date() : usage variation - unexpected values to first argument $format*** - --- int 0 -- -string(1) "0" - --- int 1 -- -string(1) "1" - --- int 12345 -- -string(5) "12345" - --- int -12345 -- -string(6) "-12345" - --- float 10.5 -- -string(4) "10.5" - --- float -10.5 -- -string(5) "-10.5" - --- float .5 -- -string(3) "0.5" - --- empty array -- - -Warning: date() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- uppercase NULL -- -string(0) "" - --- lowercase null -- -string(0) "" - --- lowercase true -- -string(1) "1" - --- lowercase false -- -string(0) "" - --- uppercase TRUE -- -string(1) "1" - --- uppercase FALSE -- -string(0) "" - --- empty string DQ -- -string(0) "" - --- empty string SQ -- -string(0) "" - --- string DQ -- -string(40) "3028Fri, 27 Feb 2009 10:44:30 +000044210" - --- string SQ -- -string(40) "3028Fri, 27 Feb 2009 10:44:30 +000044210" - --- mixed case string -- -string(40) "30GMTFri, 27 Feb 2009 10:44:30 +00000210" - --- heredoc -- -string(76) "10Europe/LondonFridayFriday2009 52009Fri, 27 Feb 2009 10:44:30 +0000Friday27" - --- instance of classWithToString -- -string(64) "CFridayam3030 AM 2009b27Europe/London2009-02-27T10:44:30+00:0028" - --- instance of classWithoutToString -- - -Warning: date() expects parameter 1 to be string, object given in %s on line %d -bool(false) - --- undefined var -- -string(0) "" - --- unset var -- -string(0) "" - --- resource -- - -Warning: date() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/date_variation2.phpt b/ext/date/tests/date_variation2.phpt deleted file mode 100644 index 77dc822396193..0000000000000 --- a/ext/date/tests/date_variation2.phpt +++ /dev/null @@ -1,221 +0,0 @@ ---TEST-- -Test date() function : usage variation - Passing unexpected values to second argument $timestamp. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$format = "F j, Y, g:i a"; - -foreach($inputs as $variation =>$timestamp) { - echo "\n-- $variation --\n"; - var_dump( date($format, $timestamp) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing date() : usage variation - unexpected values to second argument $timestamp*** - --- int 0 -- -string(24) "January 1, 1970, 1:00 am" - --- int 1 -- -string(24) "January 1, 1970, 1:00 am" - --- int 12345 -- -string(24) "January 1, 1970, 4:25 am" - --- int -12345 -- -string(26) "December 31, 1969, 9:34 pm" - --- float 10.5 -- -string(24) "January 1, 1970, 1:00 am" - --- float -10.5 -- -string(25) "January 1, 1970, 12:59 am" - --- float .5 -- -string(24) "January 1, 1970, 1:00 am" - --- empty array -- - -Warning: date() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: date() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: date() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: date() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -string(24) "January 1, 1970, 1:00 am" - --- lowercase null -- -string(24) "January 1, 1970, 1:00 am" - --- lowercase true -- -string(24) "January 1, 1970, 1:00 am" - --- lowercase false -- -string(24) "January 1, 1970, 1:00 am" - --- uppercase TRUE -- -string(24) "January 1, 1970, 1:00 am" - --- uppercase FALSE -- -string(24) "January 1, 1970, 1:00 am" - --- empty string DQ -- - -Warning: date() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: date() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: date() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: date() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: date() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: date() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: date() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: date() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -string(24) "January 1, 1970, 1:00 am" - --- unset var -- -string(24) "January 1, 1970, 1:00 am" - --- resource -- - -Warning: date() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/getdate_variation1.phpt b/ext/date/tests/getdate_variation1.phpt deleted file mode 100644 index 87b43e14d668c..0000000000000 --- a/ext/date/tests/getdate_variation1.phpt +++ /dev/null @@ -1,443 +0,0 @@ ---TEST-- -Test getdate() function : usage variation - Passing unexpected values to first argument timestamp. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for timestamp - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( getdate($value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing getdate() : usage variation *** - ---float 10.5-- -array(11) { - ["seconds"]=> - int(10) - ["minutes"]=> - int(30) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(10) -} - ---float -10.5-- -array(11) { - ["seconds"]=> - int(50) - ["minutes"]=> - int(29) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(-10) -} - ---float .5-- -array(11) { - ["seconds"]=> - int(0) - ["minutes"]=> - int(30) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(0) -} - ---empty array-- - -Warning: getdate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: getdate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: getdate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: getdate() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -array(11) { - ["seconds"]=> - int(0) - ["minutes"]=> - int(30) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(0) -} - ---lowercase null-- -array(11) { - ["seconds"]=> - int(0) - ["minutes"]=> - int(30) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(0) -} - ---lowercase true-- -array(11) { - ["seconds"]=> - int(1) - ["minutes"]=> - int(30) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(1) -} - ---lowercase false-- -array(11) { - ["seconds"]=> - int(0) - ["minutes"]=> - int(30) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(0) -} - ---uppercase TRUE-- -array(11) { - ["seconds"]=> - int(1) - ["minutes"]=> - int(30) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(1) -} - ---uppercase FALSE-- -array(11) { - ["seconds"]=> - int(0) - ["minutes"]=> - int(30) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(0) -} - ---empty string DQ-- - -Warning: getdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: getdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: getdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: getdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: getdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: getdate() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: getdate() expects parameter 1 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: getdate() expects parameter 1 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -array(11) { - ["seconds"]=> - int(0) - ["minutes"]=> - int(30) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(0) -} - ---unset var-- -array(11) { - ["seconds"]=> - int(0) - ["minutes"]=> - int(30) - ["hours"]=> - int(5) - ["mday"]=> - int(1) - ["wday"]=> - int(4) - ["mon"]=> - int(1) - ["year"]=> - int(1970) - ["yday"]=> - int(0) - ["weekday"]=> - string(8) "Thursday" - ["month"]=> - string(7) "January" - [0]=> - int(0) -} -===DONE=== diff --git a/ext/date/tests/gettimeofday_variation1.phpt b/ext/date/tests/gettimeofday_variation1.phpt deleted file mode 100644 index c4f91aab0b86a..0000000000000 --- a/ext/date/tests/gettimeofday_variation1.phpt +++ /dev/null @@ -1,284 +0,0 @@ ---TEST-- -Test gettimeofday() function : usage variation - Passing unexpected values to get_as_float argument ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for get_as_float - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gettimeofday($value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gettimeofday() : usage variation *** - ---int 0-- -array(4) { - ["sec"]=> - int(%d) - ["usec"]=> - int(%d) - ["minuteswest"]=> - int(-330) - ["dsttime"]=> - int(0) -} - ---int 1-- -float(%f) - ---int 12345-- -float(%f) - ---int -12345-- -float(%f) - ---float 10.5-- -float(%f) - ---float -10.5-- -float(%f) - ---float 12.3456789000e10-- -float(%f) - ---float -12.3456789000e10-- -float(%f) - ---float .5-- -float(%f) - ---empty array-- - -Warning: gettimeofday() expects parameter 1 to be bool, array given in %s on line %d -NULL - ---int indexed array-- - -Warning: gettimeofday() expects parameter 1 to be bool, array given in %s on line %d -NULL - ---associative array-- - -Warning: gettimeofday() expects parameter 1 to be bool, array given in %s on line %d -NULL - ---nested arrays-- - -Warning: gettimeofday() expects parameter 1 to be bool, array given in %s on line %d -NULL - ---uppercase NULL-- -array(4) { - ["sec"]=> - int(%d) - ["usec"]=> - int(%d) - ["minuteswest"]=> - int(-330) - ["dsttime"]=> - int(0) -} - ---lowercase null-- -array(4) { - ["sec"]=> - int(%d) - ["usec"]=> - int(%d) - ["minuteswest"]=> - int(-330) - ["dsttime"]=> - int(0) -} - ---lowercase true-- -float(%f) - ---lowercase false-- -array(4) { - ["sec"]=> - int(%d) - ["usec"]=> - int(%d) - ["minuteswest"]=> - int(-330) - ["dsttime"]=> - int(0) -} - ---uppercase TRUE-- -float(%f) - ---uppercase FALSE-- -array(4) { - ["sec"]=> - int(%d) - ["usec"]=> - int(%d) - ["minuteswest"]=> - int(-330) - ["dsttime"]=> - int(0) -} - ---empty string DQ-- -array(4) { - ["sec"]=> - int(%d) - ["usec"]=> - int(%d) - ["minuteswest"]=> - int(-330) - ["dsttime"]=> - int(0) -} - ---empty string SQ-- -array(4) { - ["sec"]=> - int(%d) - ["usec"]=> - int(%d) - ["minuteswest"]=> - int(-330) - ["dsttime"]=> - int(0) -} - ---string DQ-- -float(%f) - ---string SQ-- -float(%f) - ---mixed case string-- -float(%f) - ---heredoc-- -float(%f) - ---instance of classWithToString-- - -Warning: gettimeofday() expects parameter 1 to be bool, object given in %s on line %d -NULL - ---instance of classWithoutToString-- - -Warning: gettimeofday() expects parameter 1 to be bool, object given in %s on line %d -NULL - ---undefined var-- -array(4) { - ["sec"]=> - int(%d) - ["usec"]=> - int(%d) - ["minuteswest"]=> - int(-330) - ["dsttime"]=> - int(0) -} - ---unset var-- -array(4) { - ["sec"]=> - int(%d) - ["usec"]=> - int(%d) - ["minuteswest"]=> - int(-330) - ["dsttime"]=> - int(0) -} -===DONE=== diff --git a/ext/date/tests/gmdate_variation1.phpt b/ext/date/tests/gmdate_variation1.phpt deleted file mode 100644 index 88fb91d5fe500..0000000000000 --- a/ext/date/tests/gmdate_variation1.phpt +++ /dev/null @@ -1,221 +0,0 @@ ---TEST-- -Test gmdate() function : usage variation - Passing unexpected values to format argument . ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for format - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gmdate($value, $timestamp) ); - var_dump( gmdate($value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gmdate() : usage variation *** - ---int 0-- -string(1) "0" -string(1) "0" - ---int 1-- -string(1) "1" -string(1) "1" - ---int 12345-- -string(5) "12345" -string(5) "12345" - ---int -12345-- -string(6) "-12345" -string(6) "-12345" - ---float 10.5-- -string(4) "10.5" -string(4) "10.5" - ---float -10.5-- -string(5) "-10.5" -string(5) "-10.5" - ---float 12.3456789000e10-- -string(12) "123456789000" -string(12) "123456789000" - ---float -12.3456789000e10-- -string(13) "-123456789000" -string(13) "-123456789000" - ---float .5-- -string(3) "0.5" -string(3) "0.5" - ---empty array-- - -Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: gmdate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(0) "" -string(0) "" - ---lowercase null-- -string(0) "" -string(0) "" - ---lowercase true-- -string(1) "1" -string(1) "1" - ---lowercase false-- -string(0) "" -string(0) "" - ---uppercase TRUE-- -string(1) "1" -string(1) "1" - ---uppercase FALSE-- -string(0) "" -string(0) "" - ---empty string DQ-- -string(0) "" -string(0) "" - ---empty string SQ-- -string(0) "" -string(0) "" - ---instance of classWithToString-- -string(53) "CFridayam0808 AM 2008b8UTC2008-08-08T08:08:08+00:0031" -string(%d) "%s" - ---instance of classWithoutToString-- - -Warning: gmdate() expects parameter 1 to be string, object given in %s on line %d -bool(false) - -Warning: gmdate() expects parameter 1 to be string, object given in %s on line %d -bool(false) - ---undefined var-- -string(0) "" -string(0) "" - ---unset var-- -string(0) "" -string(0) "" -===DONE=== diff --git a/ext/date/tests/gmdate_variation2.phpt b/ext/date/tests/gmdate_variation2.phpt deleted file mode 100644 index 0d522e5bf22e2..0000000000000 --- a/ext/date/tests/gmdate_variation2.phpt +++ /dev/null @@ -1,210 +0,0 @@ ---TEST-- -Test gmdate() function : usage variation - Passing unexpected values to timestamp argument. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for timestamp - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gmdate($format, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gmdate() : usage variation *** - ---int 0-- -string(24) "1970-01-01T00:00:00+0000" - ---int 1-- -string(24) "1970-01-01T00:00:01+0000" - ---int 12345-- -string(24) "1970-01-01T03:25:45+0000" - ---int -12345-- -string(24) "1969-12-31T20:34:15+0000" - ---float 10.5-- -string(24) "1970-01-01T00:00:10+0000" - ---float -10.5-- -string(24) "1969-12-31T23:59:50+0000" - ---float .5-- -string(24) "1970-01-01T00:00:00+0000" - ---empty array-- - -Warning: gmdate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: gmdate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: gmdate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: gmdate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(24) "1970-01-01T00:00:00+0000" - ---lowercase null-- -string(24) "1970-01-01T00:00:00+0000" - ---lowercase true-- -string(24) "1970-01-01T00:00:01+0000" - ---lowercase false-- -string(24) "1970-01-01T00:00:00+0000" - ---uppercase TRUE-- -string(24) "1970-01-01T00:00:01+0000" - ---uppercase FALSE-- -string(24) "1970-01-01T00:00:00+0000" - ---empty string DQ-- - -Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: gmdate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: gmdate() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: gmdate() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -string(24) "1970-01-01T00:00:00+0000" - ---unset var-- -string(24) "1970-01-01T00:00:00+0000" -===DONE=== diff --git a/ext/date/tests/gmmktime_variation1.phpt b/ext/date/tests/gmmktime_variation1.phpt deleted file mode 100644 index 95150e174bd9d..0000000000000 --- a/ext/date/tests/gmmktime_variation1.phpt +++ /dev/null @@ -1,194 +0,0 @@ ---TEST-- -Test gmmktime() function : usage variation - Passing unexpected values to first argument hour. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for hour - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gmmktime($value, $min, $sec, $mon, $day, $year) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gmmktime() : usage variation *** - ---float 10.5-- -int(1218190088) - ---float -10.5-- -int(1218118088) - ---float .5-- -int(1218154088) - ---empty array-- - -Warning: gmmktime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: gmmktime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: gmmktime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: gmmktime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -int(1218154088) - ---lowercase null-- -int(1218154088) - ---lowercase true-- -int(1218157688) - ---lowercase false-- -int(1218154088) - ---uppercase TRUE-- -int(1218157688) - ---uppercase FALSE-- -int(1218154088) - ---empty string DQ-- - -Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: gmmktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: gmmktime() expects parameter 1 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: gmmktime() expects parameter 1 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -int(1218154088) - ---unset var-- -int(1218154088) -===DONE=== diff --git a/ext/date/tests/gmmktime_variation2.phpt b/ext/date/tests/gmmktime_variation2.phpt deleted file mode 100644 index 2022a08a5b0c2..0000000000000 --- a/ext/date/tests/gmmktime_variation2.phpt +++ /dev/null @@ -1,194 +0,0 @@ ---TEST-- -Test gmmktime() function : usage variation - Passing unexpected values to second argument minute. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for min - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gmmktime($hour, $value, $sec, $mon, $day, $year) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gmmktime() : usage variation *** - ---float 10.5-- -int(1218183008) - ---float -10.5-- -int(1218181808) - ---float .5-- -int(1218182408) - ---empty array-- - -Warning: gmmktime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: gmmktime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: gmmktime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: gmmktime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -int(1218182408) - ---lowercase null-- -int(1218182408) - ---lowercase true-- -int(1218182468) - ---lowercase false-- -int(1218182408) - ---uppercase TRUE-- -int(1218182468) - ---uppercase FALSE-- -int(1218182408) - ---empty string DQ-- - -Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: gmmktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: gmmktime() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: gmmktime() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -int(1218182408) - ---unset var-- -int(1218182408) -===DONE=== diff --git a/ext/date/tests/gmmktime_variation3.phpt b/ext/date/tests/gmmktime_variation3.phpt deleted file mode 100644 index 409c08ab8afa8..0000000000000 --- a/ext/date/tests/gmmktime_variation3.phpt +++ /dev/null @@ -1,194 +0,0 @@ ---TEST-- -Test gmmktime() function : usage variation - Passing unexpected values to third argument seconds. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for sec - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gmmktime($hour, $min, $value, $mon, $day, $year) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gmmktime() : usage variation *** - ---float 10.5-- -int(1218182890) - ---float -10.5-- -int(1218182870) - ---float .5-- -int(1218182880) - ---empty array-- - -Warning: gmmktime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: gmmktime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: gmmktime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: gmmktime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -int(1218182880) - ---lowercase null-- -int(1218182880) - ---lowercase true-- -int(1218182881) - ---lowercase false-- -int(1218182880) - ---uppercase TRUE-- -int(1218182881) - ---uppercase FALSE-- -int(1218182880) - ---empty string DQ-- - -Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: gmmktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: gmmktime() expects parameter 3 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: gmmktime() expects parameter 3 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -int(1218182880) - ---unset var-- -int(1218182880) -===DONE=== diff --git a/ext/date/tests/gmmktime_variation4.phpt b/ext/date/tests/gmmktime_variation4.phpt deleted file mode 100644 index fb51916e34b17..0000000000000 --- a/ext/date/tests/gmmktime_variation4.phpt +++ /dev/null @@ -1,194 +0,0 @@ ---TEST-- -Test gmmktime() function : usage variation - Passing unexpected values to fourth argument month. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for mon - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gmmktime($hour, $min, $sec, $value, $day, $year) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gmmktime() : usage variation *** - ---float 10.5-- -int(1223453288) - ---float -10.5-- -int(1170922088) - ---float .5-- -int(1197101288) - ---empty array-- - -Warning: gmmktime() expects parameter 4 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: gmmktime() expects parameter 4 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: gmmktime() expects parameter 4 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: gmmktime() expects parameter 4 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -int(1197101288) - ---lowercase null-- -int(1197101288) - ---lowercase true-- -int(1199779688) - ---lowercase false-- -int(1197101288) - ---uppercase TRUE-- -int(1199779688) - ---uppercase FALSE-- -int(1197101288) - ---empty string DQ-- - -Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: gmmktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: gmmktime() expects parameter 4 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: gmmktime() expects parameter 4 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -int(1197101288) - ---unset var-- -int(1197101288) -===DONE=== diff --git a/ext/date/tests/gmmktime_variation5.phpt b/ext/date/tests/gmmktime_variation5.phpt deleted file mode 100644 index 1ebf1377b3b5c..0000000000000 --- a/ext/date/tests/gmmktime_variation5.phpt +++ /dev/null @@ -1,194 +0,0 @@ ---TEST-- -Test gmmktime() function : usage variation - Passing unexpected values to fifth argument day. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for day - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gmmktime($hour, $min, $sec, $mon, $value, $year) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gmmktime() : usage variation *** - ---float 10.5-- -int(1218355688) - ---float -10.5-- -int(1216627688) - ---float .5-- -int(1217491688) - ---empty array-- - -Warning: gmmktime() expects parameter 5 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: gmmktime() expects parameter 5 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: gmmktime() expects parameter 5 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: gmmktime() expects parameter 5 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -int(1217491688) - ---lowercase null-- -int(1217491688) - ---lowercase true-- -int(1217578088) - ---lowercase false-- -int(1217491688) - ---uppercase TRUE-- -int(1217578088) - ---uppercase FALSE-- -int(1217491688) - ---empty string DQ-- - -Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: gmmktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: gmmktime() expects parameter 5 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: gmmktime() expects parameter 5 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -int(1217491688) - ---unset var-- -int(1217491688) -===DONE=== diff --git a/ext/date/tests/gmmktime_variation6.phpt b/ext/date/tests/gmmktime_variation6.phpt deleted file mode 100644 index e5e80282cb871..0000000000000 --- a/ext/date/tests/gmmktime_variation6.phpt +++ /dev/null @@ -1,190 +0,0 @@ ---TEST-- -Test gmmktime() function : usage variation - Passing unexpected values to sixth argument year. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for year - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gmmktime($hour, $min, $sec, $mon, $day, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gmmktime() : usage variation *** - ---float 10.5-- -int(1281254888) - ---float .5-- -int(965722088) - ---empty array-- - -Warning: gmmktime() expects parameter 6 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: gmmktime() expects parameter 6 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: gmmktime() expects parameter 6 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: gmmktime() expects parameter 6 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -int(965722088) - ---lowercase null-- -int(965722088) - ---lowercase true-- -int(997258088) - ---lowercase false-- -int(965722088) - ---uppercase TRUE-- -int(997258088) - ---uppercase FALSE-- -int(965722088) - ---empty string DQ-- - -Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: gmmktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: gmmktime() expects parameter 6 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: gmmktime() expects parameter 6 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -int(965722088) - ---unset var-- -int(965722088) -===DONE=== diff --git a/ext/date/tests/gmstrftime_variation1.phpt b/ext/date/tests/gmstrftime_variation1.phpt deleted file mode 100644 index c8dcbe08e5b07..0000000000000 --- a/ext/date/tests/gmstrftime_variation1.phpt +++ /dev/null @@ -1,220 +0,0 @@ ---TEST-- -Test gmstrftime() function : usage variation - Passing unexpected values to first argument 'format'. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for format - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gmstrftime($value) ); - var_dump( gmstrftime($value, $timestamp) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gmstrftime() : usage variation *** - ---int 0-- -string(1) "0" -string(1) "0" - ---int 1-- -string(1) "1" -string(1) "1" - ---int 12345-- -string(5) "12345" -string(5) "12345" - ---int -12345-- -string(6) "-12345" -string(6) "-12345" - ---float 10.5-- -string(4) "10.5" -string(4) "10.5" - ---float -10.5-- -string(5) "-10.5" -string(5) "-10.5" - ---float 12.3456789000e10-- -string(12) "123456789000" -string(12) "123456789000" - ---float -12.3456789000e10-- -string(13) "-123456789000" -string(13) "-123456789000" - ---float .5-- -string(3) "0.5" -string(3) "0.5" - ---empty array-- - -Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: gmstrftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---uppercase NULL-- -bool(false) -bool(false) - ---lowercase null-- -bool(false) -bool(false) - ---lowercase true-- -string(1) "1" -string(1) "1" - ---lowercase false-- -bool(false) -bool(false) - ---uppercase TRUE-- -string(1) "1" -string(1) "1" - ---uppercase FALSE-- -bool(false) -bool(false) - ---empty string DQ-- -bool(false) -bool(false) - ---empty string SQ-- -bool(false) -bool(false) - ---instance of classWithToString-- -string(14) "Class A object" -string(14) "Class A object" - ---instance of classWithoutToString-- - -Warning: gmstrftime() expects parameter 1 to be string, object given in %s on line %d -bool(false) - -Warning: gmstrftime() expects parameter 1 to be string, object given in %s on line %d -bool(false) - ---undefined var-- -bool(false) -bool(false) - ---unset var-- -bool(false) -bool(false) -===DONE=== diff --git a/ext/date/tests/gmstrftime_variation2.phpt b/ext/date/tests/gmstrftime_variation2.phpt deleted file mode 100644 index 89dc158661fcf..0000000000000 --- a/ext/date/tests/gmstrftime_variation2.phpt +++ /dev/null @@ -1,210 +0,0 @@ ---TEST-- -Test gmstrftime() function : usage variation - Passing unexpected values to second argument 'timestamp'. ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for timestamp - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gmstrftime($format, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing gmstrftime() : usage variation *** - ---float 10.5-- -string(20) "Jan 01 1970 00:00:10" - ---float -10.5-- -string(20) "Dec 31 1969 23:59:50" - ---float 12.3456789000e10-- - -Warning: gmstrftime() expects parameter 2 to be int, float given in %s on line %d -bool(false) - ---float -12.3456789000e10-- - -Warning: gmstrftime() expects parameter 2 to be int, float given in %s on line %d -bool(false) - ---float .5-- -string(20) "Jan 01 1970 00:00:00" - ---empty array-- - -Warning: gmstrftime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: gmstrftime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: gmstrftime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: gmstrftime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(20) "Jan 01 1970 00:00:00" - ---lowercase null-- -string(20) "Jan 01 1970 00:00:00" - ---lowercase true-- -string(20) "Jan 01 1970 00:00:01" - ---lowercase false-- -string(20) "Jan 01 1970 00:00:00" - ---uppercase TRUE-- -string(20) "Jan 01 1970 00:00:01" - ---uppercase FALSE-- -string(20) "Jan 01 1970 00:00:00" - ---empty string DQ-- - -Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: gmstrftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: gmstrftime() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: gmstrftime() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -string(20) "Jan 01 1970 00:00:00" - ---unset var-- -string(20) "Jan 01 1970 00:00:00" -===DONE=== diff --git a/ext/date/tests/idate_variation1.phpt b/ext/date/tests/idate_variation1.phpt deleted file mode 100644 index 8727b8133a1d8..0000000000000 --- a/ext/date/tests/idate_variation1.phpt +++ /dev/null @@ -1,301 +0,0 @@ ---TEST-- -Test idate() function : usage variation - Passing unexpected values to first argument 'format'. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for format - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( idate($value) ); - var_dump( idate($value, $timestamp) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing idate() : usage variation *** - ---int 0-- - -Warning: idate(): Unrecognized date format token. in %s on line %d -bool(false) - -Warning: idate(): Unrecognized date format token. in %s on line %d -bool(false) - ---int 1-- - -Warning: idate(): Unrecognized date format token. in %s on line %d -bool(false) - -Warning: idate(): Unrecognized date format token. in %s on line %d -bool(false) - ---int 12345-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---int -12345-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---float 10.5-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---float -10.5-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---float 12.3456789000e10-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---float -12.3456789000e10-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---float .5-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---empty array-- - -Warning: idate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: idate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: idate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: idate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: idate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: idate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: idate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: idate() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---uppercase NULL-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---lowercase null-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---lowercase true-- - -Warning: idate(): Unrecognized date format token. in %s on line %d -bool(false) - -Warning: idate(): Unrecognized date format token. in %s on line %d -bool(false) - ---lowercase false-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---uppercase TRUE-- - -Warning: idate(): Unrecognized date format token. in %s on line %d -bool(false) - -Warning: idate(): Unrecognized date format token. in %s on line %d -bool(false) - ---uppercase FALSE-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---empty string DQ-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: idate() expects parameter 1 to be string, object given in %s on line %d -bool(false) - -Warning: idate() expects parameter 1 to be string, object given in %s on line %d -bool(false) - ---undefined var-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - ---unset var-- - -Warning: idate(): idate format is one char in %s on line %d -bool(false) - -Warning: idate(): idate format is one char in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/idate_variation2.phpt b/ext/date/tests/idate_variation2.phpt deleted file mode 100644 index 5d6cc6b13f298..0000000000000 --- a/ext/date/tests/idate_variation2.phpt +++ /dev/null @@ -1,191 +0,0 @@ ---TEST-- -Test idate() function : usage variation - Passing unexpected values to second optional argument 'timestamp'. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for timestamp - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( idate($format, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing idate() : usage variation *** - ---float 10.5-- -int(1970) - ---float -10.5-- -int(1970) - ---float .5-- -int(1970) - ---empty array-- - -Warning: idate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: idate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: idate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: idate() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -int(1970) - ---lowercase null-- -int(1970) - ---lowercase true-- -int(1970) - ---lowercase false-- -int(1970) - ---uppercase TRUE-- -int(1970) - ---uppercase FALSE-- -int(1970) - ---empty string DQ-- - -Warning: idate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: idate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: idate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: idate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: idate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: idate() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: idate() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: idate() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -int(1970) - ---unset var-- -int(1970) -===DONE=== diff --git a/ext/date/tests/localtime_variation1.phpt b/ext/date/tests/localtime_variation1.phpt deleted file mode 100644 index 6dbff620d3a77..0000000000000 --- a/ext/date/tests/localtime_variation1.phpt +++ /dev/null @@ -1,658 +0,0 @@ ---TEST-- -Test localtime() function : usage variation - Passing unexpected values to first argument 'timestamp'. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for timestamp - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( localtime($value) ); - var_dump( localtime($value, $is_associative) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing localtime() : usage variation *** - ---float 10.5-- -array(9) { - [0]=> - int(10) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---float -10.5-- -array(9) { - [0]=> - int(50) - [1]=> - int(59) - [2]=> - int(23) - [3]=> - int(31) - [4]=> - int(11) - [5]=> - int(69) - [6]=> - int(3) - [7]=> - int(364) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(50) - ["tm_min"]=> - int(59) - ["tm_hour"]=> - int(23) - ["tm_mday"]=> - int(31) - ["tm_mon"]=> - int(11) - ["tm_year"]=> - int(69) - ["tm_wday"]=> - int(3) - ["tm_yday"]=> - int(364) - ["tm_isdst"]=> - int(0) -} - ---float .5-- -array(9) { - [0]=> - int(0) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(0) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---empty array-- - -Warning: localtime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: localtime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: localtime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: localtime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -array(9) { - [0]=> - int(0) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(0) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---lowercase null-- -array(9) { - [0]=> - int(0) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(0) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---lowercase true-- -array(9) { - [0]=> - int(1) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(1) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---lowercase false-- -array(9) { - [0]=> - int(0) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(0) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---uppercase TRUE-- -array(9) { - [0]=> - int(1) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(1) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---uppercase FALSE-- -array(9) { - [0]=> - int(0) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(0) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---empty string DQ-- - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: localtime() expects parameter 1 to be int, object given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: localtime() expects parameter 1 to be int, object given in %s on line %d -bool(false) - -Warning: localtime() expects parameter 1 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -array(9) { - [0]=> - int(0) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(0) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---unset var-- -array(9) { - [0]=> - int(0) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -array(9) { - ["tm_sec"]=> - int(0) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} -===DONE=== diff --git a/ext/date/tests/localtime_variation2.phpt b/ext/date/tests/localtime_variation2.phpt deleted file mode 100644 index 315d956fcd149..0000000000000 --- a/ext/date/tests/localtime_variation2.phpt +++ /dev/null @@ -1,643 +0,0 @@ ---TEST-- -Test localtime() function : usage variation - Passing unexpected values to second argument 'associative_array'. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for associative_array - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( localtime($timestamp, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing localtime() : usage variation *** - ---int 0-- -array(9) { - [0]=> - int(10) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} - ---int 1-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---int 12345-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---int -12345-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---float 10.5-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---float -10.5-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---float 12.3456789000e10-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---float -12.3456789000e10-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---float .5-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---empty array-- - -Warning: localtime() expects parameter 2 to be bool, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: localtime() expects parameter 2 to be bool, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: localtime() expects parameter 2 to be bool, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: localtime() expects parameter 2 to be bool, array given in %s on line %d -bool(false) - ---uppercase NULL-- -array(9) { - [0]=> - int(10) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} - ---lowercase null-- -array(9) { - [0]=> - int(10) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} - ---lowercase true-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---lowercase false-- -array(9) { - [0]=> - int(10) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} - ---uppercase TRUE-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---uppercase FALSE-- -array(9) { - [0]=> - int(10) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} - ---empty string DQ-- -array(9) { - [0]=> - int(10) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} - ---empty string SQ-- -array(9) { - [0]=> - int(10) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} - ---string DQ-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---string SQ-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---mixed case string-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---heredoc-- -array(9) { - ["tm_sec"]=> - int(10) - ["tm_min"]=> - int(0) - ["tm_hour"]=> - int(0) - ["tm_mday"]=> - int(1) - ["tm_mon"]=> - int(0) - ["tm_year"]=> - int(70) - ["tm_wday"]=> - int(4) - ["tm_yday"]=> - int(0) - ["tm_isdst"]=> - int(0) -} - ---instance of classWithToString-- - -Warning: localtime() expects parameter 2 to be bool, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: localtime() expects parameter 2 to be bool, object given in %s on line %d -bool(false) - ---undefined var-- -array(9) { - [0]=> - int(10) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} - ---unset var-- -array(9) { - [0]=> - int(10) - [1]=> - int(0) - [2]=> - int(0) - [3]=> - int(1) - [4]=> - int(0) - [5]=> - int(70) - [6]=> - int(4) - [7]=> - int(0) - [8]=> - int(0) -} -===DONE=== diff --git a/ext/date/tests/mktime_variation1.phpt b/ext/date/tests/mktime_variation1.phpt deleted file mode 100644 index da4dd1836a9de..0000000000000 --- a/ext/date/tests/mktime_variation1.phpt +++ /dev/null @@ -1,224 +0,0 @@ ---TEST-- -Test mktime() function : usage variation - Passing unexpected values to first argument $hour. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$hour = 10; -$minute = 30; -$sec = 45; -$month = 7; -$day = 2; -$year = 1963; -$is_dst = 0; - -foreach($inputs as $variation =>$hour) { - echo "\n-- $variation --\n"; - var_dump( mktime($hour) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing mktime() : usage variation - unexpected values to first argument $hour*** - --- int 0 -- -int(%i) - --- int 12345 -- -int(%i) - --- int -12345 -- -int(%i) - --- float 10.5 -- -int(%i) - --- float -10.5 -- -int(%i) - --- float .5 -- -int(%i) - --- empty array -- - -Warning: mktime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: mktime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: mktime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: mktime() expects parameter 1 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -int(%i) - --- lowercase null -- -int(%i) - --- lowercase true -- -int(%i) - --- lowercase false -- -int(%i) - --- uppercase TRUE -- -int(%i) - --- uppercase FALSE -- -int(%i) - --- empty string DQ -- - -Warning: mktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: mktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: mktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: mktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: mktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: mktime() expects parameter 1 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: mktime() expects parameter 1 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: mktime() expects parameter 1 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -int(%i) - --- unset var -- -int(%i) - --- resource -- - -Warning: mktime() expects parameter 1 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/mktime_variation2.phpt b/ext/date/tests/mktime_variation2.phpt deleted file mode 100644 index dafb7a0aa0883..0000000000000 --- a/ext/date/tests/mktime_variation2.phpt +++ /dev/null @@ -1,218 +0,0 @@ ---TEST-- -Test mktime() function : usage variation - Passing unexpected values to second argument $minute. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$hour = 10; - -foreach($inputs as $variation =>$minute) { - echo "\n-- $variation --\n"; - var_dump( mktime($hour, $minute) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing mktime() : usage variation - unexpected values to second argument $minute*** - --- int 0 -- -int(%i) - --- int 12345 -- -int(%i) - --- int -12345 -- -int(%i) - --- float 10.5 -- -int(%i) - --- float -10.5 -- -int(%i) - --- float .5 -- -int(%i) - --- empty array -- - -Warning: mktime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: mktime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: mktime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: mktime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -int(%i) - --- lowercase null -- -int(%i) - --- lowercase true -- -int(%i) - --- lowercase false -- -int(%i) - --- uppercase TRUE -- -int(%i) - --- uppercase FALSE -- -int(%i) - --- empty string DQ -- - -Warning: mktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: mktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: mktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: mktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: mktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: mktime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: mktime() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: mktime() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -int(%i) - --- unset var -- -int(%i) - --- resource -- - -Warning: mktime() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/mktime_variation3.phpt b/ext/date/tests/mktime_variation3.phpt deleted file mode 100644 index e610a13b3c523..0000000000000 --- a/ext/date/tests/mktime_variation3.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test mktime() function : usage variation - Passing unexpected values to third argument $second. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$hour = 10; -$minute = 30; - -foreach($inputs as $variation =>$second) { - echo "\n-- $variation --\n"; - var_dump( mktime($hour, $minute, $second) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing mktime() : usage variation - unexpected values to third argument $second*** - --- int 0 -- -int(%i) - --- int 12345 -- -int(%i) - --- int -12345 -- -int(%i) - --- float 10.5 -- -int(%i) - --- float -10.5 -- -int(%i) - --- float .5 -- -int(%i) - --- empty array -- - -Warning: mktime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: mktime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: mktime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: mktime() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -int(%i) - --- lowercase null -- -int(%i) - --- lowercase true -- -int(%i) - --- lowercase false -- -int(%i) - --- uppercase TRUE -- -int(%i) - --- uppercase FALSE -- -int(%i) - --- empty string DQ -- - -Warning: mktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: mktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: mktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: mktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: mktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: mktime() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: mktime() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: mktime() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -int(%i) - --- unset var -- -int(%i) - --- resource -- - -Warning: mktime() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/mktime_variation4.phpt b/ext/date/tests/mktime_variation4.phpt deleted file mode 100644 index 5cd39dd0ec3a0..0000000000000 --- a/ext/date/tests/mktime_variation4.phpt +++ /dev/null @@ -1,220 +0,0 @@ ---TEST-- -Test mktime() function : usage variation - Passing unexpected values to forth argument $month. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$hour = 10; -$minute = 30; -$second = 45; - -foreach($inputs as $variation =>$month) { - echo "\n-- $variation --\n"; - var_dump( mktime($hour, $minute, $second, $month) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing mktime() : usage variation - unexpected values to forth argument $month*** - --- int 0 -- -int(%i) - --- int 12345 -- -%rint\(-?[1-9][0-9]*\)|bool\(false\)%r - --- int -12345 -- -%rint\(-?[1-9][0-9]*\)|bool\(false\)%r - --- float 10.5 -- -int(%i) - --- float -10.5 -- -int(%i) - --- float .5 -- -int(%i) - --- empty array -- - -Warning: mktime() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: mktime() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: mktime() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: mktime() expects parameter 4 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -int(%i) - --- lowercase null -- -int(%i) - --- lowercase true -- -int(%i) - --- lowercase false -- -int(%i) - --- uppercase TRUE -- -int(%i) - --- uppercase FALSE -- -int(%i) - --- empty string DQ -- - -Warning: mktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: mktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: mktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: mktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: mktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: mktime() expects parameter 4 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: mktime() expects parameter 4 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: mktime() expects parameter 4 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -int(%i) - --- unset var -- -int(%i) - --- resource -- - -Warning: mktime() expects parameter 4 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/mktime_variation5.phpt b/ext/date/tests/mktime_variation5.phpt deleted file mode 100644 index 526d74d89610f..0000000000000 --- a/ext/date/tests/mktime_variation5.phpt +++ /dev/null @@ -1,221 +0,0 @@ ---TEST-- -Test mktime() function : usage variation - Passing unexpected values to fifth argument $day. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$hour = 10; -$minute = 30; -$second = 45; -$month = 7; - -foreach($inputs as $variation =>$day) { - echo "\n-- $variation --\n"; - var_dump( mktime($hour, $minute, $second, $month, $day) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing mktime() : usage variation - unexpected values to fifth argument $day*** - --- int 0 -- -int(%i) - --- int 12345 -- -%rint\(-?[1-9][0-9]*\)|bool\(false\)%r - --- int -12345 -- -int(%i) - --- float 10.5 -- -int(%i) - --- float -10.5 -- -int(%i) - --- float .5 -- -int(%i) - --- empty array -- - -Warning: mktime() expects parameter 5 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: mktime() expects parameter 5 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: mktime() expects parameter 5 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: mktime() expects parameter 5 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -int(%i) - --- lowercase null -- -int(%i) - --- lowercase true -- -int(%i) - --- lowercase false -- -int(%i) - --- uppercase TRUE -- -int(%i) - --- uppercase FALSE -- -int(%i) - --- empty string DQ -- - -Warning: mktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: mktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: mktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: mktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: mktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: mktime() expects parameter 5 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: mktime() expects parameter 5 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: mktime() expects parameter 5 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -int(%i) - --- unset var -- -int(%i) - --- resource -- - -Warning: mktime() expects parameter 5 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/mktime_variation6.phpt b/ext/date/tests/mktime_variation6.phpt deleted file mode 100644 index 82f42634a161b..0000000000000 --- a/ext/date/tests/mktime_variation6.phpt +++ /dev/null @@ -1,222 +0,0 @@ ---TEST-- -Test mktime() function : usage variation - Passing unexpected values to sixth argument $year. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$hour = 10; -$minute = 30; -$second = 45; -$month = 7; -$day = 2; - -foreach($inputs as $variation =>$year) { - echo "\n-- $variation --\n"; - var_dump( mktime($hour, $minute, $second, $month, $day, $year) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing mktime() : usage variation - unexpected values to sixth argument $year*** - --- int 0 -- -int(%i) - --- int 12345 -- -%rint\(-?[1-9][0-9]*\)|bool\(false\)%r - --- int -12345 -- -%rint\(-?[1-9][0-9]*\)|bool\(false\)%r - --- float 10.5 -- -int(%i) - --- float -10.5 -- -%rint\(-?[1-9][0-9]*\)|bool\(false\)%r - --- float .5 -- -int(%i) - --- empty array -- - -Warning: mktime() expects parameter 6 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: mktime() expects parameter 6 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: mktime() expects parameter 6 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: mktime() expects parameter 6 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -int(%i) - --- lowercase null -- -int(%i) - --- lowercase true -- -int(%i) - --- lowercase false -- -int(%i) - --- uppercase TRUE -- -int(%i) - --- uppercase FALSE -- -int(%i) - --- empty string DQ -- - -Warning: mktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: mktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: mktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: mktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: mktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: mktime() expects parameter 6 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: mktime() expects parameter 6 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: mktime() expects parameter 6 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -int(%i) - --- unset var -- -int(%i) - --- resource -- - -Warning: mktime() expects parameter 6 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/strftime_variation1.phpt b/ext/date/tests/strftime_variation1.phpt deleted file mode 100644 index c75661dcb4fd1..0000000000000 --- a/ext/date/tests/strftime_variation1.phpt +++ /dev/null @@ -1,222 +0,0 @@ ---TEST-- -Test strftime() function : usage variation - Passing unexpected values to first argument 'format'. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for format - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( strftime($value) ); - var_dump( strftime($value, $timestamp) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing strftime() : usage variation *** - ---int 0-- -string(1) "0" -string(1) "0" - ---int 1-- -string(1) "1" -string(1) "1" - ---int 12345-- -string(5) "12345" -string(5) "12345" - ---int -12345-- -string(6) "-12345" -string(6) "-12345" - ---float 10.5-- -string(4) "10.5" -string(4) "10.5" - ---float -10.5-- -string(5) "-10.5" -string(5) "-10.5" - ---float 12.3456789000e10-- -string(12) "123456789000" -string(12) "123456789000" - ---float -12.3456789000e10-- -string(13) "-123456789000" -string(13) "-123456789000" - ---float .5-- -string(3) "0.5" -string(3) "0.5" - ---empty array-- - -Warning: strftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: strftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: strftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: strftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: strftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: strftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: strftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: strftime() expects parameter 1 to be string, array given in %s on line %d -bool(false) - ---uppercase NULL-- -bool(false) -bool(false) - ---lowercase null-- -bool(false) -bool(false) - ---lowercase true-- -string(1) "1" -string(1) "1" - ---lowercase false-- -bool(false) -bool(false) - ---uppercase TRUE-- -string(1) "1" -string(1) "1" - ---uppercase FALSE-- -bool(false) -bool(false) - ---empty string DQ-- -bool(false) -bool(false) - ---empty string SQ-- -bool(false) -bool(false) - ---instance of classWithToString-- -string(14) "Class A object" -string(14) "Class A object" - ---instance of classWithoutToString-- - -Warning: strftime() expects parameter 1 to be string, object given in %s on line %d -bool(false) - -Warning: strftime() expects parameter 1 to be string, object given in %s on line %d -bool(false) - ---undefined var-- -bool(false) -bool(false) - ---unset var-- -bool(false) -bool(false) -===DONE=== diff --git a/ext/date/tests/strftime_variation2.phpt b/ext/date/tests/strftime_variation2.phpt deleted file mode 100644 index 3b54896370d43..0000000000000 --- a/ext/date/tests/strftime_variation2.phpt +++ /dev/null @@ -1,191 +0,0 @@ ---TEST-- -Test strftime() function : usage variation - Passing unexpected values to second argument 'timestamp'. ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for timestamp - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( strftime($format, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing strftime() : usage variation *** - ---float 10.5-- -string(20) "Jan 01 1970 05:30:10" - ---float -10.5-- -string(20) "Jan 01 1970 05:29:50" - ---float .5-- -string(20) "Jan 01 1970 05:30:00" - ---empty array-- - -Warning: strftime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---int indexed array-- - -Warning: strftime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---associative array-- - -Warning: strftime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---nested arrays-- - -Warning: strftime() expects parameter 2 to be int, array given in %s on line %d -bool(false) - ---uppercase NULL-- -string(20) "Jan 01 1970 05:30:00" - ---lowercase null-- -string(20) "Jan 01 1970 05:30:00" - ---lowercase true-- -string(20) "Jan 01 1970 05:30:01" - ---lowercase false-- -string(20) "Jan 01 1970 05:30:00" - ---uppercase TRUE-- -string(20) "Jan 01 1970 05:30:01" - ---uppercase FALSE-- -string(20) "Jan 01 1970 05:30:00" - ---empty string DQ-- - -Warning: strftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---empty string SQ-- - -Warning: strftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string DQ-- - -Warning: strftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---string SQ-- - -Warning: strftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---mixed case string-- - -Warning: strftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---heredoc-- - -Warning: strftime() expects parameter 2 to be int, string given in %s on line %d -bool(false) - ---instance of classWithToString-- - -Warning: strftime() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---instance of classWithoutToString-- - -Warning: strftime() expects parameter 2 to be int, object given in %s on line %d -bool(false) - ---undefined var-- -string(20) "Jan 01 1970 05:30:00" - ---unset var-- -string(20) "Jan 01 1970 05:30:00" -===DONE=== diff --git a/ext/date/tests/timezone_name_from_abbr_variation1.phpt b/ext/date/tests/timezone_name_from_abbr_variation1.phpt deleted file mode 100644 index f2702fe2c94e4..0000000000000 --- a/ext/date/tests/timezone_name_from_abbr_variation1.phpt +++ /dev/null @@ -1,205 +0,0 @@ ---TEST-- -Test timezone_name_from_abbr() function : usage variation - Passing unexpected values to first argument $abbr. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$gmtOffset= 3600; -$isdst = 1; - -foreach($inputs as $variation =>$abbr) { - echo "\n-- $variation --\n"; - var_dump( timezone_name_from_abbr($abbr, $gmtOffset, $isdst) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing timezone_name_from_abbr() : usage variation - unexpected values to first argument $abbr*** - --- int 0 -- -string(13) "Europe/London" - --- int 12345 -- -string(13) "Europe/London" - --- int -12345 -- -string(13) "Europe/London" - --- float 10.5 -- -string(13) "Europe/London" - --- float -10.5 -- -string(13) "Europe/London" - --- float .5 -- -string(13) "Europe/London" - --- empty array -- - -Warning: timezone_name_from_abbr() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: timezone_name_from_abbr() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: timezone_name_from_abbr() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: timezone_name_from_abbr() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- uppercase NULL -- -string(13) "Europe/London" - --- lowercase null -- -string(13) "Europe/London" - --- lowercase true -- -string(13) "Europe/London" - --- lowercase false -- -string(13) "Europe/London" - --- uppercase TRUE -- -string(13) "Europe/London" - --- uppercase FALSE -- -string(13) "Europe/London" - --- empty string DQ -- -string(13) "Europe/London" - --- empty string SQ -- -string(13) "Europe/London" - --- string DQ -- -string(13) "Europe/London" - --- string SQ -- -string(13) "Europe/London" - --- mixed case string -- -string(13) "Europe/London" - --- heredoc -- -string(13) "Europe/London" - --- instance of classWithToString -- -string(13) "Europe/London" - --- instance of classWithoutToString -- - -Warning: timezone_name_from_abbr() expects parameter 1 to be string, object given in %s on line %d -bool(false) - --- undefined var -- -string(13) "Europe/London" - --- unset var -- -string(13) "Europe/London" - --- resource -- - -Warning: timezone_name_from_abbr() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/timezone_name_from_abbr_variation2.phpt b/ext/date/tests/timezone_name_from_abbr_variation2.phpt deleted file mode 100644 index 952dc0008a55f..0000000000000 --- a/ext/date/tests/timezone_name_from_abbr_variation2.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test timezone_name_from_abbr() function : usage variation - Passing unexpected values to second argument $gmtOffset. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$abbr= "GMT"; -$isdst = 1; - -foreach($inputs as $variation =>$gmtOffset) { - echo "\n-- $variation --\n"; - var_dump( timezone_name_from_abbr($abbr, $gmtOffset, $isdst) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing timezone_name_from_abbr() : usage variation - unexpected values to second argument $gmtOffset*** - --- int 0 -- -string(3) "UTC" - --- int 12345 -- -string(3) "UTC" - --- int -12345 -- -string(3) "UTC" - --- float 10.5 -- -string(3) "UTC" - --- float -10.5 -- -string(3) "UTC" - --- float .5 -- -string(3) "UTC" - --- empty array -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -string(3) "UTC" - --- lowercase null -- -string(3) "UTC" - --- lowercase true -- -string(3) "UTC" - --- lowercase false -- -string(3) "UTC" - --- uppercase TRUE -- -string(3) "UTC" - --- uppercase FALSE -- -string(3) "UTC" - --- empty string DQ -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -string(3) "UTC" - --- unset var -- -string(3) "UTC" - --- resource -- - -Warning: timezone_name_from_abbr() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/timezone_name_from_abbr_variation3.phpt b/ext/date/tests/timezone_name_from_abbr_variation3.phpt deleted file mode 100644 index 901ff8cbf7bd4..0000000000000 --- a/ext/date/tests/timezone_name_from_abbr_variation3.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test timezone_name_from_abbr() function : usage variation - Passing unexpected values to third argument $isdst. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$abbr= "GMT"; -$gmtOffset = 3600; - -foreach($inputs as $variation =>$isdst) { - echo "\n-- $variation --\n"; - var_dump( timezone_name_from_abbr($abbr, $gmtOffset, $isdst) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing timezone_name_from_abbr() : usage variation - unexpected values to third argument $isdst*** - --- int 0 -- -string(3) "UTC" - --- int 12345 -- -string(3) "UTC" - --- int -12345 -- -string(3) "UTC" - --- float 10.5 -- -string(3) "UTC" - --- float -10.5 -- -string(3) "UTC" - --- float .5 -- -string(3) "UTC" - --- empty array -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, array given in %s on line %d -bool(false) - --- uppercase NULL -- -string(3) "UTC" - --- lowercase null -- -string(3) "UTC" - --- lowercase true -- -string(3) "UTC" - --- lowercase false -- -string(3) "UTC" - --- uppercase TRUE -- -string(3) "UTC" - --- uppercase FALSE -- -string(3) "UTC" - --- empty string DQ -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- undefined var -- -string(3) "UTC" - --- unset var -- -string(3) "UTC" - --- resource -- - -Warning: timezone_name_from_abbr() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/timezone_offset_get_variation1.phpt b/ext/date/tests/timezone_offset_get_variation1.phpt deleted file mode 100644 index 8d60af600d2b6..0000000000000 --- a/ext/date/tests/timezone_offset_get_variation1.phpt +++ /dev/null @@ -1,200 +0,0 @@ ---TEST-- -Test timezone_offset_get() function : usage variation - Passing unexpected values to first argument $object. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$datetime = new DateTime("2009-01-31 15:14:10"); - -foreach($inputs as $variation =>$object) { - echo "\n-- $variation --\n"; - try { - var_dump( timezone_offset_get($object, $datetime) ); - } catch (Error $ex) { - echo $ex->getMessage()."\n"; - } -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECT-- -*** Testing timezone_offset_get() : usage variation - unexpected values to first argument $object*** - --- int 0 -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, int given - --- int 1 -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, int given - --- int 12345 -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, int given - --- int -12345 -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, int given - --- float 10.5 -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, float given - --- float -10.5 -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, float given - --- float .5 -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, float given - --- empty array -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, array given - --- int indexed array -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, array given - --- associative array -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, array given - --- nested arrays -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, array given - --- uppercase NULL -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given - --- lowercase null -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given - --- lowercase true -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, bool given - --- lowercase false -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, bool given - --- uppercase TRUE -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, bool given - --- uppercase FALSE -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, bool given - --- empty string DQ -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given - --- empty string SQ -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given - --- string DQ -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given - --- string SQ -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given - --- mixed case string -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given - --- heredoc -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, string given - --- instance of classWithToString -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of classWithToString given - --- instance of classWithoutToString -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, instance of classWithoutToString given - --- undefined var -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given - --- unset var -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, null given - --- resource -- -Argument 1 passed to timezone_offset_get() must be an instance of DateTimeZone, resource given -===DONE=== diff --git a/ext/date/tests/timezone_offset_get_variation2.phpt b/ext/date/tests/timezone_offset_get_variation2.phpt deleted file mode 100644 index e116e0570c873..0000000000000 --- a/ext/date/tests/timezone_offset_get_variation2.phpt +++ /dev/null @@ -1,200 +0,0 @@ ---TEST-- -Test timezone_offset_get() function : usage variation - Passing unexpected values to second argument $datetime. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$object = new DateTimezone("Europe/London"); - -foreach($inputs as $variation =>$datetime) { - echo "\n-- $variation --\n"; - try { - var_dump( timezone_offset_get($object, $datetime) ); - } catch (Error $ex) { - echo $ex->getMessage()."\n"; - } -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECT-- -*** Testing timezone_offset_get() : usage variation - unexpected values to second argument $datetime*** - --- int 0 -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, int given - --- int 1 -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, int given - --- int 12345 -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, int given - --- int -12345 -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, int given - --- float 10.5 -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, float given - --- float -10.5 -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, float given - --- float .5 -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, float given - --- empty array -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, array given - --- int indexed array -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, array given - --- associative array -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, array given - --- nested arrays -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, array given - --- uppercase NULL -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, null given - --- lowercase null -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, null given - --- lowercase true -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, bool given - --- lowercase false -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, bool given - --- uppercase TRUE -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, bool given - --- uppercase FALSE -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, bool given - --- empty string DQ -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given - --- empty string SQ -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given - --- string DQ -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given - --- string SQ -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given - --- mixed case string -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given - --- heredoc -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, string given - --- instance of classWithToString -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, instance of classWithToString given - --- instance of classWithoutToString -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, instance of classWithoutToString given - --- undefined var -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, null given - --- unset var -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, null given - --- resource -- -Argument 2 passed to timezone_offset_get() must implement interface DateTimeInterface, resource given -===DONE=== diff --git a/ext/date/tests/timezone_open_variation1.phpt b/ext/date/tests/timezone_open_variation1.phpt deleted file mode 100644 index d9afa4700dc35..0000000000000 --- a/ext/date/tests/timezone_open_variation1.phpt +++ /dev/null @@ -1,239 +0,0 @@ ---TEST-- -Test timezone_open function : usage variation - Passing unexpected values to first argument $timezone. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - - // float data - 'float 10.5' => 10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -foreach($inputs as $variation =>$timezone) { - echo "\n-- $variation --\n"; - var_dump( timezone_open($timezone) ); - -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing timezone_open() : usage variation - unexpected values to first argument $timezone*** - --- int 0 -- - -Warning: timezone_open(): Unknown or bad timezone (0) in %s on line %d -bool(false) - --- int 1 -- - -Warning: timezone_open(): Unknown or bad timezone (1) in %s on line %d -bool(false) - --- int 12345 -- - -Warning: timezone_open(): Unknown or bad timezone (12345) in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: timezone_open(): Unknown or bad timezone (10.5) in %s on line %d -bool(false) - --- float .5 -- - -Warning: timezone_open(): Unknown or bad timezone (0.5) in %s on line %d -bool(false) - --- empty array -- - -Warning: timezone_open() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: timezone_open() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: timezone_open() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: timezone_open() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: timezone_open(): Unknown or bad timezone () in %s on line %d -bool(false) - --- lowercase null -- - -Warning: timezone_open(): Unknown or bad timezone () in %s on line %d -bool(false) - --- lowercase true -- - -Warning: timezone_open(): Unknown or bad timezone (1) in %s on line %d -bool(false) - --- lowercase false -- - -Warning: timezone_open(): Unknown or bad timezone () in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: timezone_open(): Unknown or bad timezone (1) in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: timezone_open(): Unknown or bad timezone () in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: timezone_open(): Unknown or bad timezone () in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: timezone_open(): Unknown or bad timezone () in %s on line %d -bool(false) - --- string DQ -- - -Warning: timezone_open(): Unknown or bad timezone (string) in %s on line %d -bool(false) - --- string SQ -- - -Warning: timezone_open(): Unknown or bad timezone (string) in %s on line %d -bool(false) - --- mixed case string -- - -Warning: timezone_open(): Unknown or bad timezone (sTrInG) in %s on line %d -bool(false) - --- heredoc -- - -Warning: timezone_open(): Unknown or bad timezone (hello world) in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: timezone_open(): Unknown or bad timezone (Class A object) in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: timezone_open() expects parameter 1 to be string, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: timezone_open(): Unknown or bad timezone () in %s on line %d -bool(false) - --- unset var -- - -Warning: timezone_open(): Unknown or bad timezone () in %s on line %d -bool(false) - --- resource -- - -Warning: timezone_open() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/timezone_transitions_get_variation1.phpt b/ext/date/tests/timezone_transitions_get_variation1.phpt deleted file mode 100644 index 615b02692ac8f..0000000000000 --- a/ext/date/tests/timezone_transitions_get_variation1.phpt +++ /dev/null @@ -1,250 +0,0 @@ ---TEST-- -Test timezone_transitions_get() function : usage variation - Passing unexpected values to first argument $object. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -foreach($inputs as $variation =>$object) { - echo "\n-- $variation --\n"; - var_dump( timezone_transitions_get($object) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing timezone_transitions_get() : usage variation - unexpected values to first argument $object*** - --- int 0 -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int 1 -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int 12345 -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, int given in %s on line %d -bool(false) - --- int -12345 -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, int given in %s on line %d -bool(false) - --- float 10.5 -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, float given in %s on line %d -bool(false) - --- float -10.5 -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, float given in %s on line %d -bool(false) - --- float .5 -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, float given in %s on line %d -bool(false) - --- empty array -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, array given in %s on line %d -bool(false) - --- int indexed array -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, array given in %s on line %d -bool(false) - --- associative array -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, array given in %s on line %d -bool(false) - --- nested arrays -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, array given in %s on line %d -bool(false) - --- uppercase NULL -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, null given in %s on line %d -bool(false) - --- lowercase null -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, null given in %s on line %d -bool(false) - --- lowercase true -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- lowercase false -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- uppercase TRUE -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- uppercase FALSE -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, bool given in %s on line %d -bool(false) - --- empty string DQ -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- empty string SQ -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- string DQ -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- string SQ -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- mixed case string -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- heredoc -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, string given in %s on line %d -bool(false) - --- instance of classWithToString -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, object given in %s on line %d -bool(false) - --- instance of classWithoutToString -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, object given in %s on line %d -bool(false) - --- undefined var -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, null given in %s on line %d -bool(false) - --- unset var -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, null given in %s on line %d -bool(false) - --- resource -- - -Warning: timezone_transitions_get() expects parameter 1 to be DateTimeZone, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/date/tests/timezone_transitions_get_variation2.phpt b/ext/date/tests/timezone_transitions_get_variation2.phpt deleted file mode 100644 index a3d6db912f7db..0000000000000 --- a/ext/date/tests/timezone_transitions_get_variation2.phpt +++ /dev/null @@ -1,279 +0,0 @@ ---TEST-- -Test timezone_transitions_get() function : usage variation - Passing unexpected values to first argument $timestamp_begin. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$tz = timezone_open("Europe/London"); -$timestamp_end = mktime(0, 0, 0, 1, 1, 1975); - -foreach($inputs as $variation =>$timestamp_begin) { - echo "\n-- $variation --\n"; - $tran = timezone_transitions_get($tz, $timestamp_begin, $timestamp_end); - var_dump( gettype($tran) ); - var_dump( count($tran) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing timezone_transitions_get() : usage variation - unexpected values to first argument $timestamp_begin *** - --- int 0 -- -string(5) "array" -int(8) - --- int 1 -- -string(5) "array" -int(8) - --- int 12345 -- -string(5) "array" -int(8) - --- int -12345 -- -string(5) "array" -int(8) - --- float 10.5 -- -string(5) "array" -int(8) - --- float -10.5 -- -string(5) "array" -int(8) - --- float .5 -- -string(5) "array" -int(8) - --- empty array -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, array given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- int indexed array -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, array given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- associative array -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, array given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- nested arrays -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, array given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- uppercase NULL -- -string(5) "array" -int(8) - --- lowercase null -- -string(5) "array" -int(8) - --- lowercase true -- -string(5) "array" -int(8) - --- lowercase false -- -string(5) "array" -int(8) - --- uppercase TRUE -- -string(5) "array" -int(8) - --- uppercase FALSE -- -string(5) "array" -int(8) - --- empty string DQ -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- empty string SQ -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- string DQ -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- string SQ -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- mixed case string -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- heredoc -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- instance of classWithToString -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, object given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- instance of classWithoutToString -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, object given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- undefined var -- -string(5) "array" -int(8) - --- unset var -- -string(5) "array" -int(8) - --- resource -- - -Warning: timezone_transitions_get() expects parameter 2 to be int, resource given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) -===DONE=== diff --git a/ext/date/tests/timezone_transitions_get_variation3.phpt b/ext/date/tests/timezone_transitions_get_variation3.phpt deleted file mode 100644 index 5d793acdfc1d1..0000000000000 --- a/ext/date/tests/timezone_transitions_get_variation3.phpt +++ /dev/null @@ -1,279 +0,0 @@ ---TEST-- -Test timezone_transitions_get() function : usage variation - Passing unexpected values to first argument $timestamp_env. ---FILE-- - 1, 'two' => 2); - -// resource -$file_handle = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $file_handle -); - -$tz = timezone_open("Europe/London"); -$timestamp_begin = mktime(0, 0, 0, 1, 1, 1975); - -foreach($inputs as $variation =>$timestamp_end) { - echo "\n-- $variation --\n"; - $tran = timezone_transitions_get($tz, $timestamp_begin, $timestamp_end); - var_dump( gettype($tran) ); - var_dump( count($tran) ); -}; - -// closing the resource -fclose( $file_handle ); - -?> -===DONE=== ---EXPECTF-- -*** Testing timezone_transitions_get() : usage variation - unexpected values to first argument $timestamp_end *** - --- int 0 -- -string(5) "array" -int(1) - --- int 1 -- -string(5) "array" -int(1) - --- int 12345 -- -string(5) "array" -int(1) - --- int -12345 -- -string(5) "array" -int(1) - --- float 10.5 -- -string(5) "array" -int(1) - --- float -10.5 -- -string(5) "array" -int(1) - --- float .5 -- -string(5) "array" -int(1) - --- empty array -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, array given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- int indexed array -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, array given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- associative array -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, array given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- nested arrays -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, array given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- uppercase NULL -- -string(5) "array" -int(1) - --- lowercase null -- -string(5) "array" -int(1) - --- lowercase true -- -string(5) "array" -int(1) - --- lowercase false -- -string(5) "array" -int(1) - --- uppercase TRUE -- -string(5) "array" -int(1) - --- uppercase FALSE -- -string(5) "array" -int(1) - --- empty string DQ -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- empty string SQ -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- string DQ -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- string SQ -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- mixed case string -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- heredoc -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, string given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- instance of classWithToString -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, object given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- instance of classWithoutToString -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, object given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- undefined var -- -string(5) "array" -int(1) - --- unset var -- -string(5) "array" -int(1) - --- resource -- - -Warning: timezone_transitions_get() expects parameter 3 to be int, resource given in %s on line %d -string(7) "boolean" - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) -===DONE=== diff --git a/ext/dba/dba.c b/ext/dba/dba.c index 896b30bdc891b..e2f965258b6e4 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -1319,12 +1319,3 @@ PHP_FUNCTION(dba_list) /* }}} */ #endif /* HAVE_DBA */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c index f9525e2b0efff..6e91cee65acac 100644 --- a/ext/dba/dba_cdb.c +++ b/ext/dba/dba_cdb.c @@ -337,12 +337,3 @@ DBA_INFO_FUNC(cdb) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_db1.c b/ext/dba/dba_db1.c index f8e310250f13a..5d9c28dcec2c6 100644 --- a/ext/dba/dba_db1.c +++ b/ext/dba/dba_db1.c @@ -183,12 +183,3 @@ DBA_INFO_FUNC(db1) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c index 58b45189c6a98..0fecd36c33477 100644 --- a/ext/dba/dba_db2.c +++ b/ext/dba/dba_db2.c @@ -195,12 +195,3 @@ DBA_INFO_FUNC(db2) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c index 5820a801f52df..bc0fdacd02e2a 100644 --- a/ext/dba/dba_db3.c +++ b/ext/dba/dba_db3.c @@ -232,12 +232,3 @@ DBA_INFO_FUNC(db3) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c index 7a6c25ab4d1c3..ee296b9c4f4f9 100644 --- a/ext/dba/dba_db4.c +++ b/ext/dba/dba_db4.c @@ -287,12 +287,3 @@ DBA_INFO_FUNC(db4) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c index 826422450ab03..58a1493c518aa 100644 --- a/ext/dba/dba_dbm.c +++ b/ext/dba/dba_dbm.c @@ -199,12 +199,3 @@ DBA_INFO_FUNC(dbm) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_flatfile.c b/ext/dba/dba_flatfile.c index 252552ea7373b..9a4a3674f3923 100644 --- a/ext/dba/dba_flatfile.c +++ b/ext/dba/dba_flatfile.c @@ -176,12 +176,3 @@ DBA_INFO_FUNC(flatfile) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c index 2bd4016f1a5bd..185241421d0d8 100644 --- a/ext/dba/dba_gdbm.c +++ b/ext/dba/dba_gdbm.c @@ -193,12 +193,3 @@ DBA_INFO_FUNC(gdbm) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_inifile.c b/ext/dba/dba_inifile.c index 680eb840c7c33..ed001654af121 100644 --- a/ext/dba/dba_inifile.c +++ b/ext/dba/dba_inifile.c @@ -181,12 +181,3 @@ DBA_INFO_FUNC(inifile) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_lmdb.c b/ext/dba/dba_lmdb.c index 506ae00827863..0a459d685a6ee 100644 --- a/ext/dba/dba_lmdb.c +++ b/ext/dba/dba_lmdb.c @@ -340,12 +340,3 @@ DBA_INFO_FUNC(lmdb) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c index 085a95764e995..973a91322fb45 100644 --- a/ext/dba/dba_ndbm.c +++ b/ext/dba/dba_ndbm.c @@ -157,12 +157,3 @@ DBA_INFO_FUNC(ndbm) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_qdbm.c b/ext/dba/dba_qdbm.c index d1c213a5e6a4e..ba68bcc4ba25e 100644 --- a/ext/dba/dba_qdbm.c +++ b/ext/dba/dba_qdbm.c @@ -183,12 +183,3 @@ DBA_INFO_FUNC(qdbm) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/dba_tcadb.c b/ext/dba/dba_tcadb.c index 620e389f9fae2..2df943302626b 100644 --- a/ext/dba/dba_tcadb.c +++ b/ext/dba/dba_tcadb.c @@ -208,12 +208,3 @@ DBA_INFO_FUNC(tcadb) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/libflatfile/flatfile.c b/ext/dba/libflatfile/flatfile.c index 79ae85f65ce02..410f3405266f4 100644 --- a/ext/dba/libflatfile/flatfile.c +++ b/ext/dba/libflatfile/flatfile.c @@ -289,12 +289,3 @@ char *flatfile_version() return "1.0, $Id$"; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/libinifile/inifile.c b/ext/dba/libinifile/inifile.c index 89fa6d554a0e5..42cb3bb7617b5 100644 --- a/ext/dba/libinifile/inifile.c +++ b/ext/dba/libinifile/inifile.c @@ -602,12 +602,3 @@ int inifile_append(inifile *dba, const key_type *key, const val_type *value) return inifile_delete_replace_append(dba, key, value, 1, NULL); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dba/php_tcadb.h b/ext/dba/php_tcadb.h index dbd92589610bc..a8158ce57c228 100644 --- a/ext/dba/php_tcadb.h +++ b/ext/dba/php_tcadb.h @@ -28,12 +28,3 @@ DBA_FUNCS(tcadb); #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/dom/attr.c b/ext/dom/attr.c index 492048e06ceec..f59b46799f630 100644 --- a/ext/dom/attr.c +++ b/ext/dom/attr.c @@ -243,12 +243,3 @@ PHP_FUNCTION(dom_attr_is_id) /* }}} end dom_attr_is_id */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c index a6712cbcd0477..4d34e58a612cb 100644 --- a/ext/dom/cdatasection.c +++ b/ext/dom/cdatasection.c @@ -73,12 +73,3 @@ PHP_METHOD(domcdatasection, __construct) /* }}} end DOMCdataSection::__construct */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c index e81023b8157d6..f47324049894b 100644 --- a/ext/dom/characterdata.c +++ b/ext/dom/characterdata.c @@ -388,12 +388,3 @@ PHP_FUNCTION(dom_characterdata_replace_data) /* }}} end dom_characterdata_replace_data */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/comment.c b/ext/dom/comment.c index 460c7076f2b78..9cbec9f173a0b 100644 --- a/ext/dom/comment.c +++ b/ext/dom/comment.c @@ -75,12 +75,3 @@ PHP_METHOD(domcomment, __construct) /* }}} end DOMComment::__construct */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/document.c b/ext/dom/document.c index d8c8c7f84ee47..051c5db10eb53 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -2273,12 +2273,3 @@ PHP_METHOD(domdocument, registerNodeClass) /* }}} */ #endif /* HAVE_LIBXML && HAVE_DOM */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index f74ab8da3aed3..9b222586ac537 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -148,12 +148,3 @@ PHP_METHOD(domdocumentfragment, appendXML) { /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/documenttype.c b/ext/dom/documenttype.c index 16bd622a59c5c..ff7107d16590b 100644 --- a/ext/dom/documenttype.c +++ b/ext/dom/documenttype.c @@ -216,12 +216,3 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval *retval) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/dom_ce.h b/ext/dom/dom_ce.h index ee6439322bb01..a8b9c9227c738 100644 --- a/ext/dom/dom_ce.h +++ b/ext/dom/dom_ce.h @@ -55,12 +55,3 @@ extern PHP_DOM_EXPORT zend_class_entry *dom_xpath_class_entry; extern PHP_DOM_EXPORT zend_class_entry *dom_namespace_node_class_entry; #endif /* DOM_CE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/dom_fe.h b/ext/dom/dom_fe.h index 83769f9317cfb..b8c1ff2266ee9 100644 --- a/ext/dom/dom_fe.h +++ b/ext/dom/dom_fe.h @@ -270,12 +270,3 @@ PHP_FUNCTION(dom_xpath_register_php_functions); #endif #endif /* DOM_FE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c index 575d6f85d23ae..5c9e27ee4017f 100644 --- a/ext/dom/dom_iterators.c +++ b/ext/dom/dom_iterators.c @@ -327,12 +327,3 @@ zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object, i /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/dom_properties.h b/ext/dom/dom_properties.h index 5b3b274ac258f..73d404429e004 100644 --- a/ext/dom/dom_properties.h +++ b/ext/dom/dom_properties.h @@ -161,12 +161,3 @@ int dom_xpath_document_read(dom_object *obj, zval *retval); #endif #endif /* DOM_PROPERTIERS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/domconfiguration.c b/ext/dom/domconfiguration.c index b35b270b7ab17..b1d8ef452a4cd 100644 --- a/ext/dom/domconfiguration.c +++ b/ext/dom/domconfiguration.c @@ -90,12 +90,3 @@ PHP_FUNCTION(dom_domconfiguration_can_set_parameter) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/domerror.c b/ext/dom/domerror.c index 6c424854885b6..1932d514088a4 100644 --- a/ext/dom/domerror.c +++ b/ext/dom/domerror.c @@ -120,12 +120,3 @@ int dom_domerror_location_read(dom_object *obj, zval *retval) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/domerrorhandler.c b/ext/dom/domerrorhandler.c index 16b013b293aa0..344cb77c4fd2a 100644 --- a/ext/dom/domerrorhandler.c +++ b/ext/dom/domerrorhandler.c @@ -58,12 +58,3 @@ PHP_FUNCTION(dom_domerrorhandler_handle_error) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/domexception.c b/ext/dom/domexception.c index 0eef155d1e9f1..922d01c95eff2 100644 --- a/ext/dom/domexception.c +++ b/ext/dom/domexception.c @@ -112,12 +112,3 @@ void php_dom_throw_error(int error_code, int strict_error) /* }}} end php_dom_throw_error */ #endif /* HAVE_LIBXML && HAVE_DOM */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c index 044b4f04116bd..bbebacc243211 100644 --- a/ext/dom/domimplementation.c +++ b/ext/dom/domimplementation.c @@ -261,12 +261,3 @@ PHP_METHOD(domimplementation, getFeature) /* }}} end dom_domimplementation_get_feature */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/domimplementationlist.c b/ext/dom/domimplementationlist.c index 7bd485cf9da4b..9b248d4a02cf3 100644 --- a/ext/dom/domimplementationlist.c +++ b/ext/dom/domimplementationlist.c @@ -71,12 +71,3 @@ PHP_FUNCTION(dom_domimplementationlist_item) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/domimplementationsource.c b/ext/dom/domimplementationsource.c index e7c2979716b78..7f3f8b9dfc1b0 100644 --- a/ext/dom/domimplementationsource.c +++ b/ext/dom/domimplementationsource.c @@ -74,12 +74,3 @@ PHP_FUNCTION(dom_domimplementationsource_get_domimplementations) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/domlocator.c b/ext/dom/domlocator.c index 62b12469b1677..7ad0ff8866ea4 100644 --- a/ext/dom/domlocator.c +++ b/ext/dom/domlocator.c @@ -107,12 +107,3 @@ int dom_domlocator_uri_read(dom_object *obj, zval *retval) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/domstringlist.c b/ext/dom/domstringlist.c index fd16d76e66d63..224b924c1af56 100644 --- a/ext/dom/domstringlist.c +++ b/ext/dom/domstringlist.c @@ -71,12 +71,3 @@ PHP_FUNCTION(dom_domstringlist_item) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/element.c b/ext/dom/element.c index 97eab4611b4a4..51aba0e155175 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -1277,12 +1277,3 @@ PHP_FUNCTION(dom_element_set_id_attribute_node) /* }}} end dom_element_set_id_attribute_node */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/entity.c b/ext/dom/entity.c index c1517784cd1ab..b41255066a002 100644 --- a/ext/dom/entity.c +++ b/ext/dom/entity.c @@ -170,12 +170,3 @@ int dom_entity_version_write(dom_object *obj, zval *newval) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/entityreference.c b/ext/dom/entityreference.c index 7abdc81772008..f7c0c2a711143 100644 --- a/ext/dom/entityreference.c +++ b/ext/dom/entityreference.c @@ -81,12 +81,3 @@ PHP_METHOD(domentityreference, __construct) /* }}} end DOMEntityReference::__construct */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/namednodemap.c b/ext/dom/namednodemap.c index febd316090ae0..4b8df2734fb06 100644 --- a/ext/dom/namednodemap.c +++ b/ext/dom/namednodemap.c @@ -357,12 +357,3 @@ PHP_FUNCTION(dom_namednodemap_count) /* }}} end dom_namednodemap_count */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/namelist.c b/ext/dom/namelist.c index 89d609f478093..a235536bb5a5b 100644 --- a/ext/dom/namelist.c +++ b/ext/dom/namelist.c @@ -82,12 +82,3 @@ PHP_FUNCTION(dom_namelist_get_namespace_uri) /* }}} end dom_namelist_get_namespace_uri */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/node.c b/ext/dom/node.c index 39592973e8ca3..c88d40215b695 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -1914,12 +1914,3 @@ PHP_METHOD(domnode, getLineNo) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/nodelist.c b/ext/dom/nodelist.c index 60b060cd4d28c..84c4a9eb73ee3 100644 --- a/ext/dom/nodelist.c +++ b/ext/dom/nodelist.c @@ -198,12 +198,3 @@ PHP_FUNCTION(dom_nodelist_item) #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/notation.c b/ext/dom/notation.c index 92eaa9a71656d..2fc3a84fecca6 100644 --- a/ext/dom/notation.c +++ b/ext/dom/notation.c @@ -91,12 +91,3 @@ int dom_notation_system_id_read(dom_object *obj, zval *retval) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 95c97d5a24f43..1a3689926b58e 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -310,31 +310,27 @@ static void dom_register_prop_handler(HashTable *prop_handler, char *name, size_ } /* }}} */ -static zval *dom_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ +static zval *dom_get_property_ptr_ptr(zend_object *object, zend_string *name, int type, void **cache_slot) /* {{{ */ { - dom_object *obj = Z_DOMOBJ_P(object); - zend_string *member_str = zval_get_string(member); + dom_object *obj = php_dom_obj_from_obj(object); zval *retval = NULL; - if (!obj->prop_handler || !zend_hash_exists(obj->prop_handler, member_str)) { - retval = zend_std_get_property_ptr_ptr(object, member, type, cache_slot); + if (!obj->prop_handler || !zend_hash_exists(obj->prop_handler, name)) { + retval = zend_std_get_property_ptr_ptr(object, name, type, cache_slot); } - - zend_string_release_ex(member_str, 0); return retval; } /* }}} */ /* {{{ dom_read_property */ -zval *dom_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) +zval *dom_read_property(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) { - dom_object *obj = Z_DOMOBJ_P(object); - zend_string *member_str = zval_get_string(member); + dom_object *obj = php_dom_obj_from_obj(object); zval *retval; dom_prop_handler *hnd = NULL; if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, member_str); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } else if (instanceof_function(obj->std.ce, dom_node_class_entry)) { php_error(E_WARNING, "Couldn't fetch %s. Node no longer exists", ZSTR_VAL(obj->std.ce->name)); } @@ -347,46 +343,41 @@ zval *dom_read_property(zval *object, zval *member, int type, void **cache_slot, retval = &EG(uninitialized_zval); } } else { - retval = zend_std_read_property(object, member, type, cache_slot, rv); + retval = zend_std_read_property(object, name, type, cache_slot, rv); } - zend_string_release_ex(member_str, 0); return retval; } /* }}} */ /* {{{ dom_write_property */ -zval *dom_write_property(zval *object, zval *member, zval *value, void **cache_slot) +zval *dom_write_property(zend_object *object, zend_string *name, zval *value, void **cache_slot) { - dom_object *obj = Z_DOMOBJ_P(object); - zend_string *member_str = zval_get_string(member); + dom_object *obj = php_dom_obj_from_obj(object); dom_prop_handler *hnd = NULL; if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, member_str); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } if (hnd) { hnd->write_func(obj, value); } else { - value = zend_std_write_property(object, member, value, cache_slot); + value = zend_std_write_property(object, name, value, cache_slot); } - zend_string_release_ex(member_str, 0); - return value; } /* }}} */ /* {{{ dom_property_exists */ -static int dom_property_exists(zval *object, zval *member, int check_empty, void **cache_slot) +static int dom_property_exists(zend_object *object, zend_string *name, int check_empty, void **cache_slot) { - dom_object *obj = Z_DOMOBJ_P(object); - zend_string *member_str = zval_get_string(member); + dom_object *obj = php_dom_obj_from_obj(object); dom_prop_handler *hnd = NULL; int retval = 0; if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, member_str); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } if (hnd) { zval tmp; @@ -402,17 +393,16 @@ static int dom_property_exists(zval *object, zval *member, int check_empty, void zval_ptr_dtor(&tmp); } } else { - retval = zend_std_has_property(object, member, check_empty, cache_slot); + retval = zend_std_has_property(object, name, check_empty, cache_slot); } - zend_string_release_ex(member_str, 0); return retval; } /* }}} */ -static HashTable* dom_get_debug_info_helper(zval *object, int *is_temp) /* {{{ */ +static HashTable* dom_get_debug_info_helper(zend_object *object, int *is_temp) /* {{{ */ { - dom_object *obj = Z_DOMOBJ_P(object); + dom_object *obj = php_dom_obj_from_obj(object); HashTable *debug_info, *prop_handlers = obj->prop_handler, *std_props; @@ -453,7 +443,7 @@ static HashTable* dom_get_debug_info_helper(zval *object, int *is_temp) /* {{{ * } /* }}} */ -static HashTable* dom_get_debug_info(zval *object, int *is_temp) /* {{{ */ +static HashTable* dom_get_debug_info(zend_object *object, int *is_temp) /* {{{ */ { return dom_get_debug_info_helper(object, is_temp); } @@ -500,9 +490,9 @@ PHP_FUNCTION(dom_import_simplexml) static dom_object* dom_objects_set_class(zend_class_entry *class_type); -static zend_object *dom_objects_store_clone_obj(zval *zobject) /* {{{ */ +static zend_object *dom_objects_store_clone_obj(zend_object *zobject) /* {{{ */ { - dom_object *intern = Z_DOMOBJ_P(zobject); + dom_object *intern = php_dom_obj_from_obj(zobject); dom_object *clone = dom_objects_set_class(intern->std.ce); clone->std.handlers = dom_get_obj_handlers(); @@ -583,7 +573,9 @@ ZEND_GET_MODULE(dom) void dom_objects_free_storage(zend_object *object); void dom_nnodemap_objects_free_storage(zend_object *object); -static zend_object *dom_objects_store_clone_obj(zval *zobject); +static zval *dom_nodelist_read_dimension(zend_object *object, zval *offset, int type, zval *rv); +static int dom_nodelist_has_dimension(zend_object *object, zval *member, int check_empty); +static zend_object *dom_objects_store_clone_obj(zend_object *zobject); static void dom_nnodemap_object_dtor(zend_object *object); #if defined(LIBXML_XPATH_ENABLED) void dom_xpath_objects_free_storage(zend_object *object); @@ -1530,7 +1522,7 @@ xmlNsPtr dom_get_nsdecl(xmlNode *node, xmlChar *localName) { } /* }}} end dom_get_nsdecl */ -zval *dom_nodelist_read_dimension(zval *object, zval *offset, int type, zval *rv) /* {{{ */ +static zval *dom_nodelist_read_dimension(zend_object *object, zval *offset, int type, zval *rv) /* {{{ */ { zval offset_copy; @@ -1540,12 +1532,12 @@ zval *dom_nodelist_read_dimension(zval *object, zval *offset, int type, zval *rv ZVAL_LONG(&offset_copy, zval_get_long(offset)); - zend_call_method_with_1_params(object, Z_OBJCE_P(object), NULL, "item", rv, &offset_copy); + zend_call_method_with_1_params(object, object->ce, NULL, "item", rv, &offset_copy); return rv; } /* }}} end dom_nodelist_read_dimension */ -int dom_nodelist_has_dimension(zval *object, zval *member, int check_empty) +static int dom_nodelist_has_dimension(zend_object *object, zval *member, int check_empty) { zend_long offset = zval_get_long(member); zval rv; @@ -1553,19 +1545,13 @@ int dom_nodelist_has_dimension(zval *object, zval *member, int check_empty) if (offset < 0) { return 0; } else { - zval *length = zend_read_property(Z_OBJCE_P(object), object, "length", sizeof("length") - 1, 0, &rv); + zval obj; + zval *length; + ZVAL_OBJ(&obj, object); + length = zend_read_property(object->ce, &obj, "length", sizeof("length") - 1, 0, &rv); return length && offset < Z_LVAL_P(length); } } /* }}} end dom_nodelist_has_dimension */ #endif /* HAVE_DOM */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index 757c835823219..c3b24c8691e18 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -125,8 +125,6 @@ xmlNode *php_dom_libxml_hash_iter(xmlHashTable *ht, int index); xmlNode *php_dom_libxml_notation_iter(xmlHashTable *ht, int index); zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object, int by_ref); void dom_set_doc_classmap(php_libxml_ref_obj *document, zend_class_entry *basece, zend_class_entry *ce); -zval *dom_nodelist_read_dimension(zval *object, zval *offset, int type, zval *rv); -int dom_nodelist_has_dimension(zval *object, zval *member, int check_empty); #define REGISTER_DOM_CLASS(ce, name, parent_ce, funcs, entry) \ INIT_CLASS_ENTRY(ce, name, funcs); \ @@ -158,12 +156,3 @@ PHP_MSHUTDOWN_FUNCTION(dom); PHP_MINFO_FUNCTION(dom); #endif /* PHP_DOM_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c index eb663e6dd95e2..0487abc373d0a 100644 --- a/ext/dom/processinginstruction.c +++ b/ext/dom/processinginstruction.c @@ -149,12 +149,3 @@ int dom_processinginstruction_data_write(dom_object *obj, zval *newval) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/string_extend.c b/ext/dom/string_extend.c index 6f33c083e5968..ecc29b0dd6e10 100644 --- a/ext/dom/string_extend.c +++ b/ext/dom/string_extend.c @@ -73,12 +73,3 @@ PHP_FUNCTION(dom_string_extend_find_offset32) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/text.c b/ext/dom/text.c index 426208deff3bd..168d06d8f4a77 100644 --- a/ext/dom/text.c +++ b/ext/dom/text.c @@ -226,12 +226,3 @@ PHP_FUNCTION(dom_text_replace_whole_text) /* }}} end dom_text_replace_whole_text */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/typeinfo.c b/ext/dom/typeinfo.c index ae38e3b62bbb9..2d918c2007152 100644 --- a/ext/dom/typeinfo.c +++ b/ext/dom/typeinfo.c @@ -68,12 +68,3 @@ int dom_typeinfo_type_namespace_read(dom_object *obj, zval *retval) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/userdatahandler.c b/ext/dom/userdatahandler.c index a09315c8cc63c..6695d65c15dbf 100644 --- a/ext/dom/userdatahandler.c +++ b/ext/dom/userdatahandler.c @@ -53,12 +53,3 @@ PHP_FUNCTION(dom_userdatahandler_handle) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index 04cceee2271ba..6f51fecace908 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -91,12 +91,3 @@ PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj); DOM_GET_OBJ(__ptr, __id, __prtype, __intern); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 2870dc41c4cb6..69fdcb947f7ea 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -542,12 +542,3 @@ PHP_FUNCTION(dom_xpath_register_php_functions) #endif /* LIBXML_XPATH_ENABLED */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index 3aa7c13181a88..5f5ad507aeb01 100644 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -921,12 +921,3 @@ PHP_FUNCTION(enchant_dict_describe) enchant_dict_describe(pdict->pdict, describe_dict_fn, (void *)return_value); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/enchant/php_enchant.h b/ext/enchant/php_enchant.h index 16d2fee554d24..1152a96f47d06 100644 --- a/ext/enchant/php_enchant.h +++ b/ext/enchant/php_enchant.h @@ -68,12 +68,3 @@ PHP_FUNCTION(enchant_dict_quick_check); #endif #endif /* PHP_ENCHANT_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 83b8c3f03840d..9e771ad4ebc5f 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -4703,12 +4703,3 @@ PHP_FUNCTION(exif_imagetype) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 tw=78 fdm=marker - * vim<600: sw=4 ts=4 tw=78 - */ diff --git a/ext/exif/tests/exif_imagetype_variation1.phpt b/ext/exif/tests/exif_imagetype_variation1.phpt deleted file mode 100644 index c190aed15c34b..0000000000000 --- a/ext/exif/tests/exif_imagetype_variation1.phpt +++ /dev/null @@ -1,214 +0,0 @@ ---TEST-- -Test exif_imagetype() function : usage variations - different types for filename argument ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // empty string - "", - '', - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // objects - new sample(), - - // resource - $file_handle, - - NULL, - null -); - - -// loop through each element of the array and check the working of exif_imagetype() -// when $filename is supplied with different values - -echo "\n--- Testing exif_imagetype() by supplying different values for 'filename' argument ---\n"; -$counter = 1; -foreach($values as $filename) { - echo "-- Iteration $counter --\n"; - var_dump( exif_imagetype($filename) ); - $counter ++; -} - -// closing the file -fclose($file_handle); - -echo "Done\n"; -?> - -?> -===Done=== ---EXPECTF-- -*** Testing exif_imagetype() : different types for filename argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing exif_imagetype() by supplying different values for 'filename' argument --- --- Iteration 1 -- - -Warning: exif_imagetype(0): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 2 -- - -Warning: exif_imagetype(1): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 3 -- - -Warning: exif_imagetype(12345): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: exif_imagetype(-2345): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 5 -- - -Warning: exif_imagetype(10.5): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 6 -- - -Warning: exif_imagetype(-10.5): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 7 -- - -Warning: exif_imagetype(101234567000): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 8 -- - -Warning: exif_imagetype(1.07654321E-9): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 9 -- - -Warning: exif_imagetype(0.5): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 10 -- - -Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d -NULL --- Iteration 15 -- - -Warning: exif_imagetype(1): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 16 -- - -Warning: exif_imagetype(): Filename cannot be empty in %s on line %d -bool(false) --- Iteration 17 -- - -Warning: exif_imagetype(1): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: exif_imagetype(): Filename cannot be empty in %s on line %d -bool(false) --- Iteration 19 -- - -Warning: exif_imagetype(): Filename cannot be empty in %s on line %d -bool(false) --- Iteration 20 -- - -Warning: exif_imagetype(): Filename cannot be empty in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: exif_imagetype(): Filename cannot be empty in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: exif_imagetype(): Filename cannot be empty in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: exif_imagetype(obj'ct): failed to open stream: No such file or directory in %s on line %d -bool(false) --- Iteration 24 -- - -Warning: exif_imagetype() expects parameter 1 to be a valid path, resource given in %s on line %d -NULL --- Iteration 25 -- - -Warning: exif_imagetype(): Filename cannot be empty in %s on line %d -bool(false) --- Iteration 26 -- - -Warning: exif_imagetype(): Filename cannot be empty in %s on line %d -bool(false) -Done - -?> -===Done=== diff --git a/ext/exif/tests/exif_tagname_variation1-64bit.phpt b/ext/exif/tests/exif_tagname_variation1-64bit.phpt deleted file mode 100644 index 9a14124362261..0000000000000 --- a/ext/exif/tests/exif_tagname_variation1-64bit.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test exif_tagname() function : usage variations - different types for index argument ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // empty string - "", - '', - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // objects - new sample(), - - // resource - $file_handle, - - NULL, - null -); - - -// loop through each element of the array and check the working of exif_tagname() -// when $index argument is supplied with different values - -echo "\n--- Testing exif_tagname() by supplying different values for 'index' argument ---\n"; -$counter = 1; -foreach($values as $index) { - echo "-- Iteration $counter --\n"; - var_dump( exif_tagname($index) ); - $counter ++; -} - -// closing the file -fclose($file_handle); - -echo "Done\n"; -?> - -?> -===Done=== ---EXPECTF-- -*** Testing exif_tagname() : different types for index argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing exif_tagname() by supplying different values for 'index' argument --- --- Iteration 1 -- -bool(false) --- Iteration 2 -- -bool(false) --- Iteration 3 -- -bool(false) --- Iteration 4 -- -bool(false) --- Iteration 5 -- -bool(false) --- Iteration 6 -- -bool(false) --- Iteration 7 -- -bool(false) --- Iteration 8 -- -bool(false) --- Iteration 9 -- -bool(false) --- Iteration 10 -- - -Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 15 -- -bool(false) --- Iteration 16 -- -bool(false) --- Iteration 17 -- -bool(false) --- Iteration 18 -- -bool(false) --- Iteration 19 -- - -Warning: exif_tagname() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: exif_tagname() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 21 -- -bool(false) --- Iteration 22 -- -bool(false) --- Iteration 23 -- - -Warning: exif_tagname() expects parameter 1 to be int, object given in %s on line %d -NULL --- Iteration 24 -- - -Warning: exif_tagname() expects parameter 1 to be int, resource given in %s on line %d -NULL --- Iteration 25 -- -bool(false) --- Iteration 26 -- -bool(false) -Done - -?> -===Done=== diff --git a/ext/exif/tests/exif_tagname_variation1.phpt b/ext/exif/tests/exif_tagname_variation1.phpt deleted file mode 100644 index 3ebbdd33fe25c..0000000000000 --- a/ext/exif/tests/exif_tagname_variation1.phpt +++ /dev/null @@ -1,174 +0,0 @@ ---TEST-- -Test exif_tagname() function : usage variations - different types for index argument ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // empty string - "", - '', - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // objects - new sample(), - - // resource - $file_handle, - - NULL, - null -); - - -// loop through each element of the array and check the working of exif_tagname() -// when $index argument is supplied with different values - -echo "\n--- Testing exif_tagname() by supplying different values for 'index' argument ---\n"; -$counter = 1; -foreach($values as $index) { - echo "-- Iteration $counter --\n"; - var_dump( exif_tagname($index) ); - $counter ++; -} - -// closing the file -fclose($file_handle); - -echo "Done\n"; -?> - -?> -===Done=== ---EXPECTF-- -*** Testing exif_tagname() : different types for index argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing exif_tagname() by supplying different values for 'index' argument --- --- Iteration 1 -- -bool(false) --- Iteration 2 -- -bool(false) --- Iteration 3 -- -bool(false) --- Iteration 4 -- -bool(false) --- Iteration 5 -- -bool(false) --- Iteration 6 -- -bool(false) --- Iteration 7 -- -bool(false) --- Iteration 8 -- - -Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 9 -- - -Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: exif_tagname() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 13 -- -bool(false) --- Iteration 14 -- -bool(false) --- Iteration 15 -- -bool(false) --- Iteration 16 -- -bool(false) --- Iteration 17 -- - -Warning: exif_tagname() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: exif_tagname() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 19 -- -bool(false) --- Iteration 20 -- -bool(false) --- Iteration 21 -- - -Warning: exif_tagname() expects parameter 1 to be int, object given in %s on line %d -NULL --- Iteration 22 -- - -Warning: exif_tagname() expects parameter 1 to be int, resource given in %s on line %d -NULL --- Iteration 23 -- -bool(false) --- Iteration 24 -- -bool(false) -Done - -?> -===Done=== diff --git a/ext/ext_skel.php b/ext/ext_skel.php index 77dae797ea1fe..a03f40a5d831d 100755 --- a/ext/ext_skel.php +++ b/ext/ext_skel.php @@ -42,7 +42,7 @@ function print_help() { printf(' --dir Path to the directory for where extension should be%s', PHP_EOL); printf(' created. Defaults to the directory of where this script%s', PHP_EOL); printf(' lives%s', PHP_EOL); - printf(' --std If passed, the standard header and vim rules footer used%s', PHP_EOL); + printf(' --std If passed, the standard header used%s', PHP_EOL); printf(' in extensions that is included in the core, will be used%s', PHP_EOL); printf(' --onlyunix Only generate configure scripts for Unix%s', PHP_EOL); printf(' --onlywindows Only generate configure scripts for Windows%s', PHP_EOL); @@ -179,7 +179,7 @@ function process_source_tags($file, $short_name) { $source = str_replace('%EXTNAMECAPS%', strtoupper($options['ext']), $source); if (strpos($short_name, '.c') !== false || strpos($short_name, '.h') !== false) { - static $header, $footer; + static $header; if (!$header) { if ($options['std']) { @@ -206,27 +206,16 @@ function process_source_tags($file, $short_name) { +----------------------------------------------------------------------+ */ HEADER; - $footer = <<<'FOOTER' - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ -FOOTER; } else { if ($options['author']) { $header = sprintf('/* %s extension for PHP (c) %d %s */', $options['ext'], date('Y'), $options['author']); } else { $header = sprintf('/* %s extension for PHP */', $options['ext']); } - - $footer = ''; } } - $source = str_replace(['%HEADER%', '%FOOTER%'], [$header, $footer], $source); + $source = str_replace('%HEADER%', $header, $source); } if (!file_put_contents($file, $source)) { diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 4c2689bafc8fb..715628b5e54b0 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -880,9 +880,9 @@ static void *zend_ffi_create_callback(zend_ffi_type *type, zval *value) /* {{{ * /* }}} */ #endif -static zval* zend_ffi_cdata_get(zval *object, zval *rv) /* {{{ */ +static zval* zend_ffi_cdata_get(zend_object *obj, zval *rv) /* {{{ */ { - zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(object); + zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); #if 0 @@ -897,9 +897,9 @@ static zval* zend_ffi_cdata_get(zval *object, zval *rv) /* {{{ */ } /* }}} */ -static void zend_ffi_cdata_set(zval *object, zval *value) /* {{{ */ +static void zend_ffi_cdata_set(zend_object *obj, zval *value) /* {{{ */ { - zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(object); + zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); #if 0 @@ -913,15 +913,15 @@ static void zend_ffi_cdata_set(zval *object, zval *value) /* {{{ */ } /* }}} */ -static int zend_ffi_cdata_cast_object(zval *readobj, zval *writeobj, int type) /* {{{ */ +static int zend_ffi_cdata_cast_object(zend_object *readobj, zval *writeobj, int type) /* {{{ */ { return FAILURE; } /* }}} */ -static zval *zend_ffi_cdata_read_field(zval *object, zval *member, int read_type, void **cache_slot, zval *rv) /* {{{ */ +static zval *zend_ffi_cdata_read_field(zend_object *obj, zend_string *field_name, int read_type, void **cache_slot, zval *rv) /* {{{ */ { - zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(object); + zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); void *ptr = cdata->ptr; zend_ffi_field *field; @@ -929,28 +929,22 @@ static zval *zend_ffi_cdata_read_field(zval *object, zval *member, int read_type if (cache_slot && *cache_slot == type) { field = *(cache_slot + 1); } else { - zend_string *tmp_field_name; - zend_string *field_name = zval_get_tmp_string(member, &tmp_field_name); - if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { if (type->kind == ZEND_FFI_TYPE_POINTER) { /* transparently dereference the pointer */ if (UNEXPECTED(!ptr)) { zend_throw_error(zend_ffi_exception_ce, "NULL pointer dereference"); - zend_tmp_string_release(tmp_field_name); return &EG(uninitialized_zval); } ptr = (void*)(*(char**)ptr); if (UNEXPECTED(!ptr)) { zend_throw_error(zend_ffi_exception_ce, "NULL pointer dereference"); - zend_tmp_string_release(tmp_field_name); return &EG(uninitialized_zval); } type = ZEND_FFI_TYPE(type->pointer.type); } if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { zend_throw_error(zend_ffi_exception_ce, "Attempt to read field '%s' of non C struct/union", ZSTR_VAL(field_name)); - zend_tmp_string_release(tmp_field_name); return &EG(uninitialized_zval); } } @@ -958,12 +952,9 @@ static zval *zend_ffi_cdata_read_field(zval *object, zval *member, int read_type field = zend_hash_find_ptr(&type->record.fields, field_name); if (UNEXPECTED(!field)) { zend_throw_error(zend_ffi_exception_ce, "Attempt to read undefined field '%s' of C struct/union", ZSTR_VAL(field_name)); - zend_tmp_string_release(tmp_field_name); return &EG(uninitialized_zval); } - zend_tmp_string_release(tmp_field_name); - if (cache_slot) { *cache_slot = type; *(cache_slot + 1) = field; @@ -997,9 +988,9 @@ static zval *zend_ffi_cdata_read_field(zval *object, zval *member, int read_type } /* }}} */ -static zval *zend_ffi_cdata_write_field(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */ +static zval *zend_ffi_cdata_write_field(zend_object *obj, zend_string *field_name, zval *value, void **cache_slot) /* {{{ */ { - zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(object); + zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); void *ptr = cdata->ptr; zend_ffi_field *field; @@ -1007,28 +998,22 @@ static zval *zend_ffi_cdata_write_field(zval *object, zval *member, zval *value, if (cache_slot && *cache_slot == type) { field = *(cache_slot + 1); } else { - zend_string *tmp_field_name; - zend_string *field_name = zval_get_tmp_string(member, &tmp_field_name); - if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { if (type->kind == ZEND_FFI_TYPE_POINTER) { /* transparently dereference the pointer */ if (UNEXPECTED(!ptr)) { zend_throw_error(zend_ffi_exception_ce, "NULL pointer dereference"); - zend_tmp_string_release(tmp_field_name); return value; } ptr = (void*)(*(char**)ptr); if (UNEXPECTED(!ptr)) { zend_throw_error(zend_ffi_exception_ce, "NULL pointer dereference"); - zend_tmp_string_release(tmp_field_name); return value; } type = ZEND_FFI_TYPE(type->pointer.type); } if (UNEXPECTED(type->kind != ZEND_FFI_TYPE_STRUCT)) { zend_throw_error(zend_ffi_exception_ce, "Attempt to assign field '%s' of non C struct/union", ZSTR_VAL(field_name)); - zend_tmp_string_release(tmp_field_name); return value; } } @@ -1036,12 +1021,9 @@ static zval *zend_ffi_cdata_write_field(zval *object, zval *member, zval *value, field = zend_hash_find_ptr(&type->record.fields, field_name); if (UNEXPECTED(!field)) { zend_throw_error(zend_ffi_exception_ce, "Attempt to assign undefined field '%s' of C struct/union", ZSTR_VAL(field_name)); - zend_tmp_string_release(tmp_field_name); return value; } - zend_tmp_string_release(tmp_field_name); - if (cache_slot) { *cache_slot = type; *(cache_slot + 1) = field; @@ -1059,10 +1041,7 @@ static zval *zend_ffi_cdata_write_field(zval *object, zval *member, zval *value, zend_throw_error(zend_ffi_exception_ce, "Attempt to assign read-only location"); return value; } else if (UNEXPECTED(field->is_const)) { - zend_string *tmp_field_name; - zend_string *field_name = zval_get_tmp_string(member, &tmp_field_name); zend_throw_error(zend_ffi_exception_ce, "Attempt to assign read-only field '%s'", ZSTR_VAL(field_name)); - zend_tmp_string_release(tmp_field_name); return value; } @@ -1076,9 +1055,9 @@ static zval *zend_ffi_cdata_write_field(zval *object, zval *member, zval *value, } /* }}} */ -static zval *zend_ffi_cdata_read_dim(zval *object, zval *offset, int read_type, zval *rv) /* {{{ */ +static zval *zend_ffi_cdata_read_dim(zend_object *obj, zval *offset, int read_type, zval *rv) /* {{{ */ { - zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(object); + zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); zend_long dim = zval_get_long(offset); zend_ffi_type *dim_type; @@ -1134,9 +1113,9 @@ static zval *zend_ffi_cdata_read_dim(zval *object, zval *offset, int read_type, } /* }}} */ -static void zend_ffi_cdata_write_dim(zval *object, zval *offset, zval *value) /* {{{ */ +static void zend_ffi_cdata_write_dim(zend_object *obj, zval *offset, zval *value) /* {{{ */ { - zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(object); + zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); zend_long dim = zval_get_long(offset); void *ptr; @@ -1388,9 +1367,9 @@ static int zend_ffi_cdata_compare_objects(zval *o1, zval *o2) /* {{{ */ } /* }}} */ -static int zend_ffi_cdata_count_elements(zval *object, zend_long *count) /* {{{ */ +static int zend_ffi_cdata_count_elements(zend_object *obj, zend_long *count) /* {{{ */ { - zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(object); + zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); if (type->kind != ZEND_FFI_TYPE_ARRAY) { @@ -1640,9 +1619,9 @@ static zend_object_iterator *zend_ffi_cdata_get_iterator(zend_class_entry *ce, z } /* }}} */ -static HashTable *zend_ffi_cdata_get_debug_info(zval *object, int *is_temp) /* {{{ */ +static HashTable *zend_ffi_cdata_get_debug_info(zend_object *obj, int *is_temp) /* {{{ */ { - zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(object); + zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); void *ptr = cdata->ptr; HashTable *ht = NULL; @@ -1739,9 +1718,9 @@ static HashTable *zend_ffi_cdata_get_debug_info(zval *object, int *is_temp) /* { } /* }}} */ -static int zend_ffi_cdata_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr) /* {{{ */ +static int zend_ffi_cdata_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr) /* {{{ */ { - zend_ffi_cdata *cdata = (zend_ffi_cdata*)Z_OBJ_P(obj); + zend_ffi_cdata *cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(cdata->type); zend_function *func; @@ -1870,7 +1849,7 @@ static int zend_ffi_ctype_compare_objects(zval *o1, zval *o2) /* {{{ */ } /* }}} */ -static HashTable *zend_ffi_ctype_get_debug_info(zval *object, int *is_temp) /* {{{ */ +static HashTable *zend_ffi_ctype_get_debug_info(zend_object *obj, int *is_temp) /* {{{ */ { return NULL; } @@ -2038,9 +2017,9 @@ static void zend_ffi_cdata_free_obj(zend_object *object) /* {{{ */ } /* }}} */ -static zend_object *zend_ffi_cdata_clone_obj(zval *zobject) /* {{{ */ +static zend_object *zend_ffi_cdata_clone_obj(zend_object *obj) /* {{{ */ { - zend_ffi_cdata *old_cdata = (zend_ffi_cdata*)Z_OBJ_P(zobject); + zend_ffi_cdata *old_cdata = (zend_ffi_cdata*)obj; zend_ffi_type *type = ZEND_FFI_TYPE(old_cdata->type); zend_ffi_cdata *new_cdata; @@ -2057,11 +2036,9 @@ static zend_object *zend_ffi_cdata_clone_obj(zval *zobject) /* {{{ */ } /* }}} */ -static zval *zend_ffi_read_var(zval *object, zval *member, int read_type, void **cache_slot, zval *rv) /* {{{ */ +static zval *zend_ffi_read_var(zend_object *obj, zend_string *var_name, int read_type, void **cache_slot, zval *rv) /* {{{ */ { - zend_ffi *ffi = (zend_ffi*)Z_OBJ_P(object); - zend_string *tmp_var_name; - zend_string *var_name = zval_get_tmp_string(member, &tmp_var_name); + zend_ffi *ffi = (zend_ffi*)obj; zend_ffi_symbol *sym = NULL; if (ffi->symbols) { @@ -2072,12 +2049,9 @@ static zval *zend_ffi_read_var(zval *object, zval *member, int read_type, void * } if (!sym) { zend_throw_error(zend_ffi_exception_ce, "Attempt to read undefined C variable '%s'", ZSTR_VAL(var_name)); - zend_tmp_string_release(tmp_var_name); return &EG(uninitialized_zval); } - zend_tmp_string_release(tmp_var_name); - if (sym->kind == ZEND_FFI_SYM_VAR) { zend_ffi_cdata_to_zval(NULL, sym->addr, ZEND_FFI_TYPE(sym->type), read_type, rv, (zend_ffi_flags)sym->is_const, 0); } else { @@ -2088,11 +2062,9 @@ static zval *zend_ffi_read_var(zval *object, zval *member, int read_type, void * } /* }}} */ -static zval *zend_ffi_write_var(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */ +static zval *zend_ffi_write_var(zend_object *obj, zend_string *var_name, zval *value, void **cache_slot) /* {{{ */ { - zend_ffi *ffi = (zend_ffi*)Z_OBJ_P(object); - zend_string *tmp_var_name; - zend_string *var_name = zval_get_tmp_string(member, &tmp_var_name); + zend_ffi *ffi = (zend_ffi*)obj; zend_ffi_symbol *sym = NULL; if (ffi->symbols) { @@ -2103,12 +2075,9 @@ static zval *zend_ffi_write_var(zval *object, zval *member, zval *value, void ** } if (!sym) { zend_throw_error(zend_ffi_exception_ce, "Attempt to assign undefined C variable '%s'", ZSTR_VAL(var_name)); - zend_tmp_string_release(tmp_var_name); return value; } - zend_tmp_string_release(tmp_var_name); - if (sym->is_const) { zend_throw_error(zend_ffi_exception_ce, "Attempt to assign read-only C variable '%s'", ZSTR_VAL(var_name)); return value; @@ -4270,33 +4239,29 @@ static ZEND_COLD zend_never_inline void zend_bad_array_access(zend_class_entry * } /* }}} */ -static ZEND_COLD zval *zend_fake_read_dimension(zval *object, zval *offset, int type, zval *rv) /* {{{ */ +static ZEND_COLD zval *zend_fake_read_dimension(zend_object *obj, zval *offset, int type, zval *rv) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zend_bad_array_access(ce); + zend_bad_array_access(obj->ce); return NULL; } /* }}} */ -static ZEND_COLD void zend_fake_write_dimension(zval *object, zval *offset, zval *value) /* {{{ */ +static ZEND_COLD void zend_fake_write_dimension(zend_object *obj, zval *offset, zval *value) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zend_bad_array_access(ce); + zend_bad_array_access(obj->ce); } /* }}} */ -static ZEND_COLD int zend_fake_has_dimension(zval *object, zval *offset, int check_empty) /* {{{ */ +static ZEND_COLD int zend_fake_has_dimension(zend_object *obj, zval *offset, int check_empty) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zend_bad_array_access(ce); + zend_bad_array_access(obj->ce); return 0; } /* }}} */ -static ZEND_COLD void zend_fake_unset_dimension(zval *object, zval *offset) /* {{{ */ +static ZEND_COLD void zend_fake_unset_dimension(zend_object *obj, zval *offset) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zend_bad_array_access(ce); + zend_bad_array_access(obj->ce); } /* }}} */ @@ -4306,38 +4271,34 @@ static ZEND_COLD zend_never_inline void zend_bad_property_access(zend_class_entr } /* }}} */ -static ZEND_COLD zval *zend_fake_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */ +static ZEND_COLD zval *zend_fake_read_property(zend_object *obj, zend_string *member, int type, void **cache_slot, zval *rv) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zend_bad_property_access(ce); + zend_bad_property_access(obj->ce); return &EG(uninitialized_zval); } /* }}} */ -static ZEND_COLD zval *zend_fake_write_property(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */ +static ZEND_COLD zval *zend_fake_write_property(zend_object *obj, zend_string *member, zval *value, void **cache_slot) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zend_bad_array_access(ce); + zend_bad_array_access(obj->ce); return value; } /* }}} */ -static ZEND_COLD int zend_fake_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */ +static ZEND_COLD int zend_fake_has_property(zend_object *obj, zend_string *member, int has_set_exists, void **cache_slot) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zend_bad_array_access(ce); + zend_bad_array_access(obj->ce); return 0; } /* }}} */ -static ZEND_COLD void zend_fake_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */ +static ZEND_COLD void zend_fake_unset_property(zend_object *obj, zend_string *member, void **cache_slot) /* {{{ */ { - zend_class_entry *ce = Z_OBJCE_P(object); - zend_bad_array_access(ce); + zend_bad_array_access(obj->ce); } /* }}} */ -static zval *zend_fake_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ +static zval *zend_fake_get_property_ptr_ptr(zend_object *obj, zend_string *member, int type, void **cache_slot) /* {{{ */ { return NULL; } @@ -4351,13 +4312,13 @@ static ZEND_COLD zend_function *zend_fake_get_method(zend_object **obj_ptr, zend } /* }}} */ -static HashTable *zend_fake_get_properties(zval *object) /* {{{ */ +static HashTable *zend_fake_get_properties(zend_object *obj) /* {{{ */ { return (HashTable*)&zend_empty_array; } /* }}} */ -static HashTable *zend_fake_get_gc(zval *object, zval **table, int *n) /* {{{ */ +static HashTable *zend_fake_get_gc(zend_object *ob, zval **table, int *n) /* {{{ */ { *table = NULL; *n = 0; @@ -4371,74 +4332,74 @@ static ZEND_COLD zend_never_inline void zend_ffi_use_after_free(void) /* {{{ */ } /* }}} */ -static zend_object *zend_ffi_free_clone_obj(zval *zobject) /* {{{ */ +static zend_object *zend_ffi_free_clone_obj(zend_object *obj) /* {{{ */ { zend_ffi_use_after_free(); return NULL; } /* }}} */ -static ZEND_COLD zval *zend_ffi_free_read_dimension(zval *object, zval *offset, int type, zval *rv) /* {{{ */ +static ZEND_COLD zval *zend_ffi_free_read_dimension(zend_object *obj, zval *offset, int type, zval *rv) /* {{{ */ { zend_ffi_use_after_free(); return NULL; } /* }}} */ -static ZEND_COLD void zend_ffi_free_write_dimension(zval *object, zval *offset, zval *value) /* {{{ */ +static ZEND_COLD void zend_ffi_free_write_dimension(zend_object *obj, zval *offset, zval *value) /* {{{ */ { zend_ffi_use_after_free(); } /* }}} */ -static ZEND_COLD int zend_ffi_free_has_dimension(zval *object, zval *offset, int check_empty) /* {{{ */ +static ZEND_COLD int zend_ffi_free_has_dimension(zend_object *obj, zval *offset, int check_empty) /* {{{ */ { zend_ffi_use_after_free(); return 0; } /* }}} */ -static ZEND_COLD void zend_ffi_free_unset_dimension(zval *object, zval *offset) /* {{{ */ +static ZEND_COLD void zend_ffi_free_unset_dimension(zend_object *obj, zval *offset) /* {{{ */ { zend_ffi_use_after_free(); } /* }}} */ -static ZEND_COLD zval *zend_ffi_free_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */ +static ZEND_COLD zval *zend_ffi_free_read_property(zend_object *obj, zend_string *member, int type, void **cache_slot, zval *rv) /* {{{ */ { zend_ffi_use_after_free(); return &EG(uninitialized_zval); } /* }}} */ -static ZEND_COLD zval *zend_ffi_free_write_property(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */ +static ZEND_COLD zval *zend_ffi_free_write_property(zend_object *obj, zend_string *member, zval *value, void **cache_slot) /* {{{ */ { zend_ffi_use_after_free(); return value; } /* }}} */ -static ZEND_COLD int zend_ffi_free_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */ +static ZEND_COLD int zend_ffi_free_has_property(zend_object *obj, zend_string *member, int has_set_exists, void **cache_slot) /* {{{ */ { zend_ffi_use_after_free(); return 0; } /* }}} */ -static ZEND_COLD void zend_ffi_free_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */ +static ZEND_COLD void zend_ffi_free_unset_property(zend_object *obj, zend_string *member, void **cache_slot) /* {{{ */ { zend_ffi_use_after_free(); } /* }}} */ -static zval* zend_ffi_free_get(zval *object, zval *rv) /* {{{ */ +static zval* zend_ffi_free_get(zend_object *obj, zval *rv) /* {{{ */ { zend_ffi_use_after_free(); return NULL; } /* }}} */ -static HashTable *zend_ffi_free_get_debug_info(zval *object, int *is_temp) /* {{{ */ +static HashTable *zend_ffi_free_get_debug_info(zend_object *obj, int *is_temp) /* {{{ */ { zend_ffi_use_after_free(); return NULL; @@ -6702,12 +6663,3 @@ void zend_ffi_val_character(zend_ffi_val *val, const char *str, size_t str_len) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/ffi/ffi.g b/ext/ffi/ffi.g index ae6ea0eb8803e..80b41fddc3c06 100644 --- a/ext/ffi/ffi.g +++ b/ext/ffi/ffi.g @@ -857,12 +857,3 @@ static void yy_error(const char *msg) { static void yy_error_sym(const char *msg, int sym) { zend_ffi_parser_error("%s '%s' at line %d", msg, sym_name[sym], yy_line); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/ffi/ffi_parser.c b/ext/ffi/ffi_parser.c index 337ce3360bf56..1606bef16f038 100644 --- a/ext/ffi/ffi_parser.c +++ b/ext/ffi/ffi_parser.c @@ -5052,12 +5052,3 @@ static void yy_error(const char *msg) { static void yy_error_sym(const char *msg, int sym) { zend_ffi_parser_error("%s '%s' at line %d", msg, sym_name[sym], yy_line); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/ffi/php_ffi.h b/ext/ffi/php_ffi.h index 3c36e7258d106..35b5127875464 100644 --- a/ext/ffi/php_ffi.h +++ b/ext/ffi/php_ffi.h @@ -275,13 +275,3 @@ void zend_ffi_val_string(zend_ffi_val *val, const char *str, size_t str_len); void zend_ffi_val_character(zend_ffi_val *val, const char *str, size_t str_len); #endif /* PHP_FFI_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index 3d85a0858819b..57963146afe47 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -618,13 +618,3 @@ PHP_FUNCTION(mime_content_type) _php_finfo_get_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, -1, 1); } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/fileinfo/php_fileinfo.h b/ext/fileinfo/php_fileinfo.h index 9214e57f827ae..266ecc7596ef8 100644 --- a/ext/fileinfo/php_fileinfo.h +++ b/ext/fileinfo/php_fileinfo.h @@ -50,13 +50,3 @@ PHP_FUNCTION(mime_content_type); #endif #endif /* PHP_FILEINFO_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/filter/callback_filter.c b/ext/filter/callback_filter.c index cf3cdc8c89942..00a0b19115dca 100644 --- a/ext/filter/callback_filter.c +++ b/ext/filter/callback_filter.c @@ -44,12 +44,3 @@ void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL) zval_ptr_dtor(&args[0]); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/filter/filter.c b/ext/filter/filter.c index c1da1832a4fde..465992b419930 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -894,12 +894,3 @@ PHP_FUNCTION(filter_id) RETURN_FALSE; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/filter/filter_private.h b/ext/filter/filter_private.h index fd3af7b5c3cac..a6049087071a9 100644 --- a/ext/filter/filter_private.h +++ b/ext/filter/filter_private.h @@ -122,12 +122,3 @@ } #endif /* FILTER_PRIVATE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 88566d0f3d2ed..50f4f33def594 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -945,12 +945,3 @@ void php_filter_validate_mac(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/filter/php_filter.h b/ext/filter/php_filter.h index 673c93b4d2753..48c08882d3a19 100644 --- a/ext/filter/php_filter.h +++ b/ext/filter/php_filter.h @@ -96,11 +96,3 @@ void php_filter_add_slashes(PHP_INPUT_FILTER_PARAM_DECL); void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL); #endif /* FILTER_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c index 89a12b75d545a..815ba9a94acae 100644 --- a/ext/filter/sanitizing_filters.c +++ b/ext/filter/sanitizing_filters.c @@ -380,12 +380,3 @@ void php_filter_add_slashes(PHP_INPUT_FILTER_PARAM_DECL) ZVAL_STR(value, buf); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 3921c674c94c8..2454a4e303c3e 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -2311,12 +2311,3 @@ ftp_nb_continue_write(ftpbuf_t *ftp) /* }}} */ #endif /* HAVE_FTP */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index da72b9da3f471..e798213e7fc9b 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -1613,11 +1613,3 @@ PHP_FUNCTION(ftp_get_option) /* }}} */ #endif /* HAVE_FTP */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 2addf73096d1e..f171fd81b1156 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -4835,12 +4835,3 @@ PHP_FUNCTION(imageresolution) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index 93ad8b94bc2de..74f09c2d5fe26 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -219,12 +219,3 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, RETURN_TRUE; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/gd/libgd/gd_xbm.c b/ext/gd/libgd/gd_xbm.c index 115f1c4d46aaf..a37d833d3b0ef 100644 --- a/ext/gd/libgd/gd_xbm.c +++ b/ext/gd/libgd/gd_xbm.c @@ -231,12 +231,3 @@ void gdImageXbmCtx(gdImagePtr image, char* file_name, int fg, gdIOCtx * out) gdCtxPrintf(out, "};\n"); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/gd/tests/imagecolorallocate_variation1.phpt b/ext/gd/tests/imagecolorallocate_variation1.phpt deleted file mode 100644 index 37d9f95a89b74..0000000000000 --- a/ext/gd/tests/imagecolorallocate_variation1.phpt +++ /dev/null @@ -1,267 +0,0 @@ ---TEST-- -Test imagecolorallocate() function : usage variations - passing different data types to first argument ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$values = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 10.1234567e10' => 10.1234567e10, - 'float 10.7654321E-10' => 10.7654321E-10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - //resource - "file resource" => $fp -); - -// loop through each element of the array for im -foreach($values as $key => $value) { - echo "\n-- $key --\n"; - var_dump( imagecolorallocate($value, $red, $green, $blue) ); -}; -?> -===DONE=== ---EXPECTF-- -*** Testing imagecolorallocate() : usage variations *** - --- int 0 -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- int 1 -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- int 12345 -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- int -12345 -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- float 10.5 -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- float -10.5 -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- float 10.1234567e10 -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- float 10.7654321E-10 -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- float .5 -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- empty array -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, array given in %s on line %d -NULL - --- int indexed array -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, array given in %s on line %d -NULL - --- associative array -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, array given in %s on line %d -NULL - --- nested arrays -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, array given in %s on line %d -NULL - --- uppercase NULL -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- lowercase null -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- lowercase true -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- lowercase false -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- uppercase TRUE -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- uppercase FALSE -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- empty string DQ -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- empty string SQ -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- string DQ -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- string SQ -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- mixed case string -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- heredoc -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- instance of classWithToString -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, object given in %s on line %d -NULL - --- instance of classWithoutToString -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, object given in %s on line %d -NULL - --- undefined var -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- unset var -- - -Warning: imagecolorallocate() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- file resource -- - -Warning: imagecolorallocate(): supplied resource is not a valid Image resource in %s on line %d -bool(false) -===DONE=== diff --git a/ext/gd/tests/imagecolorallocate_variation2.phpt b/ext/gd/tests/imagecolorallocate_variation2.phpt deleted file mode 100644 index e46e0da960182..0000000000000 --- a/ext/gd/tests/imagecolorallocate_variation2.phpt +++ /dev/null @@ -1,215 +0,0 @@ ---TEST-- -Test imagecolorallocate() function : usage variations - passing different data types to second argument ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$values = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 10.1234567e10' => 10.1234567e10, - 'float 10.7654321E-10' => 10.7654321E-10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - //resource - "file resource" => $fp -); -// loop through each element of the array for red -foreach($values as $key => $value) { - echo "\n--$key--\n"; - var_dump( imagecolorallocate($im, $value, $green, $blue) ); -}; -?> -===DONE=== ---EXPECTF-- -*** Testing imagecolorallocate() : usage variations *** - ---float 10.5-- -int(657930) - ---float -10.5-- -bool(false) - ---float 10.1234567e10-- -bool(false) - ---float 10.7654321E-10-- -int(2570) - ---float .5-- -int(2570) - ---empty array-- - -Warning: imagecolorallocate() expects parameter 2 to be int, array given in %s on line %d -NULL - ---int indexed array-- - -Warning: imagecolorallocate() expects parameter 2 to be int, array given in %s on line %d -NULL - ---associative array-- - -Warning: imagecolorallocate() expects parameter 2 to be int, array given in %s on line %d -NULL - ---nested arrays-- - -Warning: imagecolorallocate() expects parameter 2 to be int, array given in %s on line %d -NULL - ---uppercase NULL-- -int(2570) - ---lowercase null-- -int(2570) - ---lowercase true-- -int(68106) - ---lowercase false-- -int(2570) - ---uppercase TRUE-- -int(68106) - ---uppercase FALSE-- -int(2570) - ---empty string DQ-- - -Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d -NULL - ---empty string SQ-- - -Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d -NULL - ---string DQ-- - -Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d -NULL - ---string SQ-- - -Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d -NULL - ---mixed case string-- - -Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d -NULL - ---heredoc-- - -Warning: imagecolorallocate() expects parameter 2 to be int, string given in %s on line %d -NULL - ---instance of classWithToString-- - -Warning: imagecolorallocate() expects parameter 2 to be int, object given in %s on line %d -NULL - ---instance of classWithoutToString-- - -Warning: imagecolorallocate() expects parameter 2 to be int, object given in %s on line %d -NULL - ---undefined var-- -int(2570) - ---unset var-- -int(2570) - ---file resource-- - -Warning: imagecolorallocate() expects parameter 2 to be int, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/gd/tests/imagecolorallocate_variation3.phpt b/ext/gd/tests/imagecolorallocate_variation3.phpt deleted file mode 100644 index 8552f976c7953..0000000000000 --- a/ext/gd/tests/imagecolorallocate_variation3.phpt +++ /dev/null @@ -1,214 +0,0 @@ ---TEST-- -Test imagecolorallocate() function : usage variations - passing different data types to third argument ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$values = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 10.1234567e5' => 10.1234567e5, - 'float 10.7654321E-5' => 10.7654321E-5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - //resource - "file resource" => $fp -); -// loop through each element of the array for red -foreach($values as $key => $value) { - echo "\n--$key--\n"; - var_dump( imagecolorallocate($im, $red, $value, $blue) ); -}; -?> -===DONE=== ---EXPECTF-- -*** Testing imagecolorallocate() : usage variations *** - ---float 10.5-- -int(657930) - ---float -10.5-- -int(652810) - ---float 10.1234567e5-- -int(259815690) - ---float 10.7654321E-5-- -int(655370) - ---float .5-- -int(655370) - ---empty array-- - -Warning: imagecolorallocate() expects parameter 3 to be int, array given in %s on line %d -NULL - ---int indexed array-- - -Warning: imagecolorallocate() expects parameter 3 to be int, array given in %s on line %d -NULL - ---associative array-- - -Warning: imagecolorallocate() expects parameter 3 to be int, array given in %s on line %d -NULL - ---nested arrays-- - -Warning: imagecolorallocate() expects parameter 3 to be int, array given in %s on line %d -NULL - ---uppercase NULL-- -int(655370) - ---lowercase null-- -int(655370) - ---lowercase true-- -int(655626) - ---lowercase false-- -int(655370) - ---uppercase TRUE-- -int(655626) - ---uppercase FALSE-- -int(655370) - ---empty string DQ-- - -Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d -NULL - ---empty string SQ-- - -Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d -NULL - ---string DQ-- - -Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d -NULL - ---string SQ-- - -Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d -NULL - ---mixed case string-- - -Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d -NULL - ---heredoc-- - -Warning: imagecolorallocate() expects parameter 3 to be int, string given in %s on line %d -NULL - ---instance of classWithToString-- - -Warning: imagecolorallocate() expects parameter 3 to be int, object given in %s on line %d -NULL - ---instance of classWithoutToString-- - -Warning: imagecolorallocate() expects parameter 3 to be int, object given in %s on line %d -NULL - ---undefined var-- -int(655370) - ---unset var-- -int(655370) - ---file resource-- - -Warning: imagecolorallocate() expects parameter 3 to be int, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/gd/tests/imagecolorallocate_variation4.phpt b/ext/gd/tests/imagecolorallocate_variation4.phpt deleted file mode 100644 index ad8908eeea8fd..0000000000000 --- a/ext/gd/tests/imagecolorallocate_variation4.phpt +++ /dev/null @@ -1,214 +0,0 @@ ---TEST-- -Test imagecolorallocate() function : usage variations - passing different data types to fourth argument ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$values = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 10.1234567e10' => 10.1234567e10, - 'float 10.7654321E-10' => 10.7654321E-10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - //resource - "file resource" => $fp -); -// loop through each element of the array for red -foreach($values as $key => $value) { - echo "\n--$key--\n"; - var_dump( imagecolorallocate($im, $red, $green, $value) ); -}; -?> -===DONE=== ---EXPECTF-- -*** Testing imagecolorallocate() : usage variations *** - ---float 10.5-- -int(657930) - ---float -10.5-- -int(657910) - ---float 10.1234567e10-- -bool(false) - ---float 10.7654321E-10-- -int(657920) - ---float .5-- -int(657920) - ---empty array-- - -Warning: imagecolorallocate() expects parameter 4 to be int, array given in %s on line %d -NULL - ---int indexed array-- - -Warning: imagecolorallocate() expects parameter 4 to be int, array given in %s on line %d -NULL - ---associative array-- - -Warning: imagecolorallocate() expects parameter 4 to be int, array given in %s on line %d -NULL - ---nested arrays-- - -Warning: imagecolorallocate() expects parameter 4 to be int, array given in %s on line %d -NULL - ---uppercase NULL-- -int(657920) - ---lowercase null-- -int(657920) - ---lowercase true-- -int(657921) - ---lowercase false-- -int(657920) - ---uppercase TRUE-- -int(657921) - ---uppercase FALSE-- -int(657920) - ---empty string DQ-- - -Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d -NULL - ---empty string SQ-- - -Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d -NULL - ---string DQ-- - -Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d -NULL - ---string SQ-- - -Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d -NULL - ---mixed case string-- - -Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d -NULL - ---heredoc-- - -Warning: imagecolorallocate() expects parameter 4 to be int, string given in %s on line %d -NULL - ---instance of classWithToString-- - -Warning: imagecolorallocate() expects parameter 4 to be int, object given in %s on line %d -NULL - ---instance of classWithoutToString-- - -Warning: imagecolorallocate() expects parameter 4 to be int, object given in %s on line %d -NULL - ---undefined var-- -int(657920) - ---unset var-- -int(657920) - ---file resource-- - -Warning: imagecolorallocate() expects parameter 4 to be int, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c index f0245cb8efc3e..003787f5c08b4 100644 --- a/ext/gettext/gettext.c +++ b/ext/gettext/gettext.c @@ -389,12 +389,3 @@ PHP_NAMED_FUNCTION(zif_bind_textdomain_codeset) #endif /* HAVE_LIBINTL */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 073acd1f7f0e0..73462b8313c12 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -404,24 +404,24 @@ static inline void gmp_create(zval *target, mpz_ptr *gmpnum_target) /* {{{ */ } /* }}} */ -static int gmp_cast_object(zval *readobj, zval *writeobj, int type) /* {{{ */ +static int gmp_cast_object(zend_object *readobj, zval *writeobj, int type) /* {{{ */ { mpz_ptr gmpnum; switch (type) { case IS_STRING: - gmpnum = GET_GMP_FROM_ZVAL(readobj); + gmpnum = GET_GMP_OBJECT_FROM_OBJ(readobj)->num; gmp_strval(writeobj, gmpnum, 10); return SUCCESS; case IS_LONG: - gmpnum = GET_GMP_FROM_ZVAL(readobj); + gmpnum = GET_GMP_OBJECT_FROM_OBJ(readobj)->num; ZVAL_LONG(writeobj, mpz_get_si(gmpnum)); return SUCCESS; case IS_DOUBLE: - gmpnum = GET_GMP_FROM_ZVAL(readobj); + gmpnum = GET_GMP_OBJECT_FROM_OBJ(readobj)->num; ZVAL_DOUBLE(writeobj, mpz_get_d(gmpnum)); return SUCCESS; case _IS_NUMBER: - gmpnum = GET_GMP_FROM_ZVAL(readobj); + gmpnum = GET_GMP_OBJECT_FROM_OBJ(readobj)->num; if (mpz_fits_slong_p(gmpnum)) { ZVAL_LONG(writeobj, mpz_get_si(gmpnum)); } else { @@ -434,10 +434,10 @@ static int gmp_cast_object(zval *readobj, zval *writeobj, int type) /* {{{ */ } /* }}} */ -static HashTable *gmp_get_debug_info(zval *obj, int *is_temp) /* {{{ */ +static HashTable *gmp_get_debug_info(zend_object *obj, int *is_temp) /* {{{ */ { HashTable *ht, *props = zend_std_get_properties(obj); - mpz_ptr gmpnum = GET_GMP_FROM_ZVAL(obj); + mpz_ptr gmpnum = GET_GMP_OBJECT_FROM_OBJ(obj)->num; zval zv; *is_temp = 1; @@ -450,10 +450,10 @@ static HashTable *gmp_get_debug_info(zval *obj, int *is_temp) /* {{{ */ } /* }}} */ -static zend_object *gmp_clone_obj(zval *obj) /* {{{ */ +static zend_object *gmp_clone_obj(zend_object *obj) /* {{{ */ { - gmp_object *old_object = GET_GMP_OBJECT_FROM_ZVAL(obj); - gmp_object *new_object = GET_GMP_OBJECT_FROM_OBJ(gmp_create_object(Z_OBJCE_P(obj))); + gmp_object *old_object = GET_GMP_OBJECT_FROM_OBJ(obj); + gmp_object *new_object = GET_GMP_OBJECT_FROM_OBJ(gmp_create_object(obj->ce)); zend_objects_clone_members( &new_object->std, &old_object->std); @@ -574,7 +574,7 @@ static int gmp_serialize(zval *object, unsigned char **buffer, size_t *buf_len, php_var_serialize(&buf, &zv, &serialize_data); zval_ptr_dtor_str(&zv); - ZVAL_ARR(&zv, zend_std_get_properties(object)); + ZVAL_ARR(&zv, zend_std_get_properties(Z_OBJ_P(object))); php_var_serialize(&buf, &zv, &serialize_data); PHP_VAR_SERIALIZE_DESTROY(serialize_data); @@ -593,14 +593,12 @@ static int gmp_unserialize(zval *object, zend_class_entry *ce, const unsigned ch zval *zv; int retval = FAILURE; php_unserialize_data_t unserialize_data; - zval object_copy; + zend_object *zobj; PHP_VAR_UNSERIALIZE_INIT(unserialize_data); gmp_create(object, &gmpnum); - /* The "object" variable may be modified during the execution of this unserialize handler - * (it may turn into a reference). Keep the original object around for further operations. */ - ZVAL_COPY_VALUE(&object_copy, object); + zobj = Z_OBJ_P(object); p = buf; max = buf + buf_len; @@ -624,7 +622,7 @@ static int gmp_unserialize(zval *object, zend_class_entry *ce, const unsigned ch if (zend_hash_num_elements(Z_ARRVAL_P(zv)) != 0) { zend_hash_copy( - zend_std_get_properties(&object_copy), Z_ARRVAL_P(zv), + zend_std_get_properties(zobj), Z_ARRVAL_P(zv), (copy_ctor_func_t) zval_add_ref ); } @@ -2179,12 +2177,3 @@ ZEND_FUNCTION(gmp_scan1) FREE_GMP_TEMP(temp_a); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/gmp/php_gmp.h b/ext/gmp/php_gmp.h index c484a7d1cda6e..6994814b06c15 100644 --- a/ext/gmp/php_gmp.h +++ b/ext/gmp/php_gmp.h @@ -95,11 +95,3 @@ ZEND_TSRMLS_CACHE_EXTERN() #endif #endif /* PHP_GMP_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 099242fcc57fe..1da1ae68e28ea 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -569,7 +569,7 @@ PHP_FUNCTION(hash_copy) return; } - RETVAL_OBJ(Z_OBJ_HANDLER_P(zhash, clone_obj)(zhash)); + RETVAL_OBJ(Z_OBJ_HANDLER_P(zhash, clone_obj)(Z_OBJ_P(zhash))); if (php_hashcontext_from_object(Z_OBJ_P(return_value))->context == NULL) { zval_ptr_dtor(return_value); @@ -1137,12 +1137,12 @@ static void php_hashcontext_dtor(zend_object *obj) { /* }}} */ /* {{{ php_hashcontext_clone */ -static zend_object *php_hashcontext_clone(zval *pzv) { - php_hashcontext_object *oldobj = php_hashcontext_from_object(Z_OBJ_P(pzv)); - zend_object *znew = php_hashcontext_create(Z_OBJCE_P(pzv)); +static zend_object *php_hashcontext_clone(zend_object *zobj) { + php_hashcontext_object *oldobj = php_hashcontext_from_object(zobj); + zend_object *znew = php_hashcontext_create(zobj->ce); php_hashcontext_object *newobj = php_hashcontext_from_object(znew); - zend_objects_clone_members(znew, Z_OBJ_P(pzv)); + zend_objects_clone_members(znew, zobj); newobj->ops = oldobj->ops; newobj->options = oldobj->options; @@ -1490,12 +1490,3 @@ zend_module_entry hash_module_entry = { #ifdef COMPILE_DL_HASH ZEND_GET_MODULE(hash) #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/hash/hash_adler32.c b/ext/hash/hash_adler32.c index 74b93cc63299d..12bc44e446303 100644 --- a/ext/hash/hash_adler32.c +++ b/ext/hash/hash_adler32.c @@ -70,12 +70,3 @@ const php_hash_ops php_hash_adler32_ops = { sizeof(PHP_ADLER32_CTX), 0 }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/hash_crc32.c b/ext/hash/hash_crc32.c index 6b38e92f4cf85..4f095e4b71507 100644 --- a/ext/hash/hash_crc32.c +++ b/ext/hash/hash_crc32.c @@ -91,12 +91,3 @@ const php_hash_ops php_hash_crc32b_ops = { sizeof(PHP_CRC32_CTX), 0 }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/hash_fnv.c b/ext/hash/hash_fnv.c index e5236a95ed9d1..0ebe867b498fe 100644 --- a/ext/hash/hash_fnv.c +++ b/ext/hash/hash_fnv.c @@ -223,12 +223,3 @@ fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate) /* return our new hash value */ return hval; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/hash/hash_gost.c b/ext/hash/hash_gost.c index 6a23e54e80922..f51b310b70ad8 100644 --- a/ext/hash/hash_gost.c +++ b/ext/hash/hash_gost.c @@ -327,12 +327,3 @@ const php_hash_ops php_hash_gost_crypto_ops = { sizeof(PHP_GOST_CTX), 1 }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/hash_haval.c b/ext/hash/hash_haval.c index 54a75b2c68147..af2991e667198 100644 --- a/ext/hash/hash_haval.c +++ b/ext/hash/hash_haval.c @@ -538,12 +538,3 @@ PHP_HASH_API void PHP_HAVAL256Final(unsigned char *digest, PHP_HAVAL_CTX * conte ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/hash_joaat.c b/ext/hash/hash_joaat.c index 02162c5c133cd..fe04ed9cf28d1 100644 --- a/ext/hash/hash_joaat.c +++ b/ext/hash/hash_joaat.c @@ -87,12 +87,3 @@ joaat_buf(void *buf, size_t len, uint32_t hval) return hval; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/hash/hash_md.c b/ext/hash/hash_md.c index 69036cda2e393..497c7d9d8dab2 100644 --- a/ext/hash/hash_md.c +++ b/ext/hash/hash_md.c @@ -691,12 +691,3 @@ PHP_HASH_API void PHP_MD2Final(unsigned char output[16], PHP_MD2_CTX *context) memcpy(output, context->state, 16); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/hash_ripemd.c b/ext/hash/hash_ripemd.c index ea4c81968be20..083e6a99559fe 100644 --- a/ext/hash/hash_ripemd.c +++ b/ext/hash/hash_ripemd.c @@ -766,12 +766,3 @@ PHP_HASH_API void PHP_RIPEMD320Final(unsigned char digest[40], PHP_RIPEMD320_CTX ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/hash_sha.c b/ext/hash/hash_sha.c index c88fc45f31beb..4e0e1c17975ec 100644 --- a/ext/hash/hash_sha.c +++ b/ext/hash/hash_sha.c @@ -1111,12 +1111,3 @@ const php_hash_ops php_hash_sha512_224_ops = { sizeof(PHP_SHA512_CTX), 1 }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/hash_sha3.c b/ext/hash/hash_sha3.c index 12ff4156ad566..8d0a1e7f8b8d5 100644 --- a/ext/hash/hash_sha3.c +++ b/ext/hash/hash_sha3.c @@ -286,12 +286,3 @@ DECLARE_SHA3_OPS(384); DECLARE_SHA3_OPS(512); #undef DECLARE_SHA3_OPS - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/hash_snefru.c b/ext/hash/hash_snefru.c index acc0ef64bc6be..0e6b703f2a4a2 100644 --- a/ext/hash/hash_snefru.c +++ b/ext/hash/hash_snefru.c @@ -201,12 +201,3 @@ const php_hash_ops php_hash_snefru_ops = { sizeof(PHP_SNEFRU_CTX), 1 }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/hash_tiger.c b/ext/hash/hash_tiger.c index fdae1b2d64a9e..4d126f0d8fd9a 100644 --- a/ext/hash/hash_tiger.c +++ b/ext/hash/hash_tiger.c @@ -259,12 +259,3 @@ PHP_HASH_TIGER_OPS(3, 192); PHP_HASH_TIGER_OPS(4, 128); PHP_HASH_TIGER_OPS(4, 160); PHP_HASH_TIGER_OPS(4, 192); - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/hash_whirlpool.c b/ext/hash/hash_whirlpool.c index cacff97697b35..3bd9bd13da65e 100644 --- a/ext/hash/hash_whirlpool.c +++ b/ext/hash/hash_whirlpool.c @@ -441,12 +441,3 @@ const php_hash_ops php_hash_whirlpool_ops = { sizeof(PHP_WHIRLPOOL_CTX), 1 }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash.h b/ext/hash/php_hash.h index bb21721a9d8cc..8f23c1920d8c0 100644 --- a/ext/hash/php_hash.h +++ b/ext/hash/php_hash.h @@ -159,13 +159,3 @@ static inline void php_hash_bin2hex(char *out, const unsigned char *in, size_t i } #endif /* PHP_HASH_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_adler32.h b/ext/hash/php_hash_adler32.h index b523f021e5d22..63f32ab536b5b 100644 --- a/ext/hash/php_hash_adler32.h +++ b/ext/hash/php_hash_adler32.h @@ -31,12 +31,3 @@ PHP_HASH_API void PHP_ADLER32Final(unsigned char digest[4], PHP_ADLER32_CTX *con PHP_HASH_API int PHP_ADLER32Copy(const php_hash_ops *ops, PHP_ADLER32_CTX *orig_context, PHP_ADLER32_CTX *copy_context); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_crc32.h b/ext/hash/php_hash_crc32.h index b2ec34add6e63..5b187dc51f3c8 100644 --- a/ext/hash/php_hash_crc32.h +++ b/ext/hash/php_hash_crc32.h @@ -32,12 +32,3 @@ PHP_HASH_API void PHP_CRC32Final(unsigned char digest[4], PHP_CRC32_CTX *context PHP_HASH_API int PHP_CRC32Copy(const php_hash_ops *ops, PHP_CRC32_CTX *orig_context, PHP_CRC32_CTX *copy_context); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_crc32_tables.h b/ext/hash/php_hash_crc32_tables.h index 0e16f947bd80b..9d1e5b8376538 100644 --- a/ext/hash/php_hash_crc32_tables.h +++ b/ext/hash/php_hash_crc32_tables.h @@ -136,12 +136,3 @@ static const uint32_t crc32b_table[] = { 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_fnv.h b/ext/hash/php_hash_fnv.h index a164fad0b4a96..f00a469423765 100644 --- a/ext/hash/php_hash_fnv.h +++ b/ext/hash/php_hash_fnv.h @@ -66,12 +66,3 @@ static uint32_t fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate); static uint64_t fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_gost.h b/ext/hash/php_hash_gost.h index ccb2d915581d7..3837eeb26396d 100644 --- a/ext/hash/php_hash_gost.h +++ b/ext/hash/php_hash_gost.h @@ -35,12 +35,3 @@ PHP_HASH_API void PHP_GOSTUpdate(PHP_GOST_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_GOSTFinal(unsigned char[64], PHP_GOST_CTX *); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_joaat.h b/ext/hash/php_hash_joaat.h index 7d669f0ba5292..b9e7e7a7ee1ef 100644 --- a/ext/hash/php_hash_joaat.h +++ b/ext/hash/php_hash_joaat.h @@ -30,12 +30,3 @@ PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[16], PHP_JOAAT_CTX * conte static uint32_t joaat_buf(void *buf, size_t len, uint32_t hval); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_sha3.h b/ext/hash/php_hash_sha3.h index 2621accbd9a0b..0608f4005e275 100644 --- a/ext/hash/php_hash_sha3.h +++ b/ext/hash/php_hash_sha3.h @@ -52,11 +52,3 @@ PHP_HASH_API void PHP_SHA3512Update(PHP_SHA3_512_CTX*, const unsigned char*, siz PHP_HASH_API void PHP_SAH3512Final(unsigned char[32], PHP_SHA3_512_CTX*); #endif -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_snefru.h b/ext/hash/php_hash_snefru.h index 8e205a95b66c5..2040fbfc947d4 100644 --- a/ext/hash/php_hash_snefru.h +++ b/ext/hash/php_hash_snefru.h @@ -38,12 +38,3 @@ PHP_HASH_API void PHP_SNEFRUUpdate(PHP_SNEFRU_CTX *, const unsigned char *, size PHP_HASH_API void PHP_SNEFRUFinal(unsigned char[32], PHP_SNEFRU_CTX *); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_snefru_tables.h b/ext/hash/php_hash_snefru_tables.h index 9815f2a316d47..20d385443d825 100644 --- a/ext/hash/php_hash_snefru_tables.h +++ b/ext/hash/php_hash_snefru_tables.h @@ -929,12 +929,3 @@ static const uint32_t tables[16][256]= { /* 255*/ 0x4d87253cL /* End of S Box 15 */ } }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_tiger.h b/ext/hash/php_hash_tiger.h index cca64b1e85cc7..b80e4e3254fea 100644 --- a/ext/hash/php_hash_tiger.h +++ b/ext/hash/php_hash_tiger.h @@ -36,12 +36,3 @@ PHP_HASH_API void PHP_TIGER160Final(unsigned char digest[20], PHP_TIGER_CTX *con PHP_HASH_API void PHP_TIGER192Final(unsigned char digest[24], PHP_TIGER_CTX *context); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_tiger_tables.h b/ext/hash/php_hash_tiger_tables.h index fd81b3ce4f89b..3dbdc0a4c6fee 100644 --- a/ext/hash/php_hash_tiger_tables.h +++ b/ext/hash/php_hash_tiger_tables.h @@ -536,12 +536,3 @@ static const uint64_t table[4*256] = { L64(0xCD56D9430EA8280E) /* 1020 */, L64(0xC12591D7535F5065) /* 1021 */, L64(0xC83223F1720AEF96) /* 1022 */, L64(0xC3A0396F7363A51F) /* 1023 */, }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_whirlpool.h b/ext/hash/php_hash_whirlpool.h index 6c65c3c5bd0a0..3a2e98cff2dab 100644 --- a/ext/hash/php_hash_whirlpool.h +++ b/ext/hash/php_hash_whirlpool.h @@ -35,12 +35,3 @@ PHP_HASH_API void PHP_WHIRLPOOLUpdate(PHP_WHIRLPOOL_CTX *, const unsigned char * PHP_HASH_API void PHP_WHIRLPOOLFinal(unsigned char[64], PHP_WHIRLPOOL_CTX *); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/hash/php_hash_whirlpool_tables.h b/ext/hash/php_hash_whirlpool_tables.h index 04b61068a8bc9..2127ccca59dbd 100644 --- a/ext/hash/php_hash_whirlpool_tables.h +++ b/ext/hash/php_hash_whirlpool_tables.h @@ -572,12 +572,3 @@ static const uint64_t C7[256] = { }; #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index f3f8ed2aa73a6..0e85a5c3b3663 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2933,12 +2933,3 @@ static php_iconv_err_t php_iconv_stream_filter_unregister_factory(void) /* }}} */ /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h index 048c5d9b13dbd..980d84c945f9a 100644 --- a/ext/iconv/php_iconv.h +++ b/ext/iconv/php_iconv.h @@ -116,10 +116,3 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char * in_p, size_t in_len, #define phpext_iconv_ptr iconv_module_ptr #endif /* PHP_ICONV_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/iconv/tests/iconv_get_encoding_error.phpt b/ext/iconv/tests/iconv_get_encoding_error.phpt deleted file mode 100644 index c14605144032e..0000000000000 --- a/ext/iconv/tests/iconv_get_encoding_error.phpt +++ /dev/null @@ -1,177 +0,0 @@ ---TEST-- -Test iconv_get_encoding() function : basic functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_get_encoding() : error functionality *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- -bool(false) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: iconv_get_encoding() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/iconv/tests/iconv_mime_decode.phpt b/ext/iconv/tests/iconv_mime_decode.phpt index c5b76f3ce9e8f..b5dee827dfa14 100644 --- a/ext/iconv/tests/iconv_mime_decode.phpt +++ b/ext/iconv/tests/iconv_mime_decode.phpt @@ -6,7 +6,7 @@ iconv_mime_decode() iconv.internal_charset=iso-8859-1 --FILE-- ---FILE-- - -Received: from localhost (localhost [127.0.0.1]) by localhost - with SMTP id example for ; - Thu, 1 Jan 1970 00:00:00 +0000 (UTC) - (envelope-from example-return-0000-example=example.com@example.com) -Received: (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000 - -EOF; - -$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR; -$charset = 'ISO-8859-1'; - - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = << ---EXPECTF-- -*** Testing iconv_mime_decode_headers() : usage variations *** - --- Iteration 1 -- -array(0) { -} - --- Iteration 2 -- -array(0) { -} - --- Iteration 3 -- -array(0) { -} - --- Iteration 4 -- -array(0) { -} - --- Iteration 5 -- -array(0) { -} - --- Iteration 6 -- -array(0) { -} - --- Iteration 7 -- -array(0) { -} - --- Iteration 8 -- -array(0) { -} - --- Iteration 9 -- -array(0) { -} - --- Iteration 10 -- -array(0) { -} - --- Iteration 11 -- -array(0) { -} - --- Iteration 12 -- -array(0) { -} - --- Iteration 13 -- -array(0) { -} - --- Iteration 14 -- -array(0) { -} - --- Iteration 15 -- -array(0) { -} - --- Iteration 16 -- -array(0) { -} - --- Iteration 17 -- -array(0) { -} - --- Iteration 18 -- -array(0) { -} - --- Iteration 19 -- -array(0) { -} - --- Iteration 20 -- -array(0) { -} - --- Iteration 21 -- -array(0) { -} - --- Iteration 22 -- -array(0) { -} - --- Iteration 23 -- -array(0) { -} - --- Iteration 24 -- - -Warning: iconv_mime_decode_headers() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt b/ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt deleted file mode 100644 index f325f2816f9ef..0000000000000 --- a/ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt +++ /dev/null @@ -1,466 +0,0 @@ ---TEST-- -Test iconv_mime_encode() function : usage variations - Pass different data types to mode arg ---SKIPIF-- - ---FILE-- - -Received: from localhost (localhost [127.0.0.1]) by localhost - with SMTP id example for ; - Thu, 1 Jan 1970 00:00:00 +0000 (UTC) - (envelope-from example-return-0000-example=example.com@example.com) -Received: (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000 - -EOF; - -$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR; -$charset = 'UTF-8'; - - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = << ---EXPECTF-- -*** Testing iconv_mime_decode_headers() : usage variations *** - --- Iteration 1 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 2 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 3 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 4 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 5 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 6 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 7 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, float given in %s on line %d -bool(false) - --- Iteration 8 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 9 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 10 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 11 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 12 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 13 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 14 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 15 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 16 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- Iteration 20 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- Iteration 21 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- Iteration 22 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 23 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 24 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt b/ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt deleted file mode 100644 index 1a0f7fc0c3749..0000000000000 --- a/ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt +++ /dev/null @@ -1,469 +0,0 @@ ---TEST-- -Test iconv_mime_encode() function : usage variations - Pass different data types to charset arg ---SKIPIF-- - ---FILE-- - -Received: from localhost (localhost [127.0.0.1]) by localhost - with SMTP id example for ; - Thu, 1 Jan 1970 00:00:00 +0000 (UTC) - (envelope-from example-return-0000-example=example.com@example.com) -Received: (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000 - -EOF; - -$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR; -$charset = 'UTF-8'; - - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = << ---EXPECTF-- -*** Testing iconv_mime_decode_headers() : usage variations *** - --- Iteration 1 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 2 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 3 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 4 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 5 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 6 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 7 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, float given in %s on line %d -bool(false) - --- Iteration 8 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 9 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 10 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 11 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 12 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 13 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 14 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 15 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 16 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- Iteration 20 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d -bool(false) - --- Iteration 21 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, object given in %s on line %d -bool(false) - --- Iteration 22 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 23 -- -array(5) { - ["Subject"]=> - string(13) "A Sample Test" - ["To"]=> - string(19) "example@example.com" - ["Date"]=> - string(30) "Thu, 1 Jan 1970 00:00:00 +0000" - ["Message-Id"]=> - string(21) "" - ["Received"]=> - array(2) { - [0]=> - string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for ; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)" - [1]=> - string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000" - } -} - --- Iteration 24 -- - -Warning: iconv_mime_decode_headers() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_mime_decode_variation1.phpt b/ext/iconv/tests/iconv_mime_decode_variation1.phpt deleted file mode 100644 index e169b4ead5312..0000000000000 --- a/ext/iconv/tests/iconv_mime_decode_variation1.phpt +++ /dev/null @@ -1,183 +0,0 @@ ---TEST-- -Test iconv_mime_decode() function : usage variations - Pass different data types to header arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_mime_decode() : usage variations *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(1) "1" - --- Iteration 3 -- -string(5) "12345" - --- Iteration 4 -- -string(5) "-2345" - --- Iteration 5 -- -string(4) "10.5" - --- Iteration 6 -- -string(5) "-10.5" - --- Iteration 7 -- -string(12) "123456789000" - --- Iteration 8 -- -string(13) "1.23456789E-9" - --- Iteration 9 -- -string(3) "0.5" - --- Iteration 10 -- -string(0) "" - --- Iteration 11 -- -string(0) "" - --- Iteration 12 -- -string(1) "1" - --- Iteration 13 -- -string(0) "" - --- Iteration 14 -- -string(1) "1" - --- Iteration 15 -- -string(0) "" - --- Iteration 16 -- -string(0) "" - --- Iteration 17 -- -string(0) "" - --- Iteration 18 -- -string(6) "string" - --- Iteration 19 -- -string(6) "string" - --- Iteration 20 -- -string(11) "hello world" - --- Iteration 21 -- -string(14) "Class A object" - --- Iteration 22 -- -string(0) "" - --- Iteration 23 -- -string(0) "" - --- Iteration 24 -- - -Warning: iconv_mime_decode() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_mime_decode_variation2.phpt b/ext/iconv/tests/iconv_mime_decode_variation2.phpt deleted file mode 100644 index 3e67d8aa28b1c..0000000000000 --- a/ext/iconv/tests/iconv_mime_decode_variation2.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -Test iconv_mime_decode() function : usage variations - Pass different data types to mode arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_mime_decode() : usage variations *** - --- Iteration 1 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 2 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 3 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 4 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 5 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 6 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 7 -- - -Warning: iconv_mime_decode() expects parameter 2 to be int, float given in %s on line %d -string(0) "" - --- Iteration 8 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 9 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 10 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 11 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 12 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 13 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 14 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 15 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 16 -- - -Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d -string(0) "" - --- Iteration 17 -- - -Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d -string(0) "" - --- Iteration 18 -- - -Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d -string(0) "" - --- Iteration 19 -- - -Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d -string(0) "" - --- Iteration 20 -- - -Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d -string(0) "" - --- Iteration 21 -- - -Warning: iconv_mime_decode() expects parameter 2 to be int, object given in %s on line %d -string(0) "" - --- Iteration 22 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 23 -- -string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67" - --- Iteration 24 -- - -Warning: iconv_mime_decode() expects parameter 2 to be int, resource given in %s on line %d -string(0) "" -Done diff --git a/ext/iconv/tests/iconv_mime_decode_variation3.phpt b/ext/iconv/tests/iconv_mime_decode_variation3.phpt deleted file mode 100644 index 9d62320b034d2..0000000000000 --- a/ext/iconv/tests/iconv_mime_decode_variation3.phpt +++ /dev/null @@ -1,222 +0,0 @@ ---TEST-- -Test iconv_mime_decode() function : usage variations - Pass different data types to charset arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_mime_decode() : usage variations *** - --- Iteration 1 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `0' is not allowed in %s on line %d -bool(false) - --- Iteration 2 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1' is not allowed in %s on line %d -bool(false) - --- Iteration 3 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `12345' is not allowed in %s on line %d -bool(false) - --- Iteration 4 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `-2345' is not allowed in %s on line %d -bool(false) - --- Iteration 5 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `10.5' is not allowed in %s on line %d -bool(false) - --- Iteration 6 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `-10.5' is not allowed in %s on line %d -bool(false) - --- Iteration 7 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `123456789000' is not allowed in %s on line %d -bool(false) - --- Iteration 8 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1.23456789E-9' is not allowed in %s on line %d -bool(false) - --- Iteration 9 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `0.5' is not allowed in %s on line %d -bool(false) - --- Iteration 10 -- -string(44) "5375626a6563743a20412053616d706c652054657374" - --- Iteration 11 -- -string(44) "5375626a6563743a20412053616d706c652054657374" - --- Iteration 12 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1' is not allowed in %s on line %d -bool(false) - --- Iteration 13 -- -string(44) "5375626a6563743a20412053616d706c652054657374" - --- Iteration 14 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1' is not allowed in %s on line %d -bool(false) - --- Iteration 15 -- -string(44) "5375626a6563743a20412053616d706c652054657374" - --- Iteration 16 -- -string(44) "5375626a6563743a20412053616d706c652054657374" - --- Iteration 17 -- -string(44) "5375626a6563743a20412053616d706c652054657374" - --- Iteration 18 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `string' is not allowed in %s on line %d -bool(false) - --- Iteration 19 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `string' is not allowed in %s on line %d -bool(false) - --- Iteration 20 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `hello world' is not allowed in %s on line %d -bool(false) - --- Iteration 21 -- - -Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `Class A object' is not allowed in %s on line %d -bool(false) - --- Iteration 22 -- -string(44) "5375626a6563743a20412053616d706c652054657374" - --- Iteration 23 -- -string(44) "5375626a6563743a20412053616d706c652054657374" - --- Iteration 24 -- - -Warning: iconv_mime_decode() expects parameter 3 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_mime_encode.phpt b/ext/iconv/tests/iconv_mime_encode.phpt index bd090e4d50c2e..e4be7999159d6 100644 --- a/ext/iconv/tests/iconv_mime_encode.phpt +++ b/ext/iconv/tests/iconv_mime_encode.phpt @@ -6,7 +6,7 @@ iconv_mime_encode() iconv.internal_charset=iso-8859-1 --FILE-- ---FILE-- - ---EXPECTF-- -*** Testing iconv_set_encoding() : error functionality *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- -bool(false) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: iconv_set_encoding() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/iconv/tests/iconv_set_encoding_variation.phpt b/ext/iconv/tests/iconv_set_encoding_variation.phpt deleted file mode 100644 index 62020063d842a..0000000000000 --- a/ext/iconv/tests/iconv_set_encoding_variation.phpt +++ /dev/null @@ -1,309 +0,0 @@ ---TEST-- -Test iconv_set_encoding() function : error functionality ---SKIPIF-- - ---INI-- -error_reporting=E_ALL & ~E_DEPRECATED ---FILE-- - ---EXPECTF-- -*** Testing iconv_set_encoding() : error functionality *** - --- Iteration 1 -- -bool(true) -bool(true) -bool(true) -string(1) "0" -string(1) "0" -string(1) "0" - --- Iteration 2 -- -bool(true) -bool(true) -bool(true) -string(1) "1" -string(1) "1" -string(1) "1" - --- Iteration 3 -- -bool(true) -bool(true) -bool(true) -string(5) "12345" -string(5) "12345" -string(5) "12345" - --- Iteration 4 -- -bool(true) -bool(true) -bool(true) -string(5) "-2345" -string(5) "-2345" -string(5) "-2345" - --- Iteration 5 -- -bool(true) -bool(true) -bool(true) -string(4) "10.5" -string(4) "10.5" -string(4) "10.5" - --- Iteration 6 -- -bool(true) -bool(true) -bool(true) -string(5) "-10.5" -string(5) "-10.5" -string(5) "-10.5" - --- Iteration 7 -- -bool(true) -bool(true) -bool(true) -string(12) "123456789000" -string(12) "123456789000" -string(12) "123456789000" - --- Iteration 8 -- -bool(true) -bool(true) -bool(true) -string(13) "1.23456789E-9" -string(13) "1.23456789E-9" -string(13) "1.23456789E-9" - --- Iteration 9 -- -bool(true) -bool(true) -bool(true) -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" - --- Iteration 10 -- -bool(true) -bool(true) -bool(true) -string(5) "UTF-8" -string(5) "UTF-8" -string(5) "UTF-8" - --- Iteration 11 -- -bool(true) -bool(true) -bool(true) -string(5) "UTF-8" -string(5) "UTF-8" -string(5) "UTF-8" - --- Iteration 12 -- -bool(true) -bool(true) -bool(true) -string(1) "1" -string(1) "1" -string(1) "1" - --- Iteration 13 -- -bool(true) -bool(true) -bool(true) -string(5) "UTF-8" -string(5) "UTF-8" -string(5) "UTF-8" - --- Iteration 14 -- -bool(true) -bool(true) -bool(true) -string(1) "1" -string(1) "1" -string(1) "1" - --- Iteration 15 -- -bool(true) -bool(true) -bool(true) -string(5) "UTF-8" -string(5) "UTF-8" -string(5) "UTF-8" - --- Iteration 16 -- -bool(true) -bool(true) -bool(true) -string(5) "UTF-8" -string(5) "UTF-8" -string(5) "UTF-8" - --- Iteration 17 -- -bool(true) -bool(true) -bool(true) -string(5) "UTF-8" -string(5) "UTF-8" -string(5) "UTF-8" - --- Iteration 18 -- -bool(true) -bool(true) -bool(true) -string(7) "Nothing" -string(7) "Nothing" -string(7) "Nothing" - --- Iteration 19 -- -bool(true) -bool(true) -bool(true) -string(7) "Nothing" -string(7) "Nothing" -string(7) "Nothing" - --- Iteration 20 -- -bool(true) -bool(true) -bool(true) -string(7) "Nothing" -string(7) "Nothing" -string(7) "Nothing" - --- Iteration 21 -- -bool(true) -bool(true) -bool(true) -string(5) "UTF-8" -string(5) "UTF-8" -string(5) "UTF-8" - --- Iteration 22 -- -bool(true) -bool(true) -bool(true) -string(5) "UTF-8" -string(5) "UTF-8" -string(5) "UTF-8" - --- Iteration 23 -- -bool(true) -bool(true) -bool(true) -string(5) "UTF-8" -string(5) "UTF-8" -string(5) "UTF-8" - --- Iteration 24 -- - -Warning: iconv_set_encoding() expects parameter 2 to be string, resource given in %s on line %d -NULL - -Warning: iconv_set_encoding() expects parameter 2 to be string, resource given in %s on line %d -NULL - -Warning: iconv_set_encoding() expects parameter 2 to be string, resource given in %s on line %d -NULL -string(5) "UTF-8" -string(5) "UTF-8" -string(5) "UTF-8" -Done diff --git a/ext/iconv/tests/iconv_strlen_variation1.phpt b/ext/iconv/tests/iconv_strlen_variation1.phpt deleted file mode 100644 index d6edf5b86d6ed..0000000000000 --- a/ext/iconv/tests/iconv_strlen_variation1.phpt +++ /dev/null @@ -1,193 +0,0 @@ ---TEST-- -Test iconv_strlen() function : usage variations - Pass different data types as $str arg ---SKIPIF-- - ---FILE-- - 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data -/*5*/ - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float 12.3456789000e-10' => 12.3456789000e-10, - 'float .5' => .5, - - // null data -/*10*/ - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data -/*12*/ - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data -/*16*/ - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data -/*18*/ - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data -/*21*/ - 'instance of class' => new classA(), - - // undefined data -/*22*/ - 'undefined var' => @$undefined_var, - - // unset data -/*23*/ - 'unset var' => @$unset_var, - - // resource variable -/*24*/ - 'resource' => $fp -); - -// loop through each element of $inputs to check the behavior of iconv_strlen() -$iterator = 1; -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( iconv_strlen($value, $encoding)); - $iterator++; -}; - -fclose($fp); -?> -===DONE=== ---EXPECTF-- -*** Testing iconv_strlen() : usage variations *** - ---int 0-- -int(1) - ---int 1-- -int(1) - ---int 12345-- -int(5) - ---int -12345-- -int(6) - ---float 10.5-- -int(4) - ---float -10.5-- -int(5) - ---float 12.3456789000e10-- -int(12) - ---float 12.3456789000e-10-- -int(13) - ---float .5-- -int(3) - ---uppercase NULL-- -int(0) - ---lowercase null-- -int(0) - ---lowercase true-- -int(1) - ---lowercase false-- -int(0) - ---uppercase TRUE-- -int(1) - ---uppercase FALSE-- -int(0) - ---empty string DQ-- -int(0) - ---empty string SQ-- -int(0) - ---string DQ-- -int(6) - ---string SQ-- -int(6) - ---mixed case string-- -int(6) - ---heredoc-- -int(11) - ---instance of class-- -int(14) - ---undefined var-- -int(0) - ---unset var-- -int(0) - ---resource-- - -Warning: iconv_strlen() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/iconv/tests/iconv_strlen_variation2.phpt b/ext/iconv/tests/iconv_strlen_variation2.phpt deleted file mode 100644 index c8a736cfc0ecf..0000000000000 --- a/ext/iconv/tests/iconv_strlen_variation2.phpt +++ /dev/null @@ -1,203 +0,0 @@ ---TEST-- -Test iconv_strlen() function : usage variations - Pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_strlen() : usage variations *** - --- Iteration 1 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `0' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 2 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 3 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `12345' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 4 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `-2345' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 5 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `10.5' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 6 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `-10.5' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 7 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `123456789000' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 8 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `1.23456789E-9' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 9 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `0.5' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 10 -- -int(12) - --- Iteration 11 -- -int(12) - --- Iteration 12 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 13 -- -int(12) - --- Iteration 14 -- - -Notice: iconv_strlen(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 15 -- -int(12) - --- Iteration 16 -- -int(12) - --- Iteration 17 -- -int(12) - --- Iteration 18 -- -int(12) - --- Iteration 19 -- -int(12) - --- Iteration 20 -- -int(12) - --- Iteration 21 -- -int(12) - --- Iteration 22 -- -int(12) - --- Iteration 23 -- -int(12) - --- Iteration 24 -- - -Warning: iconv_strlen() expects parameter 2 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_strpos.phpt b/ext/iconv/tests/iconv_strpos.phpt index 28e3fe2320a49..92492c7244af3 100644 --- a/ext/iconv/tests/iconv_strpos.phpt +++ b/ext/iconv/tests/iconv_strpos.phpt @@ -6,7 +6,7 @@ iconv_strpos() iconv.internal_charset=ISO-8859-1 --FILE-- ---FILE-- - ---EXPECTF-- -*** Testing iconv_strpos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- -bool(false) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: iconv_strpos() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_strpos_variation2.phpt b/ext/iconv/tests/iconv_strpos_variation2.phpt deleted file mode 100644 index de7f52d22a836..0000000000000 --- a/ext/iconv/tests/iconv_strpos_variation2.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test iconv_strpos() function : usage variations - pass different data types as $needle arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_strpos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -int(0) - --- Iteration 19 -- -int(0) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: iconv_strpos() expects parameter 2 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_strpos_variation3.phpt b/ext/iconv/tests/iconv_strpos_variation3.phpt deleted file mode 100644 index 0a3b343bfcad4..0000000000000 --- a/ext/iconv/tests/iconv_strpos_variation3.phpt +++ /dev/null @@ -1,210 +0,0 @@ ---TEST-- -Test iconv_strpos() function : usage variations - pass different data types as $offset arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_strpos() : usage variations *** --- -int(0) -int(8) --- -int(1) -int(8) --- -int(12345) -bool(false) --- -int(-5) -int(8) --- -int(-2345) - -Warning: iconv_strpos(): Offset not contained in string. in %s on line %d -bool(false) --- -float(10.5) -bool(false) --- -float(-9.5) -int(8) --- -float(-100.3) - -Warning: iconv_strpos(): Offset not contained in string. in %s on line %d -bool(false) --- -float(123456789000) - -Warning: iconv_strpos() expects parameter 3 to be int, float given in %s on line %d -bool(false) --- -float(1.23456789E-9) -int(8) --- -float(0.5) -int(8) --- -NULL -int(8) --- -NULL -int(8) --- -bool(true) -int(8) --- -bool(false) -int(8) --- -bool(true) -int(8) --- -bool(false) -int(8) --- -string(0) "" - -Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- -string(0) "" - -Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- -string(6) "string" - -Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- -string(6) "string" - -Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- -string(11) "hello world" - -Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- -object(classA)#%d (%d) { -} - -Warning: iconv_strpos() expects parameter 3 to be int, object given in %s on line %d -bool(false) --- -NULL -int(8) --- -NULL -int(8) --- -resource(%d) of type (stream) - -Warning: iconv_strpos() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt b/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt deleted file mode 100644 index 9389282f0a9a8..0000000000000 --- a/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt +++ /dev/null @@ -1,208 +0,0 @@ ---TEST-- -Test iconv_strpos() function : usage variations - pass different data types as $offset arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_strpos() : usage variations *** --- -int(0) -int(8) --- -int(1) -int(8) --- -int(12345) -bool(false) --- -int(-5) -int(8) --- -int(-2345) - -Warning: iconv_strpos(): Offset not contained in string. in %s on line %d -bool(false) --- -float(10.5) -bool(false) --- -float(-9.5) -int(8) --- -float(-100.3) - -Warning: iconv_strpos(): Offset not contained in string. in %s on line %d -bool(false) --- -float(123456789000) -bool(false) --- -float(1.23456789E-9) -int(8) --- -float(0.5) -int(8) --- -NULL -int(8) --- -NULL -int(8) --- -bool(true) -int(8) --- -bool(false) -int(8) --- -bool(true) -int(8) --- -bool(false) -int(8) --- -string(0) "" - -Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- -string(0) "" - -Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- -string(6) "string" - -Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- -string(6) "string" - -Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- -string(11) "hello world" - -Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- -object(classA)#%d (%d) { -} - -Warning: iconv_strpos() expects parameter 3 to be int, object given in %s on line %d -bool(false) --- -NULL -int(8) --- -NULL -int(8) --- -resource(%d) of type (stream) - -Warning: iconv_strpos() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_strpos_variation4.phpt b/ext/iconv/tests/iconv_strpos_variation4.phpt deleted file mode 100644 index 55c3f62889401..0000000000000 --- a/ext/iconv/tests/iconv_strpos_variation4.phpt +++ /dev/null @@ -1,206 +0,0 @@ ---TEST-- -Test iconv_strpos() function : usage variations - pass different data types as $charset arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_strpos() : usage variations *** - --- Iteration 1 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `0' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 2 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 3 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `12345' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 4 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `-2345' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 5 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `10.5' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 6 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `-10.5' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 7 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `123456789000' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 8 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `1.23456789E-9' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 9 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `0.5' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 10 -- -int(7) - --- Iteration 11 -- -int(7) - --- Iteration 12 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 13 -- -int(7) - --- Iteration 14 -- - -Notice: iconv_strpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 15 -- -int(7) - --- Iteration 16 -- -int(7) - --- Iteration 17 -- -int(7) - --- Iteration 18 -- -int(7) - --- Iteration 19 -- -int(7) - --- Iteration 20 -- -int(7) - --- Iteration 21 -- -int(7) - --- Iteration 22 -- -int(7) - --- Iteration 23 -- -int(7) - --- Iteration 24 -- - -Warning: iconv_strpos() expects parameter 4 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_strrpos.phpt b/ext/iconv/tests/iconv_strrpos.phpt index ee977f2c31388..76b8323d89893 100644 --- a/ext/iconv/tests/iconv_strrpos.phpt +++ b/ext/iconv/tests/iconv_strrpos.phpt @@ -6,7 +6,7 @@ iconv_strrpos() iconv.internal_charset=ISO-8859-1 --FILE-- ---FILE-- - ---EXPECTF-- -*** Testing iconv_strrpos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -int(7) - --- Iteration 19 -- -int(7) - --- Iteration 20 -- -int(7) - --- Iteration 21 -- -int(7) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: iconv_strrpos() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_strrpos_variation2.phpt b/ext/iconv/tests/iconv_strrpos_variation2.phpt deleted file mode 100644 index 59e26a4a1842c..0000000000000 --- a/ext/iconv/tests/iconv_strrpos_variation2.phpt +++ /dev/null @@ -1,181 +0,0 @@ ---TEST-- -Test iconv_strrpos() function : usage variations - Pass different data types to $needle arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_strrpos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -int(7) - --- Iteration 19 -- -int(7) - --- Iteration 20 -- -int(7) - --- Iteration 21 -- -int(7) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: iconv_strrpos() expects parameter 2 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/iconv_strrpos_variation3.phpt b/ext/iconv/tests/iconv_strrpos_variation3.phpt deleted file mode 100644 index 86af94ae5927d..0000000000000 --- a/ext/iconv/tests/iconv_strrpos_variation3.phpt +++ /dev/null @@ -1,204 +0,0 @@ ---TEST-- -Test iconv_strrpos() function : usage variations - pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing iconv_strrpos() : usage variations *** - --- Iteration 1 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `0' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 2 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 3 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `12345' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 4 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `-2345' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 5 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `10.5' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 6 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `-10.5' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 7 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `123456789000' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 8 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `1.23456789E-9' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 9 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `0.5' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 10 -- -int(7) - --- Iteration 11 -- -int(7) - --- Iteration 12 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 13 -- -int(7) - --- Iteration 14 -- - -Notice: iconv_strrpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d -bool(false) - --- Iteration 15 -- -int(7) - --- Iteration 16 -- -int(7) - --- Iteration 17 -- -int(7) - --- Iteration 18 -- -int(7) - --- Iteration 19 -- -int(7) - --- Iteration 20 -- -int(7) - --- Iteration 21 -- -int(7) - --- Iteration 22 -- -int(7) - --- Iteration 23 -- -int(7) - --- Iteration 24 -- - -Warning: iconv_strrpos() expects parameter 3 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/iconv/tests/translit-utf8.phpt b/ext/iconv/tests/translit-utf8.phpt index 5098798a0d45d..68b19827792a2 100644 --- a/ext/iconv/tests/translit-utf8.phpt +++ b/ext/iconv/tests/translit-utf8.phpt @@ -8,7 +8,7 @@ include('skipif.inc'); --INI-- error_reporting=2047 --FILE-- - ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing imap_close() : usage variations *** - --- Iteration 1 -- - -Warning: imap_close() expects parameter 1 to be resource, int given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 2 -- - -Warning: imap_close() expects parameter 1 to be resource, int given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 3 -- - -Warning: imap_close() expects parameter 1 to be resource, int given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 4 -- - -Warning: imap_close() expects parameter 1 to be resource, int given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 5 -- - -Warning: imap_close() expects parameter 1 to be resource, float given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 6 -- - -Warning: imap_close() expects parameter 1 to be resource, float given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 7 -- - -Warning: imap_close() expects parameter 1 to be resource, float given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 8 -- - -Warning: imap_close() expects parameter 1 to be resource, float given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 9 -- - -Warning: imap_close() expects parameter 1 to be resource, float given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 10 -- - -Warning: imap_close() expects parameter 1 to be resource, null given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 11 -- - -Warning: imap_close() expects parameter 1 to be resource, null given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 12 -- - -Warning: imap_close() expects parameter 1 to be resource, bool given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 13 -- - -Warning: imap_close() expects parameter 1 to be resource, bool given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 14 -- - -Warning: imap_close() expects parameter 1 to be resource, bool given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 15 -- - -Warning: imap_close() expects parameter 1 to be resource, bool given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 16 -- - -Warning: imap_close() expects parameter 1 to be resource, string given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 17 -- - -Warning: imap_close() expects parameter 1 to be resource, string given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 18 -- - -Warning: imap_close() expects parameter 1 to be resource, array given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 19 -- - -Warning: imap_close() expects parameter 1 to be resource, string given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 20 -- - -Warning: imap_close() expects parameter 1 to be resource, string given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 21 -- - -Warning: imap_close() expects parameter 1 to be resource, string given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 22 -- - -Warning: imap_close() expects parameter 1 to be resource, object given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 23 -- - -Warning: imap_close() expects parameter 1 to be resource, null given in %simap_close_variation1.php on line 80 -NULL - --- Iteration 24 -- - -Warning: imap_close() expects parameter 1 to be resource, null given in %simap_close_variation1.php on line 80 -NULL -===DONE=== diff --git a/ext/imap/tests/imap_close_variation2.phpt b/ext/imap/tests/imap_close_variation2.phpt deleted file mode 100644 index 652c4260a003b..0000000000000 --- a/ext/imap/tests/imap_close_variation2.phpt +++ /dev/null @@ -1,227 +0,0 @@ ---TEST-- -Test imap_close() function : usage variations - different data types as $options arg ---SKIPIF-- - ---FILE-- - -===DONE=== ---CLEAN-- - ---EXPECTF-- -*** Testing imap_close() : usage variations *** -Create a temporary mailbox and add 3 msgs -.. mailbox '{%s}%s' created - --- Iteration 1 -- -bool(true) -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 2 -- - -Warning: imap_close(): invalid value for the flags parameter in %s on line %d -bool(false) - --- Iteration 3 -- -bool(true) -CL_EXPUNGE was set - --- Iteration 4 -- - -Warning: imap_close(): invalid value for the flags parameter in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: imap_close(): invalid value for the flags parameter in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: imap_close(): invalid value for the flags parameter in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: imap_close(): invalid value for the flags parameter in %s on line %d -bool(false) - --- Iteration 8 -- -bool(true) -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 9 -- -bool(true) -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 10 -- -bool(true) -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 11 -- -bool(true) -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 12 -- - -Warning: imap_close(): invalid value for the flags parameter in %s on line %d -bool(false) - --- Iteration 13 -- -bool(true) -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 14 -- - -Warning: imap_close(): invalid value for the flags parameter in %s on line %d -bool(false) - --- Iteration 15 -- -bool(true) -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 16 -- - -Warning: imap_close() expects parameter 2 to be int, string given in %s on line %d -NULL -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 17 -- - -Warning: imap_close() expects parameter 2 to be int, string given in %s on line %d -NULL -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 18 -- - -Warning: imap_close() expects parameter 2 to be int, array given in %s on line %d -NULL -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 19 -- -bool(true) -CL_EXPUNGE was set - --- Iteration 20 -- -bool(true) -CL_EXPUNGE was set - --- Iteration 21 -- -bool(true) -CL_EXPUNGE was set - --- Iteration 22 -- -bool(true) -CL_EXPUNGE was not set, 3 msgs in mailbox - --- Iteration 23 -- -bool(true) -CL_EXPUNGE was not set, 3 msgs in mailbox -===DONE=== diff --git a/ext/imap/tests/imap_fetch_overview_variation1.phpt b/ext/imap/tests/imap_fetch_overview_variation1.phpt deleted file mode 100644 index a0508e6d0d523..0000000000000 --- a/ext/imap/tests/imap_fetch_overview_variation1.phpt +++ /dev/null @@ -1,221 +0,0 @@ ---TEST-- -Test imap_fetch_overview() function : usage variations - diff data types as $stream_id arg ---SKIPIF-- - ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing imap_fetch_overview() : usage variations *** - --- Testing with first argument value: int(0) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- Testing with first argument value: int(1) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- Testing with first argument value: int(12345) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- Testing with first argument value: int(-2345) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- Testing with first argument value: float(10.5) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- Testing with first argument value: float(-10.5) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- Testing with first argument value: float(123456789000) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- Testing with first argument value: float(1.23456789E-9) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- Testing with first argument value: float(0.5) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- Testing with first argument value: NULL - -Warning: imap_fetch_overview() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- Testing with first argument value: NULL - -Warning: imap_fetch_overview() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- Testing with first argument value: bool(true) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- Testing with first argument value: bool(false) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- Testing with first argument value: bool(true) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- Testing with first argument value: bool(false) - -Warning: imap_fetch_overview() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- Testing with first argument value: string(0) "" - -Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- Testing with first argument value: string(0) "" - -Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- Testing with first argument value: array(0) { -} - -Warning: imap_fetch_overview() expects parameter 1 to be resource, array given in %s on line %d -NULL - --- Testing with first argument value: string(6) "string" - -Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- Testing with first argument value: string(6) "string" - -Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- Testing with first argument value: string(11) "hello world" - -Warning: imap_fetch_overview() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- Testing with first argument value: object(classA)#1 (0) { -} - -Warning: imap_fetch_overview() expects parameter 1 to be resource, object given in %s on line %d -NULL - --- Testing with first argument value: NULL - -Warning: imap_fetch_overview() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- Testing with first argument value: NULL - -Warning: imap_fetch_overview() expects parameter 1 to be resource, null given in %s on line %d -NULL -===DONE=== diff --git a/ext/imap/tests/imap_fetch_overview_variation2.phpt b/ext/imap/tests/imap_fetch_overview_variation2.phpt deleted file mode 100644 index 4baa93ae0604a..0000000000000 --- a/ext/imap/tests/imap_fetch_overview_variation2.phpt +++ /dev/null @@ -1,230 +0,0 @@ ---TEST-- -Test imap_fetch_overview() function : usage variations - diff data types as $msg_no arg ---SKIPIF-- - ---FILE-- ->> argument -$inputs = array( - - // int data -/*1*/ 0, - 1, - 12345, - -2345, - - // float data -/*5*/ 10.5, - -10.5, - 12.3456789000e10, - 12.3456789000E-10, - .5, - - // null data -/*10*/ NULL, - null, - - // boolean data -/*12*/ true, - false, - TRUE, - FALSE, - - // empty data -/*16*/ "", - '', - array(), - - // string data -/*19*/ "string", - 'string', - $heredoc, - - // object data -/*22*/ new classA(), - - // undefined data -/*23*/ @$undefined_var, - - // unset data -/*24*/ @$unset_var, - - // resource variable -/*25*/ $fp -); - -// loop through each element of $inputs to check the behavior of imap_fetch_overview() -$iterator = 1; -foreach($inputs as $input) { - echo "\n-- Testing with second argument value: "; - var_dump($input); - $overview = imap_fetch_overview($stream_id, $input); - if (!$overview) { - echo imap_last_error() . "\n"; - } else { - displayOverviewFields($overview[0]); - } - $iterator++; -}; - -fclose($fp); - -// clear the error stack -imap_errors(); -?> -===DONE=== ---CLEAN-- - ---EXPECTF-- -*** Testing imap_fetch_overview() : usage variations *** -Create a temporary mailbox and add 1 msgs -.. mailbox '{%s}%s' created - --- Testing with second argument value: int(0) -Sequence out of range - --- Testing with second argument value: int(1) -size is %d -uid is %d -msgno is 1 -recent is %d -flagged is 0 -answered is 0 -deleted is 0 -seen is 0 -draft is 0 -udate is OK - --- Testing with second argument value: int(12345) -Sequence out of range - --- Testing with second argument value: int(-2345) -Syntax error in sequence - --- Testing with second argument value: float(10.5) -Sequence out of range - --- Testing with second argument value: float(-10.5) -Syntax error in sequence - --- Testing with second argument value: float(123456789000) -Sequence out of range - --- Testing with second argument value: float(1.23456789E-9) -Sequence syntax error - --- Testing with second argument value: float(0.5) -Sequence out of range - --- Testing with second argument value: NULL -Sequence out of range - --- Testing with second argument value: NULL -Sequence out of range - --- Testing with second argument value: bool(true) -size is %d -uid is %d -msgno is 1 -recent is %d -flagged is 0 -answered is 0 -deleted is 0 -seen is 0 -draft is 0 -udate is OK - --- Testing with second argument value: bool(false) -Sequence out of range - --- Testing with second argument value: bool(true) -size is %d -uid is %d -msgno is 1 -recent is %d -flagged is 0 -answered is 0 -deleted is 0 -seen is 0 -draft is 0 -udate is OK - --- Testing with second argument value: bool(false) -Sequence out of range - --- Testing with second argument value: string(0) "" -Sequence out of range - --- Testing with second argument value: string(0) "" -Sequence out of range - --- Testing with second argument value: array(0) { -} - -Warning: imap_fetch_overview() expects parameter 2 to be string, array given in %s on line %d -Sequence out of range - --- Testing with second argument value: string(6) "string" -Syntax error in sequence - --- Testing with second argument value: string(6) "string" -Syntax error in sequence - --- Testing with second argument value: string(11) "hello world" -Syntax error in sequence - --- Testing with second argument value: object(classA)#1 (0) { -} -Syntax error in sequence - --- Testing with second argument value: NULL -Syntax error in sequence - --- Testing with second argument value: NULL -Syntax error in sequence - --- Testing with second argument value: resource(%d) of type (stream) - -Warning: imap_fetch_overview() expects parameter 2 to be string, resource given in %s on line %d -Syntax error in sequence -===DONE=== diff --git a/ext/imap/tests/imap_fetchbody_variation1.phpt b/ext/imap/tests/imap_fetchbody_variation1.phpt deleted file mode 100644 index 03bbfc782c02f..0000000000000 --- a/ext/imap/tests/imap_fetchbody_variation1.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test imap_fetchbody() function : usage variation - diff data types as $stream_id arg ---SKIPIF-- - ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing imap_fetchbody() : usage variations *** - --- Iteration 1 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, int given in %s on line 85 -NULL - --- Iteration 2 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, int given in %s on line 85 -NULL - --- Iteration 3 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, int given in %s on line 85 -NULL - --- Iteration 4 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, int given in %s on line 85 -NULL - --- Iteration 5 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, float given in %s on line 85 -NULL - --- Iteration 6 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, float given in %s on line 85 -NULL - --- Iteration 7 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, float given in %s on line 85 -NULL - --- Iteration 8 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, float given in %s on line 85 -NULL - --- Iteration 9 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, float given in %s on line 85 -NULL - --- Iteration 10 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, null given in %s on line 85 -NULL - --- Iteration 11 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, null given in %s on line 85 -NULL - --- Iteration 12 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, bool given in %s on line 85 -NULL - --- Iteration 13 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, bool given in %s on line 85 -NULL - --- Iteration 14 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, bool given in %s on line 85 -NULL - --- Iteration 15 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, bool given in %s on line 85 -NULL - --- Iteration 16 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, string given in %s on line 85 -NULL - --- Iteration 17 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, string given in %s on line 85 -NULL - --- Iteration 18 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, array given in %s on line 85 -NULL - --- Iteration 19 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, string given in %s on line 85 -NULL - --- Iteration 20 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, string given in %s on line 85 -NULL - --- Iteration 21 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, string given in %s on line 85 -NULL - --- Iteration 22 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, object given in %s on line 85 -NULL - --- Iteration 23 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, null given in %s on line 85 -NULL - --- Iteration 24 -- - -Warning: imap_fetchbody() expects parameter 1 to be resource, null given in %s on line 85 -NULL -===DONE=== diff --git a/ext/imap/tests/imap_fetchbody_variation2.phpt b/ext/imap/tests/imap_fetchbody_variation2.phpt deleted file mode 100644 index 342c9cc5e6b78..0000000000000 --- a/ext/imap/tests/imap_fetchbody_variation2.phpt +++ /dev/null @@ -1,221 +0,0 @@ ---TEST-- -Test imap_fetchbody() function : usage variation - diff data types as $msg_no arg ---SKIPIF-- - ---FILE-- - -===DONE=== ---CLEAN-- - ---EXPECTF-- -*** Testing imap_fetchbody() : usage variations *** -Create a temporary mailbox and add 1 msgs -.. mailbox '{%s}%s' created - --- Iteration 1 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 2 -- -string(%d) "1: this is a test message, please ignore%a" - --- Iteration 3 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 12 -- -string(%d) "1: this is a test message, please ignore%a" - --- Iteration 13 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 14 -- -string(%d) "1: this is a test message, please ignore%a" - --- Iteration 15 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: imap_fetchbody() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: imap_fetchbody() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: imap_fetchbody() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: imap_fetchbody() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: imap_fetchbody() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: imap_fetchbody() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: imap_fetchbody() expects parameter 2 to be int, object given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: imap_fetchbody(): Bad message number in %s on line %d -bool(false) -===DONE=== diff --git a/ext/imap/tests/imap_fetchbody_variation3.phpt b/ext/imap/tests/imap_fetchbody_variation3.phpt deleted file mode 100644 index 560f2b8242493..0000000000000 --- a/ext/imap/tests/imap_fetchbody_variation3.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test imap_fetchbody() function : usage variation - diff data types as $section arg ---SKIPIF-- - ---FILE-- - -===DONE=== ---CLEAN-- - ---EXPECTF-- -*** Testing imap_fetchbody() : usage variations *** -Create a temporary mailbox and add 1 msgs -.. mailbox '%s.phpttest' created - --- Iteration 1 -- -string(71) "From: %s -To: %s -Subject: test1 - -" - --- Iteration 2 -- -string(%d) "1: this is a test message, please ignore%a" - --- Iteration 3 -- -string(0) "" - --- Iteration 4 -- -string(0) "" - --- Iteration 5 -- -string(0) "" - --- Iteration 6 -- -string(0) "" - --- Iteration 7 -- -string(0) "" - --- Iteration 8 -- -string(0) "" - --- Iteration 9 -- -string(0) "" - --- Iteration 10 -- -string(%d) "From: %s -To: %s -Subject: test1 - -1: this is a test message, please ignore%a" - --- Iteration 11 -- -string(%d) "From: %s -To: %s -Subject: test1 - -1: this is a test message, please ignore%a" - --- Iteration 12 -- -string(%d) "1: this is a test message, please ignore%a" - --- Iteration 13 -- -string(%d) "From: %s -To: %s -Subject: test1 - -1: this is a test message, please ignore%a" - --- Iteration 14 -- -string(%d) "1: this is a test message, please ignore%a" - --- Iteration 15 -- -string(%d) "From: %s -To: %s -Subject: test1 - -1: this is a test message, please ignore%a" - --- Iteration 16 -- -string(%d) "From: %s -To: %s -Subject: test1 - -1: this is a test message, please ignore%a" - --- Iteration 17 -- -string(%d) "From: %s -To: %s -Subject: test1 - -1: this is a test message, please ignore%a" - --- Iteration 18 -- - -Warning: imap_fetchbody() expects parameter 3 to be string, array given in %s on line 87 -NULL - --- Iteration 19 -- -string(0) "" - --- Iteration 20 -- -string(0) "" - --- Iteration 21 -- -string(0) "" - --- Iteration 22 -- -string(0) "" - --- Iteration 23 -- -string(%d) "From: %s -To: %s -Subject: test1 - -1: this is a test message, please ignore%a" - --- Iteration 24 -- -string(%d) "From: %s -To: %s -Subject: test1 - -1: this is a test message, please ignore%a" -===DONE=== diff --git a/ext/imap/tests/imap_fetchheader_variation1.phpt b/ext/imap/tests/imap_fetchheader_variation1.phpt deleted file mode 100644 index ff828832f667c..0000000000000 --- a/ext/imap/tests/imap_fetchheader_variation1.phpt +++ /dev/null @@ -1,245 +0,0 @@ ---TEST-- -Test imap_fetchheader() function : usage variations - diff data types as $stream_id arg ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -// get a resource variable -$fp = fopen(__FILE__, "r"); - -// unexpected values to be passed to $stream_id argument -$inputs = array( - - // int data -/*1*/ 0, - 1, - 12345, - -2345, - - // float data -/*5*/ 10.5, - -10.5, - 12.3456789000e10, - 12.3456789000E-10, - .5, - - // null data -/*10*/ NULL, - null, - - // boolean data -/*12*/ true, - false, - TRUE, - FALSE, - - // empty data -/*16*/ "", - '', - - // string data -/*18*/ "string", - 'string', - $heredoc, - - // array data -/*21*/ array(), - $index_array, - $assoc_array, - array('foo', $index_array, $assoc_array), - - - // object data -/*25*/ new classA(), - - // undefined data -/*26*/ @$undefined_var, - - // unset data -/*27*/ @$unset_var, -); - -// loop through each element of $inputs to check the behavior of imap_fetchheader() -$iterator = 1; -foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump( imap_fetchheader($input, $msg_no) ); - $iterator++; -}; -?> -===DONE=== ---EXPECTF-- -*** Testing imap_fetchheader() : usage variations *** - --- Iteration 1 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, array given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, array given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, array given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, array given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, object given in %s on line %d -NULL - --- Iteration 26 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, null given in %s on line %d -NULL - --- Iteration 27 -- - -Warning: imap_fetchheader() expects parameter 1 to be resource, null given in %s on line %d -NULL -===DONE=== diff --git a/ext/imap/tests/imap_fetchheader_variation2.phpt b/ext/imap/tests/imap_fetchheader_variation2.phpt deleted file mode 100644 index cba0d9061a3bb..0000000000000 --- a/ext/imap/tests/imap_fetchheader_variation2.phpt +++ /dev/null @@ -1,274 +0,0 @@ ---TEST-- -Test imap_fetchheader() function : usage variations - diff data types for $msg_no arg ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -// get a resource variable -$fp = fopen(__FILE__, "r"); - -// unexpected values to be passed to $msg_no argument -$inputs = array( - - // int data -/*1*/ 0, - 1, - 12345, - -2345, - - // float data -/*5*/ 10.5, - -10.5, - 12.3456789000e10, - 12.3456789000E-10, - .5, - - // null data -/*10*/ NULL, - null, - - // boolean data -/*12*/ true, - false, - TRUE, - FALSE, - - // empty data -/*16*/ "", - '', - - // string data -/*18*/ "string", - 'string', - $heredoc, - - // array data -/*21*/ array(), - $index_array, - $assoc_array, - array('foo', $index_array, $assoc_array), - - - // object data -/*25*/ new classA(), - - // undefined data -/*26*/ @$undefined_var, - - // unset data -/*27*/ @$unset_var, - - // resource variable -/*28*/ $fp -); - -// loop through each element of $inputs to check the behavior of imap_fetchheader() -$iterator = 1; -foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump( imap_fetchheader($stream_id, $input) ); - $iterator++; -}; - -fclose($fp); -?> -===DONE=== ---CLEAN-- - -===DONE=== ---EXPECTF-- -*** Testing imap_fetchheader() : usage variations *** -Create a temporary mailbox and add 1 msgs -.. mailbox '{%s}%s' created - --- Iteration 1 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 2 -- -string(%d) "From: foo@anywhere.com -Subject: Test msg 1 -To: %s -MIME-Version: 1.0 -Content-Type: MULTIPART/mixed; BOUNDARY="%s" - -" - --- Iteration 3 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 12 -- -string(%d) "From: foo@anywhere.com -Subject: Test msg 1 -To: %s -MIME-Version: 1.0 -Content-Type: MULTIPART/mixed; BOUNDARY="%s" - -" - --- Iteration 13 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 14 -- -string(%d) "From: foo@anywhere.com -Subject: Test msg 1 -To: %s -MIME-Version: 1.0 -Content-Type: MULTIPART/mixed; BOUNDARY="%s" - -" - --- Iteration 15 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, object given in %s on line %d -NULL - --- Iteration 26 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 27 -- - -Warning: imap_fetchheader(): Bad message number in %s on line %d -bool(false) - --- Iteration 28 -- - -Warning: imap_fetchheader() expects parameter 2 to be int, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/interbase/ibase_blobs.c b/ext/interbase/ibase_blobs.c index ae8529a01ffd6..29cfe73260b8d 100644 --- a/ext/interbase/ibase_blobs.c +++ b/ext/interbase/ibase_blobs.c @@ -553,12 +553,3 @@ PHP_FUNCTION(ibase_blob_import) /* }}} */ #endif /* HAVE_IBASE */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/interbase/ibase_events.c b/ext/interbase/ibase_events.c index df1f80e9ce6d7..2ea8d4725f0d4 100644 --- a/ext/interbase/ibase_events.c +++ b/ext/interbase/ibase_events.c @@ -390,12 +390,3 @@ PHP_FUNCTION(ibase_free_event_handler) /* }}} */ #endif /* HAVE_IBASE */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c index 99576a4c42b8b..fc9b3b2b81368 100644 --- a/ext/interbase/ibase_query.c +++ b/ext/interbase/ibase_query.c @@ -2085,12 +2085,3 @@ PHP_FUNCTION(ibase_param_info) /* }}} */ #endif /* HAVE_IBASE */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/interbase/ibase_service.c b/ext/interbase/ibase_service.c index bc12998ecf91b..8108726bddf39 100644 --- a/ext/interbase/ibase_service.c +++ b/ext/interbase/ibase_service.c @@ -618,12 +618,3 @@ PHP_FUNCTION(ibase_server_info) void php_ibase_register_service_constants(INIT_FUNC_ARGS) { /* nop */ } #endif /* HAVE_IBASE */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index d5440e743c178..0ffafb2c7a5f8 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -1463,12 +1463,3 @@ PHP_FUNCTION(ibase_gen_id) /* }}} */ #endif /* HAVE_IBASE */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/interbase/php_ibase_includes.h b/ext/interbase/php_ibase_includes.h index 9379debf8b4b2..66f3809a6bc3b 100644 --- a/ext/interbase/php_ibase_includes.h +++ b/ext/interbase/php_ibase_includes.h @@ -191,10 +191,3 @@ void php_ibase_service_minit(INIT_FUNC_ARGS); #endif #endif /* PHP_IBASE_INCLUDES_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/interbase/php_interbase.h b/ext/interbase/php_interbase.h index 94876c3e113b7..674d416136b64 100644 --- a/ext/interbase/php_interbase.h +++ b/ext/interbase/php_interbase.h @@ -99,10 +99,3 @@ PHP_FUNCTION(ibase_free_event_handler); #define phpext_interbase_ptr NULL #endif /* PHP_INTERBASE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/intl/breakiterator/breakiterator_class.cpp b/ext/intl/breakiterator/breakiterator_class.cpp index 0d64efece4961..7267ff2e7dc49 100644 --- a/ext/intl/breakiterator/breakiterator_class.cpp +++ b/ext/intl/breakiterator/breakiterator_class.cpp @@ -96,16 +96,16 @@ static int BreakIterator_compare_objects(zval *object1, /* }}} */ /* {{{ clone handler for BreakIterator */ -static zend_object *BreakIterator_clone_obj(zval *object) +static zend_object *BreakIterator_clone_obj(zend_object *object) { BreakIterator_object *bio_orig, *bio_new; zend_object *ret_val; - bio_orig = Z_INTL_BREAKITERATOR_P(object); + bio_orig = php_intl_breakiterator_fetch_object(object); intl_errors_reset(INTL_DATA_ERROR_P(bio_orig)); - ret_val = BreakIterator_ce_ptr->create_object(Z_OBJCE_P(object)); + ret_val = BreakIterator_ce_ptr->create_object(object->ce); bio_new = php_intl_breakiterator_fetch_object(ret_val); zend_objects_clone_members(&bio_new->zo, &bio_orig->zo); @@ -136,7 +136,7 @@ static zend_object *BreakIterator_clone_obj(zval *object) /* }}} */ /* {{{ get_debug_info handler for BreakIterator */ -static HashTable *BreakIterator_get_debug_info(zval *object, int *is_temp) +static HashTable *BreakIterator_get_debug_info(zend_object *object, int *is_temp) { zval val; HashTable *debug_info; @@ -147,7 +147,7 @@ static HashTable *BreakIterator_get_debug_info(zval *object, int *is_temp) debug_info = zend_new_array(8); - bio = Z_INTL_BREAKITERATOR_P(object); + bio = php_intl_breakiterator_fetch_object(object); biter = bio->biter; if (biter == NULL) { diff --git a/ext/intl/calendar/calendar_class.cpp b/ext/intl/calendar/calendar_class.cpp index 29eb9eef44b36..f7cb8739e0ef1 100644 --- a/ext/intl/calendar/calendar_class.cpp +++ b/ext/intl/calendar/calendar_class.cpp @@ -78,17 +78,17 @@ U_CFUNC void calendar_object_construct(zval *object, } /* {{{ clone handler for Calendar */ -static zend_object *Calendar_clone_obj(zval *object) +static zend_object *Calendar_clone_obj(zend_object *object) { Calendar_object *co_orig, *co_new; zend_object *ret_val; intl_error_reset(NULL); - co_orig = Z_INTL_CALENDAR_P(object); + co_orig = php_intl_calendar_fetch_object(object); intl_error_reset(INTL_DATA_ERROR_P(co_orig)); - ret_val = Calendar_ce_ptr->create_object(Z_OBJCE_P(object)); + ret_val = Calendar_ce_ptr->create_object(object->ce); co_new = php_intl_calendar_fetch_object(ret_val); zend_objects_clone_members(&co_new->zo, &co_orig->zo); @@ -147,7 +147,7 @@ static const struct { }; /* {{{ get_debug_info handler for Calendar */ -static HashTable *Calendar_get_debug_info(zval *object, int *is_temp) +static HashTable *Calendar_get_debug_info(zend_object *object, int *is_temp) { zval zv, zfields; @@ -159,7 +159,7 @@ static HashTable *Calendar_get_debug_info(zval *object, int *is_temp) debug_info = zend_new_array(8); - co = Z_INTL_CALENDAR_P(object); + co = php_intl_calendar_fetch_object(object); cal = co->ucal; if (cal == NULL) { @@ -179,7 +179,7 @@ static HashTable *Calendar_get_debug_info(zval *object, int *is_temp) HashTable *debug_info_tz; timezone_object_construct(&cal->getTimeZone(), &ztz , 0); - debug_info_tz = Z_OBJ_HANDLER(ztz, get_debug_info)(&ztz, &is_tmp); + debug_info_tz = Z_OBJ_HANDLER(ztz, get_debug_info)(Z_OBJ(ztz), &is_tmp); assert(is_tmp == 1); array_init(&ztz_debug); diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index dfe34a4f03aa2..2188fb82765c3 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -1133,7 +1133,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time) if (!(Z_TYPE_P(zv_arg) == IS_OBJECT && instanceof_function( Z_OBJCE_P(zv_arg), php_date_get_date_ce()))) { object_init_ex(&zv_tmp, php_date_get_date_ce()); - zend_call_method_with_1_params(&zv_tmp, NULL, &Z_OBJCE(zv_tmp)->constructor, "__construct", NULL, zv_arg); + zend_call_method_with_1_params(Z_OBJ(zv_tmp), NULL, &Z_OBJCE(zv_tmp)->constructor, "__construct", NULL, zv_arg); zv_datetime = &zv_tmp; if (EG(exception)) { zend_object_store_ctor_failed(Z_OBJ(zv_tmp)); @@ -1151,7 +1151,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time) goto error; } - zend_call_method_with_0_params(zv_datetime, php_date_get_date_ce(), NULL, "gettimestamp", &zv_timestamp); + zend_call_method_with_0_params(Z_OBJ_P(zv_datetime), php_date_get_date_ce(), NULL, "gettimestamp", &zv_timestamp); if (Z_TYPE(zv_timestamp) != IS_LONG) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intlcal_from_date_time: bad DateTime; call to " @@ -1249,7 +1249,7 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time) /* Finally, instantiate object and call constructor */ object_init_ex(return_value, php_date_get_date_ce()); - zend_call_method_with_2_params(return_value, NULL, &Z_OBJCE_P(return_value)->constructor, "__construct", NULL, &ts_zval, timezone_zval); + zend_call_method_with_2_params(Z_OBJ_P(return_value), NULL, &Z_OBJCE_P(return_value)->constructor, "__construct", NULL, &ts_zval, timezone_zval); if (EG(exception)) { intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR, "intlcal_to_date_time: DateTime constructor has thrown exception", @@ -1264,7 +1264,7 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time) zval_ptr_dtor(&ts_zval); /* due to bug #40743, we have to set the time zone again */ - zend_call_method_with_1_params(return_value, NULL, NULL, "settimezone", + zend_call_method_with_1_params(Z_OBJ_P(return_value), NULL, NULL, "settimezone", &retval, timezone_zval); if (Z_ISUNDEF(retval) || Z_TYPE(retval) == IS_FALSE) { intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR, diff --git a/ext/intl/collator/collator.c b/ext/intl/collator/collator.c index d86139c9e0478..f450091df7277 100644 --- a/ext/intl/collator/collator.c +++ b/ext/intl/collator/collator.c @@ -85,12 +85,3 @@ void collator_register_constants( INIT_FUNC_ARGS ) #undef COLLATOR_EXPOSE_CONST } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/collator/collator_attr.c b/ext/intl/collator/collator_attr.c index 7063db3562a9d..5170d4c720cf5 100644 --- a/ext/intl/collator/collator_attr.c +++ b/ext/intl/collator/collator_attr.c @@ -146,12 +146,3 @@ PHP_FUNCTION( collator_set_strength ) RETURN_TRUE; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/collator/collator_class.c b/ext/intl/collator/collator_class.c index 0dcc134042f04..64ad9823e22ad 100644 --- a/ext/intl/collator/collator_class.c +++ b/ext/intl/collator/collator_class.c @@ -176,12 +176,3 @@ void collator_object_destroy( Collator_object* co ) intl_error_reset( COLLATOR_ERROR_P( co ) ); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/collator/collator_compare.c b/ext/intl/collator/collator_compare.c index 983b9d7f2c116..c95d144f1af4c 100644 --- a/ext/intl/collator/collator_compare.c +++ b/ext/intl/collator/collator_compare.c @@ -122,12 +122,3 @@ PHP_FUNCTION( collator_compare ) RETURN_LONG( result ); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c index 6ec24afe10b69..fc9d7da41f3ce 100644 --- a/ext/intl/collator/collator_convert.c +++ b/ext/intl/collator/collator_convert.c @@ -228,7 +228,7 @@ zval* collator_convert_object_to_string( zval* obj, zval *rv ) /* Try object's handlers. */ if( Z_OBJ_HT_P(obj)->get ) { - zstr = Z_OBJ_HT_P(obj)->get( obj, rv ); + zstr = Z_OBJ_HT_P(obj)->get( Z_OBJ_P(obj), rv ); switch( Z_TYPE_P( zstr ) ) { @@ -252,7 +252,7 @@ zval* collator_convert_object_to_string( zval* obj, zval *rv ) { zstr = rv; - if( Z_OBJ_HT_P(obj)->cast_object( obj, zstr, IS_STRING ) == FAILURE ) + if( Z_OBJ_HT_P(obj)->cast_object( Z_OBJ_P(obj), zstr, IS_STRING ) == FAILURE ) { /* cast_object failed => bail out. */ zval_ptr_dtor( zstr ); @@ -444,11 +444,3 @@ zval* collator_normalize_sort_argument( zval* arg, zval *rv ) return n_arg; } /* }}} */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/collator/collator_create.c b/ext/intl/collator/collator_create.c index a093795172625..cb2ff183e22fc 100644 --- a/ext/intl/collator/collator_create.c +++ b/ext/intl/collator/collator_create.c @@ -88,12 +88,3 @@ PHP_METHOD( Collator, __construct ) zend_restore_error_handling(&error_handling); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/collator/collator_error.c b/ext/intl/collator/collator_error.c index 5d30b8c65512b..b485cf14f1a92 100644 --- a/ext/intl/collator/collator_error.c +++ b/ext/intl/collator/collator_error.c @@ -83,12 +83,3 @@ PHP_FUNCTION( collator_get_error_message ) RETURN_STR(message); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c index c60724bcfa16e..a561897a16d4f 100644 --- a/ext/intl/collator/collator_is_numeric.c +++ b/ext/intl/collator/collator_is_numeric.c @@ -283,12 +283,3 @@ zend_uchar collator_is_numeric( UChar *str, int32_t length, zend_long *lval, dou return 0; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/collator/collator_locale.c b/ext/intl/collator/collator_locale.c index b3ea572be1b59..2a379bc97713f 100644 --- a/ext/intl/collator/collator_locale.c +++ b/ext/intl/collator/collator_locale.c @@ -69,12 +69,3 @@ PHP_FUNCTION( collator_get_locale ) RETVAL_STRINGL( locale_name, strlen(locale_name) ); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index 111dbeb195680..292391c43b772 100644 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -617,12 +617,3 @@ PHP_FUNCTION( collator_get_sort_key ) RETVAL_NEW_STR(key_str); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/common/common_error.c b/ext/intl/common/common_error.c index 0c0057a8feb25..a4a4e56b0a076 100644 --- a/ext/intl/common/common_error.c +++ b/ext/intl/common/common_error.c @@ -254,12 +254,3 @@ void intl_expose_icu_error_codes( INIT_FUNC_ARGS ) #undef INTL_EXPOSE_CONST } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c index e6215a3c5d5d0..09fa699b0095c 100644 --- a/ext/intl/converter/converter.c +++ b/ext/intl/converter/converter.c @@ -1042,9 +1042,9 @@ static zend_object *php_converter_create_object(zend_class_entry *ce) { return retval; } -static zend_object *php_converter_clone_object(zval *object) { - php_converter_object *objval, *oldobj = Z_INTL_CONVERTER_P(object); - zend_object *retval = php_converter_object_ctor(Z_OBJCE_P(object), &objval); +static zend_object *php_converter_clone_object(zend_object *object) { + php_converter_object *objval, *oldobj = php_converter_fetch_object(object); + zend_object *retval = php_converter_object_ctor(object->ce, &objval); UErrorCode error = U_ZERO_ERROR; intl_errors_reset(&oldobj->error); @@ -1140,12 +1140,3 @@ int php_converter_minit(INIT_FUNC_ARGS) { return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c index b923f70508818..036641cf95948 100644 --- a/ext/intl/dateformat/dateformat_class.c +++ b/ext/intl/dateformat/dateformat_class.c @@ -77,14 +77,14 @@ zend_object *IntlDateFormatter_object_create(zend_class_entry *ce) /* }}} */ /* {{{ IntlDateFormatter_object_clone */ -zend_object *IntlDateFormatter_object_clone(zval *object) +zend_object *IntlDateFormatter_object_clone(zend_object *object) { IntlDateFormatter_object *dfo, *new_dfo; zend_object *new_obj; - DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK; + dfo = php_intl_dateformatter_fetch_object(object); - new_obj = IntlDateFormatter_ce_ptr->create_object(Z_OBJCE_P(object)); + new_obj = IntlDateFormatter_ce_ptr->create_object(object->ce); new_dfo = php_intl_dateformatter_fetch_object(new_obj); /* clone standard parts */ zend_objects_clone_members(&new_dfo->zo, &dfo->zo); diff --git a/ext/intl/formatter/formatter.c b/ext/intl/formatter/formatter.c index 76db688aebaee..0ccd4b5cbeb78 100644 --- a/ext/intl/formatter/formatter.c +++ b/ext/intl/formatter/formatter.c @@ -132,12 +132,3 @@ void formatter_register_constants( INIT_FUNC_ARGS ) #undef FORMATTER_EXPOSE_CONST } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/formatter/formatter_attr.c b/ext/intl/formatter/formatter_attr.c index f6aa8d0d7e289..b04c33eaad361 100644 --- a/ext/intl/formatter/formatter_attr.c +++ b/ext/intl/formatter/formatter_attr.c @@ -446,12 +446,3 @@ PHP_FUNCTION( numfmt_get_locale ) RETURN_STRING(loc); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c index 0b1066f29c54e..31ef45a0fd85c 100644 --- a/ext/intl/formatter/formatter_class.c +++ b/ext/intl/formatter/formatter_class.c @@ -61,13 +61,13 @@ zend_object *NumberFormatter_object_create(zend_class_entry *ce) /* }}} */ /* {{{ NumberFormatter_object_clone */ -zend_object *NumberFormatter_object_clone(zval *object) +zend_object *NumberFormatter_object_clone(zend_object *object) { NumberFormatter_object *nfo, *new_nfo; zend_object *new_obj; - FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK; - new_obj = NumberFormatter_ce_ptr->create_object(Z_OBJCE_P(object)); + nfo = php_intl_number_format_fetch_object(object); + new_obj = NumberFormatter_ce_ptr->create_object(object->ce); new_nfo = php_intl_number_format_fetch_object(new_obj); /* clone standard parts */ zend_objects_clone_members(&new_nfo->zo, &nfo->zo); @@ -191,12 +191,3 @@ void formatter_register_class( void ) NumberFormatter_handlers.free_obj = NumberFormatter_object_free; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/formatter/formatter_data.c b/ext/intl/formatter/formatter_data.c index 46b94ad4eaa1d..fec53209882b5 100644 --- a/ext/intl/formatter/formatter_data.c +++ b/ext/intl/formatter/formatter_data.c @@ -61,12 +61,3 @@ formatter_data* formatter_data_create( void ) return nf_data; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/formatter/formatter_format.c b/ext/intl/formatter/formatter_format.c index f3253dcdb2a63..05ef6789ef9d7 100644 --- a/ext/intl/formatter/formatter_format.c +++ b/ext/intl/formatter/formatter_format.c @@ -193,12 +193,3 @@ PHP_FUNCTION( numfmt_format_currency ) } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/formatter/formatter_main.c b/ext/intl/formatter/formatter_main.c index 0565c7b9e5142..a4671c093ae7b 100644 --- a/ext/intl/formatter/formatter_main.c +++ b/ext/intl/formatter/formatter_main.c @@ -157,12 +157,3 @@ PHP_FUNCTION( numfmt_get_error_message ) RETURN_STR(message); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c index 4ee14b3ce3658..a2a20f147dc73 100644 --- a/ext/intl/formatter/formatter_parse.c +++ b/ext/intl/formatter/formatter_parse.c @@ -175,12 +175,3 @@ PHP_FUNCTION( numfmt_parse_currency ) RETVAL_DOUBLE( number ); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c index 32a9e26006502..6e5fc4ffb49ed 100644 --- a/ext/intl/grapheme/grapheme_string.c +++ b/ext/intl/grapheme/grapheme_string.c @@ -900,12 +900,3 @@ PHP_FUNCTION(grapheme_extract) } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/intl/grapheme/grapheme_util.c b/ext/intl/grapheme/grapheme_util.c index 2e47b17933e99..5bc23be2093b6 100644 --- a/ext/intl/grapheme/grapheme_util.c +++ b/ext/intl/grapheme/grapheme_util.c @@ -397,12 +397,3 @@ UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *stat return ubrk_safeClone(global_break_iterator, stack_buffer, &buffer_size, status); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c index f939eb323b957..494e3a29a6078 100644 --- a/ext/intl/idn/idn.c +++ b/ext/intl/idn/idn.c @@ -230,13 +230,3 @@ PHP_FUNCTION(idn_to_utf8) php_intl_idn_handoff(INTERNAL_FUNCTION_PARAM_PASSTHRU, INTL_IDN_TO_UTF8); } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/intl/intl_convert.c b/ext/intl/intl_convert.c index eadcf2c9f1155..e24f2370c28fa 100644 --- a/ext/intl/intl_convert.c +++ b/ext/intl/intl_convert.c @@ -152,12 +152,3 @@ zend_string* intl_convert_utf16_to_utf8( return dst; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.c index d802eb9c26067..bdab00cf2766d 100644 --- a/ext/intl/intl_error.c +++ b/ext/intl/intl_error.c @@ -315,12 +315,3 @@ smart_str intl_parse_error_to_string( UParseError* pe ) smart_str_0( &ret ); return ret; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/locale/locale.c b/ext/intl/locale/locale.c index 44626f5043e7e..fa796e3574089 100644 --- a/ext/intl/locale/locale.c +++ b/ext/intl/locale/locale.c @@ -59,12 +59,3 @@ void locale_register_constants( INIT_FUNC_ARGS ) #undef LOCALE_EXPOSE_CONST } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/locale/locale_class.c b/ext/intl/locale/locale_class.c index 9d4799bf275ce..eb797c505da74 100644 --- a/ext/intl/locale/locale_class.c +++ b/ext/intl/locale/locale_class.c @@ -116,12 +116,3 @@ void locale_register_Locale_class( void ) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index f971f4d77af86..f03aa72928171 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -1629,13 +1629,3 @@ PHP_FUNCTION(locale_accept_from_http) RETURN_STRINGL(resultLocale, len); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - *can_loc_len -*/ diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c index 90ffdf63d3737..2439b5855a63c 100644 --- a/ext/intl/msgformat/msgformat.c +++ b/ext/intl/msgformat/msgformat.c @@ -178,12 +178,3 @@ PHP_FUNCTION( msgfmt_get_error_message ) RETURN_STR(message); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/msgformat/msgformat_attr.c b/ext/intl/msgformat/msgformat_attr.c index 78eb727c6116b..51d9df049f94f 100644 --- a/ext/intl/msgformat/msgformat_attr.c +++ b/ext/intl/msgformat/msgformat_attr.c @@ -140,12 +140,3 @@ PHP_FUNCTION( msgfmt_get_locale ) RETURN_STRING(loc); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c index cccc4f5c7555a..854fb95fc3caa 100644 --- a/ext/intl/msgformat/msgformat_class.c +++ b/ext/intl/msgformat/msgformat_class.c @@ -61,13 +61,13 @@ zend_object *MessageFormatter_object_create(zend_class_entry *ce) /* }}} */ /* {{{ MessageFormatter_object_clone */ -zend_object *MessageFormatter_object_clone(zval *object) +zend_object *MessageFormatter_object_clone(zend_object *object) { MessageFormatter_object *mfo, *new_mfo; zend_object *new_obj; - MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK; - new_obj = MessageFormatter_ce_ptr->create_object(Z_OBJCE_P(object)); + mfo = php_intl_messageformatter_fetch_object(object); + new_obj = MessageFormatter_ce_ptr->create_object(object->ce); new_mfo = php_intl_messageformatter_fetch_object(new_obj); /* clone standard parts */ zend_objects_clone_members(&new_mfo->zo, &mfo->zo); @@ -159,12 +159,3 @@ void msgformat_register_class( void ) MessageFormatter_handlers.free_obj = MessageFormatter_object_free; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/msgformat/msgformat_data.c b/ext/intl/msgformat/msgformat_data.c index e2510e16b85b7..03dc232f679ed 100644 --- a/ext/intl/msgformat/msgformat_data.c +++ b/ext/intl/msgformat/msgformat_data.c @@ -98,13 +98,3 @@ int msgformat_fix_quotes(UChar **spattern, uint32_t *spattern_len, UErrorCode *e return SUCCESS; } #endif - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c index e833781c793b8..a11c167a4bc30 100644 --- a/ext/intl/msgformat/msgformat_format.c +++ b/ext/intl/msgformat/msgformat_format.c @@ -148,12 +148,3 @@ PHP_FUNCTION( msgfmt_format_message ) msgformat_data_free(&mfo->mf_data); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp index c98fb3ffddc66..dcc74283b2241 100644 --- a/ext/intl/msgformat/msgformat_helpers.cpp +++ b/ext/intl/msgformat/msgformat_helpers.cpp @@ -675,12 +675,3 @@ U_CFUNC void umsg_parse_helper(UMessageFormat *fmt, int *count, zval **args, UCh } delete[] fargs; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c index 8562a76e92acc..c517288bff2c8 100644 --- a/ext/intl/msgformat/msgformat_parse.c +++ b/ext/intl/msgformat/msgformat_parse.c @@ -152,12 +152,3 @@ PHP_FUNCTION( msgfmt_parse_message ) msgformat_data_free(&mfo->mf_data); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/normalizer/normalizer.c b/ext/intl/normalizer/normalizer.c index 823d632d019be..8609f8e437206 100644 --- a/ext/intl/normalizer/normalizer.c +++ b/ext/intl/normalizer/normalizer.c @@ -60,12 +60,3 @@ void normalizer_register_constants( INIT_FUNC_ARGS ) #undef NORMALIZER_EXPOSE_CONST } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/normalizer/normalizer_class.c b/ext/intl/normalizer/normalizer_class.c index 5168b929ab563..4e46b2e279182 100644 --- a/ext/intl/normalizer/normalizer_class.c +++ b/ext/intl/normalizer/normalizer_class.c @@ -78,12 +78,3 @@ void normalizer_register_Normalizer_class( void ) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/normalizer/normalizer_normalize.c b/ext/intl/normalizer/normalizer_normalize.c index b3a29d2941d13..6c56cdcf2afc7 100644 --- a/ext/intl/normalizer/normalizer_normalize.c +++ b/ext/intl/normalizer/normalizer_normalize.c @@ -366,12 +366,3 @@ PHP_FUNCTION( normalizer_get_raw_decomposition ) } #endif /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index b7a0afcab05ff..b244a29842189 100644 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -1057,12 +1057,3 @@ PHP_MINFO_FUNCTION( intl ) DISPLAY_INI_ENTRIES() ; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/php_intl.h b/ext/intl/php_intl.h index 6d8f46adecce8..6b910d76c82a9 100644 --- a/ext/intl/php_intl.h +++ b/ext/intl/php_intl.h @@ -74,12 +74,3 @@ const char *intl_locale_get_default( void ); #define PHP_INTL_VERSION PHP_VERSION #endif /* PHP_INTL_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/resourcebundle/resourcebundle.c b/ext/intl/resourcebundle/resourcebundle.c index fc6ecb946c7a4..5c3bc1742e8a0 100644 --- a/ext/intl/resourcebundle/resourcebundle.c +++ b/ext/intl/resourcebundle/resourcebundle.c @@ -81,12 +81,3 @@ void resourcebundle_extract_value( zval *return_value, ResourceBundle_object *so } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c index b71f7b98eb5a5..9b9cb9f9a62de 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.c +++ b/ext/intl/resourcebundle/resourcebundle_class.c @@ -176,7 +176,7 @@ PHP_FUNCTION( resourcebundle_create ) /* }}} */ /* {{{ resourcebundle_array_fetch */ -static void resourcebundle_array_fetch(zval *object, zval *offset, zval *return_value, int fallback) +static void resourcebundle_array_fetch(zend_object *object, zval *offset, zval *return_value, int fallback) { int32_t meindex = 0; char * mekey = NULL; @@ -185,7 +185,7 @@ static void resourcebundle_array_fetch(zval *object, zval *offset, zval *return_ ResourceBundle_object *rb; intl_error_reset( NULL ); - RESOURCEBUNDLE_METHOD_FETCH_OBJECT; + rb = php_intl_resourcebundle_fetch_object(object); if(Z_TYPE_P(offset) == IS_LONG) { is_numeric = 1; @@ -230,7 +230,7 @@ static void resourcebundle_array_fetch(zval *object, zval *offset, zval *return_ /* }}} */ /* {{{ resourcebundle_array_get */ -zval *resourcebundle_array_get(zval *object, zval *offset, int type, zval *rv) +zval *resourcebundle_array_get(zend_object *object, zval *offset, int type, zval *rv) { if(offset == NULL) { php_error( E_ERROR, "Cannot apply [] to ResourceBundle object" ); @@ -264,15 +264,14 @@ PHP_FUNCTION( resourcebundle_get ) RETURN_FALSE; } - resourcebundle_array_fetch(object, offset, return_value, fallback); + resourcebundle_array_fetch(Z_OBJ_P(object), offset, return_value, fallback); } /* }}} */ /* {{{ resourcebundle_array_count */ -int resourcebundle_array_count(zval *object, zend_long *count) +int resourcebundle_array_count(zend_object *object, zend_long *count) { - ResourceBundle_object *rb; - RESOURCEBUNDLE_METHOD_FETCH_OBJECT_NO_CHECK; + ResourceBundle_object *rb = php_intl_resourcebundle_fetch_object(object); if (rb->me == NULL) { intl_errors_set(&rb->error, U_ILLEGAL_ARGUMENT_ERROR, @@ -458,12 +457,3 @@ void resourcebundle_register_class( void ) zend_class_implements(ResourceBundle_ce_ptr, 1, zend_ce_traversable); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/resourcebundle/resourcebundle_iterator.c b/ext/intl/resourcebundle/resourcebundle_iterator.c index 07cfc7bc0dc87..b51f43f22b945 100644 --- a/ext/intl/resourcebundle/resourcebundle_iterator.c +++ b/ext/intl/resourcebundle/resourcebundle_iterator.c @@ -175,12 +175,3 @@ zend_object_iterator *resourcebundle_get_iterator( zend_class_entry *ce, zval *o return (zend_object_iterator *) iterator; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/spoofchecker/spoofchecker.c b/ext/intl/spoofchecker/spoofchecker.c index 221b69ee5bcd7..607576a2bf89c 100644 --- a/ext/intl/spoofchecker/spoofchecker.c +++ b/ext/intl/spoofchecker/spoofchecker.c @@ -57,12 +57,3 @@ void spoofchecker_register_constants(INIT_FUNC_ARGS) #undef SPOOFCHECKER_EXPOSE_CLASS_CONST } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/spoofchecker/spoofchecker_class.c b/ext/intl/spoofchecker/spoofchecker_class.c index 03d4caaad5bfa..52632ed122e32 100644 --- a/ext/intl/spoofchecker/spoofchecker_class.c +++ b/ext/intl/spoofchecker/spoofchecker_class.c @@ -108,15 +108,15 @@ static const zend_function_entry Spoofchecker_class_functions[] = { }; /* }}} */ -static zend_object *spoofchecker_clone_obj(zval *object) /* {{{ */ +static zend_object *spoofchecker_clone_obj(zend_object *object) /* {{{ */ { zend_object *new_obj_val; Spoofchecker_object *sfo, *new_sfo; - sfo = Z_INTL_SPOOFCHECKER_P(object); + sfo = php_intl_spoofchecker_fetch_object(object); intl_error_reset(SPOOFCHECKER_ERROR_P(sfo)); - new_obj_val = Spoofchecker_ce_ptr->create_object(Z_OBJCE_P(object)); + new_obj_val = Spoofchecker_ce_ptr->create_object(object->ce); new_sfo = php_intl_spoofchecker_fetch_object(new_obj_val); /* clone standard parts */ zend_objects_clone_members(&new_sfo->zo, &sfo->zo); @@ -183,12 +183,3 @@ void spoofchecker_object_destroy(Spoofchecker_object* co) intl_error_reset(SPOOFCHECKER_ERROR_P(co)); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/spoofchecker/spoofchecker_create.c b/ext/intl/spoofchecker/spoofchecker_create.c index f667f731f0b55..999b6af147c8a 100644 --- a/ext/intl/spoofchecker/spoofchecker_create.c +++ b/ext/intl/spoofchecker/spoofchecker_create.c @@ -65,12 +65,3 @@ PHP_METHOD(Spoofchecker, __construct) zend_restore_error_handling(&error_handling); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/spoofchecker/spoofchecker_main.c b/ext/intl/spoofchecker/spoofchecker_main.c index d41a9ae9ccf1b..072ed24b7e3b3 100644 --- a/ext/intl/spoofchecker/spoofchecker_main.c +++ b/ext/intl/spoofchecker/spoofchecker_main.c @@ -163,12 +163,3 @@ PHP_METHOD(Spoofchecker, setRestrictionLevel) } /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/tests/dateformat_set_timezone_id2.phpt b/ext/intl/tests/dateformat_set_timezone_id2.phpt index 3d22f7d03d1fe..57658610d53e1 100644 --- a/ext/intl/tests/dateformat_set_timezone_id2.phpt +++ b/ext/intl/tests/dateformat_set_timezone_id2.phpt @@ -9,7 +9,6 @@ date.timezone=Atlantic/Azores constructor, "__construct", NULL, &arg); + zend_call_method_with_1_params(Z_OBJ_P(ret), NULL, &Z_OBJCE_P(ret)->constructor, "__construct", NULL, &arg); if (EG(exception)) { spprintf(&message, 0, "%s: DateTimeZone constructor threw exception", func); @@ -221,17 +221,17 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone, /* }}} */ /* {{{ clone handler for TimeZone */ -static zend_object *TimeZone_clone_obj(zval *object) +static zend_object *TimeZone_clone_obj(zend_object *object) { TimeZone_object *to_orig, *to_new; zend_object *ret_val; intl_error_reset(NULL); - to_orig = Z_INTL_TIMEZONE_P(object); + to_orig = php_intl_timezone_fetch_object(object); intl_error_reset(TIMEZONE_ERROR_P(to_orig)); - ret_val = TimeZone_ce_ptr->create_object(Z_OBJCE_P(object)); + ret_val = TimeZone_ce_ptr->create_object(object->ce); to_new = php_intl_timezone_fetch_object(ret_val); zend_objects_clone_members(&to_new->zo, &to_orig->zo); @@ -285,7 +285,7 @@ static int TimeZone_compare_objects(zval *object1, zval *object2) /* }}} */ /* {{{ get_debug_info handler for TimeZone */ -static HashTable *TimeZone_get_debug_info(zval *object, int *is_temp) +static HashTable *TimeZone_get_debug_info(zend_object *object, int *is_temp) { zval zv; TimeZone_object *to; @@ -299,7 +299,7 @@ static HashTable *TimeZone_get_debug_info(zval *object, int *is_temp) debug_info = zend_new_array(8); - to = Z_INTL_TIMEZONE_P(object); + to = php_intl_timezone_fetch_object(object); tz = to->utimezone; if (tz == NULL) { diff --git a/ext/intl/transliterator/transliterator.c b/ext/intl/transliterator/transliterator.c index e7f2ffd72c205..a80de4bf9aad7 100644 --- a/ext/intl/transliterator/transliterator.c +++ b/ext/intl/transliterator/transliterator.c @@ -48,12 +48,3 @@ void transliterator_register_constants( INIT_FUNC_ARGS ) #undef NORMALIZER_EXPOSE_CONST } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/transliterator/transliterator_class.c b/ext/intl/transliterator/transliterator_class.c index 0f5d8cbf21df5..c9e0f83c0ba26 100644 --- a/ext/intl/transliterator/transliterator_class.c +++ b/ext/intl/transliterator/transliterator_class.c @@ -130,16 +130,16 @@ static zend_object *Transliterator_object_create( zend_class_entry *ce ) */ /* {{{ clone handler for Transliterator */ -static zend_object *Transliterator_clone_obj( zval *object ) +static zend_object *Transliterator_clone_obj( zend_object *object ) { Transliterator_object *to_orig, *to_new; zend_object *ret_val; intl_error_reset( NULL ); - to_orig = Z_INTL_TRANSLITERATOR_P( object ); + to_orig = php_intl_transliterator_fetch_object( object ); intl_error_reset( INTL_DATA_ERROR_P( to_orig ) ); - ret_val = Transliterator_ce_ptr->create_object( Z_OBJCE_P( object ) ); + ret_val = Transliterator_ce_ptr->create_object( object->ce ); to_new = php_intl_transliterator_fetch_object( ret_val ); zend_objects_clone_members( &to_new->zo, &to_orig->zo ); @@ -189,76 +189,52 @@ static zend_object *Transliterator_clone_obj( zval *object ) } /* }}} */ -#define TRANSLITERATOR_PROPERTY_HANDLER_PROLOG \ - zval tmp_member; \ - if( Z_TYPE_P( member ) != IS_STRING ) \ - { \ - ZVAL_STR(&tmp_member, \ - zval_get_string_func(member)); \ - member = &tmp_member; \ - cache_slot = NULL; \ - } - -#define TRANSLITERATOR_PROPERTY_HANDLER_EPILOG \ - if( member == &tmp_member ) \ - { \ - zval_ptr_dtor_str( &tmp_member ); \ - } - /* {{{ get_property_ptr_ptr handler */ -static zval *Transliterator_get_property_ptr_ptr( zval *object, zval *member, int type, void **cache_slot ) +static zval *Transliterator_get_property_ptr_ptr( zend_object *object, zend_string *name, int type, void **cache_slot ) { zval *retval; - TRANSLITERATOR_PROPERTY_HANDLER_PROLOG; - if(zend_binary_strcmp( "id", sizeof( "id" ) - 1, - Z_STRVAL_P( member ), Z_STRLEN_P( member ) ) == 0 ) + ZSTR_VAL( name ), ZSTR_LEN( name ) ) == 0 ) { retval = NULL; /* fallback to read_property */ } else { - retval = zend_std_get_property_ptr_ptr( object, member, type, cache_slot ); + retval = zend_std_get_property_ptr_ptr( object, name, type, cache_slot ); } - TRANSLITERATOR_PROPERTY_HANDLER_EPILOG; - return retval; } /* }}} */ /* {{{ read_property handler */ -static zval *Transliterator_read_property( zval *object, zval *member, int type, void **cache_slot, zval *rv ) +static zval *Transliterator_read_property( zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv ) { zval *retval; - TRANSLITERATOR_PROPERTY_HANDLER_PROLOG; - if( ( type != BP_VAR_R && type != BP_VAR_IS ) && ( zend_binary_strcmp( "id", sizeof( "id" ) - 1, - Z_STRVAL_P( member ), Z_STRLEN_P( member ) ) == 0 ) ) + ZSTR_VAL( name ), ZSTR_LEN( name ) ) == 0 ) ) { php_error_docref0( NULL, E_WARNING, "The property \"id\" is read-only" ); retval = &EG( uninitialized_zval ); } else { - retval = zend_std_read_property( object, member, type, cache_slot, rv ); + retval = zend_std_read_property( object, name, type, cache_slot, rv ); } - TRANSLITERATOR_PROPERTY_HANDLER_EPILOG; - return retval; } /* }}} */ /* {{{ write_property handler */ -static zval *Transliterator_write_property( zval *object, zval *member, zval *value, void **cache_slot ) +static zval *Transliterator_write_property( zend_object *object, zend_string *name, zval *value, + void **cache_slot ) { zend_class_entry *scope; - TRANSLITERATOR_PROPERTY_HANDLER_PROLOG; if (EG(fake_scope)) { scope = EG(fake_scope); @@ -267,17 +243,15 @@ static zval *Transliterator_write_property( zval *object, zval *member, zval *va } if( ( scope != Transliterator_ce_ptr ) && ( zend_binary_strcmp( "id", sizeof( "id" ) - 1, - Z_STRVAL_P( member ), Z_STRLEN_P( member ) ) == 0 ) ) + ZSTR_VAL( name ), ZSTR_LEN( name ) ) == 0 ) ) { php_error_docref0( NULL, E_WARNING, "The property \"id\" is read-only" ); } else { - value = zend_std_write_property( object, member, value, cache_slot ); + value = zend_std_write_property( object, name, value, cache_slot ); } - TRANSLITERATOR_PROPERTY_HANDLER_EPILOG; - return value; } /* }}} */ @@ -359,12 +333,3 @@ void transliterator_register_Transliterator_class( void ) } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/intl/transliterator/transliterator_methods.c b/ext/intl/transliterator/transliterator_methods.c index 8bf7f9e7f2e14..25d0b9a4dae21 100644 --- a/ext/intl/transliterator/transliterator_methods.c +++ b/ext/intl/transliterator/transliterator_methods.c @@ -525,13 +525,3 @@ PHP_FUNCTION( transliterator_get_error_message ) RETURN_STR( message ); } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/json/json.c b/ext/json/json.c index 9d8a72ff649eb..b9b506e00b87a 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -385,12 +385,3 @@ static PHP_FUNCTION(json_last_error_msg) RETURN_STRING(php_json_get_error_msg(JSON_G(error_code))); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/json/json_encoder.c b/ext/json/json_encoder.c index 93cfb5aeb1fa5..a8a5c64c9e532 100644 --- a/ext/json/json_encoder.c +++ b/ext/json/json_encoder.c @@ -590,12 +590,3 @@ int php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encode return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/json/json_parser.y b/ext/json/json_parser.y index aa37c03658443..e251d6e0d4be9 100644 --- a/ext/json/json_parser.y +++ b/ext/json/json_parser.y @@ -274,7 +274,6 @@ static int php_json_parser_object_update(php_json_parser *parser, zval *object, if (Z_TYPE_P(object) == IS_ARRAY) { zend_symtable_update(Z_ARRVAL_P(object), key, zvalue); } else { - zval zkey; if (ZSTR_LEN(key) > 0 && ZSTR_VAL(key)[0] == '\0') { parser->scanner.errcode = PHP_JSON_ERROR_INVALID_PROPERTY_NAME; zend_string_release_ex(key, 0); @@ -282,8 +281,7 @@ static int php_json_parser_object_update(php_json_parser *parser, zval *object, zval_ptr_dtor_nogc(object); return FAILURE; } - ZVAL_NEW_STR(&zkey, key); - zend_std_write_property(object, &zkey, zvalue, NULL); + zend_std_write_property(Z_OBJ_P(object), key, zvalue, NULL); Z_TRY_DELREF_P(zvalue); } zend_string_release_ex(key, 0); diff --git a/ext/json/php_json.h b/ext/json/php_json.h index c947b9bd50e0a..50ef76107b049 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -106,12 +106,3 @@ static inline int php_json_decode(zval *return_value, char *str, int str_len, ze } #endif /* PHP_JSON_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4 index 6a34fb7434234..38bd8ee56d83b 100644 --- a/ext/ldap/config.m4 +++ b/ext/ldap/config.m4 @@ -90,7 +90,7 @@ PHP_ARG_WITH(ldap-sasl,for LDAP Cyrus SASL support, if test "$PHP_LDAP" != "no"; then - PHP_NEW_EXTENSION(ldap, ldap.c, $ext_shared,,-DLDAP_DEPRECATED=1) + PHP_NEW_EXTENSION(ldap, ldap.c, $ext_shared,,) if test "$PHP_LDAP" = "yes"; then for i in /usr/local /usr; do diff --git a/ext/ldap/config.w32 b/ext/ldap/config.w32 index a16a4fcd65354..e1136b2c33977 100644 --- a/ext/ldap/config.w32 +++ b/ext/ldap/config.w32 @@ -18,7 +18,6 @@ if (PHP_LDAP != "no") { AC_DEFINE('HAVE_LDAP', 1); AC_DEFINE('HAVE_LDAP_SASL', 1); AC_DEFINE('HAVE_LDAP_SASL_SASL_H', 1); - AC_DEFINE('LDAP_DEPRECATED', 1); AC_DEFINE('HAVE_LDAP_CONTROL_FIND', 1); AC_DEFINE('HAVE_LDAP_PARSE_EXTENDED_RESULT', 1); AC_DEFINE('HAVE_LDAP_EXTENDED_OPERATION_S', 1); diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 197f6b019d736..f7bb2ab485491 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -2937,39 +2937,6 @@ PHP_FUNCTION(ldap_compare) } /* }}} */ -/* {{{ proto bool ldap_sort(resource link, resource result, string sortfilter) - Sort LDAP result entries */ -PHP_FUNCTION(ldap_sort) -{ - zval *link, *result; - ldap_linkdata *ld; - char *sortfilter; - size_t sflen; - zend_resource *le; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrs", &link, &result, &sortfilter, &sflen) != SUCCESS) { - RETURN_FALSE; - } - - if ((ld = (ldap_linkdata *)zend_fetch_resource(Z_RES_P(link), "ldap link", le_link)) == NULL) { - RETURN_FALSE; - } - - le = Z_RES_P(result); - if (le->type != le_result) { - php_error_docref(NULL, E_WARNING, "Supplied resource is not a valid ldap result resource"); - RETURN_FALSE; - } - - if (ldap_sort_entries(ld->link, (LDAPMessage **) &le->ptr, sflen ? sortfilter : NULL, strcmp) != LDAP_SUCCESS) { - php_error_docref(NULL, E_WARNING, "%s", ldap_err2string(errno)); - RETURN_FALSE; - } - - RETURN_TRUE; -} -/* }}} */ - #if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP /* {{{ proto bool ldap_get_option(resource link, int option, mixed retval) Get the current value of various session-wide parameters */ @@ -4613,12 +4580,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_compare, 0, 0, 4) ZEND_ARG_INFO(0, servercontrols) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_sort, 0, 0, 3) - ZEND_ARG_INFO(0, link) - ZEND_ARG_INFO(0, result) - ZEND_ARG_INFO(0, sortfilter) -ZEND_END_ARG_INFO() - #ifdef LDAP_CONTROL_PAGEDRESULTS ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_control_paged_result, 0, 0, 2) ZEND_ARG_INFO(0, link) @@ -4817,7 +4778,6 @@ static const zend_function_entry ldap_functions[] = { PHP_FE(ldap_err2str, arginfo_ldap_err2str) PHP_FE(ldap_error, arginfo_ldap_resource) PHP_FE(ldap_compare, arginfo_ldap_compare) - PHP_DEP_FE(ldap_sort, arginfo_ldap_sort) #if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP PHP_FE(ldap_rename, arginfo_ldap_rename) @@ -4864,8 +4824,8 @@ static const zend_function_entry ldap_functions[] = { #endif #ifdef LDAP_CONTROL_PAGEDRESULTS - PHP_FE(ldap_control_paged_result, arginfo_ldap_control_paged_result) - PHP_FE(ldap_control_paged_result_response, arginfo_ldap_control_paged_result_response) + PHP_DEP_FE(ldap_control_paged_result, arginfo_ldap_control_paged_result) + PHP_DEP_FE(ldap_control_paged_result_response, arginfo_ldap_control_paged_result_response) #endif PHP_FE_END }; @@ -4888,12 +4848,3 @@ zend_module_entry ldap_module_entry = { /* {{{ */ STANDARD_MODULE_PROPERTIES_EX }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt index cd189ebf096ca..76084cfb4b7db 100644 --- a/ext/ldap/tests/ldap_control_paged_results_variation1.phpt +++ b/ext/ldap/tests/ldap_control_paged_results_variation1.phpt @@ -31,6 +31,7 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); remove_dummy_data($link, $base); ?> --EXPECTF-- +Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d bool(true) resource(%d) of type (ldap result) array(2) { diff --git a/ext/ldap/tests/ldap_control_paged_results_variation2.phpt b/ext/ldap/tests/ldap_control_paged_results_variation2.phpt index 7b1715c21b70b..6b7eb3553744d 100644 --- a/ext/ldap/tests/ldap_control_paged_results_variation2.phpt +++ b/ext/ldap/tests/ldap_control_paged_results_variation2.phpt @@ -31,6 +31,7 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); remove_dummy_data($link, $base); ?> --EXPECTF-- +Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d bool(true) resource(%d) of type (ldap result) array(3) { diff --git a/ext/ldap/tests/ldap_control_paged_results_variation3.phpt b/ext/ldap/tests/ldap_control_paged_results_variation3.phpt index 24eae9615f6dd..0099b1f9a1dcd 100644 --- a/ext/ldap/tests/ldap_control_paged_results_variation3.phpt +++ b/ext/ldap/tests/ldap_control_paged_results_variation3.phpt @@ -36,6 +36,11 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); remove_dummy_data($link, $base); ?> --EXPECTF-- +Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d + +Deprecated: Function ldap_control_paged_result_response() is deprecated in %s.php on line %d + +Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d bool(true) resource(%d) of type (ldap result) array(3) { diff --git a/ext/ldap/tests/ldap_parse_result_controls.phpt b/ext/ldap/tests/ldap_parse_result_controls.phpt index 711507f6c02fd..8ce2328d2feaa 100644 --- a/ext/ldap/tests/ldap_parse_result_controls.phpt +++ b/ext/ldap/tests/ldap_parse_result_controls.phpt @@ -37,6 +37,7 @@ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); remove_dummy_data($link, $base); ?> --EXPECTF-- +Deprecated: Function ldap_control_paged_result() is deprecated in %s.php on line %d bool(true) resource(%d) of type (ldap result) bool(true) diff --git a/ext/ldap/tests/ldap_sort_basic.phpt b/ext/ldap/tests/ldap_sort_basic.phpt deleted file mode 100644 index e14381f8c7431..0000000000000 --- a/ext/ldap/tests/ldap_sort_basic.phpt +++ /dev/null @@ -1,201 +0,0 @@ ---TEST-- -ldap_sort() - Basic ldap_sort test ---CREDITS-- -Patrick Allaert -# Belgian PHP Testfest 2009 ---SKIPIF-- - - ---FILE-- - "person", - "cn" => "userC", - "sn" => "zzz", - "userPassword" => "oops", - "description" => "a user", -)); -ldap_add($link, "cn=userD,$base", array( - "objectclass" => "person", - "cn" => "userD", - "sn" => "aaa", - "userPassword" => "oops", - "description" => "another user", -)); -ldap_add($link, "cn=userE,$base", array( - "objectclass" => "person", - "cn" => "userE", - "sn" => "a", - "userPassword" => "oops", - "description" => "yet another user", -)); -$result = ldap_search($link, "$base", "(objectclass=person)", array("sn", "description")); -var_dump( - ldap_sort($link, $result, "sn"), - ldap_get_entries($link, $result) -); -?> -===DONE=== ---CLEAN-- - ---EXPECTF-- -Deprecated: Function ldap_sort() is deprecated in %s.php on line %d -bool(true) -array(7) { - ["count"]=> - int(6) - [0]=> - array(6) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(1) "a" - } - [0]=> - string(2) "sn" - ["description"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(16) "yet another user" - } - [1]=> - string(11) "description" - ["count"]=> - int(2) - ["dn"]=> - string(%d) "cn=userE,%s" - } - [1]=> - array(6) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(3) "aaa" - } - [0]=> - string(2) "sn" - ["description"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(12) "another user" - } - [1]=> - string(11) "description" - ["count"]=> - int(2) - ["dn"]=> - string(%d) "cn=userD,%s" - } - [2]=> - array(6) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(7) "testSN1" - } - [0]=> - string(2) "sn" - ["description"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(6) "user A" - } - [1]=> - string(11) "description" - ["count"]=> - int(2) - ["dn"]=> - string(%d) "cn=userA,%s" - } - [3]=> - array(6) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(7) "testSN2" - } - [0]=> - string(2) "sn" - ["description"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(6) "user B" - } - [1]=> - string(11) "description" - ["count"]=> - int(2) - ["dn"]=> - string(%d) "cn=userB,%s" - } - [4]=> - array(4) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(7) "testSN3" - } - [0]=> - string(2) "sn" - ["count"]=> - int(1) - ["dn"]=> - string(%d) "cn=userC,cn=userB,%s" - } - [5]=> - array(6) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(3) "zzz" - } - [0]=> - string(2) "sn" - ["description"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(6) "a user" - } - [1]=> - string(11) "description" - ["count"]=> - int(2) - ["dn"]=> - string(%d) "cn=userC,%s" - } -} -===DONE=== diff --git a/ext/ldap/tests/ldap_sort_error.phpt b/ext/ldap/tests/ldap_sort_error.phpt deleted file mode 100644 index c41b56ab511d3..0000000000000 --- a/ext/ldap/tests/ldap_sort_error.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -ldap_sort() - Testing ldap_sort() that should fail ---CREDITS-- -Patrick Allaert -# Belgian PHP Testfest 2009 ---SKIPIF-- - ---FILE-- - -===DONE=== ---EXPECTF-- -Deprecated: Function ldap_sort() is deprecated in %s.php on line %d - -Warning: ldap_sort() expects exactly 3 parameters, 1 given in %s on line %d -bool(false) - -Deprecated: Function ldap_sort() is deprecated in %s.php on line %d - -Warning: ldap_sort() expects exactly 3 parameters, 2 given in %s on line %d -bool(false) - -Deprecated: Function ldap_sort() is deprecated in %s.php on line %d - -Warning: ldap_sort() expects exactly 3 parameters, 4 given in %s on line %d -bool(false) - -Deprecated: Function ldap_sort() is deprecated in %s.php on line %d - -Warning: ldap_sort() expects parameter 3 to be string, resource given in %s on line %d -bool(false) - -Deprecated: Function ldap_sort() is deprecated in %s.php on line %d - -Warning: ldap_sort(): Supplied resource is not a valid ldap result resource in %s on line %d -bool(false) -===DONE=== diff --git a/ext/ldap/tests/ldap_sort_variation.phpt b/ext/ldap/tests/ldap_sort_variation.phpt deleted file mode 100644 index bb121b63cb575..0000000000000 --- a/ext/ldap/tests/ldap_sort_variation.phpt +++ /dev/null @@ -1,201 +0,0 @@ ---TEST-- -ldap_sort() - Basic ldap_sort test ---CREDITS-- -Patrick Allaert -# Belgian PHP Testfest 2009 ---SKIPIF-- - - ---FILE-- - "person", - "cn" => "userC", - "sn" => "zzz", - "userPassword" => "oops", - "description" => "a user", -)); -ldap_add($link, "cn=userD,$base", array( - "objectclass" => "person", - "cn" => "userD", - "sn" => "aaa", - "userPassword" => "oops", - "description" => "another user", -)); -ldap_add($link, "cn=userE,$base", array( - "objectclass" => "person", - "cn" => "userE", - "sn" => "a", - "userPassword" => "oops", - "description" => "yet another user", -)); -$result = ldap_search($link, "$base", "(objectclass=person)", array("sn", "description")); -var_dump( - ldap_sort($link, $result, "description"), - ldap_get_entries($link, $result) -); -?> -===DONE=== ---CLEAN-- - ---EXPECTF-- -Deprecated: Function ldap_sort() is deprecated in %s.php on line %d -bool(true) -array(7) { - ["count"]=> - int(6) - [0]=> - array(4) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(7) "testSN3" - } - [0]=> - string(2) "sn" - ["count"]=> - int(1) - ["dn"]=> - string(%d) "cn=userC,cn=userB,%s" - } - [1]=> - array(6) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(3) "zzz" - } - [0]=> - string(2) "sn" - ["description"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(6) "a user" - } - [1]=> - string(11) "description" - ["count"]=> - int(2) - ["dn"]=> - string(%d) "cn=userC,%s" - } - [2]=> - array(6) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(3) "aaa" - } - [0]=> - string(2) "sn" - ["description"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(12) "another user" - } - [1]=> - string(11) "description" - ["count"]=> - int(2) - ["dn"]=> - string(%d) "cn=userD,%s" - } - [3]=> - array(6) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(7) "testSN1" - } - [0]=> - string(2) "sn" - ["description"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(6) "user A" - } - [1]=> - string(11) "description" - ["count"]=> - int(2) - ["dn"]=> - string(%d) "cn=userA,%s" - } - [4]=> - array(6) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(7) "testSN2" - } - [0]=> - string(2) "sn" - ["description"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(6) "user B" - } - [1]=> - string(11) "description" - ["count"]=> - int(2) - ["dn"]=> - string(%d) "cn=userB,%s" - } - [5]=> - array(6) { - ["sn"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(1) "a" - } - [0]=> - string(2) "sn" - ["description"]=> - array(2) { - ["count"]=> - int(1) - [0]=> - string(16) "yet another user" - } - [1]=> - string(11) "description" - ["count"]=> - int(2) - ["dn"]=> - string(%d) "cn=userE,%s" - } -} -===DONE=== diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 2d71ffdb7b5ea..b8603fdf3857a 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -1346,12 +1346,3 @@ PHP_LIBXML_API BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID l #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 12af448137c35..cf936e95de147 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -127,10 +127,3 @@ ZEND_TSRMLS_CACHE_EXTERN() #define phpext_libxml_ptr libxml_module_ptr #endif /* PHP_LIBXML_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index 3d67883b09dec..b6d7f529a6759 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -327,5 +327,3 @@ if test "$PHP_MBSTRING" != "no"; then PHP_MBSTRING_SETUP_LIBMBFL PHP_MBSTRING_EXTENSION fi - -# vim600: sts=2 sw=2 et diff --git a/ext/mbstring/libmbfl/DISCLAIMER b/ext/mbstring/libmbfl/DISCLAIMER index 21b7a91d55a92..8cc750769a593 100644 --- a/ext/mbstring/libmbfl/DISCLAIMER +++ b/ext/mbstring/libmbfl/DISCLAIMER @@ -1,6 +1,3 @@ -# charset=UTF-8 -# vim600: encoding=UTF-8 - "streamable kanji code filter and converter" Copyright (c) 1998,1999,2000,2001 HappySize, Inc. All rights reserved. diff --git a/ext/mbstring/libmbfl/filters/html_entities.c b/ext/mbstring/libmbfl/filters/html_entities.c index 919a5bb7465d8..a9152c090cd6a 100644 --- a/ext/mbstring/libmbfl/filters/html_entities.c +++ b/ext/mbstring/libmbfl/filters/html_entities.c @@ -289,10 +289,3 @@ const mbfl_html_entity_entry mbfl_html_entity_list[] = { {"diams", 9830}, {NULL, -1} /* mark end of table */ }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_armscii8.h b/ext/mbstring/libmbfl/filters/mbfilter_armscii8.h index 1de95c615b2f8..0b14934995cd9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_armscii8.h +++ b/ext/mbstring/libmbfl/filters/mbfilter_armscii8.h @@ -36,10 +36,3 @@ int mbfl_filt_conv_armscii8_wchar(int c, mbfl_convert_filter *filter); int mbfl_filt_conv_wchar_armscii8(int c, mbfl_convert_filter *filter); #endif /* MBFL_MBFILTER_ARMSCII8_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_hz.c b/ext/mbstring/libmbfl/filters/mbfilter_hz.c index 8a39b75e170f8..570fcb4fffbb1 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_hz.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_hz.c @@ -276,11 +276,3 @@ static int mbfl_filt_ident_hz(int c, mbfl_identify_filter *filter) return c; } - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_koi8r.h b/ext/mbstring/libmbfl/filters/mbfilter_koi8r.h index c0b198ccad993..6073d140ae65b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_koi8r.h +++ b/ext/mbstring/libmbfl/filters/mbfilter_koi8r.h @@ -41,10 +41,3 @@ int mbfl_filt_conv_koi8r_wchar(int c, mbfl_convert_filter *filter); int mbfl_filt_conv_wchar_koi8r(int c, mbfl_convert_filter *filter); #endif /* MBFL_MBFILTER_KOI8R_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_koi8u.h b/ext/mbstring/libmbfl/filters/mbfilter_koi8u.h index fee7ebe2c0c4e..16b95c1fc493b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_koi8u.h +++ b/ext/mbstring/libmbfl/filters/mbfilter_koi8u.h @@ -38,10 +38,3 @@ int mbfl_filt_conv_koi8u_wchar(int c, mbfl_convert_filter *filter); int mbfl_filt_conv_wchar_koi8u(int c, mbfl_convert_filter *filter); #endif /* MBFL_MBFILTER_KOI8U_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 331ce4941c818..1cb6d28e7b4e0 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -2892,10 +2892,3 @@ mbfl_html_numeric_entity( return result; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index a6aed129fabba..0966e2df44b57 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -1,7 +1,3 @@ -/* charset=UTF-8 - * vim: encoding=utf-8: - * */ - /* * "streamable kanji code filter and converter" * diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c index 0c473ee9f6f2f..2a6a9b23bb965 100644 --- a/ext/mbstring/mb_gpc.c +++ b/ext/mbstring/mb_gpc.c @@ -386,12 +386,3 @@ SAPI_POST_HANDLER_FUNC(php_mb_post_handler) /* }}} */ #endif /* HAVE_MBSTRING */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/mbstring/mb_gpc.h b/ext/mbstring/mb_gpc.h index 5ce1e1e05bf04..2a75488e65164 100644 --- a/ext/mbstring/mb_gpc.h +++ b/ext/mbstring/mb_gpc.h @@ -48,12 +48,3 @@ int _php_mb_enable_encoding_translation(int flag); const mbfl_encoding *_php_mb_encoding_handler_ex(const php_mb_encoding_handler_info_t *info, zval *arg, char *res); /* }}} */ #endif /* HAVE_MBSTRING */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index f60c404885b50..05892cb1972d4 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -5061,12 +5061,3 @@ static void php_mb_gpc_set_input_encoding(const zend_encoding *encoding) /* {{{ /* }}} */ #endif /* HAVE_MBSTRING */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index 29e60334b2faa..2b62b7a393fe9 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -183,10 +183,3 @@ ZEND_TSRMLS_CACHE_EXTERN() #define phpext_mbstring_ptr mbstring_module_ptr #endif /* _MBSTRING_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 5ceb492f2c47c..f65b86755d344 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -853,16 +853,16 @@ PHP_FUNCTION(mb_regex_encoding) /* {{{ _php_mb_regex_ereg_exec */ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase) { - zval *arg_pattern, *array = NULL; - char *string; - size_t string_len; + zval *array = NULL; + char *arg_pattern, *string; + size_t arg_pattern_len, string_len; php_mb_regex_t *re; OnigRegion *regs = NULL; int i, match_len, beg, end; OnigOptionType options; char *str; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs|z", &arg_pattern, &string, &string_len, &array) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|z", &arg_pattern, &arg_pattern_len, &string, &string_len, &array) == FAILURE) { RETURN_FALSE; } @@ -886,23 +886,13 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase) options |= ONIG_OPTION_IGNORECASE; } - /* compile the regular expression from the supplied regex */ - if (Z_TYPE_P(arg_pattern) != IS_STRING) { - /* we convert numbers to integers and treat them as a string */ - if (Z_TYPE_P(arg_pattern) == IS_DOUBLE) { - convert_to_long_ex(arg_pattern); /* get rid of decimal places */ - } - convert_to_string_ex(arg_pattern); - /* don't bother doing an extended regex with just a number */ - } - - if (Z_STRLEN_P(arg_pattern) == 0) { + if (arg_pattern_len == 0) { php_error_docref(NULL, E_WARNING, "empty pattern"); RETVAL_FALSE; goto out; } - re = php_mbregex_compile_pattern(Z_STRVAL_P(arg_pattern), Z_STRLEN_P(arg_pattern), options, MBREX(current_mbctype), MBREX(regex_default_syntax)); + re = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, options, MBREX(current_mbctype), MBREX(regex_default_syntax)); if (re == NULL) { RETVAL_FALSE; goto out; @@ -967,8 +957,6 @@ PHP_FUNCTION(mb_eregi) /* {{{ _php_mb_regex_ereg_replace_exec */ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOptionType options, int is_callable) { - zval *arg_pattern_zval; - char *arg_pattern; size_t arg_pattern_len; @@ -991,7 +979,6 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp OnigUChar *pos; OnigUChar *string_lim; char *description = NULL; - char pat_buf[6]; const mbfl_encoding *enc; @@ -1010,16 +997,16 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp size_t option_str_len = 0; if (!is_callable) { - if (zend_parse_parameters(ZEND_NUM_ARGS(), "zss|s", - &arg_pattern_zval, + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sss|s", + &arg_pattern, &arg_pattern_len, &replace, &replace_len, &string, &string_len, &option_str, &option_str_len) == FAILURE) { RETURN_FALSE; } } else { - if (zend_parse_parameters(ZEND_NUM_ARGS(), "zfs|s", - &arg_pattern_zval, + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sfs|s", + &arg_pattern, &arg_pattern_len, &arg_replace_fci, &arg_replace_fci_cache, &string, &string_len, &option_str, &option_str_len) == FAILURE) { @@ -1046,22 +1033,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp php_error_docref(NULL, E_WARNING, "The 'e' option is no longer supported, use mb_ereg_replace_callback instead"); RETURN_FALSE; } - if (Z_TYPE_P(arg_pattern_zval) == IS_STRING) { - arg_pattern = Z_STRVAL_P(arg_pattern_zval); - arg_pattern_len = Z_STRLEN_P(arg_pattern_zval); - } else { - /* FIXME: this code is not multibyte aware! */ - convert_to_long_ex(arg_pattern_zval); - pat_buf[0] = (char)Z_LVAL_P(arg_pattern_zval); - pat_buf[1] = '\0'; - pat_buf[2] = '\0'; - pat_buf[3] = '\0'; - pat_buf[4] = '\0'; - pat_buf[5] = '\0'; - - arg_pattern = pat_buf; - arg_pattern_len = 1; - } + /* create regex pattern buffer */ re = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, options, MBREX(current_mbctype), syntax); if (re == NULL) { @@ -1667,12 +1639,3 @@ PHP_FUNCTION(mb_regex_set_options) /* }}} */ #endif /* HAVE_MBREGEX */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/mbstring/php_mbregex.h b/ext/mbstring/php_mbregex.h index c9d2f6d5918d7..e1ddeedae8b9d 100644 --- a/ext/mbstring/php_mbregex.h +++ b/ext/mbstring/php_mbregex.h @@ -81,12 +81,3 @@ PHP_FUNCTION(mb_regex_set_options); #endif /* HAVE_MBREGEX */ #endif /* _PHP_MBREGEX_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index ac9e670855a5a..69fdfc0706c69 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -449,12 +449,3 @@ MBSTRING_API char *php_unicode_convert_case( #endif /* HAVE_MBSTRING */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/mbstring/tests/bug72994.phpt b/ext/mbstring/tests/bug72994.phpt deleted file mode 100644 index 842fdc10b6b74..0000000000000 --- a/ext/mbstring/tests/bug72994.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -Bug #72994 (mbc_to_code() out of bounds read) ---SKIPIF-- - ---FILE-- - -===DONE=== ---EXPECTF-- -Notice: Undefined variable: var in %s on line %d - -Warning: mb_ereg_replace(): mbregex compile err: invalid code point value in %sbug72994.php on line %d -bool(false) -===DONE=== diff --git a/ext/mbstring/tests/common.inc b/ext/mbstring/tests/common.inc index adccb0ab7357a..5f8a9c13d54ab 100644 --- a/ext/mbstring/tests/common.inc +++ b/ext/mbstring/tests/common.inc @@ -4,7 +4,7 @@ */ // Custom Error Hanlder for testing -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { global $debug; $err_type = array ( diff --git a/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt b/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt deleted file mode 100644 index 5ee6fc569c9c1..0000000000000 --- a/ext/mbstring/tests/mb_decode_mimeheader_variation1.phpt +++ /dev/null @@ -1,206 +0,0 @@ ---TEST-- -Test mb_decode_mimeheader() function : usage variation ---CREDITS-- -D. Kesley ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for string - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_decode_mimeheader($value) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_decode_mimeheader() : usage variation *** - ---int 0-- -string(1) "0" - ---int 1-- -string(1) "1" - ---int 12345-- -string(5) "12345" - ---int -12345-- -string(5) "-2345" - ---float 10.5-- -string(4) "10.5" - ---float -10.5-- -string(5) "-10.5" - ---float 12.3456789000e10-- -string(12) "123456789000" - ---float -12.3456789000e10-- -string(13) "-123456789000" - ---float .5-- -string(3) "0.5" - ---empty array-- -Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -string(0) "" - ---lowercase null-- -string(0) "" - ---lowercase true-- -string(1) "1" - ---lowercase false-- -string(0) "" - ---uppercase TRUE-- -string(1) "1" - ---uppercase FALSE-- -string(0) "" - ---empty string DQ-- -string(0) "" - ---empty string SQ-- -string(0) "" - ---instance of classWithToString-- -string(14) "Class A object" - ---instance of classWithoutToString-- -Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, object given, %s(%d) -NULL - ---undefined var-- -string(0) "" - ---unset var-- -string(0) "" - ---resource-- -Error: 2 - mb_decode_mimeheader() expects parameter 1 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt deleted file mode 100644 index be01edbaddb72..0000000000000 --- a/ext/mbstring/tests/mb_encode_mimeheader_variation1.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test mb_encode_mimeheader() function : usage variations - Pass different data types to $str arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_encode_mimeheader() : usage variations *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(1) "1" - --- Iteration 3 -- -string(5) "12345" - --- Iteration 4 -- -string(5) "-2345" - --- Iteration 5 -- -string(4) "10.5" - --- Iteration 6 -- -string(5) "-10.5" - --- Iteration 7 -- -string(12) "123456789000" - --- Iteration 8 -- -string(13) "1.23456789E-9" - --- Iteration 9 -- -string(3) "0.5" - --- Iteration 10 -- -string(0) "" - --- Iteration 11 -- -string(0) "" - --- Iteration 12 -- -string(1) "1" - --- Iteration 13 -- -string(0) "" - --- Iteration 14 -- -string(1) "1" - --- Iteration 15 -- -string(0) "" - --- Iteration 16 -- -string(0) "" - --- Iteration 17 -- -string(0) "" - --- Iteration 18 -- -string(6) "string" - --- Iteration 19 -- -string(6) "string" - --- Iteration 20 -- -string(11) "hello world" - --- Iteration 21 -- -string(14) "Class A object" - --- Iteration 22 -- -string(0) "" - --- Iteration 23 -- -string(0) "" - --- Iteration 24 -- - -Warning: mb_encode_mimeheader() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt deleted file mode 100644 index e9d9fa2dd6748..0000000000000 --- a/ext/mbstring/tests/mb_encode_mimeheader_variation2.phpt +++ /dev/null @@ -1,224 +0,0 @@ ---TEST-- -Test mb_encode_mimeheader() function : usage variations - Pass different data types to $charset arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_encode_mimeheader() : usage variations *** - --- Iteration 1 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 19 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 20 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 21 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 22 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_encode_mimeheader(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_encode_mimeheader() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt deleted file mode 100644 index 1da923ec212d1..0000000000000 --- a/ext/mbstring/tests/mb_encode_mimeheader_variation3.phpt +++ /dev/null @@ -1,186 +0,0 @@ ---TEST-- -Test mb_encode_mimeheader() function : usage variations - Pass different data types to $transfer_encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_encode_mimeheader() : usage variations *** - --- Iteration 1 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 2 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 3 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 4 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 5 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 6 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 7 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 8 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 9 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 10 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 11 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 12 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 13 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 14 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 15 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 16 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 17 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 18 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 19 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 20 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 21 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 22 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 23 -- -string(52) "=?UTF-8?B?5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CC?=" - --- Iteration 24 -- - -Warning: mb_encode_mimeheader() expects parameter 3 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt deleted file mode 100644 index 11279c7bf6ee6..0000000000000 --- a/ext/mbstring/tests/mb_encode_mimeheader_variation4.phpt +++ /dev/null @@ -1,187 +0,0 @@ ---TEST-- -Test mb_encode_mimeheader() function : usage variations - Pass different data types to $linefeed arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_encode_mimeheader() : usage variations *** - --- Iteration 1 -- -string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=0 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 2 -- -string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 3 -- -string(118) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=12345 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 4 -- -string(118) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=-2345 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 5 -- -string(117) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=10.5 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 6 -- -string(118) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=-10.5 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 7 -- -string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=12345678 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 8 -- -string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1.234567 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 9 -- -string(116) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=0.5 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 10 -- -string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 11 -- -string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 12 -- -string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 13 -- -string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 14 -- -string(114) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=1 =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 15 -- -string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 16 -- -string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 17 -- -string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 18 -- -string(119) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=string =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 19 -- -string(119) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=string =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 20 -- -string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=hello wo =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 21 -- -string(121) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?=Class A =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 22 -- -string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 23 -- -string(113) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 24 -- - -Warning: mb_encode_mimeheader() expects parameter 4 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt b/ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt deleted file mode 100644 index 9dec3c11c5d78..0000000000000 --- a/ext/mbstring/tests/mb_encode_mimeheader_variation5.phpt +++ /dev/null @@ -1,216 +0,0 @@ ---TEST-- -Test mb_encode_mimeheader() function : usage variations - Pass different data types to $indent arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_encode_mimeheader() : usage variations *** - --- Iteration 1 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 2 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 3 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 4 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 5 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66?= - =?UTF-8?B?zrXOr868zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 6 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 7 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 8 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 9 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 10 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 11 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 12 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 13 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 14 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 15 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 16 -- - -Warning: mb_encode_mimeheader() expects parameter 5 to be int, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: mb_encode_mimeheader() expects parameter 5 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: mb_encode_mimeheader() expects parameter 5 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: mb_encode_mimeheader() expects parameter 5 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: mb_encode_mimeheader() expects parameter 5 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: mb_encode_mimeheader() expects parameter 5 to be int, object given in %s on line %d -NULL - --- Iteration 22 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 23 -- -string(115) "=?UTF-8?B?zpHPhc+Ez4wgzrXOr869zrHOuSDOtc67zrvOt869zrnOus+MIM66zrXOr868?= - =?UTF-8?B?zrXOvc6/LiAwMTIzNDU2Nzg5Lg==?=" - --- Iteration 24 -- - -Warning: mb_encode_mimeheader() expects parameter 5 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_ereg1.phpt b/ext/mbstring/tests/mb_ereg1.phpt index 59ef788a77a5c..85db1d1c98a36 100644 --- a/ext/mbstring/tests/mb_ereg1.phpt +++ b/ext/mbstring/tests/mb_ereg1.phpt @@ -43,7 +43,7 @@ array(3) { } } -Notice: Array to string conversion in %s on line %d +Warning: mb_ereg() expects parameter 1 to be string, array given in %s on line %d bool(false) array(3) { [0]=> @@ -52,8 +52,7 @@ array(3) { [1]=> int(1) [2]=> - array(0) { - } + string(0) "" } Warning: mb_ereg() expects parameter 2 to be string, array given in %s on line %d diff --git a/ext/mbstring/tests/mb_ereg_replace_variation1.phpt b/ext/mbstring/tests/mb_ereg_replace_variation1.phpt index 6a1231bf8b1ca..c61e47723d317 100644 --- a/ext/mbstring/tests/mb_ereg_replace_variation1.phpt +++ b/ext/mbstring/tests/mb_ereg_replace_variation1.phpt @@ -96,7 +96,7 @@ foreach($inputs as $input) { echo "Done"; ?> ---EXPECTF-- +--EXPECT-- *** Testing mb_ereg_replace() : usage variations *** -- Iteration 1 -- @@ -109,17 +109,13 @@ string(10) "string_val" string(10) "string_val" -- Iteration 4 -- - -Warning: mb_ereg_replace(): mbregex compile err: invalid code point value in %smb_ereg_replace_variation1.php on line %d -bool(false) +string(10) "string_val" -- Iteration 5 -- string(10) "string_val" -- Iteration 6 -- - -Warning: mb_ereg_replace(): mbregex compile err: invalid code point value in %smb_ereg_replace_variation1.php on line %d -bool(false) +string(10) "string_val" -- Iteration 7 -- string(10) "string_val" @@ -131,22 +127,22 @@ string(10) "string_val" string(10) "string_val" -- Iteration 10 -- -string(10) "string_val" +string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val" -- Iteration 11 -- -string(10) "string_val" +string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val" -- Iteration 12 -- string(10) "string_val" -- Iteration 13 -- -string(10) "string_val" +string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val" -- Iteration 14 -- string(10) "string_val" -- Iteration 15 -- -string(10) "string_val" +string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val" -- Iteration 16 -- string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val" @@ -167,8 +163,8 @@ string(10) "string_val" string(10) "string_val" -- Iteration 22 -- -string(10) "string_val" +string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val" -- Iteration 23 -- -string(10) "string_val" +string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val" Done diff --git a/ext/mbstring/tests/mb_ereg_replace_variation2.phpt b/ext/mbstring/tests/mb_ereg_replace_variation2.phpt deleted file mode 100644 index 39bdf5102006c..0000000000000 --- a/ext/mbstring/tests/mb_ereg_replace_variation2.phpt +++ /dev/null @@ -1,178 +0,0 @@ ---TEST-- -Test mb_ereg_replace() function : usage variations ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_ereg_replace() : usage variations *** - --- Iteration 1 -- -string(10) "000000_000" - --- Iteration 2 -- -string(10) "111111_111" - --- Iteration 3 -- -string(46) "123451234512345123451234512345_123451234512345" - --- Iteration 4 -- -string(46) "-2345-2345-2345-2345-2345-2345_-2345-2345-2345" - --- Iteration 5 -- -string(37) "10.510.510.510.510.510.5_10.510.510.5" - --- Iteration 6 -- -string(46) "-10.5-10.5-10.5-10.5-10.5-10.5_-10.5-10.5-10.5" - --- Iteration 7 -- -string(109) "123456789000123456789000123456789000123456789000123456789000123456789000_123456789000123456789000123456789000" - --- Iteration 8 -- -string(118) "1.23456789E-91.23456789E-91.23456789E-91.23456789E-91.23456789E-91.23456789E-9_1.23456789E-91.23456789E-91.23456789E-9" - --- Iteration 9 -- -string(28) "0.50.50.50.50.50.5_0.50.50.5" - --- Iteration 10 -- -string(1) "_" - --- Iteration 11 -- -string(1) "_" - --- Iteration 12 -- -string(10) "111111_111" - --- Iteration 13 -- -string(1) "_" - --- Iteration 14 -- -string(10) "111111_111" - --- Iteration 15 -- -string(1) "_" - --- Iteration 16 -- -string(1) "_" - --- Iteration 17 -- -string(1) "_" - --- Iteration 18 -- -string(46) "UTF-8UTF-8UTF-8UTF-8UTF-8UTF-8_UTF-8UTF-8UTF-8" - --- Iteration 19 -- -string(46) "UTF-8UTF-8UTF-8UTF-8UTF-8UTF-8_UTF-8UTF-8UTF-8" - --- Iteration 20 -- -string(46) "UTF-8UTF-8UTF-8UTF-8UTF-8UTF-8_UTF-8UTF-8UTF-8" - --- Iteration 21 -- -string(46) "UTF-8UTF-8UTF-8UTF-8UTF-8UTF-8_UTF-8UTF-8UTF-8" - --- Iteration 22 -- -string(1) "_" - --- Iteration 23 -- -string(1) "_" - --- Iteration 24 -- - -Warning: mb_ereg_replace() expects parameter 2 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/mbstring/tests/mb_ereg_replace_variation3.phpt b/ext/mbstring/tests/mb_ereg_replace_variation3.phpt deleted file mode 100644 index 2e115f5d6fe56..0000000000000 --- a/ext/mbstring/tests/mb_ereg_replace_variation3.phpt +++ /dev/null @@ -1,179 +0,0 @@ ---TEST-- -Test mb_ereg_replace() function : usage variations ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_ereg_replace() : usage variations *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(1) "1" - --- Iteration 3 -- -string(5) "12345" - --- Iteration 4 -- -string(5) "-2345" - --- Iteration 5 -- -string(4) "10.5" - --- Iteration 6 -- -string(5) "-10.5" - --- Iteration 7 -- -string(12) "123456789000" - --- Iteration 8 -- -string(13) "1.23456789E-9" - --- Iteration 9 -- -string(3) "0.5" - --- Iteration 10 -- -string(0) "" - --- Iteration 11 -- -string(0) "" - --- Iteration 12 -- -string(1) "1" - --- Iteration 13 -- -string(0) "" - --- Iteration 14 -- -string(1) "1" - --- Iteration 15 -- -string(0) "" - --- Iteration 16 -- -string(0) "" - --- Iteration 17 -- -string(0) "" - --- Iteration 18 -- -string(5) "UTF-8" - --- Iteration 19 -- -string(5) "UTF-8" - --- Iteration 20 -- -string(5) "UTF-8" - --- Iteration 21 -- -string(5) "UTF-8" - --- Iteration 22 -- -string(0) "" - --- Iteration 23 -- -string(0) "" - --- Iteration 24 -- - -Warning: mb_ereg_replace() expects parameter 3 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/mbstring/tests/mb_ereg_replace_variation4.phpt b/ext/mbstring/tests/mb_ereg_replace_variation4.phpt deleted file mode 100644 index deb8b2eb4183c..0000000000000 --- a/ext/mbstring/tests/mb_ereg_replace_variation4.phpt +++ /dev/null @@ -1,179 +0,0 @@ ---TEST-- -Test mb_ereg_replace() function : usage variations ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_ereg_replace() : usage variations *** - --- Iteration 1 -- -string(10) "str1n1_v1l" - --- Iteration 2 -- -string(10) "str1n1_v1l" - --- Iteration 3 -- -string(10) "str1n1_v1l" - --- Iteration 4 -- -string(10) "str1n1_v1l" - --- Iteration 5 -- -string(10) "str1n1_v1l" - --- Iteration 6 -- -string(10) "str1n1_v1l" - --- Iteration 7 -- -string(10) "str1n1_v1l" - --- Iteration 8 -- -string(10) "str1n1_v1l" - --- Iteration 9 -- -string(10) "str1n1_v1l" - --- Iteration 10 -- -string(10) "str1n1_v1l" - --- Iteration 11 -- -string(10) "str1n1_v1l" - --- Iteration 12 -- -string(10) "str1n1_v1l" - --- Iteration 13 -- -string(10) "str1n1_v1l" - --- Iteration 14 -- -string(10) "str1n1_v1l" - --- Iteration 15 -- -string(10) "str1n1_v1l" - --- Iteration 16 -- -string(10) "str1n1_v1l" - --- Iteration 17 -- -string(10) "str1n1_v1l" - --- Iteration 18 -- -string(10) "str1n1_v1l" - --- Iteration 19 -- -string(10) "str1n1_v1l" - --- Iteration 20 -- -string(10) "str1n1_v1l" - --- Iteration 21 -- -string(10) "str1n1_v1l" - --- Iteration 22 -- -string(10) "str1n1_v1l" - --- Iteration 23 -- -string(10) "str1n1_v1l" - --- Iteration 24 -- - -Warning: mb_ereg_replace() expects parameter 4 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/mbstring/tests/mb_ereg_variation1.phpt b/ext/mbstring/tests/mb_ereg_variation1.phpt index 60baf8743e60b..2ee33c9e803bd 100644 --- a/ext/mbstring/tests/mb_ereg_variation1.phpt +++ b/ext/mbstring/tests/mb_ereg_variation1.phpt @@ -89,7 +89,7 @@ fclose($fp); echo "Done"; ?> ---EXPECT-- +--EXPECTF-- *** Testing mb_ereg() : usage variations *** -- Iteration 1 -- @@ -172,7 +172,8 @@ array(0) { } -- Iteration 16 -- + +Warning: mb_ereg() expects parameter 1 to be string, resource given in %s on line %d bool(false) -array(0) { -} +NULL Done diff --git a/ext/mbstring/tests/mb_internal_encoding_variation1.phpt b/ext/mbstring/tests/mb_internal_encoding_variation1.phpt deleted file mode 100644 index c031569399fda..0000000000000 --- a/ext/mbstring/tests/mb_internal_encoding_variation1.phpt +++ /dev/null @@ -1,216 +0,0 @@ ---TEST-- -Test mb_internal_encoding() function : usage variations - Pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_internal_encoding() : usage variations *** - --- Iteration 1 -- - -Warning: mb_internal_encoding(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_internal_encoding(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_internal_encoding(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_internal_encoding(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_internal_encoding(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_internal_encoding(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_internal_encoding(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_internal_encoding(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_internal_encoding(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: mb_internal_encoding(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_internal_encoding(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -bool(true) - --- Iteration 19 -- -bool(true) - --- Iteration 20 -- -bool(true) - --- Iteration 21 -- -bool(true) - --- Iteration 22 -- - -Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_internal_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_internal_encoding() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_regex_encoding_variation1.phpt b/ext/mbstring/tests/mb_regex_encoding_variation1.phpt deleted file mode 100644 index c3bb50ce807c4..0000000000000 --- a/ext/mbstring/tests/mb_regex_encoding_variation1.phpt +++ /dev/null @@ -1,215 +0,0 @@ ---TEST-- -Test mb_regex_encoding() function : usage variations - Pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_regex_encoding() : usage variations *** - --- Iteration 1 -- - -Warning: mb_regex_encoding(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_regex_encoding(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_regex_encoding(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_regex_encoding(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_regex_encoding(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_regex_encoding(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_regex_encoding(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_regex_encoding(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_regex_encoding(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: mb_regex_encoding(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_regex_encoding(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -bool(true) - --- Iteration 19 -- -bool(true) - --- Iteration 20 -- -bool(true) - --- Iteration 21 -- -bool(true) - --- Iteration 22 -- - -Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_regex_encoding(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_regex_encoding() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_split_variation1.phpt b/ext/mbstring/tests/mb_split_variation1.phpt deleted file mode 100644 index 7d2f952bff633..0000000000000 --- a/ext/mbstring/tests/mb_split_variation1.phpt +++ /dev/null @@ -1,246 +0,0 @@ ---TEST-- -Test mb_split() function : usage variations - different parameter types for pattern ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_split() : usage variations *** - --- Iteration 1 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 2 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 3 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 4 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 5 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 6 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 7 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 8 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 9 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 10 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 11 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 12 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 13 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 14 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 15 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 16 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 17 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 18 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 19 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 20 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 21 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 22 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 23 -- -array(1) { - [0]=> - string(13) "a b c d e f g" -} - --- Iteration 24 -- - -Warning: mb_split() expects parameter 1 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/mbstring/tests/mb_split_variation2.phpt b/ext/mbstring/tests/mb_split_variation2.phpt deleted file mode 100644 index 2ef402f205d07..0000000000000 --- a/ext/mbstring/tests/mb_split_variation2.phpt +++ /dev/null @@ -1,248 +0,0 @@ ---TEST-- -Test mb_split() function : usage variations - different parameter types for string ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_split() : usage variations *** - --- Iteration 1 -- -array(1) { - [0]=> - string(1) "0" -} - --- Iteration 2 -- -array(1) { - [0]=> - string(1) "1" -} - --- Iteration 3 -- -array(1) { - [0]=> - string(5) "12345" -} - --- Iteration 4 -- -array(1) { - [0]=> - string(5) "-2345" -} - --- Iteration 5 -- -array(1) { - [0]=> - string(4) "10.5" -} - --- Iteration 6 -- -array(1) { - [0]=> - string(5) "-10.5" -} - --- Iteration 7 -- -array(1) { - [0]=> - string(12) "123456789000" -} - --- Iteration 8 -- -array(1) { - [0]=> - string(13) "1.23456789E-9" -} - --- Iteration 9 -- -array(1) { - [0]=> - string(3) "0.5" -} - --- Iteration 10 -- -array(1) { - [0]=> - string(0) "" -} - --- Iteration 11 -- -array(1) { - [0]=> - string(0) "" -} - --- Iteration 12 -- -array(1) { - [0]=> - string(1) "1" -} - --- Iteration 13 -- -array(1) { - [0]=> - string(0) "" -} - --- Iteration 14 -- -array(1) { - [0]=> - string(1) "1" -} - --- Iteration 15 -- -array(1) { - [0]=> - string(0) "" -} - --- Iteration 16 -- -array(1) { - [0]=> - string(0) "" -} - --- Iteration 17 -- -array(1) { - [0]=> - string(0) "" -} - --- Iteration 18 -- -array(1) { - [0]=> - string(5) "UTF-8" -} - --- Iteration 19 -- -array(1) { - [0]=> - string(5) "UTF-8" -} - --- Iteration 20 -- -array(1) { - [0]=> - string(5) "UTF-8" -} - --- Iteration 21 -- -array(1) { - [0]=> - string(5) "UTF-8" -} - --- Iteration 22 -- -array(1) { - [0]=> - string(0) "" -} - --- Iteration 23 -- -array(1) { - [0]=> - string(0) "" -} - --- Iteration 24 -- - -Warning: mb_split() expects parameter 2 to be string, resource given in %s on line %d -bool(false) -Done diff --git a/ext/mbstring/tests/mb_split_variation3.phpt b/ext/mbstring/tests/mb_split_variation3.phpt deleted file mode 100644 index c5e6783f98d95..0000000000000 --- a/ext/mbstring/tests/mb_split_variation3.phpt +++ /dev/null @@ -1,332 +0,0 @@ ---TEST-- -Test mb_split() function : usage variations - different parameter types for limit ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_split() : usage variations *** - --- Iteration 1 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 2 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 3 -- -array(10) { - [0]=> - string(0) "" - [1]=> - string(0) "" - [2]=> - string(0) "" - [3]=> - string(0) "" - [4]=> - string(0) "" - [5]=> - string(0) "" - [6]=> - string(1) "_" - [7]=> - string(0) "" - [8]=> - string(0) "" - [9]=> - string(0) "" -} - --- Iteration 4 -- -array(10) { - [0]=> - string(0) "" - [1]=> - string(0) "" - [2]=> - string(0) "" - [3]=> - string(0) "" - [4]=> - string(0) "" - [5]=> - string(0) "" - [6]=> - string(1) "_" - [7]=> - string(0) "" - [8]=> - string(0) "" - [9]=> - string(0) "" -} - --- Iteration 5 -- -array(10) { - [0]=> - string(0) "" - [1]=> - string(0) "" - [2]=> - string(0) "" - [3]=> - string(0) "" - [4]=> - string(0) "" - [5]=> - string(0) "" - [6]=> - string(1) "_" - [7]=> - string(0) "" - [8]=> - string(0) "" - [9]=> - string(0) "" -} - --- Iteration 6 -- -array(10) { - [0]=> - string(0) "" - [1]=> - string(0) "" - [2]=> - string(0) "" - [3]=> - string(0) "" - [4]=> - string(0) "" - [5]=> - string(0) "" - [6]=> - string(1) "_" - [7]=> - string(0) "" - [8]=> - string(0) "" - [9]=> - string(0) "" -} - --- Iteration 7 -- -array(10) { - [0]=> - string(0) "" - [1]=> - string(0) "" - [2]=> - string(0) "" - [3]=> - string(0) "" - [4]=> - string(0) "" - [5]=> - string(0) "" - [6]=> - string(1) "_" - [7]=> - string(0) "" - [8]=> - string(0) "" - [9]=> - string(0) "" -} - --- Iteration 8 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 9 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 10 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 11 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 12 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 13 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 14 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 15 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 16 -- - -Warning: mb_split() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_split() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: mb_split() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: mb_split() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- Iteration 20 -- - -Warning: mb_split() expects parameter 3 to be int, string given in %s on line %d -bool(false) - --- Iteration 21 -- - -Warning: mb_split() expects parameter 3 to be int, object given in %s on line %d -bool(false) - --- Iteration 22 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 23 -- -array(1) { - [0]=> - string(10) "string_val" -} - --- Iteration 24 -- - -Warning: mb_split() expects parameter 3 to be int, resource given in %s on line %d -bool(false) -Done diff --git a/ext/mbstring/tests/mb_stripos_variation1.phpt b/ext/mbstring/tests/mb_stripos_variation1.phpt deleted file mode 100644 index 7ecbbe9e70f71..0000000000000 --- a/ext/mbstring/tests/mb_stripos_variation1.phpt +++ /dev/null @@ -1,183 +0,0 @@ ---TEST-- -Test mb_stripos() function : usage variations - pass different data types to $haystack arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_stripos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- -bool(false) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: mb_stripos() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_stripos_variation2.phpt b/ext/mbstring/tests/mb_stripos_variation2.phpt deleted file mode 100644 index bb49022e0f152..0000000000000 --- a/ext/mbstring/tests/mb_stripos_variation2.phpt +++ /dev/null @@ -1,199 +0,0 @@ ---TEST-- -Test mb_stripos() function : usage variations - pass different data types as $needle arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_stripos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- - -Warning: mb_stripos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_stripos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- - -Warning: mb_stripos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- - -Warning: mb_stripos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_stripos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_stripos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 18 -- -int(0) - --- Iteration 19 -- -int(0) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- - -Warning: mb_stripos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_stripos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_stripos() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_stripos_variation3.phpt b/ext/mbstring/tests/mb_stripos_variation3.phpt deleted file mode 100644 index 4c9441462a696..0000000000000 --- a/ext/mbstring/tests/mb_stripos_variation3.phpt +++ /dev/null @@ -1,211 +0,0 @@ ---TEST-- -Test mb_stripos() function : usage variations - pass different data types as $offset arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_stripos() : usage variations *** - --- Iteration 1 -- -int(8) - --- Iteration 2 -- -int(8) - --- Iteration 3 -- - -Warning: mb_stripos(): Offset not contained in string in %s on line %d -bool(false) - --- Iteration 4 -- -int(8) - --- Iteration 5 -- - -Warning: mb_stripos(): Offset not contained in string in %s on line %d -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -int(8) - --- Iteration 8 -- - -Warning: mb_stripos(): Offset not contained in string in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_stripos(): Offset not contained in string in %s on line %d -bool(false) - --- Iteration 10 -- -int(8) - --- Iteration 11 -- -int(8) - --- Iteration 12 -- -int(8) - --- Iteration 13 -- -int(8) - --- Iteration 14 -- -int(8) - --- Iteration 15 -- -int(8) - --- Iteration 16 -- -int(8) - --- Iteration 17 -- -int(8) - --- Iteration 18 -- - -Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: mb_stripos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: mb_stripos() expects parameter 3 to be int, object given in %s on line %d -NULL - --- Iteration 24 -- -int(8) - --- Iteration 25 -- -int(8) - --- Iteration 26 -- - -Warning: mb_stripos() expects parameter 3 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_stripos_variation4.phpt b/ext/mbstring/tests/mb_stripos_variation4.phpt deleted file mode 100644 index b2109ee8e023e..0000000000000 --- a/ext/mbstring/tests/mb_stripos_variation4.phpt +++ /dev/null @@ -1,222 +0,0 @@ ---TEST-- -Test mb_stripos() function : usage variations - pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_stripos() : usage variations *** - --- Iteration 1 -- - -Warning: mb_stripos(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_stripos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_stripos(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_stripos(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_stripos(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_stripos(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_stripos(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_stripos(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_stripos(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: mb_stripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_stripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: mb_stripos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_stripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_stripos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_stripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_stripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_stripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -int(7) - --- Iteration 19 -- -int(7) - --- Iteration 20 -- -int(7) - --- Iteration 21 -- -int(7) - --- Iteration 22 -- - -Warning: mb_stripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_stripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_stripos() expects parameter 4 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_stristr_variation1.phpt b/ext/mbstring/tests/mb_stristr_variation1.phpt deleted file mode 100644 index 15b4c864c804a..0000000000000 --- a/ext/mbstring/tests/mb_stristr_variation1.phpt +++ /dev/null @@ -1,207 +0,0 @@ ---TEST-- -Test mb_stristr() function : usage variation - various haystacks, needle won't be found ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for haystack - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_stristr($value, $needle, $part, $encoding) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_stristr() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- -Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(false) - ---lowercase null-- -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -bool(false) - ---empty string DQ-- -bool(false) - ---empty string SQ-- -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_stristr() expects parameter 1 to be string, object given, %s(%d) -NULL - ---undefined var-- -bool(false) - ---unset var-- -bool(false) - ---resource-- -Error: 2 - mb_stristr() expects parameter 1 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_stristr_variation2.phpt b/ext/mbstring/tests/mb_stristr_variation2.phpt deleted file mode 100644 index 2352e82beb862..0000000000000 --- a/ext/mbstring/tests/mb_stristr_variation2.phpt +++ /dev/null @@ -1,215 +0,0 @@ ---TEST-- -Test mb_stristr() function : usage variation - different types of needle. ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for needle - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_stristr($haystack, $value, $part, $encoding) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_stristr() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- -Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - mb_stristr(): Empty delimiter, %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - mb_stristr(): Empty delimiter, %s(%d) -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -Error: 2 - mb_stristr(): Empty delimiter, %s(%d) -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -Error: 2 - mb_stristr(): Empty delimiter, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - mb_stristr(): Empty delimiter, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - mb_stristr(): Empty delimiter, %s(%d) -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_stristr() expects parameter 2 to be string, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - mb_stristr(): Empty delimiter, %s(%d) -bool(false) - ---unset var-- -Error: 2 - mb_stristr(): Empty delimiter, %s(%d) -bool(false) - ---resource-- -Error: 2 - mb_stristr() expects parameter 2 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_stristr_variation3.phpt b/ext/mbstring/tests/mb_stristr_variation3.phpt deleted file mode 100644 index b24faaeb716a5..0000000000000 --- a/ext/mbstring/tests/mb_stristr_variation3.phpt +++ /dev/null @@ -1,232 +0,0 @@ ---TEST-- -Test mb_stristr() function : usage variation - different values for part ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for part - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $res = mb_stristr($haystack, $needle, $value, $encoding); - if ($res === NULL) { - var_dump($res); - } - else { - var_dump(bin2hex($res)); - } -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_stristr() : usage variation *** - ---int 0-- -string(8) "5f76616c" - ---int 1-- -string(12) "737472696e67" - ---int 12345-- -string(12) "737472696e67" - ---int -12345-- -string(12) "737472696e67" - ---float 10.5-- -string(12) "737472696e67" - ---float -10.5-- -string(12) "737472696e67" - ---float 12.3456789000e10-- -string(12) "737472696e67" - ---float -12.3456789000e10-- -string(12) "737472696e67" - ---float .5-- -string(12) "737472696e67" - ---empty array-- -Error: 2 - mb_stristr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_stristr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_stristr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_stristr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---uppercase NULL-- -string(8) "5f76616c" - ---lowercase null-- -string(8) "5f76616c" - ---lowercase true-- -string(12) "737472696e67" - ---lowercase false-- -string(8) "5f76616c" - ---uppercase TRUE-- -string(12) "737472696e67" - ---uppercase FALSE-- -string(8) "5f76616c" - ---empty string DQ-- -string(8) "5f76616c" - ---empty string SQ-- -string(8) "5f76616c" - ---string DQ-- -string(12) "737472696e67" - ---string SQ-- -string(12) "737472696e67" - ---mixed case string-- -string(12) "737472696e67" - ---heredoc-- -string(12) "737472696e67" - ---instance of classWithToString-- -Error: 2 - mb_stristr() expects parameter 3 to be bool, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - mb_stristr() expects parameter 3 to be bool, object given, %s(%d) -NULL - ---undefined var-- -string(8) "5f76616c" - ---unset var-- -string(8) "5f76616c" - ---resource-- -Error: 2 - mb_stristr() expects parameter 3 to be bool, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_stristr_variation4.phpt b/ext/mbstring/tests/mb_stristr_variation4.phpt deleted file mode 100644 index 122e92fcc455e..0000000000000 --- a/ext/mbstring/tests/mb_stristr_variation4.phpt +++ /dev/null @@ -1,227 +0,0 @@ ---TEST-- -Test mb_stristr() function : usage variation - different encoding types ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for encoding - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_stristr($haystack, $needle, $part, $value) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_stristr() : usage variation *** - ---int 0-- -Error: 2 - mb_stristr(): Unknown encoding "0", %s(%d) -bool(false) - ---int 1-- -Error: 2 - mb_stristr(): Unknown encoding "1", %s(%d) -bool(false) - ---int 12345-- -Error: 2 - mb_stristr(): Unknown encoding "12345", %s(%d) -bool(false) - ---int -12345-- -Error: 2 - mb_stristr(): Unknown encoding "-2345", %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - mb_stristr(): Unknown encoding "10.5", %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - mb_stristr(): Unknown encoding "-10.5", %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - mb_stristr(): Unknown encoding "123456789000", %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - mb_stristr(): Unknown encoding "-123456789000", %s(%d) -bool(false) - ---float .5-- -Error: 2 - mb_stristr(): Unknown encoding "0.5", %s(%d) -bool(false) - ---empty array-- -Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - mb_stristr(): Unknown encoding "", %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - mb_stristr(): Unknown encoding "", %s(%d) -bool(false) - ---lowercase true-- -Error: 2 - mb_stristr(): Unknown encoding "1", %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - mb_stristr(): Unknown encoding "", %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - mb_stristr(): Unknown encoding "1", %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - mb_stristr(): Unknown encoding "", %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - mb_stristr(): Unknown encoding "", %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - mb_stristr(): Unknown encoding "", %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - mb_stristr(): Unknown encoding "invalid", %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_stristr() expects parameter 4 to be string, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - mb_stristr(): Unknown encoding "", %s(%d) -bool(false) - ---unset var-- -Error: 2 - mb_stristr(): Unknown encoding "", %s(%d) -bool(false) - ---resource-- -Error: 2 - mb_stristr() expects parameter 4 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strlen_variation1.phpt b/ext/mbstring/tests/mb_strlen_variation1.phpt deleted file mode 100644 index 480ee6909f8fe..0000000000000 --- a/ext/mbstring/tests/mb_strlen_variation1.phpt +++ /dev/null @@ -1,180 +0,0 @@ ---TEST-- -Test mb_strlen() function : usage variations - Pass different data types as $str arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strlen() : usage variations *** - --- Iteration 1 -- -int(1) - --- Iteration 2 -- -int(1) - --- Iteration 3 -- -int(5) - --- Iteration 4 -- -int(5) - --- Iteration 5 -- -int(4) - --- Iteration 6 -- -int(5) - --- Iteration 7 -- -int(12) - --- Iteration 8 -- -int(13) - --- Iteration 9 -- -int(3) - --- Iteration 10 -- -int(0) - --- Iteration 11 -- -int(0) - --- Iteration 12 -- -int(1) - --- Iteration 13 -- -int(0) - --- Iteration 14 -- -int(1) - --- Iteration 15 -- -int(0) - --- Iteration 16 -- -int(0) - --- Iteration 17 -- -int(0) - --- Iteration 18 -- -int(6) - --- Iteration 19 -- -int(6) - --- Iteration 20 -- -int(11) - --- Iteration 21 -- -int(14) - --- Iteration 22 -- -int(0) - --- Iteration 23 -- -int(0) - --- Iteration 24 -- - -Warning: mb_strlen() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strlen_variation2.phpt b/ext/mbstring/tests/mb_strlen_variation2.phpt deleted file mode 100644 index 17c1e0c6e6791..0000000000000 --- a/ext/mbstring/tests/mb_strlen_variation2.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test mb_strlen() function : usage variations - Pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strlen() : usage variations *** - --- Iteration 1 -- - -Warning: mb_strlen(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_strlen(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_strlen(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_strlen(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_strlen(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_strlen(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_strlen(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_strlen(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_strlen(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: mb_strlen(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_strlen(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: mb_strlen(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_strlen(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_strlen(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_strlen(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_strlen(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_strlen(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -int(12) - --- Iteration 19 -- -int(12) - --- Iteration 20 -- -int(12) - --- Iteration 21 -- -int(12) - --- Iteration 22 -- - -Warning: mb_strlen(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_strlen(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_strlen() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strpos_variation1.phpt b/ext/mbstring/tests/mb_strpos_variation1.phpt deleted file mode 100644 index 696cc1cd89822..0000000000000 --- a/ext/mbstring/tests/mb_strpos_variation1.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test mb_strpos() function : usage variations - pass different data types to $haystack arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strpos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- -bool(false) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: mb_strpos() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strpos_variation2.phpt b/ext/mbstring/tests/mb_strpos_variation2.phpt deleted file mode 100644 index 9dc8e2a019415..0000000000000 --- a/ext/mbstring/tests/mb_strpos_variation2.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -Test mb_strpos() function : usage variations - pass different data types as $needle arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strpos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- - -Warning: mb_strpos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_strpos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- - -Warning: mb_strpos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- - -Warning: mb_strpos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_strpos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_strpos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 18 -- -int(0) - --- Iteration 19 -- -int(0) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- - -Warning: mb_strpos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_strpos(): Empty delimiter in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_strpos() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strpos_variation3.phpt b/ext/mbstring/tests/mb_strpos_variation3.phpt deleted file mode 100644 index b34682d5b461c..0000000000000 --- a/ext/mbstring/tests/mb_strpos_variation3.phpt +++ /dev/null @@ -1,211 +0,0 @@ ---TEST-- -Test mb_strpos() function : usage variations - pass different data types as $offset arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strpos() : usage variations *** - --- Iteration 1 -- -int(8) - --- Iteration 2 -- -int(8) - --- Iteration 3 -- - -Warning: mb_strpos(): Offset not contained in string in %s on line %d -bool(false) - --- Iteration 4 -- -int(8) - --- Iteration 5 -- - -Warning: mb_strpos(): Offset not contained in string in %s on line %d -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -int(8) - --- Iteration 8 -- - -Warning: mb_strpos(): Offset not contained in string in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_strpos(): Offset not contained in string in %s on line %d -bool(false) - --- Iteration 10 -- -int(8) - --- Iteration 11 -- -int(8) - --- Iteration 12 -- -int(8) - --- Iteration 13 -- -int(8) - --- Iteration 14 -- -int(8) - --- Iteration 15 -- -int(8) - --- Iteration 16 -- -int(8) - --- Iteration 17 -- -int(8) - --- Iteration 18 -- - -Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: mb_strpos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: mb_strpos() expects parameter 3 to be int, object given in %s on line %d -NULL - --- Iteration 24 -- -int(8) - --- Iteration 25 -- -int(8) - --- Iteration 26 -- - -Warning: mb_strpos() expects parameter 3 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strpos_variation4.phpt b/ext/mbstring/tests/mb_strpos_variation4.phpt deleted file mode 100644 index a9b168c5734a7..0000000000000 --- a/ext/mbstring/tests/mb_strpos_variation4.phpt +++ /dev/null @@ -1,221 +0,0 @@ ---TEST-- -Test mb_strpos() function : usage variations - pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strpos() : usage variations *** - --- Iteration 1 -- - -Warning: mb_strpos(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_strpos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_strpos(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_strpos(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_strpos(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_strpos(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_strpos(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_strpos(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_strpos(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: mb_strpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_strpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: mb_strpos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_strpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_strpos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_strpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_strpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_strpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -int(7) - --- Iteration 19 -- -int(7) - --- Iteration 20 -- -int(7) - --- Iteration 21 -- -int(7) - --- Iteration 22 -- - -Warning: mb_strpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_strpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_strpos() expects parameter 4 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strrchr_variation1.phpt b/ext/mbstring/tests/mb_strrchr_variation1.phpt deleted file mode 100644 index da635fb74a62b..0000000000000 --- a/ext/mbstring/tests/mb_strrchr_variation1.phpt +++ /dev/null @@ -1,207 +0,0 @@ ---TEST-- -Test mb_strrchr() function : usage variation - various haystacks, needle won't be found ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for haystack - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_strrchr($value, $needle, $part, $encoding) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strrchr() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- -Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(false) - ---lowercase null-- -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -bool(false) - ---empty string DQ-- -bool(false) - ---empty string SQ-- -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_strrchr() expects parameter 1 to be string, object given, %s(%d) -NULL - ---undefined var-- -bool(false) - ---unset var-- -bool(false) - ---resource-- -Error: 2 - mb_strrchr() expects parameter 1 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strrchr_variation2.phpt b/ext/mbstring/tests/mb_strrchr_variation2.phpt deleted file mode 100644 index 942980e5fdfff..0000000000000 --- a/ext/mbstring/tests/mb_strrchr_variation2.phpt +++ /dev/null @@ -1,207 +0,0 @@ ---TEST-- -Test mb_strrchr() function : usage variation - different types of needle. ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for needle - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_strrchr($haystack, $value, $part, $encoding) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strrchr() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- -Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(false) - ---lowercase null-- -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -bool(false) - ---empty string DQ-- -bool(false) - ---empty string SQ-- -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_strrchr() expects parameter 2 to be string, object given, %s(%d) -NULL - ---undefined var-- -bool(false) - ---unset var-- -bool(false) - ---resource-- -Error: 2 - mb_strrchr() expects parameter 2 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strrchr_variation3.phpt b/ext/mbstring/tests/mb_strrchr_variation3.phpt deleted file mode 100644 index 0664a16302144..0000000000000 --- a/ext/mbstring/tests/mb_strrchr_variation3.phpt +++ /dev/null @@ -1,232 +0,0 @@ ---TEST-- -Test mb_strrchr() function : usage variation - different values for part ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for part - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $res = mb_strrchr($haystack, $needle, $value, $encoding); - if ($res === NULL) { - var_dump($res); - } - else { - var_dump(bin2hex($res)); - } -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strrchr() : usage variation *** - ---int 0-- -string(8) "5f76616c" - ---int 1-- -string(12) "737472696e67" - ---int 12345-- -string(12) "737472696e67" - ---int -12345-- -string(12) "737472696e67" - ---float 10.5-- -string(12) "737472696e67" - ---float -10.5-- -string(12) "737472696e67" - ---float 12.3456789000e10-- -string(12) "737472696e67" - ---float -12.3456789000e10-- -string(12) "737472696e67" - ---float .5-- -string(12) "737472696e67" - ---empty array-- -Error: 2 - mb_strrchr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strrchr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strrchr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strrchr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---uppercase NULL-- -string(8) "5f76616c" - ---lowercase null-- -string(8) "5f76616c" - ---lowercase true-- -string(12) "737472696e67" - ---lowercase false-- -string(8) "5f76616c" - ---uppercase TRUE-- -string(12) "737472696e67" - ---uppercase FALSE-- -string(8) "5f76616c" - ---empty string DQ-- -string(8) "5f76616c" - ---empty string SQ-- -string(8) "5f76616c" - ---string DQ-- -string(12) "737472696e67" - ---string SQ-- -string(12) "737472696e67" - ---mixed case string-- -string(12) "737472696e67" - ---heredoc-- -string(12) "737472696e67" - ---instance of classWithToString-- -Error: 2 - mb_strrchr() expects parameter 3 to be bool, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - mb_strrchr() expects parameter 3 to be bool, object given, %s(%d) -NULL - ---undefined var-- -string(8) "5f76616c" - ---unset var-- -string(8) "5f76616c" - ---resource-- -Error: 2 - mb_strrchr() expects parameter 3 to be bool, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strrchr_variation4.phpt b/ext/mbstring/tests/mb_strrchr_variation4.phpt deleted file mode 100644 index 5ba8e0563f76d..0000000000000 --- a/ext/mbstring/tests/mb_strrchr_variation4.phpt +++ /dev/null @@ -1,227 +0,0 @@ ---TEST-- -Test mb_strrchr() function : usage variation - different encoding types ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for encoding - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_strrchr($haystack, $needle, $part, $value) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strrchr() : usage variation *** - ---int 0-- -Error: 2 - mb_strrchr(): Unknown encoding "0", %s(%d) -bool(false) - ---int 1-- -Error: 2 - mb_strrchr(): Unknown encoding "1", %s(%d) -bool(false) - ---int 12345-- -Error: 2 - mb_strrchr(): Unknown encoding "12345", %s(%d) -bool(false) - ---int -12345-- -Error: 2 - mb_strrchr(): Unknown encoding "-2345", %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - mb_strrchr(): Unknown encoding "10.5", %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - mb_strrchr(): Unknown encoding "-10.5", %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - mb_strrchr(): Unknown encoding "123456789000", %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - mb_strrchr(): Unknown encoding "-123456789000", %s(%d) -bool(false) - ---float .5-- -Error: 2 - mb_strrchr(): Unknown encoding "0.5", %s(%d) -bool(false) - ---empty array-- -Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d) -bool(false) - ---lowercase true-- -Error: 2 - mb_strrchr(): Unknown encoding "1", %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - mb_strrchr(): Unknown encoding "1", %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - mb_strrchr(): Unknown encoding "invalid", %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_strrchr() expects parameter 4 to be string, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d) -bool(false) - ---unset var-- -Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d) -bool(false) - ---resource-- -Error: 2 - mb_strrchr() expects parameter 4 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strrichr_variation1.phpt b/ext/mbstring/tests/mb_strrichr_variation1.phpt deleted file mode 100644 index afc01e70fbc70..0000000000000 --- a/ext/mbstring/tests/mb_strrichr_variation1.phpt +++ /dev/null @@ -1,207 +0,0 @@ ---TEST-- -Test mb_strrichr() function : usage variation - various haystacks, needle won't be found ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for haystack - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_strrichr($value, $needle, $part, $encoding) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strrichr() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- -Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(false) - ---lowercase null-- -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -bool(false) - ---empty string DQ-- -bool(false) - ---empty string SQ-- -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_strrichr() expects parameter 1 to be string, object given, %s(%d) -NULL - ---undefined var-- -bool(false) - ---unset var-- -bool(false) - ---resource-- -Error: 2 - mb_strrichr() expects parameter 1 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strrichr_variation2.phpt b/ext/mbstring/tests/mb_strrichr_variation2.phpt deleted file mode 100644 index b389f607218f4..0000000000000 --- a/ext/mbstring/tests/mb_strrichr_variation2.phpt +++ /dev/null @@ -1,207 +0,0 @@ ---TEST-- -Test mb_strrichr() function : usage variation - different types of needle. ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for needle - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_strrichr($haystack, $value, $part, $encoding) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strrichr() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- -Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(false) - ---lowercase null-- -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -bool(false) - ---empty string DQ-- -bool(false) - ---empty string SQ-- -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_strrichr() expects parameter 2 to be string, object given, %s(%d) -NULL - ---undefined var-- -bool(false) - ---unset var-- -bool(false) - ---resource-- -Error: 2 - mb_strrichr() expects parameter 2 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strrichr_variation3.phpt b/ext/mbstring/tests/mb_strrichr_variation3.phpt deleted file mode 100644 index c2cccaa3754b4..0000000000000 --- a/ext/mbstring/tests/mb_strrichr_variation3.phpt +++ /dev/null @@ -1,232 +0,0 @@ ---TEST-- -Test mb_strrichr() function : usage variation - different values for part ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for part - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $res = mb_strrichr($haystack, $needle, $value, $encoding); - if ($res === NULL) { - var_dump($res); - } - else { - var_dump(bin2hex($res)); - } -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strrichr() : usage variation *** - ---int 0-- -string(8) "5f76616c" - ---int 1-- -string(12) "737472696e67" - ---int 12345-- -string(12) "737472696e67" - ---int -12345-- -string(12) "737472696e67" - ---float 10.5-- -string(12) "737472696e67" - ---float -10.5-- -string(12) "737472696e67" - ---float 12.3456789000e10-- -string(12) "737472696e67" - ---float -12.3456789000e10-- -string(12) "737472696e67" - ---float .5-- -string(12) "737472696e67" - ---empty array-- -Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strrichr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---uppercase NULL-- -string(8) "5f76616c" - ---lowercase null-- -string(8) "5f76616c" - ---lowercase true-- -string(12) "737472696e67" - ---lowercase false-- -string(8) "5f76616c" - ---uppercase TRUE-- -string(12) "737472696e67" - ---uppercase FALSE-- -string(8) "5f76616c" - ---empty string DQ-- -string(8) "5f76616c" - ---empty string SQ-- -string(8) "5f76616c" - ---string DQ-- -string(12) "737472696e67" - ---string SQ-- -string(12) "737472696e67" - ---mixed case string-- -string(12) "737472696e67" - ---heredoc-- -string(12) "737472696e67" - ---instance of classWithToString-- -Error: 2 - mb_strrichr() expects parameter 3 to be bool, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - mb_strrichr() expects parameter 3 to be bool, object given, %s(%d) -NULL - ---undefined var-- -string(8) "5f76616c" - ---unset var-- -string(8) "5f76616c" - ---resource-- -Error: 2 - mb_strrichr() expects parameter 3 to be bool, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strrichr_variation4.phpt b/ext/mbstring/tests/mb_strrichr_variation4.phpt deleted file mode 100644 index adcccee20901c..0000000000000 --- a/ext/mbstring/tests/mb_strrichr_variation4.phpt +++ /dev/null @@ -1,227 +0,0 @@ ---TEST-- -Test mb_strrichr() function : usage variation - different encoding types ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for encoding - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_strrichr($haystack, $needle, $part, $value) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strrichr() : usage variation *** - ---int 0-- -Error: 2 - mb_strrichr(): Unknown encoding "0", %s(%d) -bool(false) - ---int 1-- -Error: 2 - mb_strrichr(): Unknown encoding "1", %s(%d) -bool(false) - ---int 12345-- -Error: 2 - mb_strrichr(): Unknown encoding "12345", %s(%d) -bool(false) - ---int -12345-- -Error: 2 - mb_strrichr(): Unknown encoding "-2345", %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - mb_strrichr(): Unknown encoding "10.5", %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - mb_strrichr(): Unknown encoding "-10.5", %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - mb_strrichr(): Unknown encoding "123456789000", %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - mb_strrichr(): Unknown encoding "-123456789000", %s(%d) -bool(false) - ---float .5-- -Error: 2 - mb_strrichr(): Unknown encoding "0.5", %s(%d) -bool(false) - ---empty array-- -Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d) -bool(false) - ---lowercase true-- -Error: 2 - mb_strrichr(): Unknown encoding "1", %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - mb_strrichr(): Unknown encoding "1", %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - mb_strrichr(): Unknown encoding "invalid", %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_strrichr() expects parameter 4 to be string, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d) -bool(false) - ---unset var-- -Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d) -bool(false) - ---resource-- -Error: 2 - mb_strrichr() expects parameter 4 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strripos_variation1.phpt b/ext/mbstring/tests/mb_strripos_variation1.phpt deleted file mode 100644 index 0ba21a5624d50..0000000000000 --- a/ext/mbstring/tests/mb_strripos_variation1.phpt +++ /dev/null @@ -1,183 +0,0 @@ ---TEST-- -Test mb_strripos() function : usage variations - pass different data types to $haystack arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strripos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- -bool(false) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: mb_strripos() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strripos_variation2.phpt b/ext/mbstring/tests/mb_strripos_variation2.phpt deleted file mode 100644 index 6777145e1309c..0000000000000 --- a/ext/mbstring/tests/mb_strripos_variation2.phpt +++ /dev/null @@ -1,183 +0,0 @@ ---TEST-- -Test mb_strripos() function : usage variations - pass different data types as $needle arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strripos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -int(0) - --- Iteration 19 -- -int(0) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: mb_strripos() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt b/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt deleted file mode 100644 index ed0707e6bb076..0000000000000 --- a/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt +++ /dev/null @@ -1,206 +0,0 @@ ---TEST-- -Test mb_strripos() function : usage variations - pass different data types as $offset arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strripos() : usage variations *** - --- Iteration 1 -- -int(8) - --- Iteration 2 -- -int(8) - --- Iteration 3 -- - -Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d -bool(false) - --- Iteration 8 -- -int(8) - --- Iteration 9 -- -int(8) - --- Iteration 10 -- -int(8) - --- Iteration 11 -- -int(8) - --- Iteration 12 -- -int(8) - --- Iteration 13 -- -int(8) - --- Iteration 14 -- -int(8) - --- Iteration 15 -- -int(8) - --- Iteration 16 -- - -Warning: mb_strripos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: mb_strripos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: mb_strripos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: mb_strripos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: mb_strripos() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: mb_strripos() expects parameter 3 to be int, object given in %s on line %d -NULL - --- Iteration 22 -- -int(8) - --- Iteration 23 -- -int(8) - --- Iteration 24 -- - -Warning: mb_strripos() expects parameter 3 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strripos_variation4.phpt b/ext/mbstring/tests/mb_strripos_variation4.phpt deleted file mode 100644 index 72ce6865a8acd..0000000000000 --- a/ext/mbstring/tests/mb_strripos_variation4.phpt +++ /dev/null @@ -1,222 +0,0 @@ ---TEST-- -Test mb_strripos() function : usage variations - pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strripos() : usage variations *** - --- Iteration 1 -- - -Warning: mb_strripos(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_strripos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_strripos(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_strripos(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_strripos(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_strripos(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_strripos(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_strripos(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_strripos(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: mb_strripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_strripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: mb_strripos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_strripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_strripos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_strripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_strripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_strripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -int(7) - --- Iteration 19 -- -int(7) - --- Iteration 20 -- -int(7) - --- Iteration 21 -- -int(7) - --- Iteration 22 -- - -Warning: mb_strripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_strripos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_strripos() expects parameter 4 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strrpos_variation1.phpt b/ext/mbstring/tests/mb_strrpos_variation1.phpt deleted file mode 100644 index 9376443cf41e5..0000000000000 --- a/ext/mbstring/tests/mb_strrpos_variation1.phpt +++ /dev/null @@ -1,180 +0,0 @@ ---TEST-- -Test mb_strrpos() function : usage variations - pass different data types to $haystack arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strrpos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -int(7) - --- Iteration 19 -- -int(7) - --- Iteration 20 -- -int(7) - --- Iteration 21 -- -int(7) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: mb_strrpos() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strrpos_variation2.phpt b/ext/mbstring/tests/mb_strrpos_variation2.phpt deleted file mode 100644 index 85c951eb831c7..0000000000000 --- a/ext/mbstring/tests/mb_strrpos_variation2.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test mb_strrpos() function : usage variations - Pass different data types to $needle arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strrpos() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -int(7) - --- Iteration 19 -- -int(7) - --- Iteration 20 -- -int(7) - --- Iteration 21 -- -int(7) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: mb_strrpos() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strrpos_variation3.phpt b/ext/mbstring/tests/mb_strrpos_variation3.phpt deleted file mode 100644 index 99e5962f67185..0000000000000 --- a/ext/mbstring/tests/mb_strrpos_variation3.phpt +++ /dev/null @@ -1,153 +0,0 @@ ---TEST-- -Test mb_strrpos() function : usage variations - Pass different data types as $offset arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strrpos() : usage variations *** - --- Iteration 1 -- -int(8) - --- Iteration 2 -- -int(8) - --- Iteration 3 -- - -Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- - -Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d -bool(false) - --- Iteration 8 -- -int(8) - --- Iteration 9 -- -int(8) - --- Iteration 10 -- -int(8) - --- Iteration 11 -- -int(8) - --- Iteration 12 -- -int(8) - --- Iteration 13 -- -int(8) - --- Iteration 14 -- -int(8) - --- Iteration 15 -- -int(8) - --- Iteration 16 -- - -Notice: Object of class classA could not be converted to int in %s on line %d -int(8) - --- Iteration 17 -- -int(8) - --- Iteration 18 -- -int(8) -Done diff --git a/ext/mbstring/tests/mb_strrpos_variation4.phpt b/ext/mbstring/tests/mb_strrpos_variation4.phpt deleted file mode 100644 index 3e1f6c9703d00..0000000000000 --- a/ext/mbstring/tests/mb_strrpos_variation4.phpt +++ /dev/null @@ -1,221 +0,0 @@ ---TEST-- -Test mb_strrpos() function : usage variations - pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strrpos() : usage variations *** - --- Iteration 1 -- - -Warning: mb_strrpos(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_strrpos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_strrpos(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_strrpos(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_strrpos(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_strrpos(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_strrpos(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_strrpos(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_strrpos(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: mb_strrpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_strrpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: mb_strrpos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_strrpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_strrpos(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_strrpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_strrpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_strrpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -int(7) - --- Iteration 19 -- -int(7) - --- Iteration 20 -- -int(7) - --- Iteration 21 -- -int(7) - --- Iteration 22 -- - -Warning: mb_strrpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_strrpos(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_strrpos() expects parameter 4 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strstr_variation1.phpt b/ext/mbstring/tests/mb_strstr_variation1.phpt deleted file mode 100644 index 5dfeaee8a1fc1..0000000000000 --- a/ext/mbstring/tests/mb_strstr_variation1.phpt +++ /dev/null @@ -1,207 +0,0 @@ ---TEST-- -Test mb_strstr() function : usage variation - various haystacks, needle won't be found ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for haystack - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_strstr($value, $needle, $part, $encoding) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strstr() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- -Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(false) - ---lowercase null-- -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -bool(false) - ---empty string DQ-- -bool(false) - ---empty string SQ-- -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_strstr() expects parameter 1 to be string, object given, %s(%d) -NULL - ---undefined var-- -bool(false) - ---unset var-- -bool(false) - ---resource-- -Error: 2 - mb_strstr() expects parameter 1 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strstr_variation2.phpt b/ext/mbstring/tests/mb_strstr_variation2.phpt deleted file mode 100644 index b14da94fabe61..0000000000000 --- a/ext/mbstring/tests/mb_strstr_variation2.phpt +++ /dev/null @@ -1,215 +0,0 @@ ---TEST-- -Test mb_strstr() function : usage variation - different types of needle. ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for needle - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_strstr($haystack, $value, $part, $encoding) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strstr() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- -Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - mb_strstr(): Empty delimiter, %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - mb_strstr(): Empty delimiter, %s(%d) -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -Error: 2 - mb_strstr(): Empty delimiter, %s(%d) -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -Error: 2 - mb_strstr(): Empty delimiter, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - mb_strstr(): Empty delimiter, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - mb_strstr(): Empty delimiter, %s(%d) -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_strstr() expects parameter 2 to be string, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - mb_strstr(): Empty delimiter, %s(%d) -bool(false) - ---unset var-- -Error: 2 - mb_strstr(): Empty delimiter, %s(%d) -bool(false) - ---resource-- -Error: 2 - mb_strstr() expects parameter 2 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strstr_variation3.phpt b/ext/mbstring/tests/mb_strstr_variation3.phpt deleted file mode 100644 index 462c993b74880..0000000000000 --- a/ext/mbstring/tests/mb_strstr_variation3.phpt +++ /dev/null @@ -1,232 +0,0 @@ ---TEST-- -Test mb_strstr() function : usage variation - different values for part ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for part - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $res = mb_strstr($haystack, $needle, $value, $encoding); - if ($res === NULL) { - var_dump($res); - } - else { - var_dump(bin2hex($res)); - } -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strstr() : usage variation *** - ---int 0-- -string(8) "5f76616c" - ---int 1-- -string(12) "737472696e67" - ---int 12345-- -string(12) "737472696e67" - ---int -12345-- -string(12) "737472696e67" - ---float 10.5-- -string(12) "737472696e67" - ---float -10.5-- -string(12) "737472696e67" - ---float 12.3456789000e10-- -string(12) "737472696e67" - ---float -12.3456789000e10-- -string(12) "737472696e67" - ---float .5-- -string(12) "737472696e67" - ---empty array-- -Error: 2 - mb_strstr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strstr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strstr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strstr() expects parameter 3 to be bool, array given, %s(%d) -NULL - ---uppercase NULL-- -string(8) "5f76616c" - ---lowercase null-- -string(8) "5f76616c" - ---lowercase true-- -string(12) "737472696e67" - ---lowercase false-- -string(8) "5f76616c" - ---uppercase TRUE-- -string(12) "737472696e67" - ---uppercase FALSE-- -string(8) "5f76616c" - ---empty string DQ-- -string(8) "5f76616c" - ---empty string SQ-- -string(8) "5f76616c" - ---string DQ-- -string(12) "737472696e67" - ---string SQ-- -string(12) "737472696e67" - ---mixed case string-- -string(12) "737472696e67" - ---heredoc-- -string(12) "737472696e67" - ---instance of classWithToString-- -Error: 2 - mb_strstr() expects parameter 3 to be bool, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - mb_strstr() expects parameter 3 to be bool, object given, %s(%d) -NULL - ---undefined var-- -string(8) "5f76616c" - ---unset var-- -string(8) "5f76616c" - ---resource-- -Error: 2 - mb_strstr() expects parameter 3 to be bool, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strstr_variation4.phpt b/ext/mbstring/tests/mb_strstr_variation4.phpt deleted file mode 100644 index 088f4dac0db2e..0000000000000 --- a/ext/mbstring/tests/mb_strstr_variation4.phpt +++ /dev/null @@ -1,227 +0,0 @@ ---TEST-- -Test mb_strstr() function : usage variation - different encoding types ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for encoding - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( mb_strstr($haystack, $needle, $part, $value) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing mb_strstr() : usage variation *** - ---int 0-- -Error: 2 - mb_strstr(): Unknown encoding "0", %s(%d) -bool(false) - ---int 1-- -Error: 2 - mb_strstr(): Unknown encoding "1", %s(%d) -bool(false) - ---int 12345-- -Error: 2 - mb_strstr(): Unknown encoding "12345", %s(%d) -bool(false) - ---int -12345-- -Error: 2 - mb_strstr(): Unknown encoding "-2345", %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - mb_strstr(): Unknown encoding "10.5", %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - mb_strstr(): Unknown encoding "-10.5", %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - mb_strstr(): Unknown encoding "123456789000", %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - mb_strstr(): Unknown encoding "-123456789000", %s(%d) -bool(false) - ---float .5-- -Error: 2 - mb_strstr(): Unknown encoding "0.5", %s(%d) -bool(false) - ---empty array-- -Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - mb_strstr(): Unknown encoding "", %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - mb_strstr(): Unknown encoding "", %s(%d) -bool(false) - ---lowercase true-- -Error: 2 - mb_strstr(): Unknown encoding "1", %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - mb_strstr(): Unknown encoding "", %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - mb_strstr(): Unknown encoding "1", %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - mb_strstr(): Unknown encoding "", %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - mb_strstr(): Unknown encoding "", %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - mb_strstr(): Unknown encoding "", %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - mb_strstr(): Unknown encoding "invalid", %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - mb_strstr() expects parameter 4 to be string, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - mb_strstr(): Unknown encoding "", %s(%d) -bool(false) - ---unset var-- -Error: 2 - mb_strstr(): Unknown encoding "", %s(%d) -bool(false) - ---resource-- -Error: 2 - mb_strstr() expects parameter 4 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/mbstring/tests/mb_strtolower_variation1.phpt b/ext/mbstring/tests/mb_strtolower_variation1.phpt deleted file mode 100644 index 004660ff1f951..0000000000000 --- a/ext/mbstring/tests/mb_strtolower_variation1.phpt +++ /dev/null @@ -1,178 +0,0 @@ ---TEST-- -Test mb_strtolower() function : usage variations - pass different data types as $sourcestring arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strtolower() : usage variations *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(1) "1" - --- Iteration 3 -- -string(5) "12345" - --- Iteration 4 -- -string(5) "-2345" - --- Iteration 5 -- -string(4) "10.5" - --- Iteration 6 -- -string(5) "-10.5" - --- Iteration 7 -- -string(12) "123456789000" - --- Iteration 8 -- -string(13) "1.23456789e-9" - --- Iteration 9 -- -string(3) "0.5" - --- Iteration 10 -- -string(0) "" - --- Iteration 11 -- -string(0) "" - --- Iteration 12 -- -string(1) "1" - --- Iteration 13 -- -string(0) "" - --- Iteration 14 -- -string(1) "1" - --- Iteration 15 -- -string(0) "" - --- Iteration 16 -- -string(0) "" - --- Iteration 17 -- -string(0) "" - --- Iteration 18 -- -string(6) "string" - --- Iteration 19 -- -string(6) "string" - --- Iteration 20 -- -string(11) "hello world" - --- Iteration 21 -- -string(14) "class a object" - --- Iteration 22 -- -string(0) "" - --- Iteration 23 -- -string(0) "" - --- Iteration 24 -- - -Warning: mb_strtolower() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strtolower_variation2.phpt b/ext/mbstring/tests/mb_strtolower_variation2.phpt deleted file mode 100644 index c9e2520232598..0000000000000 --- a/ext/mbstring/tests/mb_strtolower_variation2.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test mb_strtolower() function : usage variations - pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strtolower() : usage variations *** - --- Iteration 1 -- - -Warning: mb_strtolower(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_strtolower(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_strtolower(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_strtolower(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_strtolower(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_strtolower(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_strtolower(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_strtolower(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_strtolower(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- -string(24) "68656c6c6f2c20776f726c64" - --- Iteration 11 -- -string(24) "68656c6c6f2c20776f726c64" - --- Iteration 12 -- - -Warning: mb_strtolower(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_strtolower(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_strtolower(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_strtolower(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_strtolower(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_strtolower(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -string(24) "68656c6c6f2c20776f726c64" - --- Iteration 19 -- -string(24) "68656c6c6f2c20776f726c64" - --- Iteration 20 -- -string(24) "68656c6c6f2c20776f726c64" - --- Iteration 21 -- -string(24) "68656c6c6f2c20776f726c64" - --- Iteration 22 -- -string(24) "68656c6c6f2c20776f726c64" - --- Iteration 23 -- -string(24) "68656c6c6f2c20776f726c64" - --- Iteration 24 -- - -Warning: mb_strtolower() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strtoupper_variation1.phpt b/ext/mbstring/tests/mb_strtoupper_variation1.phpt deleted file mode 100644 index 3bf6e181034eb..0000000000000 --- a/ext/mbstring/tests/mb_strtoupper_variation1.phpt +++ /dev/null @@ -1,180 +0,0 @@ ---TEST-- -Test mb_strtoupper() function : usage varitations - pass different data types as $sourcestring arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strtoupper() : usage variations *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(1) "1" - --- Iteration 3 -- -string(5) "12345" - --- Iteration 4 -- -string(5) "-2345" - --- Iteration 5 -- -string(4) "10.5" - --- Iteration 6 -- -string(5) "-10.5" - --- Iteration 7 -- -string(12) "123456789000" - --- Iteration 8 -- -string(13) "1.23456789E-9" - --- Iteration 9 -- -string(3) "0.5" - --- Iteration 10 -- -string(0) "" - --- Iteration 11 -- -string(0) "" - --- Iteration 12 -- -string(1) "1" - --- Iteration 13 -- -string(0) "" - --- Iteration 14 -- -string(1) "1" - --- Iteration 15 -- -string(0) "" - --- Iteration 16 -- -string(0) "" - --- Iteration 17 -- -string(0) "" - --- Iteration 18 -- -string(6) "STRING" - --- Iteration 19 -- -string(6) "STRING" - --- Iteration 20 -- -string(12) "HELLO, WORLD" - --- Iteration 21 -- -string(14) "CLASS A OBJECT" - --- Iteration 22 -- -string(0) "" - --- Iteration 23 -- -string(0) "" - --- Iteration 24 -- - -Warning: mb_strtoupper() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_strtoupper_variation2.phpt b/ext/mbstring/tests/mb_strtoupper_variation2.phpt deleted file mode 100644 index 498f94fba415d..0000000000000 --- a/ext/mbstring/tests/mb_strtoupper_variation2.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test mb_strtoupper() function : usage varitations - Pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_strtoupper() : usage variations *** - --- Iteration 1 -- - -Warning: mb_strtoupper(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_strtoupper(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_strtoupper(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_strtoupper(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_strtoupper(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_strtoupper(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_strtoupper(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_strtoupper(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_strtoupper(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- -string(24) "48454c4c4f2c20574f524c44" - --- Iteration 11 -- -string(24) "48454c4c4f2c20574f524c44" - --- Iteration 12 -- - -Warning: mb_strtoupper(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_strtoupper(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_strtoupper(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -string(24) "48454c4c4f2c20574f524c44" - --- Iteration 19 -- -string(24) "48454c4c4f2c20574f524c44" - --- Iteration 20 -- -string(24) "48454c4c4f2c20574f524c44" - --- Iteration 21 -- -string(24) "48454c4c4f2c20574f524c44" - --- Iteration 22 -- -string(24) "48454c4c4f2c20574f524c44" - --- Iteration 23 -- -string(24) "48454c4c4f2c20574f524c44" - --- Iteration 24 -- - -Warning: mb_strtoupper() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_substitute_character_variation1.phpt b/ext/mbstring/tests/mb_substitute_character_variation1.phpt index f738876469fcd..68e1ad7ca89ba 100644 --- a/ext/mbstring/tests/mb_substitute_character_variation1.phpt +++ b/ext/mbstring/tests/mb_substitute_character_variation1.phpt @@ -16,7 +16,7 @@ function_exists('mb_substitute_character') or die("skip mb_substitute_character( echo "*** Testing mb_substitute_character() : usage variation ***\n"; // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/mbstring/tests/mb_substr_count_variation1.phpt b/ext/mbstring/tests/mb_substr_count_variation1.phpt deleted file mode 100644 index 86efcadad9a1a..0000000000000 --- a/ext/mbstring/tests/mb_substr_count_variation1.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test mb_substr_count() function : usage variations - Pass different data types as $haystack arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_substr_count() : usage variations *** - --- Iteration 1 -- -int(0) - --- Iteration 2 -- -int(0) - --- Iteration 3 -- -int(0) - --- Iteration 4 -- -int(0) - --- Iteration 5 -- -int(0) - --- Iteration 6 -- -int(0) - --- Iteration 7 -- -int(0) - --- Iteration 8 -- -int(0) - --- Iteration 9 -- -int(0) - --- Iteration 10 -- -int(0) - --- Iteration 11 -- -int(0) - --- Iteration 12 -- -int(0) - --- Iteration 13 -- -int(0) - --- Iteration 14 -- -int(0) - --- Iteration 15 -- -int(0) - --- Iteration 16 -- -int(0) - --- Iteration 17 -- -int(0) - --- Iteration 18 -- -int(1) - --- Iteration 19 -- -int(1) - --- Iteration 20 -- -int(1) - --- Iteration 21 -- -int(1) - --- Iteration 22 -- -int(0) - --- Iteration 23 -- -int(0) - --- Iteration 24 -- - -Warning: mb_substr_count() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_substr_count_variation2.phpt b/ext/mbstring/tests/mb_substr_count_variation2.phpt deleted file mode 100644 index 48dd675fda7fb..0000000000000 --- a/ext/mbstring/tests/mb_substr_count_variation2.phpt +++ /dev/null @@ -1,196 +0,0 @@ ---TEST-- -Test mb_substr_count() function : usage variations - pass different data types as $needle arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_substr_count() : usage variations *** - --- Iteration 1 -- -int(0) - --- Iteration 2 -- -int(0) - --- Iteration 3 -- -int(0) - --- Iteration 4 -- -int(0) - --- Iteration 5 -- -int(0) - --- Iteration 6 -- -int(0) - --- Iteration 7 -- -int(0) - --- Iteration 8 -- -int(0) - --- Iteration 9 -- -int(0) - --- Iteration 10 -- - -Warning: mb_substr_count(): Empty substring in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_substr_count(): Empty substring in %s on line %d -bool(false) - --- Iteration 12 -- -int(0) - --- Iteration 13 -- - -Warning: mb_substr_count(): Empty substring in %s on line %d -bool(false) - --- Iteration 14 -- -int(0) - --- Iteration 15 -- - -Warning: mb_substr_count(): Empty substring in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_substr_count(): Empty substring in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_substr_count(): Empty substring in %s on line %d -bool(false) - --- Iteration 18 -- -int(1) - --- Iteration 19 -- -int(1) - --- Iteration 20 -- -int(1) - --- Iteration 21 -- -int(1) - --- Iteration 22 -- - -Warning: mb_substr_count(): Empty substring in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_substr_count(): Empty substring in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_substr_count() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_substr_count_variation3.phpt b/ext/mbstring/tests/mb_substr_count_variation3.phpt deleted file mode 100644 index 2324ed0939402..0000000000000 --- a/ext/mbstring/tests/mb_substr_count_variation3.phpt +++ /dev/null @@ -1,220 +0,0 @@ ---TEST-- -Test mb_substr_count() function :usage variations - pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_substr_count() : usage variations *** - --- Iteration 1 -- - -Warning: mb_substr_count(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_substr_count(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_substr_count(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_substr_count(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_substr_count(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_substr_count(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_substr_count(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_substr_count(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_substr_count(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: mb_substr_count(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_substr_count(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: mb_substr_count(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_substr_count(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_substr_count(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_substr_count(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_substr_count(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_substr_count(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -int(1) - --- Iteration 19 -- -int(1) - --- Iteration 20 -- -int(1) - --- Iteration 21 -- -int(1) - --- Iteration 22 -- - -Warning: mb_substr_count(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_substr_count(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_substr_count() expects parameter 3 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_substr_variation1.phpt b/ext/mbstring/tests/mb_substr_variation1.phpt deleted file mode 100644 index 5fa4f25975d71..0000000000000 --- a/ext/mbstring/tests/mb_substr_variation1.phpt +++ /dev/null @@ -1,180 +0,0 @@ ---TEST-- -Test mb_substr() function : usage variations - pass unexpected arguments (including strings) in place of $str ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_substr() : usage variations *** - --- Iteration 1 -- -string(1) "0" - --- Iteration 2 -- -string(1) "1" - --- Iteration 3 -- -string(5) "12345" - --- Iteration 4 -- -string(5) "-2345" - --- Iteration 5 -- -string(4) "10.5" - --- Iteration 6 -- -string(5) "-10.5" - --- Iteration 7 -- -string(5) "12345" - --- Iteration 8 -- -string(5) "1.234" - --- Iteration 9 -- -string(3) "0.5" - --- Iteration 10 -- -string(0) "" - --- Iteration 11 -- -string(0) "" - --- Iteration 12 -- -string(1) "1" - --- Iteration 13 -- -string(0) "" - --- Iteration 14 -- -string(1) "1" - --- Iteration 15 -- -string(0) "" - --- Iteration 16 -- -string(0) "" - --- Iteration 17 -- -string(0) "" - --- Iteration 18 -- -string(5) "strin" - --- Iteration 19 -- -string(5) "strin" - --- Iteration 20 -- -string(5) "hello" - --- Iteration 21 -- -string(5) "Class" - --- Iteration 22 -- -string(0) "" - --- Iteration 23 -- -string(0) "" - --- Iteration 24 -- - -Warning: mb_substr() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/mbstring/tests/mb_substr_variation2.phpt b/ext/mbstring/tests/mb_substr_variation2.phpt deleted file mode 100644 index d65774ab6098b..0000000000000 --- a/ext/mbstring/tests/mb_substr_variation2.phpt +++ /dev/null @@ -1,226 +0,0 @@ ---TEST-- -Test mb_substr() function : usage variations - Pass different data types as $encoding arg ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing mb_substr() : usage variations *** - --- Iteration 1 -- - -Warning: mb_substr(): Unknown encoding "0" in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: mb_substr(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: mb_substr(): Unknown encoding "12345" in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: mb_substr(): Unknown encoding "-2345" in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: mb_substr(): Unknown encoding "10.5" in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: mb_substr(): Unknown encoding "-10.5" in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: mb_substr(): Unknown encoding "123456789000" in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: mb_substr(): Unknown encoding "1.23456789E-9" in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: mb_substr(): Unknown encoding "0.5" in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: mb_substr(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: mb_substr(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: mb_substr(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: mb_substr(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: mb_substr(): Unknown encoding "1" in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: mb_substr(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: mb_substr(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: mb_substr(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 18 -- -string(10) "7472696e67" - --- Iteration 19 -- -string(10) "7472696e67" - --- Iteration 20 -- -string(10) "7472696e67" - --- Iteration 21 -- -string(10) "7472696e67" - --- Iteration 22 -- - -Warning: mb_substr(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: mb_substr(): Unknown encoding "" in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: mb_substr() expects parameter 4 to be string, resource given in %s on line %d -string(0) "" -Done diff --git a/ext/mbstring/tests/mb_substr_variation3.phpt b/ext/mbstring/tests/mb_substr_variation3.phpt deleted file mode 100644 index 702bdda147087..0000000000000 --- a/ext/mbstring/tests/mb_substr_variation3.phpt +++ /dev/null @@ -1,445 +0,0 @@ ---TEST-- -Test mb_substr() function : usage variations - test different encodings ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing mb_substr() : usage variations *** - --- Iteration 1: UCS-4 -- --- ASCII String -- -Encoding UCS-4 recognised --- Multibyte String -- -Encoding UCS-4 recognised - --- Iteration 1: UCS-4BE -- --- ASCII String -- -Encoding UCS-4BE recognised --- Multibyte String -- -Encoding UCS-4BE recognised - --- Iteration 1: UCS-4LE -- --- ASCII String -- -Encoding UCS-4LE recognised --- Multibyte String -- -Encoding UCS-4LE recognised - --- Iteration 1: UCS-2 -- --- ASCII String -- -Encoding UCS-2 recognised --- Multibyte String -- -Encoding UCS-2 recognised - --- Iteration 1: UCS-2BE -- --- ASCII String -- -Encoding UCS-2BE recognised --- Multibyte String -- -Encoding UCS-2BE recognised - --- Iteration 1: UCS-2LE -- --- ASCII String -- -Encoding UCS-2LE recognised --- Multibyte String -- -Encoding UCS-2LE recognised - --- Iteration 1: UTF-32 -- --- ASCII String -- -Encoding UTF-32 recognised --- Multibyte String -- -Encoding UTF-32 recognised - --- Iteration 1: UTF-32BE -- --- ASCII String -- -Encoding UTF-32BE recognised --- Multibyte String -- -Encoding UTF-32BE recognised - --- Iteration 1: UTF-32LE -- --- ASCII String -- -Encoding UTF-32LE recognised --- Multibyte String -- -Encoding UTF-32LE recognised - --- Iteration 1: UTF-16 -- --- ASCII String -- -Encoding UTF-16 recognised --- Multibyte String -- -Encoding UTF-16 recognised - --- Iteration 1: UTF-16BE -- --- ASCII String -- -Encoding UTF-16BE recognised --- Multibyte String -- -Encoding UTF-16BE recognised - --- Iteration 1: UTF-16LE -- --- ASCII String -- -Encoding UTF-16LE recognised --- Multibyte String -- -Encoding UTF-16LE recognised - --- Iteration 1: UTF-7 -- --- ASCII String -- -Encoding UTF-7 recognised --- Multibyte String -- -Encoding UTF-7 recognised - --- Iteration 1: UTF7-IMAP -- --- ASCII String -- -Encoding UTF7-IMAP recognised --- Multibyte String -- -Encoding UTF7-IMAP recognised - --- Iteration 1: UTF-8 -- --- ASCII String -- -Encoding UTF-8 recognised --- Multibyte String -- -Encoding UTF-8 recognised - --- Iteration 1: ASCII -- --- ASCII String -- -Encoding ASCII recognised --- Multibyte String -- -Encoding ASCII recognised - --- Iteration 1: EUC-JP -- --- ASCII String -- -Encoding EUC-JP recognised --- Multibyte String -- -Encoding EUC-JP recognised - --- Iteration 1: SJIS -- --- ASCII String -- -Encoding SJIS recognised --- Multibyte String -- -Encoding SJIS recognised - --- Iteration 1: eucJP-win -- --- ASCII String -- -Encoding eucJP-win recognised --- Multibyte String -- -Encoding eucJP-win recognised - --- Iteration 1: SJIS-win -- --- ASCII String -- -Encoding SJIS-win recognised --- Multibyte String -- -Encoding SJIS-win recognised - --- Iteration 1: ISO-2022-JP -- --- ASCII String -- -Encoding ISO-2022-JP recognised --- Multibyte String -- -Encoding ISO-2022-JP recognised - --- Iteration 1: JIS -- --- ASCII String -- -Encoding JIS recognised --- Multibyte String -- -Encoding JIS recognised - --- Iteration 1: ISO-8859-1 -- --- ASCII String -- -Encoding ISO-8859-1 recognised --- Multibyte String -- -Encoding ISO-8859-1 recognised - --- Iteration 1: ISO-8859-2 -- --- ASCII String -- -Encoding ISO-8859-2 recognised --- Multibyte String -- -Encoding ISO-8859-2 recognised - --- Iteration 1: ISO-8859-3 -- --- ASCII String -- -Encoding ISO-8859-3 recognised --- Multibyte String -- -Encoding ISO-8859-3 recognised - --- Iteration 1: ISO-8859-4 -- --- ASCII String -- -Encoding ISO-8859-4 recognised --- Multibyte String -- -Encoding ISO-8859-4 recognised - --- Iteration 1: ISO-8859-5 -- --- ASCII String -- -Encoding ISO-8859-5 recognised --- Multibyte String -- -Encoding ISO-8859-5 recognised - --- Iteration 1: ISO-8859-6 -- --- ASCII String -- -Encoding ISO-8859-6 recognised --- Multibyte String -- -Encoding ISO-8859-6 recognised - --- Iteration 1: ISO-8859-7 -- --- ASCII String -- -Encoding ISO-8859-7 recognised --- Multibyte String -- -Encoding ISO-8859-7 recognised - --- Iteration 1: ISO-8859-8 -- --- ASCII String -- -Encoding ISO-8859-8 recognised --- Multibyte String -- -Encoding ISO-8859-8 recognised - --- Iteration 1: ISO-8859-9 -- --- ASCII String -- -Encoding ISO-8859-9 recognised --- Multibyte String -- -Encoding ISO-8859-9 recognised - --- Iteration 1: ISO-8859-10 -- --- ASCII String -- -Encoding ISO-8859-10 recognised --- Multibyte String -- -Encoding ISO-8859-10 recognised - --- Iteration 1: ISO-8859-13 -- --- ASCII String -- -Encoding ISO-8859-13 recognised --- Multibyte String -- -Encoding ISO-8859-13 recognised - --- Iteration 1: ISO-8859-14 -- --- ASCII String -- -Encoding ISO-8859-14 recognised --- Multibyte String -- -Encoding ISO-8859-14 recognised - --- Iteration 1: ISO-8859-15 -- --- ASCII String -- -Encoding ISO-8859-15 recognised --- Multibyte String -- -Encoding ISO-8859-15 recognised - --- Iteration 1: byte2be -- --- ASCII String -- -Encoding byte2be recognised --- Multibyte String -- -Encoding byte2be recognised - --- Iteration 1: byte2le -- --- ASCII String -- -Encoding byte2le recognised --- Multibyte String -- -Encoding byte2le recognised - --- Iteration 1: byte4be -- --- ASCII String -- -Encoding byte4be recognised --- Multibyte String -- -Encoding byte4be recognised - --- Iteration 1: byte4le -- --- ASCII String -- -Encoding byte4le recognised --- Multibyte String -- -Encoding byte4le recognised - --- Iteration 1: BASE64 -- --- ASCII String -- -Encoding BASE64 recognised --- Multibyte String -- -Encoding BASE64 recognised - --- Iteration 1: HTML-ENTITIES -- --- ASCII String -- -Encoding HTML-ENTITIES recognised --- Multibyte String -- -Encoding HTML-ENTITIES recognised - --- Iteration 1: 7bit -- --- ASCII String -- -Encoding 7bit recognised --- Multibyte String -- -Encoding 7bit recognised - --- Iteration 1: 8bit -- --- ASCII String -- -Encoding 8bit recognised --- Multibyte String -- -Encoding 8bit recognised - --- Iteration 1: EUC-CN -- --- ASCII String -- -Encoding EUC-CN recognised --- Multibyte String -- -Encoding EUC-CN recognised - --- Iteration 1: CP936 -- --- ASCII String -- -Encoding CP936 recognised --- Multibyte String -- -Encoding CP936 recognised - --- Iteration 1: HZ -- --- ASCII String -- -Encoding HZ recognised --- Multibyte String -- -Encoding HZ recognised - --- Iteration 1: EUC-TW -- --- ASCII String -- -Encoding EUC-TW recognised --- Multibyte String -- -Encoding EUC-TW recognised - --- Iteration 1: CP950 -- --- ASCII String -- -Encoding CP950 recognised --- Multibyte String -- -Encoding CP950 recognised - --- Iteration 1: BIG-5 -- --- ASCII String -- -Encoding BIG-5 recognised --- Multibyte String -- -Encoding BIG-5 recognised - --- Iteration 1: EUC-KR -- --- ASCII String -- -Encoding EUC-KR recognised --- Multibyte String -- -Encoding EUC-KR recognised - --- Iteration 1: UHC -- --- ASCII String -- -Encoding UHC recognised --- Multibyte String -- -Encoding UHC recognised - --- Iteration 1: ISO-2022-KR -- --- ASCII String -- -Encoding ISO-2022-KR recognised --- Multibyte String -- -Encoding ISO-2022-KR recognised - --- Iteration 1: Windows-1251 -- --- ASCII String -- -Encoding Windows-1251 recognised --- Multibyte String -- -Encoding Windows-1251 recognised - --- Iteration 1: Windows-1252 -- --- ASCII String -- -Encoding Windows-1252 recognised --- Multibyte String -- -Encoding Windows-1252 recognised - --- Iteration 1: CP866 -- --- ASCII String -- -Encoding CP866 recognised --- Multibyte String -- -Encoding CP866 recognised - --- Iteration 1: KOI8-R -- --- ASCII String -- -Encoding KOI8-R recognised --- Multibyte String -- -Encoding KOI8-R recognised -Done diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index e82434744d7c7..4745ea04999dd 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -297,22 +297,16 @@ static int mysqli_write_na(mysqli_object *obj, zval *newval) /* }}} */ /* {{{ mysqli_read_property */ -zval *mysqli_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) +zval *mysqli_read_property(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) { - zval tmp_member; zval *retval; mysqli_object *obj; mysqli_prop_handler *hnd = NULL; - obj = Z_MYSQLI_P(object); - - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - } + obj = php_mysqli_fetch_object(object); if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, Z_STR_P(member)); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } if (hnd) { @@ -321,11 +315,7 @@ zval *mysqli_read_property(zval *object, zval *member, int type, void **cache_sl retval = &EG(uninitialized_zval); } } else { - retval = zend_std_read_property(object, member, type, cache_slot, rv); - } - - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); + retval = zend_std_read_property(object, name, type, cache_slot, rv); } return retval; @@ -333,31 +323,21 @@ zval *mysqli_read_property(zval *object, zval *member, int type, void **cache_sl /* }}} */ /* {{{ mysqli_write_property */ -zval *mysqli_write_property(zval *object, zval *member, zval *value, void **cache_slot) +zval *mysqli_write_property(zend_object *object, zend_string *name, zval *value, void **cache_slot) { - zval tmp_member; mysqli_object *obj; mysqli_prop_handler *hnd = NULL; - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - } - - obj = Z_MYSQLI_P(object); + obj = php_mysqli_fetch_object(object); if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, Z_STR_P(member)); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } if (hnd) { hnd->write_func(obj, value); } else { - value = zend_std_write_property(object, member, value, cache_slot); - } - - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); + value = zend_std_write_property(object, name, value, cache_slot); } return value; @@ -376,20 +356,20 @@ void mysqli_add_property(HashTable *h, const char *pname, size_t pname_len, mysq } /* }}} */ -static int mysqli_object_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */ +static int mysqli_object_has_property(zend_object *object, zend_string *name, int has_set_exists, void **cache_slot) /* {{{ */ { - mysqli_object *obj = Z_MYSQLI_P(object); + mysqli_object *obj = php_mysqli_fetch_object(object); mysqli_prop_handler *p; int ret = 0; - if ((p = zend_hash_find_ptr(obj->prop_handler, Z_STR_P(member))) != NULL) { + if ((p = zend_hash_find_ptr(obj->prop_handler, name)) != NULL) { switch (has_set_exists) { case ZEND_PROPERTY_EXISTS: ret = 1; break; case ZEND_PROPERTY_NOT_EMPTY: { zval rv; - zval *value = mysqli_read_property(object, member, BP_VAR_IS, cache_slot, &rv); + zval *value = mysqli_read_property(object, name, BP_VAR_IS, cache_slot, &rv); if (value != &EG(uninitialized_zval)) { convert_to_boolean(value); ret = Z_TYPE_P(value) == IS_TRUE ? 1 : 0; @@ -398,7 +378,7 @@ static int mysqli_object_has_property(zval *object, zval *member, int has_set_ex } case ZEND_PROPERTY_ISSET: { zval rv; - zval *value = mysqli_read_property(object, member, BP_VAR_IS, cache_slot, &rv); + zval *value = mysqli_read_property(object, name, BP_VAR_IS, cache_slot, &rv); if (value != &EG(uninitialized_zval)) { ret = Z_TYPE_P(value) != IS_NULL? 1 : 0; zval_ptr_dtor(value); @@ -409,27 +389,26 @@ static int mysqli_object_has_property(zval *object, zval *member, int has_set_ex php_error_docref(NULL, E_WARNING, "Invalid value for has_set_exists"); } } else { - ret = zend_std_has_property(object, member, has_set_exists, cache_slot); + ret = zend_std_has_property(object, name, has_set_exists, cache_slot); } return ret; } /* }}} */ -HashTable *mysqli_object_get_debug_info(zval *object, int *is_temp) +HashTable *mysqli_object_get_debug_info(zend_object *object, int *is_temp) { - mysqli_object *obj = Z_MYSQLI_P(object); + mysqli_object *obj = php_mysqli_fetch_object(object); HashTable *retval, *props = obj->prop_handler; mysqli_prop_handler *entry; retval = zend_new_array(zend_hash_num_elements(props) + 1); ZEND_HASH_FOREACH_PTR(props, entry) { - zval rv, member; + zval rv; zval *value; - ZVAL_STR(&member, entry->name); - value = mysqli_read_property(object, &member, BP_VAR_IS, 0, &rv); + value = mysqli_read_property(object, entry->name, BP_VAR_IS, 0, &rv); if (value != &EG(uninitialized_zval)) { - zend_hash_add(retval, Z_STR(member), value); + zend_hash_add(retval, entry->name, value); } } ZEND_HASH_FOREACH_END(); @@ -1315,12 +1294,3 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 9e2f8fa0e9ce8..604b4b672d93d 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -2676,12 +2676,3 @@ PHP_FUNCTION(mysqli_warning_count) RETURN_LONG(mysql_warning_count(mysql->mysql)); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/mysqli_driver.c b/ext/mysqli/mysqli_driver.c index 5cf2d0f5b2c15..5839c1482775e 100644 --- a/ext/mysqli/mysqli_driver.c +++ b/ext/mysqli/mysqli_driver.c @@ -153,13 +153,3 @@ const zend_function_entry mysqli_driver_methods[] = { PHP_FE_END }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/mysqli_embedded.c b/ext/mysqli/mysqli_embedded.c index 4d0ff48ec1a28..efc9a55852d2e 100644 --- a/ext/mysqli/mysqli_embedded.c +++ b/ext/mysqli/mysqli_embedded.c @@ -119,13 +119,3 @@ PHP_FUNCTION(mysqli_embedded_server_end) #endif } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/mysqli_exception.c b/ext/mysqli/mysqli_exception.c index 8453db25bafb4..6ac5261e077b2 100644 --- a/ext/mysqli/mysqli_exception.c +++ b/ext/mysqli/mysqli_exception.c @@ -72,13 +72,3 @@ void php_mysqli_throw_sql_exception(char *sqlstate, int errorno, char *format, . zend_throw_exception_object(&sql_ex); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c index e11983d9315ae..68c79c88dc857 100644 --- a/ext/mysqli/mysqli_fe.c +++ b/ext/mysqli/mysqli_fe.c @@ -658,12 +658,3 @@ const zend_function_entry mysqli_stmt_methods[] = { PHP_FE_END }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 5ed56a1f67c39..a69fb63d6a3d7 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -1206,13 +1206,3 @@ PHP_FUNCTION(mysqli_get_links_stats) add_assoc_long_ex(return_value, "cached_plinks", sizeof("cached_plinks") - 1, MyG(num_inactive_persistent)); } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index eb5b3ac7bd0ac..25985927dc1cc 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -466,12 +466,3 @@ const mysqli_property_entry mysqli_stmt_property_entries[] = { {"id", sizeof("id") - 1, stmt_id_read, NULL}, {NULL, 0, NULL, NULL} }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/mysqli_report.c b/ext/mysqli/mysqli_report.c index 1b3ba19a9a304..330e5a6f70b7f 100644 --- a/ext/mysqli/mysqli_report.c +++ b/ext/mysqli/mysqli_report.c @@ -65,12 +65,3 @@ void php_mysqli_report_index(const char *query, unsigned int status) { php_mysqli_throw_sql_exception("00000", 0, "%s used in query/prepared statement %s", index, query); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/mysqli_result_iterator.c b/ext/mysqli/mysqli_result_iterator.c index 45f85e1005a8e..704c67f5c2be7 100644 --- a/ext/mysqli/mysqli_result_iterator.c +++ b/ext/mysqli/mysqli_result_iterator.c @@ -154,12 +154,3 @@ const zend_object_iterator_funcs php_mysqli_result_iterator_funcs = { NULL }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 0e8b214ca2c7d..248d9a281f2a4 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -323,13 +323,3 @@ const mysqli_property_entry mysqli_warning_property_entries[] = { {NULL, 0, NULL, NULL} }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h index 79bcf3d1738a1..64a979d3fde1d 100644 --- a/ext/mysqli/php_mysqli.h +++ b/ext/mysqli/php_mysqli.h @@ -28,13 +28,3 @@ extern zend_module_entry mysqli_module_entry; #define PHP_MYSQLI_VERSION PHP_VERSION #endif /* PHP_MYSQLI.H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h index f0136c88bc2a6..b309c21070cad 100644 --- a/ext/mysqli/php_mysqli_structs.h +++ b/ext/mysqli/php_mysqli_structs.h @@ -345,14 +345,3 @@ ZEND_TSRMLS_CACHE_EXTERN() ZEND_EXTERN_MODULE_GLOBALS(mysqli) #endif /* PHP_MYSQLI_STRUCTS.H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/config-win.h b/ext/mysqlnd/config-win.h index 3b5f95ed18a49..d93b3bf9f9a9f 100644 --- a/ext/mysqlnd/config-win.h +++ b/ext/mysqlnd/config-win.h @@ -104,12 +104,3 @@ This file is public domain and comes with NO WARRANTY of any kind */ #endif /* _WIN64 */ #endif /* _MYSQLND_CONFIG_WIN_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysql_float_to_double.h b/ext/mysqlnd/mysql_float_to_double.h index 7ac77d91271e4..dca9a3fdafd55 100644 --- a/ext/mysqlnd/mysql_float_to_double.h +++ b/ext/mysqlnd/mysql_float_to_double.h @@ -48,13 +48,4 @@ static inline double mysql_float_to_double(float fp4, int decimals) { return zend_strtod(num_buf, NULL); } -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ - #endif /* MYSQL_FLOAT_TO_DOUBLE_H */ diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h index 021e7a1155424..08d09db3add04 100644 --- a/ext/mysqlnd/mysqlnd.h +++ b/ext/mysqlnd/mysqlnd.h @@ -338,13 +338,3 @@ ZEND_TSRMLS_CACHE_EXTERN() PHPAPI void mysqlnd_minfo_print_hash(zval *values); #endif /* MYSQLND_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c index 5ee2d4537f956..c882a334b94bf 100644 --- a/ext/mysqlnd/mysqlnd_alloc.c +++ b/ext/mysqlnd/mysqlnd_alloc.c @@ -848,13 +848,3 @@ PHPAPI struct st_mysqlnd_allocator_methods mysqlnd_allocator = _mysqlnd_sprintf_free, #endif }; - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_alloc.h b/ext/mysqlnd/mysqlnd_alloc.h index d9ceca2eaca6f..e5377e0285717 100644 --- a/ext/mysqlnd/mysqlnd_alloc.h +++ b/ext/mysqlnd/mysqlnd_alloc.h @@ -85,12 +85,3 @@ static inline MYSQLND_CSTRING mnd_str2c(const MYSQLND_STRING str) } #endif /* MYSQLND_ALLOC_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 9822b40537d0a..3fcc2d8cf0f74 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -1105,13 +1105,3 @@ mysqlnd_register_builtin_authentication_plugins(void) #endif } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_auth.h b/ext/mysqlnd/mysqlnd_auth.h index 6c115d9e05758..ced45b0bedcf3 100644 --- a/ext/mysqlnd/mysqlnd_auth.h +++ b/ext/mysqlnd/mysqlnd_auth.h @@ -98,12 +98,3 @@ mysqlnd_run_authentication( PHPAPI void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, const zend_uchar * const pass, const size_t pass_len); #endif /* MYSQLND_AUTH_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_block_alloc.c b/ext/mysqlnd/mysqlnd_block_alloc.c index e1d3f846ec813..15de3138b369d 100644 --- a/ext/mysqlnd/mysqlnd_block_alloc.c +++ b/ext/mysqlnd/mysqlnd_block_alloc.c @@ -208,12 +208,3 @@ mysqlnd_mempool_restore_state(MYSQLND_MEMORY_POOL * pool) DBG_VOID_RETURN; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_block_alloc.h b/ext/mysqlnd/mysqlnd_block_alloc.h index f3adde5af0a6f..7390fa4ce7682 100644 --- a/ext/mysqlnd/mysqlnd_block_alloc.h +++ b/ext/mysqlnd/mysqlnd_block_alloc.h @@ -26,13 +26,3 @@ PHPAPI void mysqlnd_mempool_save_state(MYSQLND_MEMORY_POOL * pool); PHPAPI void mysqlnd_mempool_restore_state(MYSQLND_MEMORY_POOL * pool); #endif /* MYSQLND_BLOCK_ALLOC_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c index ce9708ce4c841..315f754c68be3 100644 --- a/ext/mysqlnd/mysqlnd_charset.c +++ b/ext/mysqlnd/mysqlnd_charset.c @@ -939,13 +939,3 @@ mysqlnd_charsets_plugin_register(void) mysqlnd_plugin_register_ex((struct st_mysqlnd_plugin_header *) &mysqlnd_plugin_charsets_plugin); } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_charset.h b/ext/mysqlnd/mysqlnd_charset.h index 96dc95df9dfdb..39ed4e293bcf8 100644 --- a/ext/mysqlnd/mysqlnd_charset.h +++ b/ext/mysqlnd/mysqlnd_charset.h @@ -42,12 +42,3 @@ struct st_mysqlnd_plugin_charsets void mysqlnd_charsets_plugin_register(void); #endif /* MYSQLND_CHARSET_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_commands.c b/ext/mysqlnd/mysqlnd_commands.c index c292810b4f535..999b4f614c3a3 100644 --- a/ext/mysqlnd/mysqlnd_commands.c +++ b/ext/mysqlnd/mysqlnd_commands.c @@ -704,12 +704,3 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_command) MYSQLND_METHOD(mysqlnd_command, enable_ssl), MYSQLND_METHOD(mysqlnd_command, handshake), MYSQLND_CLASS_METHODS_END; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_commands.h b/ext/mysqlnd/mysqlnd_commands.h index a9041f76e10f6..ed490904b92c3 100644 --- a/ext/mysqlnd/mysqlnd_commands.h +++ b/ext/mysqlnd/mysqlnd_commands.h @@ -23,12 +23,3 @@ //extern func_mysqlnd__run_command mysqlnd_run_command; #endif /* MYSQLND_COMMANDS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index 0a4461c2eb4cd..068f387c97e4f 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -2711,13 +2711,3 @@ mysqlnd_connection_init(const size_t client_flags, const zend_bool persistent, M DBG_RETURN(ret); } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_connection.h b/ext/mysqlnd/mysqlnd_connection.h index a5c07c3af6a70..ade46afbb4b93 100644 --- a/ext/mysqlnd/mysqlnd_connection.h +++ b/ext/mysqlnd/mysqlnd_connection.h @@ -76,12 +76,3 @@ PHPAPI void mysqlnd_error_info_free_contents(MYSQLND_ERROR_INFO * const info); PHPAPI void mysqlnd_connection_state_init(struct st_mysqlnd_connection_state * const state); #endif /* MYSQLND_CONNECTION_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c index 409097a559132..2142fe63b3d0b 100644 --- a/ext/mysqlnd/mysqlnd_debug.c +++ b/ext/mysqlnd/mysqlnd_debug.c @@ -780,13 +780,3 @@ mysqlnd_debug_trace_plugin_register(void) mysqlnd_plugin_register_ex((struct st_mysqlnd_plugin_header *) &mysqlnd_plugin_trace_log_plugin); } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_debug.h b/ext/mysqlnd/mysqlnd_debug.h index 08a3a2b6a2d25..08ce1adba4e5a 100644 --- a/ext/mysqlnd/mysqlnd_debug.h +++ b/ext/mysqlnd/mysqlnd_debug.h @@ -228,12 +228,3 @@ static inline void TRACE_ALLOC_ENTER(const char * const func_name) {} #endif #endif /* MYSQLND_DEBUG_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_driver.c b/ext/mysqlnd/mysqlnd_driver.c index 46872d9ecbfd3..7c44cd4f71079 100644 --- a/ext/mysqlnd/mysqlnd_driver.c +++ b/ext/mysqlnd/mysqlnd_driver.c @@ -319,12 +319,3 @@ PHPAPI MYSQLND_CLASS_METHODS_START(mysqlnd_object_factory) MYSQLND_METHOD(mysqlnd_object_factory, get_vio), MYSQLND_METHOD(mysqlnd_object_factory, get_protocol_payload_decoder_factory) MYSQLND_CLASS_METHODS_END; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_enum_n_def.h b/ext/mysqlnd/mysqlnd_enum_n_def.h index 21b84ce71f92e..3c96763ba6aa6 100644 --- a/ext/mysqlnd/mysqlnd_enum_n_def.h +++ b/ext/mysqlnd/mysqlnd_enum_n_def.h @@ -711,13 +711,3 @@ enum mysqlnd_buffered_type #define MYSQLND_CLIENT_KNOWS_RSET_COPY_DATA 1 #endif /* MYSQLND_ENUM_N_DEF_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_ext_plugin.c b/ext/mysqlnd/mysqlnd_ext_plugin.c index 9bcb12f34147b..c2f42eb2f6cc3 100644 --- a/ext/mysqlnd/mysqlnd_ext_plugin.c +++ b/ext/mysqlnd/mysqlnd_ext_plugin.c @@ -448,13 +448,3 @@ struct st_mysqlnd_plugin_methods_xetters mysqlnd_plugin_methods_xetters = _mysqlnd_command_factory_set, }, }; - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_ext_plugin.h b/ext/mysqlnd/mysqlnd_ext_plugin.h index cbd0982982223..6bb96461f55f3 100644 --- a/ext/mysqlnd/mysqlnd_ext_plugin.h +++ b/ext/mysqlnd/mysqlnd_ext_plugin.h @@ -164,12 +164,3 @@ PHPAPI extern struct st_mysqlnd_plugin_methods_xetters mysqlnd_plugin_methods_xe #define mysqlnd_error_info_set_methods(m) mysqlnd_plugin_methods_xetters.error_info.set((m)) #endif /* MYSQLND_EXT_PLUGIN_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_loaddata.c b/ext/mysqlnd/mysqlnd_loaddata.c index a77961717db0e..f1cb2f44c2e85 100644 --- a/ext/mysqlnd/mysqlnd_loaddata.c +++ b/ext/mysqlnd/mysqlnd_loaddata.c @@ -228,12 +228,3 @@ mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filenam DBG_RETURN(result); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c index 6fb9c5fde2dd7..cb29d0b258af2 100644 --- a/ext/mysqlnd/mysqlnd_net.c +++ b/ext/mysqlnd/mysqlnd_net.c @@ -1216,14 +1216,3 @@ mysqlnd_net_free(MYSQLND_NET * const net, MYSQLND_STATS * stats, MYSQLND_ERROR_I DBG_VOID_RETURN; } /* }}} */ - - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_plugin.c b/ext/mysqlnd/mysqlnd_plugin.c index 4c9d0a0bf5da2..884b5db7c98d7 100644 --- a/ext/mysqlnd/mysqlnd_plugin.c +++ b/ext/mysqlnd/mysqlnd_plugin.c @@ -188,13 +188,3 @@ PHPAPI unsigned int mysqlnd_plugin_count() return mysqlnd_plugins_counter; } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_plugin.h b/ext/mysqlnd/mysqlnd_plugin.h index 7a1448faba99f..02054d23eaacd 100644 --- a/ext/mysqlnd/mysqlnd_plugin.h +++ b/ext/mysqlnd/mysqlnd_plugin.h @@ -29,13 +29,3 @@ void mysqlnd_register_builtin_authentication_plugins(void); void mysqlnd_example_plugin_register(void); #endif /* MYSQLND_PLUGIN_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_portability.h b/ext/mysqlnd/mysqlnd_portability.h index cb09a47915020..6816a8af3a1d5 100644 --- a/ext/mysqlnd/mysqlnd_portability.h +++ b/ext/mysqlnd/mysqlnd_portability.h @@ -389,13 +389,3 @@ typedef union { #endif /* float8get */ #endif /* MYSQLND_PORTABILITY_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h index 36113d3da9284..d61e45b58a6c6 100644 --- a/ext/mysqlnd/mysqlnd_priv.h +++ b/ext/mysqlnd/mysqlnd_priv.h @@ -34,12 +34,3 @@ PHPAPI extern MYSQLND_CLASS_METHOD_TABLE_NAME_FORWARD(mysqlnd_command); enum_func_status mysqlnd_handle_local_infile(MYSQLND_CONN_DATA * conn, const char * const filename, zend_bool * is_warning); #endif /* MYSQLND_PRIV_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c index 4f84c02c5dc8d..b65d9cc017360 100644 --- a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c +++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c @@ -495,13 +495,3 @@ mysqlnd_pfc_free(MYSQLND_PFC * const pfc, MYSQLND_STATS * stats, MYSQLND_ERROR_I DBG_VOID_RETURN; } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.h b/ext/mysqlnd/mysqlnd_protocol_frame_codec.h index e69a61be44592..3e88ba84ac09b 100644 --- a/ext/mysqlnd/mysqlnd_protocol_frame_codec.h +++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.h @@ -24,12 +24,3 @@ PHPAPI MYSQLND_PFC * mysqlnd_pfc_init(const zend_bool persistent, MYSQLND_CLASS_ PHPAPI void mysqlnd_pfc_free(MYSQLND_PFC * const pfc, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); #endif /* MYSQLND_PROTOCOL_FRAME_CODEC_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index 703c1f050a818..bf779a13c4088 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -2268,13 +2268,3 @@ void _mysqlnd_init_ps_subsystem() _mysqlnd_init_ps_fetch_subsystem(); } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_ps.h b/ext/mysqlnd/mysqlnd_ps.h index 36ca1227e79a8..f2eba36ffc47b 100644 --- a/ext/mysqlnd/mysqlnd_ps.h +++ b/ext/mysqlnd/mysqlnd_ps.h @@ -43,12 +43,3 @@ void _mysqlnd_init_ps_fetch_subsystem(); void ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row, unsigned int byte_count); #endif /* MYSQLND_PS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index f45cbaae3e43b..3e8dbe2e46b26 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -966,12 +966,3 @@ mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** requ DBG_RETURN(ret); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_read_buffer.c b/ext/mysqlnd/mysqlnd_read_buffer.c index 198764baa19da..104d5547242c1 100644 --- a/ext/mysqlnd/mysqlnd_read_buffer.c +++ b/ext/mysqlnd/mysqlnd_read_buffer.c @@ -85,12 +85,3 @@ mysqlnd_create_read_buffer(const size_t count) DBG_RETURN(ret); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index 74fd2d184015f..7d8e95133d149 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -2041,13 +2041,3 @@ mysqlnd_result_buffered_c_init(MYSQLND_RES * result, const unsigned int field_co DBG_RETURN(ret); } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_result.h b/ext/mysqlnd/mysqlnd_result.h index b8b919d942d12..425b5f355e992 100644 --- a/ext/mysqlnd/mysqlnd_result.h +++ b/ext/mysqlnd/mysqlnd_result.h @@ -28,12 +28,3 @@ PHPAPI MYSQLND_RES_BUFFERED_C * mysqlnd_result_buffered_c_init(MYSQLND_RES * res enum_func_status mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * stmt); #endif /* MYSQLND_RESULT_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_result_meta.c b/ext/mysqlnd/mysqlnd_result_meta.c index 0141cec4f0f1f..cab5c55398a5b 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.c +++ b/ext/mysqlnd/mysqlnd_result_meta.c @@ -330,12 +330,3 @@ _mysqlnd_plugin_get_plugin_result_metadata_data(const MYSQLND_RES_METADATA * met DBG_RETURN((void *)((char *)meta + sizeof(MYSQLND_RES_METADATA) + plugin_id * sizeof(void *))); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_result_meta.h b/ext/mysqlnd/mysqlnd_result_meta.h index 09af69837eb87..c4f7af9f8f07d 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.h +++ b/ext/mysqlnd/mysqlnd_result_meta.h @@ -26,12 +26,3 @@ PHPAPI struct st_mysqlnd_res_meta_methods * mysqlnd_result_metadata_get_methods( PHPAPI void ** _mysqlnd_plugin_get_plugin_result_metadata_data(const MYSQLND_RES_METADATA * meta, unsigned int plugin_id); #endif /* MYSQLND_RESULT_META_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_reverse_api.c b/ext/mysqlnd/mysqlnd_reverse_api.c index 931c3b26e22d8..cb71ee5158638 100644 --- a/ext/mysqlnd/mysqlnd_reverse_api.c +++ b/ext/mysqlnd/mysqlnd_reverse_api.c @@ -99,13 +99,3 @@ zval_to_mysqlnd(zval * zv, const unsigned int client_api_capabilities, unsigned return NULL; } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_reverse_api.h b/ext/mysqlnd/mysqlnd_reverse_api.h index 448f33bfeae2d..cbe60665d2733 100644 --- a/ext/mysqlnd/mysqlnd_reverse_api.h +++ b/ext/mysqlnd/mysqlnd_reverse_api.h @@ -36,12 +36,3 @@ PHPAPI void mysqlnd_reverse_api_register_api(const MYSQLND_REVERSE_API * apiext) PHPAPI MYSQLND * zval_to_mysqlnd(zval * zv, const unsigned int client_api_capabilities, unsigned int * save_client_api_capabilities); #endif /* MYSQLND_REVERSE_API_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c index f3069b580f58f..9bc3f0454bdd5 100644 --- a/ext/mysqlnd/mysqlnd_statistics.c +++ b/ext/mysqlnd/mysqlnd_statistics.c @@ -292,14 +292,3 @@ _mysqlnd_get_client_stats(MYSQLND_STATS * stats_ptr, zval *return_value ZEND_FIL DBG_VOID_RETURN; } /* }}} */ - - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_statistics.h b/ext/mysqlnd/mysqlnd_statistics.h index 869c24a56ed71..81246d3e11441 100644 --- a/ext/mysqlnd/mysqlnd_statistics.h +++ b/ext/mysqlnd/mysqlnd_statistics.h @@ -119,12 +119,3 @@ PHPAPI mysqlnd_stat_trigger mysqlnd_stats_set_trigger(MYSQLND_STATS * const stat PHPAPI mysqlnd_stat_trigger mysqlnd_stats_reset_triggers(MYSQLND_STATS * const stats); #endif /* MYSQLND_STATISTICS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_vio.c b/ext/mysqlnd/mysqlnd_vio.c index 50db782be6e97..ee2bb40d561c5 100644 --- a/ext/mysqlnd/mysqlnd_vio.c +++ b/ext/mysqlnd/mysqlnd_vio.c @@ -789,13 +789,3 @@ mysqlnd_vio_free(MYSQLND_VIO * const vio, MYSQLND_STATS * stats, MYSQLND_ERROR_I DBG_VOID_RETURN; } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_vio.h b/ext/mysqlnd/mysqlnd_vio.h index b0f6d85589018..4d15618929439 100644 --- a/ext/mysqlnd/mysqlnd_vio.h +++ b/ext/mysqlnd/mysqlnd_vio.h @@ -24,12 +24,3 @@ PHPAPI MYSQLND_VIO * mysqlnd_vio_init(zend_bool persistent, MYSQLND_CLASS_METHOD PHPAPI void mysqlnd_vio_free(MYSQLND_VIO * const vio, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info); #endif /* MYSQLND_VIO_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index a6c0ac949bca8..bb748e4d61e3c 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -2732,13 +2732,3 @@ mysqlnd_protocol_payload_decoder_factory_free(MYSQLND_PROTOCOL_PAYLOAD_DECODER_F DBG_VOID_RETURN; } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 7dfb256eec41d..c48fea0fb158c 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -316,12 +316,3 @@ PHPAPI MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * mysqlnd_protocol_payload_decod PHPAPI void mysqlnd_protocol_payload_decoder_factory_free(MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY * const payload_decoder_factory); #endif /* MYSQLND_WIREPROTOCOL_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c index 53a85701d1b3c..60e1b25603fbc 100644 --- a/ext/mysqlnd/php_mysqlnd.c +++ b/ext/mysqlnd/php_mysqlnd.c @@ -363,12 +363,3 @@ ZEND_TSRMLS_CACHE_DEFINE() ZEND_GET_MODULE(mysqlnd) #endif /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/php_mysqlnd.h b/ext/mysqlnd/php_mysqlnd.h index a3e88bf4969ed..e4a8ef3bc6b17 100644 --- a/ext/mysqlnd/php_mysqlnd.h +++ b/ext/mysqlnd/php_mysqlnd.h @@ -24,12 +24,3 @@ extern zend_module_entry mysqlnd_module_entry; #endif /* PHP_MYSQLND_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index be628ebc292f3..a3364be7e6b1e 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -3467,12 +3467,3 @@ void php_oci_dtrace_check_connection(php_oci_connection *connection, sb4 errcode /* }}} */ #endif /* HAVE_OCI8 */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c index 4969b6edc21c7..a89b5abe2ce6f 100644 --- a/ext/oci8/oci8_collection.c +++ b/ext/oci8/oci8_collection.c @@ -810,12 +810,3 @@ void php_oci_collection_close(php_oci_collection *collection) /* }}} */ #endif /* HAVE_OCI8 */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/oci8/oci8_failover.c b/ext/oci8/oci8_failover.c index c680713b05cca..5b836bb239246 100644 --- a/ext/oci8/oci8_failover.c +++ b/ext/oci8/oci8_failover.c @@ -152,12 +152,3 @@ int php_oci_register_taf_callback(php_oci_connection *connection, zval *callback /* }}} */ #endif /* HAVE_OCI8 */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index d96ca501f60b4..ae05c08a28c58 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -2607,12 +2607,3 @@ PHP_FUNCTION(oci_get_implicit_resultset) /* }}} */ #endif /* HAVE_OCI8 */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c index 6d034c10ae090..5a31618713f15 100644 --- a/ext/oci8/oci8_lob.c +++ b/ext/oci8/oci8_lob.c @@ -949,12 +949,3 @@ int php_oci_lob_write_tmp (php_oci_descriptor *descriptor, zend_long type, char /* }}} */ #endif /* HAVE_OCI8 */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index a3ebeca865875..4face29e4a6d7 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -1952,12 +1952,3 @@ php_oci_bind *php_oci_bind_array_helper_date(zval *var, zend_long max_table_leng /* }}} */ #endif /* HAVE_OCI8 */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h index a601aa4a63971..061c2c7ae76f8 100644 --- a/ext/oci8/php_oci8.h +++ b/ext/oci8/php_oci8.h @@ -63,10 +63,3 @@ PHP_MINFO_FUNCTION(oci); # define oci8_module_ptr NULL #endif /* HAVE_OCI8 */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h index b52d82d9d93ec..8d1e326815503 100644 --- a/ext/oci8/php_oci8_int.h +++ b/ext/oci8/php_oci8_int.h @@ -563,12 +563,3 @@ ZEND_EXTERN_MODULE_GLOBALS(oci) # define oci8_module_ptr NULL #endif /* HAVE_OCI8 */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 4e41b22108820..37a207e6247f6 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -3854,12 +3854,3 @@ PHP_FUNCTION(odbc_tableprivileges) #endif /* HAVE_DBMAKER */ #endif /* HAVE_UODBC */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h index 3de2ac637507d..351b31ea4010e 100644 --- a/ext/odbc/php_odbc.h +++ b/ext/odbc/php_odbc.h @@ -116,10 +116,3 @@ PHP_FUNCTION(odbc_statistics); #define phpext_odbc_ptr odbc_module_ptr #endif /* PHP_ODBC_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h index 24bbdff94c9a2..858a28af68556 100644 --- a/ext/odbc/php_odbc_includes.h +++ b/ext/odbc/php_odbc_includes.h @@ -278,10 +278,3 @@ ZEND_TSRMLS_CACHE_EXTERN() #endif /* HAVE_UODBC */ #endif /* PHP_ODBC_INCLUDES_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c index 84c5687212b4d..6b5c003ef51dc 100644 --- a/ext/opcache/Optimizer/block_pass.c +++ b/ext/opcache/Optimizer/block_pass.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/compact_literals.c b/ext/opcache/Optimizer/compact_literals.c index 8c5702a38d521..70d51fc832866 100644 --- a/ext/opcache/Optimizer/compact_literals.c +++ b/ext/opcache/Optimizer/compact_literals.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/compact_vars.c b/ext/opcache/Optimizer/compact_vars.c index 53db3c9b8def2..bf7a005787392 100644 --- a/ext/opcache/Optimizer/compact_vars.c +++ b/ext/opcache/Optimizer/compact_vars.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, Removing unused variables | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/dce.c b/ext/opcache/Optimizer/dce.c index a633e9ddf6a81..0f5b7892c3087 100644 --- a/ext/opcache/Optimizer/dce.c +++ b/ext/opcache/Optimizer/dce.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, DCE - Dead Code Elimination | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/dfa_pass.c b/ext/opcache/Optimizer/dfa_pass.c index 79717a64bd4ed..14c1527fc5622 100644 --- a/ext/opcache/Optimizer/dfa_pass.c +++ b/ext/opcache/Optimizer/dfa_pass.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -1227,11 +1227,3 @@ void zend_optimize_dfa(zend_op_array *op_array, zend_optimizer_ctx *ctx) /* Destroy SSA */ zend_arena_release(&ctx->arena, checkpoint); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/escape_analysis.c b/ext/opcache/Optimizer/escape_analysis.c index a92d773783ec0..e350cf734d3e2 100644 --- a/ext/opcache/Optimizer/escape_analysis.c +++ b/ext/opcache/Optimizer/escape_analysis.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache, Escape Analysis | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -565,11 +565,3 @@ int zend_ssa_escape_analysis(const zend_script *script, zend_op_array *op_array, return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/nop_removal.c b/ext/opcache/Optimizer/nop_removal.c index 1019af9099702..32d2f10bf46a8 100644 --- a/ext/opcache/Optimizer/nop_removal.c +++ b/ext/opcache/Optimizer/nop_removal.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/optimize_func_calls.c b/ext/opcache/Optimizer/optimize_func_calls.c index dc3494a2bab30..ae707a24097c0 100644 --- a/ext/opcache/Optimizer/optimize_func_calls.c +++ b/ext/opcache/Optimizer/optimize_func_calls.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/optimize_temp_vars_5.c b/ext/opcache/Optimizer/optimize_temp_vars_5.c index b414527a08f32..825091bfc30ce 100644 --- a/ext/opcache/Optimizer/optimize_temp_vars_5.c +++ b/ext/opcache/Optimizer/optimize_temp_vars_5.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c index 2a09b2118aea0..95f5f43772a6c 100644 --- a/ext/opcache/Optimizer/pass1_5.c +++ b/ext/opcache/Optimizer/pass1_5.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/pass2.c b/ext/opcache/Optimizer/pass2.c index d5ce86e133288..3613fd57de4d0 100644 --- a/ext/opcache/Optimizer/pass2.c +++ b/ext/opcache/Optimizer/pass2.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/pass3.c b/ext/opcache/Optimizer/pass3.c index d382d37e11240..a700893cee01c 100644 --- a/ext/opcache/Optimizer/pass3.c +++ b/ext/opcache/Optimizer/pass3.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/sccp.c b/ext/opcache/Optimizer/sccp.c index 49e3c4f622597..69f4883d5acc4 100644 --- a/ext/opcache/Optimizer/sccp.c +++ b/ext/opcache/Optimizer/sccp.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, SCCP - Sparse Conditional Constant Propagation | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -873,7 +873,7 @@ static inline int ct_eval_func_call( } else if (zend_string_equals_literal(name, "array_merge") || zend_string_equals_literal(name, "array_replace") || zend_string_equals_literal(name, "array_merge_recursive") - || zend_string_equals_literal(name, "array_merge_recursive") + || zend_string_equals_literal(name, "array_replace_recursive") || zend_string_equals_literal(name, "array_diff") || zend_string_equals_literal(name, "array_diff_assoc") || zend_string_equals_literal(name, "array_diff_key")) { @@ -937,7 +937,7 @@ static inline int ct_eval_func_call( } else if (zend_string_equals_literal(name, "array_merge") || zend_string_equals_literal(name, "array_replace") || zend_string_equals_literal(name, "array_merge_recursive") - || zend_string_equals_literal(name, "array_merge_recursive") + || zend_string_equals_literal(name, "array_replace_recursive") || zend_string_equals_literal(name, "array_diff") || zend_string_equals_literal(name, "array_diff_assoc") || zend_string_equals_literal(name, "array_diff_key")) { diff --git a/ext/opcache/Optimizer/scdf.c b/ext/opcache/Optimizer/scdf.c index 45c4a250288d3..f9b16411e788b 100644 --- a/ext/opcache/Optimizer/scdf.c +++ b/ext/opcache/Optimizer/scdf.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, Sparse Conditional Data Flow Propagation Framework | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/scdf.h b/ext/opcache/Optimizer/scdf.h index 1f651e04f4430..1b730936ec9ac 100644 --- a/ext/opcache/Optimizer/scdf.h +++ b/ext/opcache/Optimizer/scdf.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, Call Graph | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/ssa_integrity.c b/ext/opcache/Optimizer/ssa_integrity.c index 0deaf0e8a96c0..ede40be59a75f 100644 --- a/ext/opcache/Optimizer/ssa_integrity.c +++ b/ext/opcache/Optimizer/ssa_integrity.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, SSA validation | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/zend_call_graph.c b/ext/opcache/Optimizer/zend_call_graph.c index a20180af3792a..02dc2b79cfd7f 100644 --- a/ext/opcache/Optimizer/zend_call_graph.c +++ b/ext/opcache/Optimizer/zend_call_graph.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, Call Graph | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -294,11 +294,3 @@ zend_call_info **zend_build_call_map(zend_arena **arena, zend_func_info *info, z return map; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_call_graph.h b/ext/opcache/Optimizer/zend_call_graph.h index 6c8e5efa0920e..033c675b63482 100644 --- a/ext/opcache/Optimizer/zend_call_graph.h +++ b/ext/opcache/Optimizer/zend_call_graph.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, Call Graph | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -76,11 +76,3 @@ int zend_analyze_calls(zend_arena **arena, zend_script *script, uint32_t build_f END_EXTERN_C() #endif /* ZEND_CALL_GRAPH_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_cfg.c b/ext/opcache/Optimizer/zend_cfg.c index 1bd0a4b5e09a8..d6c6565779b42 100644 --- a/ext/opcache/Optimizer/zend_cfg.c +++ b/ext/opcache/Optimizer/zend_cfg.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, CFG - Control Flow Graph | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -895,11 +895,3 @@ int zend_cfg_identify_loops(const zend_op_array *op_array, zend_cfg *cfg) /* {{{ return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_cfg.h b/ext/opcache/Optimizer/zend_cfg.h index fcb7657842359..19a30ad40b35a 100644 --- a/ext/opcache/Optimizer/zend_cfg.h +++ b/ext/opcache/Optimizer/zend_cfg.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, CFG - Control Flow Graph | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -126,11 +126,3 @@ int zend_cfg_identify_loops(const zend_op_array *op_array, zend_cfg *cfg); END_EXTERN_C() #endif /* ZEND_CFG_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_dfg.c b/ext/opcache/Optimizer/zend_dfg.c index 66dd15da002d1..00a7dba10cf8e 100644 --- a/ext/opcache/Optimizer/zend_dfg.c +++ b/ext/opcache/Optimizer/zend_dfg.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, DFG - Data Flow Graph | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -259,11 +259,3 @@ int zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_dfg.h b/ext/opcache/Optimizer/zend_dfg.h index 0c50cef7daf0a..9720f79cc17ee 100644 --- a/ext/opcache/Optimizer/zend_dfg.h +++ b/ext/opcache/Optimizer/zend_dfg.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, DFG - Data Flow Graph | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -48,11 +48,3 @@ int zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg END_EXTERN_C() #endif /* ZEND_DFG_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_dump.c b/ext/opcache/Optimizer/zend_dump.c index b10cc31c9d147..0cc08758980ce 100644 --- a/ext/opcache/Optimizer/zend_dump.c +++ b/ext/opcache/Optimizer/zend_dump.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, Bytecode Visualisation | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -1230,11 +1230,3 @@ void zend_dump_phi_placement(const zend_op_array *op_array, const zend_ssa *ssa) } } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_dump.h b/ext/opcache/Optimizer/zend_dump.h index 8786113ae5be0..820f3daf193ce 100644 --- a/ext/opcache/Optimizer/zend_dump.h +++ b/ext/opcache/Optimizer/zend_dump.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, Bytecode Visualisation | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -45,11 +45,3 @@ void zend_dump_ht(HashTable *ht); END_EXTERN_C() #endif /* ZEND_DUMP_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index f14c3faa0d5aa..7298059cb70ba 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, Func Info | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -1769,11 +1769,3 @@ int zend_func_info_shutdown(void) } return SUCCESS; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_func_info.h b/ext/opcache/Optimizer/zend_func_info.h index 656cc59fad8de..7042d6dd9c118 100644 --- a/ext/opcache/Optimizer/zend_func_info.h +++ b/ext/opcache/Optimizer/zend_func_info.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, Func Info | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -61,11 +61,3 @@ int zend_func_info_shutdown(void); END_EXTERN_C() #endif /* ZEND_FUNC_INFO_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 9a875fd90b656..b5d761e7011a7 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, e-SSA based Type & Range Inference | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -4701,11 +4701,3 @@ int zend_may_throw(const zend_op *opline, zend_op_array *op_array, zend_ssa *ssa return 1; } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_inference.h b/ext/opcache/Optimizer/zend_inference.h index 297be8e616cd9..de90850fc45e5 100644 --- a/ext/opcache/Optimizer/zend_inference.h +++ b/ext/opcache/Optimizer/zend_inference.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, e-SSA based Type & Range Inference | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -269,11 +269,3 @@ int zend_may_throw(const zend_op *opline, zend_op_array *op_array, zend_ssa *ssa END_EXTERN_C() #endif /* ZEND_INFERENCE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index 5c4acad817d04..b0d20a9a2a086 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -1593,11 +1593,3 @@ int zend_optimizer_shutdown(void) { return zend_func_info_shutdown(); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_optimizer.h b/ext/opcache/Optimizer/zend_optimizer.h index bdd8c85add300..2841d018a5a3e 100644 --- a/ext/opcache/Optimizer/zend_optimizer.h +++ b/ext/opcache/Optimizer/zend_optimizer.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/zend_optimizer_internal.h b/ext/opcache/Optimizer/zend_optimizer_internal.h index 8afba7c8e5508..9997506bf0e54 100644 --- a/ext/opcache/Optimizer/zend_optimizer_internal.h +++ b/ext/opcache/Optimizer/zend_optimizer_internal.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/Optimizer/zend_ssa.c b/ext/opcache/Optimizer/zend_ssa.c index 2e5c4639789c0..cdcec65332a60 100644 --- a/ext/opcache/Optimizer/zend_ssa.c +++ b/ext/opcache/Optimizer/zend_ssa.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, SSA - Static Single Assignment Form | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -1613,11 +1613,3 @@ void zend_ssa_rename_var_uses(zend_ssa *ssa, int old, int new, zend_bool update_ old_var->phi_use_chain = NULL; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_ssa.h b/ext/opcache/Optimizer/zend_ssa.h index 08aa5b9c1afe5..2ea72b6f27803 100644 --- a/ext/opcache/Optimizer/zend_ssa.h +++ b/ext/opcache/Optimizer/zend_ssa.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine, SSA - Static Single Assignment Form | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -315,11 +315,3 @@ static zend_always_inline void zend_ssa_rename_defs_of_instr(zend_ssa *ssa, zend } while (0) #endif /* ZEND_SSA_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/Optimizer/zend_worklist.h b/ext/opcache/Optimizer/zend_worklist.h index 3ff1df14eeabc..2f3e3dd97997a 100644 --- a/ext/opcache/Optimizer/zend_worklist.h +++ b/ext/opcache/Optimizer/zend_worklist.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -119,11 +119,3 @@ static inline int zend_worklist_pop(zend_worklist *worklist) } #endif /* _ZEND_WORKLIST_H_ */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 4b73c6a119d6a..c783977a43ca8 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -4057,7 +4057,7 @@ ZEND_EXT_API zend_extension zend_extension_entry = { PHP_VERSION, /* version */ "Zend Technologies", /* author */ "http://www.zend.com/", /* URL */ - "Copyright (c) 1999-2018", /* copyright */ + "Copyright (c) 1999-2019", /* copyright */ accel_startup, /* startup */ NULL, /* shutdown */ NULL, /* per-script activation */ diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 9a60fc8956eb9..547fc498677e3 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/shared_alloc_mmap.c b/ext/opcache/shared_alloc_mmap.c index 6d72e5b4abf9f..dc02d038f5a5b 100644 --- a/ext/opcache/shared_alloc_mmap.c +++ b/ext/opcache/shared_alloc_mmap.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/shared_alloc_posix.c b/ext/opcache/shared_alloc_posix.c index 9d860a68cac2b..2db83aff42738 100644 --- a/ext/opcache/shared_alloc_posix.c +++ b/ext/opcache/shared_alloc_posix.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/shared_alloc_shm.c b/ext/opcache/shared_alloc_shm.c index 68a4b63a76e60..4d93b3f3f831c 100644 --- a/ext/opcache/shared_alloc_shm.c +++ b/ext/opcache/shared_alloc_shm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c index eba853cbc6e39..27f3d6cd13c47 100644 --- a/ext/opcache/shared_alloc_win32.c +++ b/ext/opcache/shared_alloc_win32.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c index 25dc3ecd6a58d..ab02079bd139a 100644 --- a/ext/opcache/zend_accelerator_blacklist.c +++ b/ext/opcache/zend_accelerator_blacklist.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_accelerator_blacklist.h b/ext/opcache/zend_accelerator_blacklist.h index 2b8e1856b722e..16c75bb3967b5 100644 --- a/ext/opcache/zend_accelerator_blacklist.h +++ b/ext/opcache/zend_accelerator_blacklist.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_accelerator_debug.c b/ext/opcache/zend_accelerator_debug.c index bd0a5bdb0a412..991f2329da9a4 100644 --- a/ext/opcache/zend_accelerator_debug.c +++ b/ext/opcache/zend_accelerator_debug.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_accelerator_debug.h b/ext/opcache/zend_accelerator_debug.h index 833cffd9d06c2..234d0367deb23 100644 --- a/ext/opcache/zend_accelerator_debug.h +++ b/ext/opcache/zend_accelerator_debug.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_accelerator_hash.c b/ext/opcache/zend_accelerator_hash.c index 85581eaa964fa..7cd9ef1ef45be 100644 --- a/ext/opcache/zend_accelerator_hash.c +++ b/ext/opcache/zend_accelerator_hash.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_accelerator_hash.h b/ext/opcache/zend_accelerator_hash.h index 83258c2f5a2fa..dc18ca54e1398 100644 --- a/ext/opcache/zend_accelerator_hash.h +++ b/ext/opcache/zend_accelerator_hash.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index 899fddc3f3832..2c5b829d57f81 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_accelerator_module.h b/ext/opcache/zend_accelerator_module.h index 6454699db300f..f7a186708e33c 100644 --- a/ext/opcache/zend_accelerator_module.h +++ b/ext/opcache/zend_accelerator_module.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index 7b04d0d2df44b..0ccd882c0b896 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_accelerator_util_funcs.h b/ext/opcache/zend_accelerator_util_funcs.h index 0666b17759fd0..30531fc2e7f54 100644 --- a/ext/opcache/zend_accelerator_util_funcs.h +++ b/ext/opcache/zend_accelerator_util_funcs.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -40,10 +40,3 @@ unsigned int zend_adler32(unsigned int checksum, signed char *buf, uint32_t len) unsigned int zend_accel_script_checksum(zend_persistent_script *persistent_script); #endif /* ZEND_ACCELERATOR_UTIL_FUNCS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 92a77ab7929b1..008e5007ac178 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_file_cache.h b/ext/opcache/zend_file_cache.h index f04a3af29f751..eb71e2cef5f26 100644 --- a/ext/opcache/zend_file_cache.h +++ b/ext/opcache/zend_file_cache.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index af9244bbf58d0..920843affa708 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_persist.h b/ext/opcache/zend_persist.h index d659b88f57762..78b6b0f6d9a09 100644 --- a/ext/opcache/zend_persist.h +++ b/ext/opcache/zend_persist.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c index a17d7c4627f6a..21f6d45b5b259 100644 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index 9fdc68e9dbb92..9f71cf673686b 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/opcache/zend_shared_alloc.h b/ext/opcache/zend_shared_alloc.h index 833e4a68fedf6..37f278db92942 100644 --- a/ext/opcache/zend_shared_alloc.h +++ b/ext/opcache/zend_shared_alloc.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | Zend OPcache | +----------------------------------------------------------------------+ - | Copyright (c) 1998-2018 The PHP Group | + | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 142324c23f0fb..942733fada822 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -6956,12 +6956,3 @@ PHP_FUNCTION(openssl_random_pseudo_bytes) } } /* }}} */ - -/* - * Local variables: - * tab-width: 8 - * c-basic-offset: 8 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h index 7147ae4a79653..7926b475e7bfa 100644 --- a/ext/openssl/php_openssl.h +++ b/ext/openssl/php_openssl.h @@ -182,10 +182,3 @@ PHP_FUNCTION(openssl_get_cert_locations); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index cbc78c565f7ed..31e6aa9ea8405 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -2739,12 +2739,3 @@ php_stream *php_openssl_ssl_socket_factory(const char *proto, size_t protolen, return stream; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index dc0afb8db6009..7a06e82398169 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1497,11 +1497,3 @@ static void pcntl_interrupt_function(zend_execute_data *execute_data) orig_interrupt_function(execute_data); } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h index ee8f1c1cfa0c9..2ddb45dbe8c94 100644 --- a/ext/pcntl/php_pcntl.h +++ b/ext/pcntl/php_pcntl.h @@ -97,12 +97,3 @@ ZEND_END_MODULE_GLOBALS(pcntl) #define REGISTER_PCNTL_ERRNO_CONSTANT(name) REGISTER_LONG_CONSTANT("PCNTL_" #name, name, CONST_CS | CONST_PERSISTENT) #endif /* PHP_PCNTL_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c index e3b6c30572c93..da7881b255556 100644 --- a/ext/pcntl/php_signal.c +++ b/ext/pcntl/php_signal.c @@ -65,12 +65,3 @@ Sigfunc *php_signal(int signo, Sigfunc *func, int restart) { return php_signal4(signo, func, restart, 0); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index 77ab9f5c600c6..cfacd6ca8e4c9 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -68,20 +68,18 @@ else AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ]) AC_DEFINE(PCRE2_CODE_UNIT_WIDTH, 8, [ ]) - if test "$PHP_PCRE_REGEX" != "no"; then - AC_MSG_CHECKING([whether to enable PCRE JIT functionality]) - if test "$PHP_PCRE_JIT" != "no"; then - AC_DEFINE(HAVE_PCRE_JIT_SUPPORT, 1, [ ]) - AC_MSG_RESULT([yes]) - else + AC_MSG_CHECKING([whether to enable PCRE JIT functionality]) + if test "$PHP_PCRE_JIT" != "no"; then + AC_DEFINE(HAVE_PCRE_JIT_SUPPORT, 1, [ ]) + AC_MSG_RESULT([yes]) + else AC_MSG_RESULT([no]) - fi fi fi PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR Enable PCRE valgrind support. Developers only!], no, no) - if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then + if test "$PHP_EXTERNAL_PCRE" != "no"; then AC_MSG_WARN([PHP is going to be linked with an external PCRE, --with-pcre-valgrind has no effect]) else if test "$PHP_PCRE_VALGRIND" != "no"; then diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index edbc2c90b47f0..35c9956fdb399 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -3057,12 +3057,3 @@ PHPAPI pcre2_code *php_pcre_pce_re(pcre_cache_entry *pce) }/*}}}*/ #endif /* HAVE_PCRE || HAVE_BUNDLED_PCRE */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/pdo/README b/ext/pdo/README index cb7b4297d4398..a778543822341 100644 --- a/ext/pdo/README +++ b/ext/pdo/README @@ -48,5 +48,3 @@ When the database handle is closed or destroyed (or at request end for persistent handles), the driver will implicitly rollBack(). It is your responsibility to call commit() when you are done making changes and autocommit is turned off. - -vim:tw=78:et diff --git a/ext/pdo/config.m4 b/ext/pdo/config.m4 index 91c977a7a95b4..511f33bbd7782 100644 --- a/ext/pdo/config.m4 +++ b/ext/pdo/config.m4 @@ -1,5 +1,4 @@ dnl config.m4 for extension pdo -dnl vim:se ts=2 sw=2 et: AC_DEFUN([PHP_PDO_PEAR_CHECK],[ pdo_running_under_pear=0 diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c index 8c5fc52e77aa1..ddd5a4d1bcafb 100644 --- a/ext/pdo/pdo.c +++ b/ext/pdo/pdo.c @@ -392,12 +392,3 @@ PHP_MINFO_FUNCTION(pdo) } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 7b3c306356dd6..5805a05686500 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -419,13 +419,13 @@ static zval *pdo_stmt_instantiate(pdo_dbh_t *dbh, zval *object, zend_class_entry static void pdo_stmt_construct(zend_execute_data *execute_data, pdo_stmt_t *stmt, zval *object, zend_class_entry *dbstmt_ce, zval *ctor_args) /* {{{ */ { zval query_string; - zval z_key; + zend_string *key; ZVAL_STRINGL(&query_string, stmt->query_string, stmt->query_stringlen); - ZVAL_STRINGL(&z_key, "queryString", sizeof("queryString") - 1); - zend_std_write_property(object, &z_key, &query_string, NULL); + key = zend_string_init("queryString", sizeof("queryString") - 1, 0); + zend_std_write_property(Z_OBJ_P(object), key, &query_string, NULL); zval_ptr_dtor(&query_string); - zval_ptr_dtor(&z_key); + zend_string_release_ex(key, 0); if (dbstmt_ce->constructor) { zend_fcall_info fci; @@ -1350,9 +1350,9 @@ static int dbh_compare(zval *object1, zval *object2) return -1; } -static HashTable *dbh_get_gc(zval *object, zval **gc_data, int *gc_count) +static HashTable *dbh_get_gc(zend_object *object, zval **gc_data, int *gc_count) { - pdo_dbh_t *dbh = Z_PDO_DBH_P(object); + pdo_dbh_t *dbh = php_pdo_dbh_fetch_inner(object); *gc_data = &dbh->def_stmt_ctor_args; *gc_count = 1; return zend_std_get_properties(object); @@ -1557,12 +1557,3 @@ ZEND_RSRC_DTOR_FUNC(php_pdo_pdbh_dtor) /* {{{ */ } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index 5a26cde862955..5950cdc38e657 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -414,12 +414,3 @@ clean_up: return ret; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker ft=c - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 6b8051e9def8d..50820499cfea5 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2176,30 +2176,26 @@ const zend_function_entry pdo_dbstmt_functions[] = { }; /* {{{ overloaded handlers for PDOStatement class */ -static zval *dbstmt_prop_write(zval *object, zval *member, zval *value, void **cache_slot) +static zval *dbstmt_prop_write(zend_object *object, zend_string *name, zval *value, void **cache_slot) { - pdo_stmt_t *stmt = Z_PDO_STMT_P(object); - - convert_to_string(member); + pdo_stmt_t *stmt = php_pdo_stmt_fetch_object(object); - if (strcmp(Z_STRVAL_P(member), "queryString") == 0) { + if (strcmp(ZSTR_VAL(name), "queryString") == 0) { pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "property queryString is read only"); return value; } else { - return zend_std_write_property(object, member, value, cache_slot); + return zend_std_write_property(object, name, value, cache_slot); } } -static void dbstmt_prop_delete(zval *object, zval *member, void **cache_slot) +static void dbstmt_prop_delete(zend_object *object, zend_string *name, void **cache_slot) { - pdo_stmt_t *stmt = Z_PDO_STMT_P(object); - - convert_to_string(member); + pdo_stmt_t *stmt = php_pdo_stmt_fetch_object(object); - if (strcmp(Z_STRVAL_P(member), "queryString") == 0) { + if (strcmp(ZSTR_VAL(name), "queryString") == 0) { pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "property queryString is read only"); } else { - zend_std_unset_property(object, member, cache_slot); + zend_std_unset_property(object, name, cache_slot); } } @@ -2246,16 +2242,16 @@ static int dbstmt_compare(zval *object1, zval *object2) return -1; } -static zend_object *dbstmt_clone_obj(zval *zobject) +static zend_object *dbstmt_clone_obj(zend_object *zobject) { pdo_stmt_t *stmt; pdo_stmt_t *old_stmt; - stmt = zend_object_alloc(sizeof(pdo_stmt_t), Z_OBJCE_P(zobject)); - zend_object_std_init(&stmt->std, Z_OBJCE_P(zobject)); - object_properties_init(&stmt->std, Z_OBJCE_P(zobject)); + stmt = zend_object_alloc(sizeof(pdo_stmt_t), zobject->ce); + zend_object_std_init(&stmt->std, zobject->ce); + object_properties_init(&stmt->std, zobject->ce); - old_stmt = Z_PDO_STMT_P(zobject); + old_stmt = php_pdo_stmt_fetch_object(zobject); zend_objects_clone_members(&stmt->std, &old_stmt->std); @@ -2454,12 +2450,44 @@ const zend_function_entry pdo_row_functions[] = { PHP_FE_END }; -static zval *row_prop_read(zval *object, zval *member, int type, void **cache_slot, zval *rv) +static zval *row_prop_read(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) { - pdo_row_t *row = (pdo_row_t *)Z_OBJ_P(object); + pdo_row_t *row = (pdo_row_t *)object; + pdo_stmt_t *stmt = row->stmt; + int colno = -1; + zend_long lval; + + ZVAL_NULL(rv); + if (stmt) { + if (is_numeric_string_ex(ZSTR_VAL(name), ZSTR_LEN(name), &lval, NULL, 0, NULL) == IS_LONG) { + if (lval >= 0 && lval < stmt->column_count) { + fetch_value(stmt, rv, lval, NULL); + } + } else { + /* TODO: replace this with a hash of available column names to column + * numbers */ + for (colno = 0; colno < stmt->column_count; colno++) { + if (ZSTR_LEN(stmt->columns[colno].name) == ZSTR_LEN(name) && + strncmp(ZSTR_VAL(stmt->columns[colno].name), ZSTR_VAL(name), ZSTR_LEN(name)) == 0) { + fetch_value(stmt, rv, colno, NULL); + return rv; + } + } + if (strcmp(ZSTR_VAL(name), "queryString") == 0) { + //zval_ptr_dtor(rv); + return zend_std_read_property(&stmt->std, name, type, cache_slot, rv); + } + } + } + + return rv; +} + +static zval *row_dim_read(zend_object *object, zval *member, int type, zval *rv) +{ + pdo_row_t *row = (pdo_row_t *)object; pdo_stmt_t *stmt = row->stmt; int colno = -1; - zval zobj; zend_long lval; ZVAL_NULL(rv); @@ -2485,9 +2513,8 @@ static zval *row_prop_read(zval *object, zval *member, int type, void **cache_sl } } if (strcmp(Z_STRVAL_P(member), "queryString") == 0) { - ZVAL_OBJ(&zobj, &stmt->std); //zval_ptr_dtor(rv); - return zend_std_read_property(&zobj, member, type, cache_slot, rv); + return zend_std_read_property(&stmt->std, Z_STR_P(member), type, NULL, rv); } } } @@ -2495,25 +2522,52 @@ static zval *row_prop_read(zval *object, zval *member, int type, void **cache_sl return rv; } -static zval *row_dim_read(zval *object, zval *member, int type, zval *rv) +static zval *row_prop_write(zend_object *object, zend_string *name, zval *value, void **cache_slot) { - return row_prop_read(object, member, type, NULL, rv); + php_error_docref(NULL, E_WARNING, "This PDORow is not from a writable result set"); + return value; } -static zval *row_prop_write(zval *object, zval *member, zval *value, void **cache_slot) +static void row_dim_write(zend_object *object, zval *member, zval *value) { php_error_docref(NULL, E_WARNING, "This PDORow is not from a writable result set"); - return value; } -static void row_dim_write(zval *object, zval *member, zval *value) +static int row_prop_exists(zend_object *object, zend_string *name, int check_empty, void **cache_slot) { - php_error_docref(NULL, E_WARNING, "This PDORow is not from a writable result set"); + pdo_row_t *row = (pdo_row_t *)object; + pdo_stmt_t *stmt = row->stmt; + int colno = -1; + zend_long lval; + + if (stmt) { + if (is_numeric_string_ex(ZSTR_VAL(name), ZSTR_LEN(name), &lval, NULL, 0, NULL) == IS_LONG) { + return lval >=0 && lval < stmt->column_count; + } + + /* TODO: replace this with a hash of available column names to column + * numbers */ + for (colno = 0; colno < stmt->column_count; colno++) { + if (ZSTR_LEN(stmt->columns[colno].name) == ZSTR_LEN(name) && + strncmp(ZSTR_VAL(stmt->columns[colno].name), ZSTR_VAL(name), ZSTR_LEN(name)) == 0) { + int res; + zval val; + + fetch_value(stmt, &val, colno, NULL); + res = check_empty ? i_zend_is_true(&val) : Z_TYPE(val) != IS_NULL; + zval_ptr_dtor_nogc(&val); + + return res; + } + } + } + + return 0; } -static int row_prop_exists(zval *object, zval *member, int check_empty, void **cache_slot) +static int row_dim_exists(zend_object *object, zval *member, int check_empty) { - pdo_row_t *row = (pdo_row_t *)Z_OBJ_P(object); + pdo_row_t *row = (pdo_row_t *)object; pdo_stmt_t *stmt = row->stmt; int colno = -1; zend_long lval; @@ -2549,24 +2603,19 @@ static int row_prop_exists(zval *object, zval *member, int check_empty, void **c return 0; } -static int row_dim_exists(zval *object, zval *member, int check_empty) -{ - return row_prop_exists(object, member, check_empty, NULL); -} - -static void row_prop_delete(zval *object, zval *offset, void **cache_slot) +static void row_prop_delete(zend_object *object, zend_string *offset, void **cache_slot) { php_error_docref(NULL, E_WARNING, "Cannot delete properties from a PDORow"); } -static void row_dim_delete(zval *object, zval *offset) +static void row_dim_delete(zend_object *object, zval *offset) { php_error_docref(NULL, E_WARNING, "Cannot delete properties from a PDORow"); } -static HashTable *row_get_properties_for(zval *object, zend_prop_purpose purpose) +static HashTable *row_get_properties_for(zend_object *object, zend_prop_purpose purpose) { - pdo_row_t *row = (pdo_row_t *)Z_OBJ_P(object); + pdo_row_t *row = (pdo_row_t *)object; pdo_stmt_t *stmt = row->stmt; HashTable *props; int i; @@ -2695,12 +2744,3 @@ void pdo_stmt_init(void) pdo_row_object_handlers.get_class_name = row_get_classname; pdo_row_object_handlers.compare_objects = row_compare; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo/php_pdo.h b/ext/pdo/php_pdo.h index 84c65b12ba23f..50d38dba8f66b 100644 --- a/ext/pdo/php_pdo.h +++ b/ext/pdo/php_pdo.h @@ -73,13 +73,3 @@ ZEND_END_MODULE_GLOBALS(pdo) #endif /* PHP_PDO_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index a86dab2117c11..d17b168c2d79b 100644 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -692,11 +692,3 @@ PDO_API void php_pdo_free_statement(pdo_stmt_t *stmt); #endif /* PHP_PDO_DRIVER_H */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo/php_pdo_error.h b/ext/pdo/php_pdo_error.h index 0b57e13ec1afc..b9702833dd208 100644 --- a/ext/pdo/php_pdo_error.h +++ b/ext/pdo/php_pdo_error.h @@ -35,11 +35,3 @@ PDO_API void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt); #define PDO_HANDLE_STMT_ERR() if (strcmp(stmt->error_code, PDO_ERR_NONE)) { pdo_handle_error(stmt->dbh, stmt); } #endif /* PHP_PDO_ERROR_H */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h index 1a6df1db4c945..20c373bd24de6 100644 --- a/ext/pdo/php_pdo_int.h +++ b/ext/pdo/php_pdo_int.h @@ -59,13 +59,3 @@ int pdo_sqlstate_init_error_table(void); void pdo_sqlstate_fini_error_table(void); const char *pdo_sqlstate_state_to_description(char *state); int pdo_hash_methods(pdo_dbh_object_t *dbh, int kind); - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo/tests/bug_34630.phpt b/ext/pdo/tests/bug_34630.phpt index 070217bafed1e..5642b2130e651 100644 --- a/ext/pdo/tests/bug_34630.phpt +++ b/ext/pdo/tests/bug_34630.phpt @@ -1,7 +1,7 @@ --TEST-- PDO Common: Bug #34630 (inserting streams as LOBs) --SKIPIF-- -setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL)) --SKIPIF-- -query() parameter parsing/checking needs an update) --SKIPIF-- - --REDIRECTTEST-- diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 9cbd28ac3eb08..6c83717e653c1 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -682,12 +682,3 @@ const pdo_driver_t pdo_firebird_driver = { /* {{{ */ pdo_firebird_handle_factory }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 8be52b53ddda6..2dec82b0ba596 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -787,12 +787,3 @@ const struct pdo_stmt_methods firebird_stmt_methods = { /* {{{ */ firebird_stmt_cursor_closer }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_firebird/pdo_firebird.c b/ext/pdo_firebird/pdo_firebird.c index 716d6ed9c7238..71dec4add2e8f 100644 --- a/ext/pdo_firebird/pdo_firebird.c +++ b/ext/pdo_firebird/pdo_firebird.c @@ -87,12 +87,3 @@ PHP_MINFO_FUNCTION(pdo_firebird) /* {{{ */ php_info_print_table_end(); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_firebird/php_pdo_firebird.h b/ext/pdo_firebird/php_pdo_firebird.h index b8d83aadafdf2..48ff715e8c9df 100644 --- a/ext/pdo_firebird/php_pdo_firebird.h +++ b/ext/pdo_firebird/php_pdo_firebird.h @@ -36,12 +36,3 @@ PHP_RSHUTDOWN_FUNCTION(pdo_firebird); PHP_MINFO_FUNCTION(pdo_firebird); #endif /* PHP_PDO_FIREBIRD_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h index 0a34883d29dea..3694d362c0cbf 100644 --- a/ext/pdo_firebird/php_pdo_firebird_int.h +++ b/ext/pdo_firebird/php_pdo_firebird_int.h @@ -143,12 +143,3 @@ enum { }; #endif /* PHP_PDO_FIREBIRD_INT_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_firebird/tests/common.phpt b/ext/pdo_firebird/tests/common.phpt index adad09df05aac..50db48d0d82b8 100644 --- a/ext/pdo_firebird/tests/common.phpt +++ b/ext/pdo_firebird/tests/common.phpt @@ -1,7 +1,7 @@ --TEST-- FIREBIRD --SKIPIF-- - --REDIRECTTEST-- # magic auto-configuration diff --git a/ext/pdo_mysql/config.m4 b/ext/pdo_mysql/config.m4 index 3e37a6adec777..45566615fa4f2 100644 --- a/ext/pdo_mysql/config.m4 +++ b/ext/pdo_mysql/config.m4 @@ -1,5 +1,4 @@ dnl config.m4 for extension pdo_mysql -dnl vim: se ts=2 sw=2 et: PHP_ARG_WITH(pdo-mysql, for MySQL support for PDO, [ --with-pdo-mysql[=DIR] PDO: MySQL support. DIR is the MySQL base directory diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 3ff594f2256e1..a0a3e35e24fd3 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -841,12 +841,3 @@ const pdo_driver_t pdo_mysql_driver = { PDO_DRIVER_HEADER(mysql), pdo_mysql_handle_factory }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 03df732dfa52e..ea4b13a5d227d 100644 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -934,12 +934,3 @@ const struct pdo_stmt_methods mysql_stmt_methods = { pdo_mysql_stmt_next_rowset, pdo_mysql_stmt_cursor_closer }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c index f51973f4bdf4f..54e1c931ceb4d 100644 --- a/ext/pdo_mysql/pdo_mysql.c +++ b/ext/pdo_mysql/pdo_mysql.c @@ -263,13 +263,3 @@ zend_module_entry pdo_mysql_module_entry = { STANDARD_MODULE_PROPERTIES_EX }; /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_mysql/php_pdo_mysql.h b/ext/pdo_mysql/php_pdo_mysql.h index 10905eb3ab9e2..fa34e70f3a6d8 100644 --- a/ext/pdo_mysql/php_pdo_mysql.h +++ b/ext/pdo_mysql/php_pdo_mysql.h @@ -37,13 +37,3 @@ extern zend_module_entry pdo_mysql_module_entry; #endif /* PHP_PDO_MYSQL_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_mysql/tests/common.phpt b/ext/pdo_mysql/tests/common.phpt index f55d1f883b482..0d002546e047e 100644 --- a/ext/pdo_mysql/tests/common.phpt +++ b/ext/pdo_mysql/tests/common.phpt @@ -1,7 +1,7 @@ --TEST-- MySQL --SKIPIF-- - --REDIRECTTEST-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt index 82806ce479f20..10ccba22911bc 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt @@ -1,7 +1,7 @@ --TEST-- MySQL: PDOStatement->getColumnMeta() --SKIPIF-- - --REDIRECTTEST-- # magic auto-configuration diff --git a/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt b/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt index 475b2b1798a7a..a973e9524fab1 100755 --- a/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt +++ b/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt @@ -1,7 +1,7 @@ --TEST-- PDO_OCI: PDOStatement->getColumnMeta --SKIPIF-- - --FILE-- diff --git a/ext/pdo_pgsql/config.m4 b/ext/pdo_pgsql/config.m4 index 523127de3d725..ad7bb9122255c 100644 --- a/ext/pdo_pgsql/config.m4 +++ b/ext/pdo_pgsql/config.m4 @@ -1,5 +1,4 @@ dnl config.m4 for extension pdo_pgsql -dnl vim:et:sw=2:ts=2: PHP_ARG_WITH(pdo-pgsql,for PostgreSQL support for PDO, [ --with-pdo-pgsql[=DIR] PDO: PostgreSQL support. DIR is the PostgreSQL base diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c index 6338ee7ebdc58..a27c1e85e74b2 100644 --- a/ext/pdo_pgsql/pdo_pgsql.c +++ b/ext/pdo_pgsql/pdo_pgsql.c @@ -110,12 +110,3 @@ PHP_MINFO_FUNCTION(pdo_pgsql) php_info_print_table_end(); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index aa4a969ad2f01..e61e82c642527 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -1263,12 +1263,3 @@ const pdo_driver_t pdo_pgsql_driver = { PDO_DRIVER_HEADER(pgsql), pdo_pgsql_handle_factory }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index dd30b58dac28f..107eceaa4bc74 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -727,12 +727,3 @@ const struct pdo_stmt_methods pgsql_stmt_methods = { NULL, /* next_rowset */ pdo_pgsql_stmt_cursor_closer }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_pgsql/php_pdo_pgsql.h b/ext/pdo_pgsql/php_pdo_pgsql.h index 31a4880d53791..e6d7c17058a01 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql.h +++ b/ext/pdo_pgsql/php_pdo_pgsql.h @@ -36,13 +36,3 @@ PHP_MSHUTDOWN_FUNCTION(pdo_pgsql); PHP_MINFO_FUNCTION(pdo_pgsql); #endif /* PHP_PDO_PGSQL_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h index 225bc1813190a..9b1f60549f287 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql_int.h +++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h @@ -110,12 +110,3 @@ php_stream *pdo_pgsql_create_lob_stream(zval *pdh, int lfd, Oid oid); extern const php_stream_ops pdo_pgsql_lob_stream_ops; #endif /* PHP_PDO_PGSQL_INT_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo_pgsql/tests/bug68199.phpt b/ext/pdo_pgsql/tests/bug68199.phpt index 9abfba2b8e659..b27d3ecf9d01b 100644 --- a/ext/pdo_pgsql/tests/bug68199.phpt +++ b/ext/pdo_pgsql/tests/bug68199.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #68199 (PDO::pgsqlGetNotify doesn't support NOTIFY payloads) --SKIPIF-- - --REDIRECTTEST-- # magic auto-configuration diff --git a/ext/pdo_pgsql/tests/config.inc b/ext/pdo_pgsql/tests/config.inc index 4fcfa470633dd..0fefe4664b8b6 100644 --- a/ext/pdo_pgsql/tests/config.inc +++ b/ext/pdo_pgsql/tests/config.inc @@ -1,4 +1,4 @@ - --FILE-- diff --git a/ext/pdo_sqlite/tests/bug35336.phpt b/ext/pdo_sqlite/tests/bug35336.phpt index 1f9fda12b6560..201429bc4ee27 100644 --- a/ext/pdo_sqlite/tests/bug35336.phpt +++ b/ext/pdo_sqlite/tests/bug35336.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #35336 (crash on PDO::FETCH_CLASS + __set()) --SKIPIF-- - --FILE-- diff --git a/ext/pdo_sqlite/tests/bug46542.phpt b/ext/pdo_sqlite/tests/bug46542.phpt index 2de0c051910ec..d324270f2ae16 100644 --- a/ext/pdo_sqlite/tests/bug46542.phpt +++ b/ext/pdo_sqlite/tests/bug46542.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #46542 Extending PDO class with a __call() function --SKIPIF-- - --FILE-- diff --git a/ext/pdo_sqlite/tests/bug52487.phpt b/ext/pdo_sqlite/tests/bug52487.phpt index fc65bd3b603af..4861f6204fe07 100644 --- a/ext/pdo_sqlite/tests/bug52487.phpt +++ b/ext/pdo_sqlite/tests/bug52487.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #52487 (PDO::FETCH_INTO leaks memory) --SKIPIF-- - --FILE-- diff --git a/ext/pdo_sqlite/tests/common.phpt b/ext/pdo_sqlite/tests/common.phpt index da28d91950cde..9c07a5dc38964 100644 --- a/ext/pdo_sqlite/tests/common.phpt +++ b/ext/pdo_sqlite/tests/common.phpt @@ -1,7 +1,7 @@ --TEST-- SQLite --SKIPIF-- - --REDIRECTTEST-- return array( diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 01381fc0a1609..03669de0884ca 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -7194,12 +7194,3 @@ PHP_FUNCTION(pg_select) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c index 985f0f6db044a..ba06fcea63b00 100644 --- a/ext/phar/dirstream.c +++ b/ext/phar/dirstream.c @@ -666,12 +666,3 @@ int phar_wrapper_rmdir(php_stream_wrapper *wrapper, const char *url, int options return 1; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/dirstream.h b/ext/phar/dirstream.h index c6ff4b161d6af..fa512183f7e9a 100644 --- a/ext/phar/dirstream.h +++ b/ext/phar/dirstream.h @@ -34,12 +34,3 @@ static int phar_dir_seek( php_stream *stream, zend_off_t offset, int whence, php_stream* phar_wrapper_open_dir(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC); #endif END_EXTERN_C() - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 4531c710f8f2f..210d0794712ab 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -1155,12 +1155,3 @@ void phar_restore_orig_functions(void) /* {{{ */ PHAR_G(orig_stat) = phar_orig_functions.orig_stat; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/func_interceptors.h b/ext/phar/func_interceptors.h index 93294231c7254..8bbfaae5c332d 100644 --- a/ext/phar/func_interceptors.h +++ b/ext/phar/func_interceptors.h @@ -25,12 +25,3 @@ void phar_intercept_functions_shutdown(void); void phar_save_orig_functions(void); void phar_restore_orig_functions(void); END_EXTERN_C() - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 2762096cfb7c9..85194e7dc7638 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -3637,12 +3637,3 @@ zend_module_entry phar_module_entry = { STANDARD_MODULE_PROPERTIES_EX }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h index f4dcaead46648..dd44b209aaef3 100644 --- a/ext/phar/phar_internal.h +++ b/ext/phar/phar_internal.h @@ -606,12 +606,3 @@ typedef enum { phar_path_check_result phar_path_check(char **p, size_t *len, const char **error); END_EXTERN_C() - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index cd15e519e07c1..560576ca5281b 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1224,7 +1224,7 @@ PHP_METHOD(Phar, __construct) ZVAL_STRINGL(&arg1, fname, fname_len); ZVAL_LONG(&arg2, flags); - zend_call_method_with_2_params(zobj, Z_OBJCE_P(zobj), + zend_call_method_with_2_params(Z_OBJ_P(zobj), Z_OBJCE_P(zobj), &spl_ce_RecursiveDirectoryIterator->constructor, "__construct", NULL, &arg1, &arg2); zval_ptr_dtor(&arg1); @@ -1733,7 +1733,7 @@ PHP_METHOD(Phar, buildFromDirectory) ZVAL_STRINGL(&arg, dir, dir_len); ZVAL_LONG(&arg2, SPL_FILE_DIR_SKIPDOTS|SPL_FILE_DIR_UNIXPATHS); - zend_call_method_with_2_params(&iter, spl_ce_RecursiveDirectoryIterator, + zend_call_method_with_2_params(Z_OBJ(iter), spl_ce_RecursiveDirectoryIterator, &spl_ce_RecursiveDirectoryIterator->constructor, "__construct", NULL, &arg, &arg2); zval_ptr_dtor(&arg); @@ -1749,7 +1749,7 @@ PHP_METHOD(Phar, buildFromDirectory) RETURN_FALSE; } - zend_call_method_with_1_params(&iteriter, spl_ce_RecursiveIteratorIterator, + zend_call_method_with_1_params(Z_OBJ(iteriter), spl_ce_RecursiveIteratorIterator, &spl_ce_RecursiveIteratorIterator->constructor, "__construct", NULL, &iter); if (EG(exception)) { @@ -1772,7 +1772,7 @@ PHP_METHOD(Phar, buildFromDirectory) ZVAL_STRINGL(&arg2, regex, regex_len); - zend_call_method_with_2_params(®exiter, spl_ce_RegexIterator, + zend_call_method_with_2_params(Z_OBJ(regexiter), spl_ce_RegexIterator, &spl_ce_RegexIterator->constructor, "__construct", NULL, &iteriter, &arg2); zval_ptr_dtor(&arg2); } @@ -2223,7 +2223,7 @@ static zend_object *phar_rename_archive(phar_archive_data **sphar, char *ext) /* ZVAL_STRINGL(&arg1, phar->fname, phar->fname_len); - zend_call_method_with_1_params(&ret, ce, &ce->constructor, "__construct", NULL, &arg1); + zend_call_method_with_1_params(Z_OBJ(ret), ce, &ce->constructor, "__construct", NULL, &arg1); zval_ptr_dtor(&arg1); return Z_OBJ(ret); } @@ -4480,7 +4480,7 @@ PHP_METHOD(PharFileInfo, __construct) ZVAL_STRINGL(&arg1, fname, fname_len); - zend_call_method_with_1_params(zobj, Z_OBJCE_P(zobj), + zend_call_method_with_1_params(Z_OBJ_P(zobj), Z_OBJCE_P(zobj), &spl_ce_SplFileInfo->constructor, "__construct", NULL, &arg1); zval_ptr_dtor(&arg1); @@ -5435,12 +5435,3 @@ void phar_object_init(void) /* {{{ */ REGISTER_PHAR_CLASS_CONST_LONG(phar_ce_archive, "SHA512", PHAR_SIG_SHA512) } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/pharzip.h b/ext/phar/pharzip.h index 37bdf28db50a0..100de6f436f96 100644 --- a/ext/phar/pharzip.h +++ b/ext/phar/pharzip.h @@ -231,11 +231,3 @@ typedef struct _phar_zip_dir_end { char comment_len[2]; /* .ZIP file comment length 2 bytes */ /* .ZIP file comment (variable size) */ } phar_zip_dir_end; -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/php_phar.h b/ext/phar/php_phar.h index 0a76ae3f5e340..c9c28ef28ed90 100644 --- a/ext/phar/php_phar.h +++ b/ext/phar/php_phar.h @@ -35,13 +35,3 @@ extern zend_module_entry phar_module_entry; PHP_PHAR_API int phar_resolve_alias(char *alias, size_t alias_len, char **filename, size_t *filename_len); #endif /* PHP_PHAR_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/stream.c b/ext/phar/stream.c index 8f0db6ed65e36..c5d2cffba1060 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -967,12 +967,3 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from return 1; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/stream.h b/ext/phar/stream.h index 5472d559ac4ef..54f6c0e428196 100644 --- a/ext/phar/stream.h +++ b/ext/phar/stream.h @@ -35,12 +35,3 @@ static int phar_stream_flush(php_stream *stream); static int phar_stream_seek( php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffset); static int phar_stream_stat( php_stream *stream, php_stream_statbuf *ssb); END_EXTERN_C() - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/tar.c b/ext/phar/tar.c index bce66f0c3b1ad..426944c5ea215 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -1359,12 +1359,3 @@ int phar_tar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int return EOF; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/util.c b/ext/phar/util.c index 6af4879c2d026..24ecb56030c59 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -2088,12 +2088,3 @@ int phar_copy_on_write(phar_archive_data **pphar) /* {{{ */ return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/phar/zip.c b/ext/phar/zip.c index bbafd8836e4c4..93b867e6e16f9 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -1533,12 +1533,3 @@ int phar_zip_flush(phar_archive_data *phar, char *user_stub, zend_long len, int return EOF; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/posix/posix.c b/ext/posix/posix.c index b07abf81e4d54..3e723043948b2 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -1474,12 +1474,3 @@ PHP_FUNCTION(posix_initgroups) } /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/posix/tests/posix_getgrgid_variation.phpt b/ext/posix/tests/posix_getgrgid_variation.phpt deleted file mode 100644 index 9bf807ad142d1..0000000000000 --- a/ext/posix/tests/posix_getgrgid_variation.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test posix_getgrgid() function : usage variations - parameter types ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for gid - -foreach($values as $value) { - echo "\nArg value $value \n"; - $result = posix_getgrgid($value); - if ((is_array($result) && (count($result) == 4)) - || - ($result === false)) { - echo "valid output\n"; - } else { - var_dump($result); - } -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getgrgid() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -valid output - -Arg value -10.5 -valid output - -Arg value 101234567000 - -Warning: posix_getgrgid() expects parameter 1 to be int, float given in %s on line %d -valid output - -Arg value 1.07654321E-9 -valid output - -Arg value 0.5 -valid output - -Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d - -Arg value Array - -Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d - -Arg value Array - -Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d - -Arg value Array - -Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d - -Arg value Array - -Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d - -Arg value Array - -Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value - -Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value - -Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_getpgid_variation.phpt b/ext/posix/tests/posix_getpgid_variation.phpt deleted file mode 100644 index 6a5e7fd5a9c68..0000000000000 --- a/ext/posix/tests/posix_getpgid_variation.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test posix_getpgid() function : variation ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for gid - -foreach($values as $value) { - echo "\nArg value $value \n"; - $result = posix_getpgid($value); - if (is_int($result) || $result === false) { - echo "valid output\n"; - } else { - var_dump($result); - } -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getpgid() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -valid output - -Arg value -10.5 -valid output - -Arg value 101234567000 - -Warning: posix_getpgid() expects parameter 1 to be int, float given in %s on line %d -valid output - -Arg value 1.07654321E-9 -valid output - -Arg value 0.5 -valid output - -Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d - -Arg value Array - -Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d - -Arg value Array - -Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d - -Arg value Array - -Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d - -Arg value Array - -Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d - -Arg value Array - -Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value - -Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value - -Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_getpwuid_variation.phpt b/ext/posix/tests/posix_getpwuid_variation.phpt deleted file mode 100644 index ca57d2cc83be3..0000000000000 --- a/ext/posix/tests/posix_getpwuid_variation.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test posix_getpwuid() function : usage variations - parameter types ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for uid - -foreach($values as $value) { - echo "\nArg value $value \n"; - $result = posix_getpwuid($value); - if ((is_array($result) && (count($result) == 7)) - || - ($result === false)) { - echo "valid output\n"; - } else { - var_dump($result); - } -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_getpwuid() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -valid output - -Arg value -10.5 -valid output - -Arg value 101234567000 - -Warning: posix_getpwuid() expects parameter 1 to be int, float given in %s on line %d -valid output - -Arg value 1.07654321E-9 -valid output - -Arg value 0.5 -valid output - -Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d - -Arg value Array - -Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d - -Arg value Array - -Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d - -Arg value Array - -Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d - -Arg value Array - -Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d - -Arg value Array - -Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value 1 -valid output - -Arg value -valid output - -Arg value - -Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value - -Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value string - -Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d -valid output - -Arg value -valid output - -Arg value -valid output - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_kill_variation1.phpt b/ext/posix/tests/posix_kill_variation1.phpt deleted file mode 100644 index 25a123cf049c5..0000000000000 --- a/ext/posix/tests/posix_kill_variation1.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test posix_kill() function : usage variations - first parameter type ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for pid - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( posix_kill($value, $sig) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_kill() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -bool(false) - -Arg value -10.5 -bool(false) - -Arg value 101234567000 - -Warning: posix_kill() expects parameter 1 to be int, float given in %s on line %d -bool(false) - -Arg value 1.07654321E-9 -bool(false) - -Arg value 0.5 -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation1.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation1.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation1.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation1.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation1.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value - -Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Arg value - -Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Arg value string - -Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Arg value string - -Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_kill_variation2.phpt b/ext/posix/tests/posix_kill_variation2.phpt deleted file mode 100644 index 8ca0d9f3c29f6..0000000000000 --- a/ext/posix/tests/posix_kill_variation2.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test posix_kill() function : usage variations - second parameter type ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for sig - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( posix_kill($pid, $value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_kill() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -bool(false) - -Arg value -10.5 -bool(false) - -Arg value 101234567000 - -Warning: posix_kill() expects parameter 2 to be int, float given in %s on line %d -bool(false) - -Arg value 1.07654321E-9 -bool(false) - -Arg value 0.5 -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation2.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation2.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation2.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation2.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d -bool(false) - -Notice: Array to string conversion in %sposix_kill_variation2.php on line %d - -Arg value Array - -Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value - -Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d -bool(false) - -Arg value - -Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d -bool(false) - -Arg value string - -Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d -bool(false) - -Arg value string - -Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_seteuid_error2.phpt b/ext/posix/tests/posix_seteuid_error2.phpt deleted file mode 100644 index b56046d326c16..0000000000000 --- a/ext/posix/tests/posix_seteuid_error2.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -Test function posix_seteuid() by substituting argument 1 with object values. ---SKIPIF-- - ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---FILE-- - new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_seteuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with object values *** -Error: 2 - posix_seteuid() expects parameter 1 to be int, object given, %s -bool(false) -Error: 2 - posix_seteuid() expects parameter 1 to be int, object given, %s -bool(false) diff --git a/ext/posix/tests/posix_seteuid_variation3.phpt b/ext/posix/tests/posix_seteuid_variation3.phpt deleted file mode 100644 index d4c16514e371a..0000000000000 --- a/ext/posix/tests/posix_seteuid_variation3.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function posix_seteuid() by substituting argument 1 with emptyUnsetUndefNull values. ---SKIPIF-- - ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---FILE-- - @$unset_var, - 'undefined var' => @$undefined_var, - 'empty string DQ' => "", - 'empty string SQ' => '', - 'uppercase NULL' => NULL, - 'lowercase null' => null, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_seteuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with emptyUnsetUndefNull values *** -bool(false) -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 22 -bool(false) - -Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 22 -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_setgid_variation3.phpt b/ext/posix/tests/posix_setgid_variation3.phpt deleted file mode 100644 index 92580c9373fff..0000000000000 --- a/ext/posix/tests/posix_setgid_variation3.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function posix_setgid() by substituting argument 1 with emptyUnsetUndefNull values. ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---SKIPIF-- - ---FILE-- - @$unset_var, - 'undefined var' => @$undefined_var, - 'empty string DQ' => "", - 'empty string SQ' => '', - 'uppercase NULL' => NULL, - 'lowercase null' => null, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setgid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with emptyUnsetUndefNull values *** -bool(false) -bool(false) - -Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_setgid_variation6.phpt b/ext/posix/tests/posix_setgid_variation6.phpt deleted file mode 100644 index 6be85e7a85ce4..0000000000000 --- a/ext/posix/tests/posix_setgid_variation6.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -Test function posix_setgid() by substituting argument 1 with object values. ---SKIPIF-- - ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---FILE-- - new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setgid( $var ) ); -} -?> -===DONE=== ---EXPECTF-- -*** Test substituting argument 1 with object values *** -Error: 2 - posix_setgid() expects parameter 1 to be int, object given, %s -bool(false) -Error: 2 - posix_setgid() expects parameter 1 to be int, object given, %s -bool(false) -===DONE=== - diff --git a/ext/posix/tests/posix_setuid_error2.phpt b/ext/posix/tests/posix_setuid_error2.phpt deleted file mode 100644 index 7775f09b0c1cd..0000000000000 --- a/ext/posix/tests/posix_setuid_error2.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -Test function posix_setuid() by substituting argument 1 with object values. ---SKIPIF-- - ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---FILE-- - new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with object values *** -Error: 2 - posix_setuid() expects parameter 1 to be int, object given, %s -bool(false) -Error: 2 - posix_setuid() expects parameter 1 to be int, object given, %s -bool(false) diff --git a/ext/posix/tests/posix_setuid_variation3.phpt b/ext/posix/tests/posix_setuid_variation3.phpt deleted file mode 100644 index 03368650620f8..0000000000000 --- a/ext/posix/tests/posix_setuid_variation3.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function posix_setuid() by substituting argument 1 with emptyUnsetUndefNull values. ---SKIPIF-- - ---CREDITS-- -Marco Fabbri mrfabbri@gmail.com -Francesco Fullone ff@ideato.it -#PHPTestFest Cesena Italia on 2009-06-20 ---FILE-- - @$unset_var, - 'undefined var' => @$undefined_var, - 'empty string DQ' => "", - 'empty string SQ' => '', - 'uppercase NULL' => NULL, - 'lowercase null' => null, - ); - - -foreach ( $variation_array as $var ) { - var_dump(posix_setuid( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with emptyUnsetUndefNull values *** -bool(false) -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 22 -bool(false) - -Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 22 -bool(false) -bool(false) -bool(false) diff --git a/ext/posix/tests/posix_strerror_variation1.phpt b/ext/posix/tests/posix_strerror_variation1.phpt deleted file mode 100644 index e8da057c7f203..0000000000000 --- a/ext/posix/tests/posix_strerror_variation1.phpt +++ /dev/null @@ -1,181 +0,0 @@ ---TEST-- -Test posix_strerror() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // object data - new stdclass(), -); - -// loop through each element of the array for errno - -foreach($values as $value) { - echo "\nArg value $value \n"; - echo gettype( posix_strerror($value) )."\n"; -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing posix_strerror() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -Arg value 10.5 -string - -Arg value -10.5 -string - -Arg value 101234567000 - -Warning: posix_strerror() expects parameter 1 to be int, float given in %s on line %d -boolean - -Arg value 1.07654321E-9 -string - -Arg value 0.5 -string - -Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d - -Arg value Array - -Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d -boolean - -Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d - -Arg value Array - -Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d -boolean - -Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d - -Arg value Array - -Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d -boolean - -Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d - -Arg value Array - -Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d -boolean - -Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d - -Arg value Array - -Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d -boolean - -Arg value -string - -Arg value -string - -Arg value 1 -string - -Arg value -string - -Arg value 1 -string - -Arg value -string - -Arg value - -Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d -boolean - -Arg value - -Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d -boolean - -Arg value string - -Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d -boolean - -Arg value string - -Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d -boolean - -Arg value -string - -Arg value -string - -Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d diff --git a/ext/posix/tests/posix_ttyname_variation6.phpt b/ext/posix/tests/posix_ttyname_variation6.phpt index eecae6769e2ba..691c5eea7ee3a 100644 --- a/ext/posix/tests/posix_ttyname_variation6.phpt +++ b/ext/posix/tests/posix_ttyname_variation6.phpt @@ -18,7 +18,7 @@ echo "*** Test substituting argument 1 with object values ***\n"; -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index 6208f378846cf..4e5e34e6b5653 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -915,12 +915,3 @@ static PHP_MINFO_FUNCTION(pspell) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 76c8c03033f68..70bfd275bdcb3 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -662,10 +662,3 @@ PHP_FUNCTION(readline_on_new_line) #endif /* HAVE_LIBREADLINE */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c index e13111e489147..f55de8e4f9627 100644 --- a/ext/readline/readline_cli.c +++ b/ext/readline/readline_cli.c @@ -795,12 +795,3 @@ PHP_MINFO_FUNCTION(cli_readline) DISPLAY_INI_ENTRIES(); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/recode/recode.c b/ext/recode/recode.c index 74bd2aea6a6a2..5330a6e20a34b 100644 --- a/ext/recode/recode.c +++ b/ext/recode/recode.c @@ -230,10 +230,3 @@ PHP_FUNCTION(recode_file) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index ac31f9e5c4367..92d9d9138a2c9 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -43,11 +43,8 @@ #include "zend_smart_str.h" #define reflection_update_property(object, name, value) do { \ - zval member; \ - ZVAL_STR(&member, name); \ - zend_std_write_property(object, &member, value, NULL); \ + zend_std_write_property(Z_OBJ_P(object), name, value, NULL); \ Z_TRY_DELREF_P(value); \ - zval_ptr_dtor(&member); \ } while (0) #define reflection_update_property_name(object, value) \ @@ -236,9 +233,9 @@ static void reflection_free_objects_storage(zend_object *object) /* {{{ */ } /* }}} */ -static HashTable *reflection_get_gc(zval *obj, zval **gc_data, int *gc_data_count) /* {{{ */ +static HashTable *reflection_get_gc(zend_object *obj, zval **gc_data, int *gc_data_count) /* {{{ */ { - reflection_object *intern = Z_REFLECTION_P(obj); + reflection_object *intern = reflection_object_from_obj(obj); *gc_data = &intern->obj; *gc_data_count = 1; return zend_std_get_properties(obj); @@ -435,7 +432,7 @@ static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, char smart_str_append_printf(str, "%s }\n", indent); if (obj && Z_TYPE_P(obj) == IS_OBJECT) { - HashTable *properties = Z_OBJ_HT_P(obj)->get_properties(obj); + HashTable *properties = Z_OBJ_HT_P(obj)->get_properties(Z_OBJ_P(obj)); zend_string *prop_name; smart_str prop_str = {0}; @@ -1843,7 +1840,7 @@ ZEND_METHOD(reflection_function, invoke) if (!Z_ISUNDEF(intern->obj)) { Z_OBJ_HT(intern->obj)->get_closure( - &intern->obj, &fcc.called_scope, &fcc.function_handler, &fcc.object); + Z_OBJ(intern->obj), &fcc.called_scope, &fcc.function_handler, &fcc.object); } result = zend_call_function(&fci, &fcc); @@ -1906,7 +1903,7 @@ ZEND_METHOD(reflection_function, invokeArgs) if (!Z_ISUNDEF(intern->obj)) { Z_OBJ_HT(intern->obj)->get_closure( - &intern->obj, &fcc.called_scope, &fcc.function_handler, &fcc.object); + Z_OBJ(intern->obj), &fcc.called_scope, &fcc.function_handler, &fcc.object); } result = zend_call_function(&fci, &fcc); @@ -4180,7 +4177,6 @@ ZEND_METHOD(reflection_class, hasProperty) zend_property_info *property_info; zend_class_entry *ce; zend_string *name; - zval property; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &name) == FAILURE) { return; @@ -4194,12 +4190,9 @@ ZEND_METHOD(reflection_class, hasProperty) RETURN_TRUE; } else { if (Z_TYPE(intern->obj) != IS_UNDEF) { - ZVAL_STR_COPY(&property, name); - if (Z_OBJ_HANDLER(intern->obj, has_property)(&intern->obj, &property, 2, NULL)) { - zval_ptr_dtor(&property); + if (Z_OBJ_HANDLER(intern->obj, has_property)(Z_OBJ(intern->obj), name, 2, NULL)) { RETURN_TRUE; } - zval_ptr_dtor(&property); } RETURN_FALSE; } @@ -4229,7 +4222,7 @@ ZEND_METHOD(reflection_class, getProperty) } } else if (Z_TYPE(intern->obj) != IS_UNDEF) { /* Check for dynamic properties */ - if (zend_hash_exists(Z_OBJ_HT(intern->obj)->get_properties(&intern->obj), name)) { + if (zend_hash_exists(Z_OBJ_HT(intern->obj)->get_properties(Z_OBJ(intern->obj)), name)) { zend_property_info property_info_tmp; property_info_tmp.flags = ZEND_ACC_PUBLIC; property_info_tmp.name = name; @@ -4343,7 +4336,7 @@ ZEND_METHOD(reflection_class, getProperties) } ZEND_HASH_FOREACH_END(); if (Z_TYPE(intern->obj) != IS_UNDEF && (filter & ZEND_ACC_PUBLIC) != 0) { - HashTable *properties = Z_OBJ_HT(intern->obj)->get_properties(&intern->obj); + HashTable *properties = Z_OBJ_HT(intern->obj)->get_properties(Z_OBJ(intern->obj)); zval *prop; ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) { _adddynproperty(prop, key, ce, return_value); @@ -5248,7 +5241,7 @@ ZEND_METHOD(reflection_property, __construct) && property_info->ce != ce)) { /* Check for dynamic properties */ if (property_info == NULL && Z_TYPE_P(classname) == IS_OBJECT) { - if (zend_hash_exists(Z_OBJ_HT_P(classname)->get_properties(classname), name)) { + if (zend_hash_exists(Z_OBJ_HT_P(classname)->get_properties(Z_OBJ_P(classname)), name)) { dynam_prop = 1; } } @@ -5514,7 +5507,6 @@ ZEND_METHOD(reflection_property, isInitialized) } RETURN_FALSE; } else { - zval name_zv; zend_class_entry *old_scope; int retval; @@ -5529,8 +5521,7 @@ ZEND_METHOD(reflection_property, isInitialized) old_scope = EG(fake_scope); EG(fake_scope) = intern->ce; - ZVAL_STR(&name_zv, ref->unmangled_name); - retval = Z_OBJ_HT_P(object)->has_property(object, &name_zv, ZEND_PROPERTY_EXISTS, NULL); + retval = Z_OBJ_HT_P(object)->has_property(Z_OBJ_P(object), ref->unmangled_name, ZEND_PROPERTY_EXISTS, NULL); EG(fake_scope) = old_scope; RETVAL_BOOL(retval); @@ -6644,20 +6635,19 @@ static const zend_function_entry reflection_ext_functions[] = { /* {{{ */ }; /* }}} */ /* {{{ _reflection_write_property */ -static zval *_reflection_write_property(zval *object, zval *member, zval *value, void **cache_slot) +static zval *_reflection_write_property(zend_object *object, zend_string *name, zval *value, void **cache_slot) { - if ((Z_TYPE_P(member) == IS_STRING) - && zend_hash_exists(&Z_OBJCE_P(object)->properties_info, Z_STR_P(member)) - && ((Z_STRLEN_P(member) == sizeof("name") - 1 && !memcmp(Z_STRVAL_P(member), "name", sizeof("name"))) - || (Z_STRLEN_P(member) == sizeof("class") - 1 && !memcmp(Z_STRVAL_P(member), "class", sizeof("class"))))) + if (zend_hash_exists(&object->ce->properties_info, name) + && ((ZSTR_LEN(name) == sizeof("name") - 1 && !memcmp(ZSTR_VAL(name), "name", sizeof("name"))) + || (ZSTR_LEN(name) == sizeof("class") - 1 && !memcmp(ZSTR_VAL(name), "class", sizeof("class"))))) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Cannot set read-only property %s::$%s", ZSTR_VAL(Z_OBJCE_P(object)->name), Z_STRVAL_P(member)); + "Cannot set read-only property %s::$%s", ZSTR_VAL(object->ce->name), ZSTR_VAL(name)); return &EG(uninitialized_zval); } else { - return zend_std_write_property(object, member, value, cache_slot); + return zend_std_write_property(object, name, value, cache_slot); } } /* }}} */ @@ -6799,12 +6789,3 @@ zend_module_entry reflection_module_entry = { /* {{{ */ PHP_REFLECTION_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: noet sw=4 ts=4 fdm=marker - */ diff --git a/ext/reflection/php_reflection.h b/ext/reflection/php_reflection.h index 9619c94df376b..82dacb55010ad 100644 --- a/ext/reflection/php_reflection.h +++ b/ext/reflection/php_reflection.h @@ -49,11 +49,3 @@ PHPAPI void zend_reflection_class_factory(zend_class_entry *ce, zval *object); END_EXTERN_C() #endif /* PHP_REFLECTION_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index ef1e074f22e36..552d990fe39f9 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -713,12 +713,3 @@ PS_VALIDATE_SID_FUNC(files) return ps_files_key_exists(data, ZSTR_VAL(key)); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c index 4033fc1df3551..93cfde7633a11 100644 --- a/ext/session/mod_mm.c +++ b/ext/session/mod_mm.c @@ -493,12 +493,3 @@ PS_CREATE_SID_FUNC(mm) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index c39971f1347cc..c899fe2901d20 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -266,12 +266,3 @@ PS_UPDATE_TIMESTAMP_FUNC(user) FINISH; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/session/session.c b/ext/session/session.c index 90e4a026d3d0f..124b470205741 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2344,30 +2344,31 @@ static PHP_FUNCTION(session_cache_limiter) Return the current cache expire. If new_cache_expire is given, the current cache_expire is replaced with new_cache_expire */ static PHP_FUNCTION(session_cache_expire) { - zval *expires = NULL; - zend_string *ini_name; + zend_long expires; + zend_bool expires_is_null = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &expires) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &expires, &expires_is_null) == FAILURE) { return; } - if (expires && PS(session_status) == php_session_active) { + if (!expires_is_null && PS(session_status) == php_session_active) { php_error_docref(NULL, E_WARNING, "Cannot change cache expire when session is active"); RETURN_LONG(PS(cache_expire)); } - if (expires && SG(headers_sent)) { + if (!expires_is_null && SG(headers_sent)) { php_error_docref(NULL, E_WARNING, "Cannot change cache expire when headers already sent"); RETURN_FALSE; } RETVAL_LONG(PS(cache_expire)); - if (expires) { - convert_to_string_ex(expires); - ini_name = zend_string_init("session.cache_expire", sizeof("session.cache_expire") - 1, 0); - zend_alter_ini_entry(ini_name, Z_STR_P(expires), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME); + if (!expires_is_null) { + zend_string *ini_name = zend_string_init("session.cache_expire", sizeof("session.cache_expire") - 1, 0); + zend_string *ini_value = zend_long_to_str(expires); + zend_alter_ini_entry(ini_name, ini_value, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME); zend_string_release_ex(ini_name, 0); + zend_string_release_ex(ini_value, 0); } } /* }}} */ @@ -3357,12 +3358,3 @@ ZEND_TSRMLS_CACHE_DEFINE() #endif ZEND_GET_MODULE(session) #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/session/tests/session_cache_expire_error.phpt b/ext/session/tests/session_cache_expire_error.phpt index 5ae5d95637a6c..484d4220fc075 100644 --- a/ext/session/tests/session_cache_expire_error.phpt +++ b/ext/session/tests/session_cache_expire_error.phpt @@ -120,7 +120,7 @@ int(-10) int(%s) -- Iteration 9 -- -int(1) +int(0) -- Iteration 10 -- int(0) @@ -141,22 +141,34 @@ int(0) int(1) -- Iteration 16 -- -int(0) + +Warning: session_cache_expire() expects parameter 1 to be int, string given in %s on line %d +NULL -- Iteration 17 -- -int(0) + +Warning: session_cache_expire() expects parameter 1 to be int, string given in %s on line %d +NULL -- Iteration 18 -- -int(0) + +Warning: session_cache_expire() expects parameter 1 to be int, string given in %s on line %d +NULL -- Iteration 19 -- -int(0) + +Warning: session_cache_expire() expects parameter 1 to be int, string given in %s on line %d +NULL -- Iteration 20 -- -int(0) + +Warning: session_cache_expire() expects parameter 1 to be int, string given in %s on line %d +NULL -- Iteration 21 -- -int(0) + +Warning: session_cache_expire() expects parameter 1 to be int, object given in %s on line %d +NULL -- Iteration 22 -- int(0) @@ -165,5 +177,7 @@ int(0) int(0) -- Iteration 24 -- -int(0) + +Warning: session_cache_expire() expects parameter 1 to be int, resource given in %s on line %d +NULL Done diff --git a/ext/session/tests/session_commit_error.phpt b/ext/session/tests/session_commit_error.phpt deleted file mode 100644 index c71cee34ebe38..0000000000000 --- a/ext/session/tests/session_commit_error.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test session_commit() function : error functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_commit() : error functionality *** - --- Iteration 1 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 2 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 3 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 4 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 5 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 6 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 7 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 8 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 9 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 10 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 11 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 12 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 13 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 14 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 15 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 16 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 17 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 18 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 19 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 20 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 21 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 22 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 23 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 24 -- - -Warning: session_commit() expects exactly 0 parameters, 1 given in %s on line 82 -NULL -Done diff --git a/ext/session/tests/session_decode_error.phpt b/ext/session/tests/session_decode_error.phpt deleted file mode 100644 index 72bc25976b0b1..0000000000000 --- a/ext/session/tests/session_decode_error.phpt +++ /dev/null @@ -1,223 +0,0 @@ ---TEST-- -Test session_decode() function : error functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_decode() : error functionality *** -bool(true) - --- Iteration 1 -- -bool(true) -array(0) { -} - --- Iteration 2 -- -bool(true) -array(0) { -} - --- Iteration 3 -- -bool(true) -array(0) { -} - --- Iteration 4 -- -bool(true) -array(0) { -} - --- Iteration 5 -- -bool(true) -array(0) { -} - --- Iteration 6 -- -bool(true) -array(0) { -} - --- Iteration 7 -- -bool(true) -array(0) { -} - --- Iteration 8 -- -bool(true) -array(0) { -} - --- Iteration 9 -- -bool(true) -array(0) { -} - --- Iteration 10 -- -bool(true) -array(0) { -} - --- Iteration 11 -- -bool(true) -array(0) { -} - --- Iteration 12 -- -bool(true) -array(0) { -} - --- Iteration 13 -- -bool(true) -array(0) { -} - --- Iteration 14 -- -bool(true) -array(0) { -} - --- Iteration 15 -- -bool(true) -array(0) { -} - --- Iteration 16 -- -bool(true) -array(0) { -} - --- Iteration 17 -- -bool(true) -array(0) { -} - --- Iteration 18 -- -bool(true) -array(0) { -} - --- Iteration 19 -- -bool(true) -array(0) { -} - --- Iteration 20 -- -bool(true) -array(0) { -} - --- Iteration 21 -- -bool(true) -array(0) { -} - --- Iteration 22 -- -bool(true) -array(0) { -} - --- Iteration 23 -- -bool(true) -array(0) { -} - --- Iteration 24 -- - -Warning: session_decode() expects parameter 1 to be string, resource given in %s on line %d -NULL -array(0) { -} -bool(true) -Done diff --git a/ext/session/tests/session_encode_error.phpt b/ext/session/tests/session_encode_error.phpt deleted file mode 100644 index bbd26f92f77cd..0000000000000 --- a/ext/session/tests/session_encode_error.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test session_encode() function : basic functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_encode() : basic functionality *** - --- Iteration 1 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: session_encode() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/session/tests/session_get_cookie_params_error.phpt b/ext/session/tests/session_get_cookie_params_error.phpt deleted file mode 100644 index d5b987fb579f6..0000000000000 --- a/ext/session/tests/session_get_cookie_params_error.phpt +++ /dev/null @@ -1,216 +0,0 @@ ---TEST-- -Test session_get_cookie_params() function : error functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_get_cookie_params() : error functionality *** - --- Iteration 1 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: session_get_cookie_params() expects exactly 0 parameters, 1 given in %s on line %d -NULL -Done diff --git a/ext/session/tests/session_id_error.phpt b/ext/session/tests/session_id_error.phpt deleted file mode 100644 index 7a323bc3c1e8e..0000000000000 --- a/ext/session/tests/session_id_error.phpt +++ /dev/null @@ -1,171 +0,0 @@ ---TEST-- -Test session_id() function : error functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_id() : error functionality *** - --- Iteration 1 -- -string(0) "" - --- Iteration 2 -- -string(1) "0" - --- Iteration 3 -- -string(1) "1" - --- Iteration 4 -- -string(5) "12345" - --- Iteration 5 -- -string(5) "-2345" - --- Iteration 6 -- -string(4) "10.5" - --- Iteration 7 -- -string(5) "-10.5" - --- Iteration 8 -- -string(12) "123456789000" - --- Iteration 9 -- -string(13) "1.23456789E-9" - --- Iteration 10 -- -string(3) "0.5" - --- Iteration 11 -- -string(0) "" - --- Iteration 12 -- -string(0) "" - --- Iteration 13 -- -string(1) "1" - --- Iteration 14 -- -string(0) "" - --- Iteration 15 -- -string(1) "1" - --- Iteration 16 -- -string(0) "" - --- Iteration 17 -- -string(0) "" - --- Iteration 18 -- -string(0) "" - --- Iteration 19 -- -string(7) "Nothing" - --- Iteration 20 -- -string(7) "Nothing" - --- Iteration 21 -- -string(12) "Hello World!" - --- Iteration 22 -- -string(12) "Hello World!" - --- Iteration 23 -- -string(0) "" - --- Iteration 24 -- - -Warning: session_id() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/session/tests/session_module_name_error.phpt b/ext/session/tests/session_module_name_error.phpt deleted file mode 100644 index 6940445969fcd..0000000000000 --- a/ext/session/tests/session_module_name_error.phpt +++ /dev/null @@ -1,216 +0,0 @@ ---TEST-- -Test session_module_name() function : error functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_module_name() : error functionality *** - --- Iteration 1 -- - -Warning: session_module_name(): Cannot find named PHP session module (0) in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: session_module_name(): Cannot find named PHP session module (1) in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: session_module_name(): Cannot find named PHP session module (12345) in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: session_module_name(): Cannot find named PHP session module (-2345) in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: session_module_name(): Cannot find named PHP session module (10.5) in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: session_module_name(): Cannot find named PHP session module (-10.5) in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: session_module_name(): Cannot find named PHP session module (123456789000) in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: session_module_name(): Cannot find named PHP session module (1.23456789E-9) in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: session_module_name(): Cannot find named PHP session module (0.5) in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: session_module_name(): Cannot find named PHP session module (1) in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: session_module_name(): Cannot find named PHP session module (1) in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: session_module_name(): Cannot find named PHP session module (Nothing) in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: session_module_name(): Cannot find named PHP session module (Nothing) in %s on line %d -bool(false) - --- Iteration 20 -- - -Warning: session_module_name(): Cannot find named PHP session module (Hello World!) in %s on line %d -bool(false) - --- Iteration 21 -- - -Warning: session_module_name(): Cannot find named PHP session module (Hello World!) in %s on line %d -bool(false) - --- Iteration 22 -- - -Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: session_module_name() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/session/tests/session_name_error.phpt b/ext/session/tests/session_name_error.phpt deleted file mode 100644 index 641d8b6b93fae..0000000000000 --- a/ext/session/tests/session_name_error.phpt +++ /dev/null @@ -1,236 +0,0 @@ ---TEST-- -Test session_name() function : error functionality ---INI-- -session.save_path= -session.name=PHPSESSID ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_name() : error functionality *** - --- Iteration 1 -- - -Warning: session_name(): session.name cannot be a numeric or empty '0' in %s on line %d -int(0) -string(9) "PHPSESSID" - --- Iteration 2 -- - -Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d -int(1) -string(9) "PHPSESSID" - --- Iteration 3 -- - -Warning: session_name(): session.name cannot be a numeric or empty '12345' in %s on line %d -int(12345) -string(9) "PHPSESSID" - --- Iteration 4 -- - -Warning: session_name(): session.name cannot be a numeric or empty '-2345' in %s on line %d -int(-2345) -string(9) "PHPSESSID" - --- Iteration 5 -- - -Warning: session_name(): session.name cannot be a numeric or empty '10.5' in %s on line %d -float(10.5) -string(9) "PHPSESSID" - --- Iteration 6 -- - -Warning: session_name(): session.name cannot be a numeric or empty '-10.5' in %s on line %d -float(-10.5) -string(9) "PHPSESSID" - --- Iteration 7 -- - -Warning: session_name(): session.name cannot be a numeric or empty '123456789000' in %s on line %d -float(123456789000) -string(9) "PHPSESSID" - --- Iteration 8 -- - -Warning: session_name(): session.name cannot be a numeric or empty '1.23456789E-9' in %s on line %d -float(1.23456789E-9) -string(9) "PHPSESSID" - --- Iteration 9 -- - -Warning: session_name(): session.name cannot be a numeric or empty '0.5' in %s on line %d -float(0.5) -string(9) "PHPSESSID" - --- Iteration 10 -- - -Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d -NULL -string(9) "PHPSESSID" - --- Iteration 11 -- - -Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d -NULL -string(9) "PHPSESSID" - --- Iteration 12 -- - -Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d -bool(true) -string(9) "PHPSESSID" - --- Iteration 13 -- - -Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d -bool(false) -string(9) "PHPSESSID" - --- Iteration 14 -- - -Warning: session_name(): session.name cannot be a numeric or empty '1' in %s on line %d -bool(true) -string(9) "PHPSESSID" - --- Iteration 15 -- - -Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d -bool(false) -string(9) "PHPSESSID" - --- Iteration 16 -- - -Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d -string(0) "" -string(9) "PHPSESSID" - --- Iteration 17 -- - -Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d -string(0) "" -string(9) "PHPSESSID" - --- Iteration 18 -- -string(7) "Nothing" -string(9) "PHPSESSID" - --- Iteration 19 -- -string(7) "Nothing" -string(7) "Nothing" - --- Iteration 20 -- -string(12) "Hello World!" -string(7) "Nothing" - --- Iteration 21 -- -object(classA)#1 (0) { -} -string(12) "Hello World!" - --- Iteration 22 -- - -Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d -NULL -string(12) "Hello World!" - --- Iteration 23 -- - -Warning: session_name(): session.name cannot be a numeric or empty '' in %s on line %d -NULL -string(12) "Hello World!" - --- Iteration 24 -- - -Warning: session_name() expects parameter 1 to be string, resource given in %s on line %d -resource(%d) of type (stream) -NULL -Done diff --git a/ext/session/tests/session_regenerate_id_error.phpt b/ext/session/tests/session_regenerate_id_error.phpt deleted file mode 100644 index b3def66b539fc..0000000000000 --- a/ext/session/tests/session_regenerate_id_error.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test session_regenerate_id() function : error functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_regenerate_id() : error functionality *** - --- Iteration 1 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 20 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 21 -- - -Warning: session_regenerate_id() expects parameter 1 to be bool, object given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: session_regenerate_id() expects parameter 1 to be bool, resource given in %s on line %d -NULL -Done diff --git a/ext/session/tests/session_save_path_error.phpt b/ext/session/tests/session_save_path_error.phpt deleted file mode 100644 index 1df2c76cce7e4..0000000000000 --- a/ext/session/tests/session_save_path_error.phpt +++ /dev/null @@ -1,176 +0,0 @@ ---TEST-- -Test session_save_path() function : error functionality ---INI-- -session.gc_probability=0 -session.save_path= -session.name=PHPSESSID -session.save_handler=files ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_save_path() : error functionality *** - --- Iteration 1 -- -string(0) "" - --- Iteration 2 -- -string(1) "0" - --- Iteration 3 -- -string(1) "1" - --- Iteration 4 -- -string(5) "12345" - --- Iteration 5 -- -string(5) "-2345" - --- Iteration 6 -- -string(4) "10.5" - --- Iteration 7 -- -string(5) "-10.5" - --- Iteration 8 -- -string(12) "123456789000" - --- Iteration 9 -- -string(13) "1.23456789E-9" - --- Iteration 10 -- -string(3) "0.5" - --- Iteration 11 -- -string(0) "" - --- Iteration 12 -- -string(0) "" - --- Iteration 13 -- -string(1) "1" - --- Iteration 14 -- -string(0) "" - --- Iteration 15 -- -string(1) "1" - --- Iteration 16 -- -string(0) "" - --- Iteration 17 -- -string(0) "" - --- Iteration 18 -- -string(0) "" - --- Iteration 19 -- -string(7) "Nothing" - --- Iteration 20 -- -string(7) "Nothing" - --- Iteration 21 -- -string(12) "Hello World!" - --- Iteration 22 -- -string(12) "Hello World!" - --- Iteration 23 -- -string(0) "" - --- Iteration 24 -- - -Warning: session_save_path() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/session/tests/session_start_error.phpt b/ext/session/tests/session_start_error.phpt deleted file mode 100644 index c81a7d2fdea6e..0000000000000 --- a/ext/session/tests/session_start_error.phpt +++ /dev/null @@ -1,290 +0,0 @@ ---TEST-- -Test session_start() function : error functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_start() : error functionality *** - --- Iteration 1 -- - -Warning: session_start() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: session_start() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: session_start() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: session_start() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: session_start() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: session_start() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: session_start() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: session_start() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: session_start() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: session_start() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: session_start() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: session_start() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: session_start() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: session_start() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: session_start() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: session_start() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 20 -- - -Warning: session_start() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 21 -- - -Warning: session_start() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 22 -- - -Warning: session_start() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: session_start() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: session_start() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d -bool(false) -Done diff --git a/ext/session/tests/session_unset_error.phpt b/ext/session/tests/session_unset_error.phpt deleted file mode 100644 index c411cffa469b3..0000000000000 --- a/ext/session/tests/session_unset_error.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test session_unset() function : error functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_unset() : error functionality *** - --- Iteration 1 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 2 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 3 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 4 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 5 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 6 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 7 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 8 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 9 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 10 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 11 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 12 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 13 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 14 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 15 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 16 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 17 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 18 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 19 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 20 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 21 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 22 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 23 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 24 -- - -Warning: session_unset() expects exactly 0 parameters, 1 given in %s on line 82 -NULL -Done diff --git a/ext/session/tests/session_write_close_error.phpt b/ext/session/tests/session_write_close_error.phpt deleted file mode 100644 index 5e48d8c0008c7..0000000000000 --- a/ext/session/tests/session_write_close_error.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test session_write_close() function : error functionality ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -*** Testing session_write_close() : error functionality *** - --- Iteration 1 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 2 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 3 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 4 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 5 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 6 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 7 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 8 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 9 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 10 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 11 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 12 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 13 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 14 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 15 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 16 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 17 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 18 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 19 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 20 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 21 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 22 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 23 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL - --- Iteration 24 -- - -Warning: session_write_close() expects exactly 0 parameters, 1 given in %s on line 82 -NULL -Done diff --git a/ext/shmop/php_shmop.h b/ext/shmop/php_shmop.h index cd17017103eac..1aafa6c6f43ec 100644 --- a/ext/shmop/php_shmop.h +++ b/ext/shmop/php_shmop.h @@ -68,11 +68,3 @@ typedef struct { #endif #endif /* PHP_SHMOP_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 89e2380f60cb5..8a4c0b87633ba 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -359,12 +359,3 @@ PHP_FUNCTION(shmop_delete) /* }}} */ #endif /* HAVE_SHMOP */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h index cea64cdc29648..c3c3c2f1b31b4 100644 --- a/ext/simplexml/php_simplexml.h +++ b/ext/simplexml/php_simplexml.h @@ -88,13 +88,3 @@ typedef struct { PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/simplexml/php_simplexml_exports.h b/ext/simplexml/php_simplexml_exports.h index 1ae01bbb6b891..20e9785162313 100644 --- a/ext/simplexml/php_simplexml_exports.h +++ b/ext/simplexml/php_simplexml_exports.h @@ -55,13 +55,3 @@ PHP_SXE_API void php_sxe_rewind_iterator(php_sxe_object *sxe); PHP_SXE_API void php_sxe_move_forward_iterator(php_sxe_object *sxe); #endif /* PHP_SIMPLEXML_EXPORTS_H */ - -/** - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * indent-tabs-mode: t - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 3bb601be825fb..cf459311b7f1b 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -50,7 +50,7 @@ PHP_SXE_API zend_class_entry *sxe_get_element_class_entry() /* {{{ */ static php_sxe_object* php_sxe_object_new(zend_class_entry *ce, zend_function *fptr_count); static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data); static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data); -static zval *sxe_get_value(zval *z, zval *rv); +static zval *sxe_get_value(zend_object *z, zval *rv); static void php_sxe_iterator_dtor(zend_object_iterator *iter); static int php_sxe_iterator_valid(zend_object_iterator *iter); static zval *php_sxe_iterator_current_data(zend_object_iterator *iter); @@ -228,7 +228,7 @@ static xmlNodePtr sxe_get_element_by_name(php_sxe_object *sxe, xmlNodePtr node, /* {{{ sxe_prop_dim_read() */ -static zval *sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, zend_bool attribs, int type, zval *rv) +static zval *sxe_prop_dim_read(zend_object *object, zval *member, zend_bool elements, zend_bool attribs, int type, zval *rv) { php_sxe_object *sxe; char *name; @@ -238,7 +238,7 @@ static zval *sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, z int nodendx = 0; int test = 0; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); if (!member) { if (sxe->iter.type == SXE_ITER_ATTRLIST) { @@ -365,15 +365,17 @@ static zval *sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, z /* {{{ sxe_property_read() */ -static zval *sxe_property_read(zval *object, zval *member, int type, void **cache_slot, zval *rv) +static zval *sxe_property_read(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) { - return sxe_prop_dim_read(object, member, 1, 0, type, rv); + zval member; + ZVAL_STR(&member, name); + return sxe_prop_dim_read(object, &member, 1, 0, type, rv); } /* }}} */ /* {{{ sxe_dimension_read() */ -static zval *sxe_dimension_read(zval *object, zval *offset, int type, zval *rv) +static zval *sxe_dimension_read(zend_object *object, zval *offset, int type, zval *rv) { return sxe_prop_dim_read(object, offset, 0, 1, type, rv); } @@ -415,7 +417,7 @@ static void change_node_zval(xmlNodePtr node, zval *value) /* {{{ sxe_property_write() */ -static zval *sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_bool elements, zend_bool attribs, xmlNodePtr *pnewnode) +static zval *sxe_prop_dim_write(zend_object *object, zval *member, zval *value, zend_bool elements, zend_bool attribs, xmlNodePtr *pnewnode) { php_sxe_object *sxe; xmlNodePtr node; @@ -432,7 +434,7 @@ static zval *sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_bo zval tmp_zv, zval_copy; zend_string *trim_str; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); if (!member) { if (sxe->iter.type == SXE_ITER_ATTRLIST) { @@ -517,7 +519,7 @@ static zval *sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_bo break; case IS_OBJECT: if (Z_OBJCE_P(value) == sxe_class_entry) { - value = sxe_get_value(value, &zval_copy); + value = sxe_get_value(Z_OBJ_P(value), &zval_copy); new_value = 1; break; } @@ -648,40 +650,42 @@ static zval *sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_bo /* {{{ sxe_property_write() */ -static zval *sxe_property_write(zval *object, zval *member, zval *value, void **cache_slot) +static zval *sxe_property_write(zend_object *object, zend_string *name, zval *value, void **cache_slot) { - zval *retval = sxe_prop_dim_write(object, member, value, 1, 0, NULL); - + zval member; + ZVAL_STR(&member, name); + zval *retval = sxe_prop_dim_write(object, &member, value, 1, 0, NULL); return retval == &EG(error_zval) ? &EG(uninitialized_zval) : retval; } /* }}} */ /* {{{ sxe_dimension_write() */ -static void sxe_dimension_write(zval *object, zval *offset, zval *value) +static void sxe_dimension_write(zend_object *object, zval *offset, zval *value) { sxe_prop_dim_write(object, offset, value, 0, 1, NULL); } /* }}} */ -static zval *sxe_property_get_adr(zval *object, zval *member, int fetch_type, void **cache_slot) /* {{{ */ +static zval *sxe_property_get_adr(zend_object *object, zend_string *zname, int fetch_type, void **cache_slot) /* {{{ */ { php_sxe_object *sxe; xmlNodePtr node; zval ret; char *name; SXE_ITER type; + zval member; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); GET_NODE(sxe, node); - convert_to_string(member); - name = Z_STRVAL_P(member); + name = ZSTR_VAL(zname); node = sxe_get_element_by_name(sxe, node, &name, &type); if (node) { return NULL; } - if (sxe_prop_dim_write(object, member, NULL, 1, 0, &node) == &EG(error_zval)) { + ZVAL_STR(&member, zname); + if (sxe_prop_dim_write(object, &member, NULL, 1, 0, &node) == &EG(error_zval)) { return NULL; } type = SXE_ITER_NONE; @@ -701,7 +705,7 @@ static zval *sxe_property_get_adr(zval *object, zval *member, int fetch_type, vo /* {{{ sxe_prop_dim_exists() */ -static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend_bool elements, zend_bool attribs) +static int sxe_prop_dim_exists(zend_object *object, zval *member, int check_empty, zend_bool elements, zend_bool attribs) { php_sxe_object *sxe; xmlNodePtr node; @@ -715,7 +719,7 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend member = &tmp_zv; } - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); GET_NODE(sxe, node); @@ -803,15 +807,17 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend /* {{{ sxe_property_exists() */ -static int sxe_property_exists(zval *object, zval *member, int check_empty, void **cache_slot) +static int sxe_property_exists(zend_object *object, zend_string *name, int check_empty, void **cache_slot) { - return sxe_prop_dim_exists(object, member, check_empty, 1, 0); + zval member; + ZVAL_STR(&member, name); + return sxe_prop_dim_exists(object, &member, check_empty, 1, 0); } /* }}} */ /* {{{ sxe_dimension_exists() */ -static int sxe_dimension_exists(zval *object, zval *member, int check_empty) +static int sxe_dimension_exists(zend_object *object, zval *member, int check_empty) { return sxe_prop_dim_exists(object, member, check_empty, 0, 1); } @@ -819,7 +825,7 @@ static int sxe_dimension_exists(zval *object, zval *member, int check_empty) /* {{{ sxe_prop_dim_delete() */ -static void sxe_prop_dim_delete(zval *object, zval *member, zend_bool elements, zend_bool attribs) +static void sxe_prop_dim_delete(zend_object *object, zval *member, zend_bool elements, zend_bool attribs) { php_sxe_object *sxe; xmlNodePtr node; @@ -834,7 +840,7 @@ static void sxe_prop_dim_delete(zval *object, zval *member, zend_bool elements, member = &tmp_zv; } - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); GET_NODE(sxe, node); @@ -926,15 +932,17 @@ static void sxe_prop_dim_delete(zval *object, zval *member, zend_bool elements, /* {{{ sxe_property_delete() */ -static void sxe_property_delete(zval *object, zval *member, void **cache_slot) +static void sxe_property_delete(zend_object *object, zend_string *name, void **cache_slot) { - sxe_prop_dim_delete(object, member, 1, 0); + zval member; + ZVAL_STR(&member, name); + sxe_prop_dim_delete(object, &member, 1, 0); } /* }}} */ /* {{{ sxe_dimension_unset() */ -static void sxe_dimension_delete(zval *object, zval *offset) +static void sxe_dimension_delete(zend_object *object, zval *offset) { sxe_prop_dim_delete(object, offset, 0, 1); } @@ -1008,7 +1016,7 @@ static void sxe_properties_add(HashTable *rv, char *name, int namelen, zval *val } /* }}} */ -static int sxe_prop_is_empty(zval *object) /* {{{ */ +static int sxe_prop_is_empty(zend_object *object) /* {{{ */ { php_sxe_object *sxe; xmlNodePtr node; @@ -1017,7 +1025,7 @@ static int sxe_prop_is_empty(zval *object) /* {{{ */ int test; int is_empty; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); GET_NODE(sxe, node); if (!node) { @@ -1099,7 +1107,7 @@ static int sxe_prop_is_empty(zval *object) /* {{{ */ } /* }}} */ -static HashTable *sxe_get_prop_hash(zval *object, int is_debug) /* {{{ */ +static HashTable *sxe_get_prop_hash(zend_object *object, int is_debug) /* {{{ */ { zval value; zval zattr; @@ -1115,7 +1123,7 @@ static HashTable *sxe_get_prop_hash(zval *object, int is_debug) /* {{{ */ use_iter = 0; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); if (is_debug) { rv = zend_new_array(0); @@ -1229,9 +1237,9 @@ static HashTable *sxe_get_prop_hash(zval *object, int is_debug) /* {{{ */ } /* }}} */ -static HashTable *sxe_get_gc(zval *object, zval **table, int *n) /* {{{ */ { +static HashTable *sxe_get_gc(zend_object *object, zval **table, int *n) /* {{{ */ { php_sxe_object *sxe; - sxe = Z_SXEOBJ_P(object); + sxe = php_sxe_fetch_object(object); *table = NULL; *n = 0; @@ -1239,13 +1247,13 @@ static HashTable *sxe_get_gc(zval *object, zval **table, int *n) /* {{{ */ { } /* }}} */ -static HashTable *sxe_get_properties(zval *object) /* {{{ */ +static HashTable *sxe_get_properties(zend_object *object) /* {{{ */ { return sxe_get_prop_hash(object, 0); } /* }}} */ -static HashTable * sxe_get_debug_info(zval *object, int *is_temp) /* {{{ */ +static HashTable * sxe_get_debug_info(zend_object *object, int *is_temp) /* {{{ */ { *is_temp = 1; return sxe_get_prop_hash(object, 1); @@ -1855,14 +1863,14 @@ static int cast_object(zval *object, int type, char *contents) /* {{{ sxe_object_cast() */ -static int sxe_object_cast_ex(zval *readobj, zval *writeobj, int type) +static int sxe_object_cast_ex(zend_object *readobj, zval *writeobj, int type) { php_sxe_object *sxe; xmlChar *contents = NULL; xmlNodePtr node; int rv; - sxe = Z_SXEOBJ_P(readobj); + sxe = php_sxe_fetch_object(readobj); if (type == _IS_BOOL) { node = php_sxe_get_first_node(sxe, NULL); @@ -1904,7 +1912,7 @@ static int sxe_object_cast_ex(zval *readobj, zval *writeobj, int type) /* }}} */ /* {{{ Variant of sxe_object_cast_ex that handles overwritten __toString() method */ -static int sxe_object_cast(zval *readobj, zval *writeobj, int type) +static int sxe_object_cast(zend_object *readobj, zval *writeobj, int type) { if (type == IS_STRING && zend_std_cast_object_tostring(readobj, writeobj, IS_STRING) == SUCCESS @@ -1920,7 +1928,7 @@ static int sxe_object_cast(zval *readobj, zval *writeobj, int type) Returns the string content */ SXE_METHOD(__toString) { - if (sxe_object_cast_ex(ZEND_THIS, return_value, IS_STRING) != SUCCESS) { + if (sxe_object_cast_ex(Z_OBJ_P(ZEND_THIS), return_value, IS_STRING) != SUCCESS) { zval_ptr_dtor(return_value); RETURN_EMPTY_STRING(); } @@ -1954,10 +1962,10 @@ static int php_sxe_count_elements_helper(php_sxe_object *sxe, zend_long *count) } /* }}} */ -static int sxe_count_elements(zval *object, zend_long *count) /* {{{ */ +static int sxe_count_elements(zend_object *object, zend_long *count) /* {{{ */ { php_sxe_object *intern; - intern = Z_SXEOBJ_P(object); + intern = php_sxe_fetch_object(object); if (intern->fptr_count) { zval rv; zend_call_method_with_0_params(object, intern->zo.ce, &intern->fptr_count, "count", &rv); @@ -1989,9 +1997,9 @@ SXE_METHOD(count) } /* }}} */ -static zval *sxe_get_value(zval *z, zval *rv) /* {{{ */ +static zval *sxe_get_value(zend_object *zobj, zval *rv) /* {{{ */ { - if (sxe_object_cast_ex(z, rv, IS_STRING) == FAILURE) { + if (sxe_object_cast_ex(zobj, rv, IS_STRING) == FAILURE) { zend_error(E_ERROR, "Unable to cast node to string"); /* FIXME: Should not be fatal */ } @@ -2005,9 +2013,9 @@ static zend_object_handlers sxe_object_handlers; /* {{{ sxe_object_clone() */ static zend_object * -sxe_object_clone(zval *object) +sxe_object_clone(zend_object *object) { - php_sxe_object *sxe = Z_SXEOBJ_P(object); + php_sxe_object *sxe = php_sxe_fetch_object(object); php_sxe_object *clone; xmlNodePtr nodep = NULL; xmlDocPtr docp = NULL; @@ -2745,13 +2753,3 @@ PHP_MINFO_FUNCTION(simplexml) /* }}} */ #endif - -/** - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * indent-tabs-mode: t - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/simplexml/sxe.c b/ext/simplexml/sxe.c index 4c2f42baf8eb4..c60e37e264d3b 100644 --- a/ext/simplexml/sxe.c +++ b/ext/simplexml/sxe.c @@ -206,12 +206,3 @@ PHP_MINIT_FUNCTION(sxe) /* {{{ */ return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/simplexml/sxe.h b/ext/simplexml/sxe.h index 867f251c8a6c1..6806553acc0f8 100644 --- a/ext/simplexml/sxe.h +++ b/ext/simplexml/sxe.h @@ -27,12 +27,3 @@ extern PHP_SXE_API zend_class_entry *ce_SimpleXMLElement; PHP_MINIT_FUNCTION(sxe); #endif /* SXE_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/skeleton/php_skeleton.h b/ext/skeleton/php_skeleton.h index 35e094d66113b..2fa9abe545bc1 100644 --- a/ext/skeleton/php_skeleton.h +++ b/ext/skeleton/php_skeleton.h @@ -13,4 +13,3 @@ ZEND_TSRMLS_CACHE_EXTERN() # endif #endif /* PHP_%EXTNAMECAPS%_H */ -%FOOTER% diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c index 12c8ee4fa92ad..2c03ea9fd5ae6 100644 --- a/ext/skeleton/skeleton.c +++ b/ext/skeleton/skeleton.c @@ -107,4 +107,3 @@ ZEND_TSRMLS_CACHE_DEFINE() # endif ZEND_GET_MODULE(%EXTNAME%) #endif -%FOOTER% diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 49fd7502e5d42..a68ea14e5c144 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -1911,22 +1911,16 @@ void php_snmp_add_property(HashTable *h, const char *name, size_t name_length, p /* {{{ php_snmp_read_property(zval *object, zval *member, int type[, const zend_literal *key]) Generic object property reader */ -zval *php_snmp_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) +zval *php_snmp_read_property(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) { - zval tmp_member; zval *retval; php_snmp_object *obj; php_snmp_prop_handler *hnd; int ret; - obj = Z_SNMP_P(object); + obj = php_snmp_fetch_object(object); - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - } - - hnd = zend_hash_find_ptr(&php_snmp_properties, Z_STR_P(member)); + hnd = zend_hash_find_ptr(&php_snmp_properties, name); if (hnd && hnd->read_func) { ret = hnd->read_func(obj, rv); @@ -1936,11 +1930,7 @@ zval *php_snmp_read_property(zval *object, zval *member, int type, void **cache_ retval = &EG(uninitialized_zval); } } else { - retval = zend_std_read_property(object, member, type, cache_slot, rv); - } - - if (member == &tmp_member) { - zval_ptr_dtor(member); + retval = zend_std_read_property(object, name, type, cache_slot, rv); } return retval; @@ -1949,20 +1939,14 @@ zval *php_snmp_read_property(zval *object, zval *member, int type, void **cache_ /* {{{ php_snmp_write_property(zval *object, zval *member, zval *value[, const zend_literal *key]) Generic object property writer */ -zval *php_snmp_write_property(zval *object, zval *member, zval *value, void **cache_slot) +zval *php_snmp_write_property(zend_object *object, zend_string *name, zval *value, void **cache_slot) { - zval tmp_member; php_snmp_object *obj; php_snmp_prop_handler *hnd; - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - } - - obj = Z_SNMP_P(object); + obj = php_snmp_fetch_object(object); - hnd = zend_hash_find_ptr(&php_snmp_properties, Z_STR_P(member)); + hnd = zend_hash_find_ptr(&php_snmp_properties, name); if (hnd && hnd->write_func) { hnd->write_func(obj, value); @@ -1973,11 +1957,7 @@ zval *php_snmp_write_property(zval *object, zval *member, zval *value, void **ca } */ } else { - value = zend_std_write_property(object, member, value, cache_slot); - } - - if (member == &tmp_member) { - zval_ptr_dtor(member); + value = zend_std_write_property(object, name, value, cache_slot); } return value; @@ -1986,19 +1966,19 @@ zval *php_snmp_write_property(zval *object, zval *member, zval *value, void **ca /* {{{ php_snmp_has_property(zval *object, zval *member, int has_set_exists[, const zend_literal *key]) Generic object property checker */ -static int php_snmp_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) +static int php_snmp_has_property(zend_object *object, zend_string *name, int has_set_exists, void **cache_slot) { zval rv; php_snmp_prop_handler *hnd; int ret = 0; - if ((hnd = zend_hash_find_ptr(&php_snmp_properties, Z_STR_P(member))) != NULL) { + if ((hnd = zend_hash_find_ptr(&php_snmp_properties, name)) != NULL) { switch (has_set_exists) { case ZEND_PROPERTY_EXISTS: ret = 1; break; case ZEND_PROPERTY_ISSET: { - zval *value = php_snmp_read_property(object, member, BP_VAR_IS, cache_slot, &rv); + zval *value = php_snmp_read_property(object, name, BP_VAR_IS, cache_slot, &rv); if (value != &EG(uninitialized_zval)) { ret = Z_TYPE_P(value) != IS_NULL? 1 : 0; zval_ptr_dtor(value); @@ -2006,7 +1986,7 @@ static int php_snmp_has_property(zval *object, zval *member, int has_set_exists, break; } default: { - zval *value = php_snmp_read_property(object, member, BP_VAR_IS, cache_slot, &rv); + zval *value = php_snmp_read_property(object, name, BP_VAR_IS, cache_slot, &rv); if (value != &EG(uninitialized_zval)) { convert_to_boolean(value); ret = Z_TYPE_P(value) == IS_TRUE? 1:0; @@ -2015,13 +1995,13 @@ static int php_snmp_has_property(zval *object, zval *member, int has_set_exists, } } } else { - ret = zend_std_has_property(object, member, has_set_exists, cache_slot); + ret = zend_std_has_property(object, name, has_set_exists, cache_slot); } return ret; } /* }}} */ -static HashTable *php_snmp_get_gc(zval *object, zval ***gc_data, int *gc_data_count) /* {{{ */ +static HashTable *php_snmp_get_gc(zend_object *object, zval **gc_data, int *gc_data_count) /* {{{ */ { *gc_data = NULL; *gc_data_count = 0; @@ -2031,7 +2011,7 @@ static HashTable *php_snmp_get_gc(zval *object, zval ***gc_data, int *gc_data_co /* {{{ php_snmp_get_properties(zval *object) Returns all object properties. Injects SNMP properties into object on first call */ -static HashTable *php_snmp_get_properties(zval *object) +static HashTable *php_snmp_get_properties(zend_object *object) { php_snmp_object *obj; php_snmp_prop_handler *hnd; @@ -2039,7 +2019,7 @@ static HashTable *php_snmp_get_properties(zval *object) zval rv; zend_string *key; - obj = Z_SNMP_P(object); + obj = php_snmp_fetch_object(object); props = zend_std_get_properties(object); ZEND_HASH_FOREACH_STR_KEY_PTR(&php_snmp_properties, key, hnd) { @@ -2395,12 +2375,3 @@ zend_module_entry snmp_module_entry = { /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 674f67545c42a..9df865b76a0ad 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -1537,11 +1537,3 @@ static zend_string *get_http_headers(php_stream *stream) smart_str_free(&tmp_response); return NULL; } -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/soap/soap.c b/ext/soap/soap.c index c551c39650955..6f495b6bd1797 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -4861,14 +4861,3 @@ static void delete_hashtable(void *data) /* {{{ */ efree(ht); } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index 4d22589a93688..c1aba9dc98bec 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -117,10 +117,3 @@ php_socket *socket_import_file_descriptor(PHP_SOCKET sock); #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 8a558ec9386bf..ea8caa729886c 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2927,12 +2927,3 @@ PHP_FUNCTION(socket_wsaprotocol_info_release) } /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/sodium/libsodium.c b/ext/sodium/libsodium.c index 104840b7d63b6..c70b9df9ff2ef 100644 --- a/ext/sodium/libsodium.c +++ b/ext/sodium/libsodium.c @@ -3717,12 +3717,3 @@ PHP_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_rekey) crypto_secretstream_xchacha20poly1305_rekey((void *) state); } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 tw=78 fdm=marker - * vim<600: sw=4 ts=4 tw=78 - */ diff --git a/ext/sodium/php_libsodium.h b/ext/sodium/php_libsodium.h index d3dcf591eb5c9..66053f2862ecd 100644 --- a/ext/sodium/php_libsodium.h +++ b/ext/sodium/php_libsodium.h @@ -121,12 +121,3 @@ PHP_FUNCTION(sodium_pad); PHP_FUNCTION(sodium_unpad); #endif /* PHP_LIBSODIUM_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index bc81dc3ba27a9..96762e65c4792 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -1049,12 +1049,3 @@ zend_module_entry spl_module_entry = { STANDARD_MODULE_PROPERTIES_EX }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h index a638f468d29e4..69ff65f72c947 100644 --- a/ext/spl/php_spl.h +++ b/ext/spl/php_spl.h @@ -73,12 +73,3 @@ PHP_FUNCTION(class_uses); PHPAPI zend_string *php_spl_object_hash(zval *obj); #endif /* PHP_SPL_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 51329ac982c24..fcab6fbae1691 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -165,7 +165,7 @@ static void spl_array_object_free_storage(zend_object *object) zend_object_iterator *spl_array_get_iterator(zend_class_entry *ce, zval *object, int by_ref); /* {{{ spl_array_object_new_ex */ -static zend_object *spl_array_object_new_ex(zend_class_entry *class_type, zval *orig, int clone_orig) +static zend_object *spl_array_object_new_ex(zend_class_entry *class_type, zend_object *orig, int clone_orig) { spl_array_object *intern; zend_class_entry *parent = class_type; @@ -179,7 +179,7 @@ static zend_object *spl_array_object_new_ex(zend_class_entry *class_type, zval * intern->ar_flags = 0; intern->ce_get_iterator = spl_ce_ArrayIterator; if (orig) { - spl_array_object *other = Z_SPLARRAY_P(orig); + spl_array_object *other = spl_array_from_obj(orig); intern->ar_flags &= ~ SPL_ARRAY_CLONE_MASK; intern->ar_flags |= (other->ar_flags & SPL_ARRAY_CLONE_MASK); @@ -187,16 +187,18 @@ static zend_object *spl_array_object_new_ex(zend_class_entry *class_type, zval * if (clone_orig) { if (other->ar_flags & SPL_ARRAY_IS_SELF) { ZVAL_UNDEF(&intern->array); - } else if (Z_OBJ_HT_P(orig) == &spl_handler_ArrayObject) { + } else if (orig->handlers == &spl_handler_ArrayObject) { ZVAL_ARR(&intern->array, zend_array_dup(spl_array_get_hash_table(other))); } else { - ZEND_ASSERT(Z_OBJ_HT_P(orig) == &spl_handler_ArrayIterator); - ZVAL_COPY(&intern->array, orig); + ZEND_ASSERT(orig->handlers == &spl_handler_ArrayIterator); + GC_ADDREF(orig); + ZVAL_OBJ(&intern->array, orig); intern->ar_flags |= SPL_ARRAY_USE_OTHER; } } else { - ZVAL_COPY(&intern->array, orig); + GC_ADDREF(orig); + ZVAL_OBJ(&intern->array, orig); intern->ar_flags |= SPL_ARRAY_USE_OTHER; } } else { @@ -274,13 +276,11 @@ static zend_object *spl_array_object_new(zend_class_entry *class_type) /* }}} */ /* {{{ spl_array_object_clone */ -static zend_object *spl_array_object_clone(zval *zobject) +static zend_object *spl_array_object_clone(zend_object *old_object) { - zend_object *old_object; zend_object *new_object; - old_object = Z_OBJ_P(zobject); - new_object = spl_array_object_new_ex(old_object->ce, zobject, 1); + new_object = spl_array_object_new_ex(old_object->ce, old_object, 1); zend_objects_clone_members(new_object, old_object); @@ -394,11 +394,11 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object * } } /* }}} */ -static int spl_array_has_dimension(zval *object, zval *offset, int check_empty); +static int spl_array_has_dimension(zend_object *object, zval *offset, int check_empty); -static zval *spl_array_read_dimension_ex(int check_inherited, zval *object, zval *offset, int type, zval *rv) /* {{{ */ +static zval *spl_array_read_dimension_ex(int check_inherited, zend_object *object, zval *offset, int type, zval *rv) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); zval *ret; if (check_inherited && @@ -417,7 +417,7 @@ static zval *spl_array_read_dimension_ex(int check_inherited, zval *object, zval } else { SEPARATE_ARG_IF_REF(offset); } - zend_call_method_with_1_params(object, Z_OBJCE_P(object), &intern->fptr_offset_get, "offsetGet", rv, offset); + zend_call_method_with_1_params(object, object->ce, &intern->fptr_offset_get, "offsetGet", rv, offset); zval_ptr_dtor(offset); if (!Z_ISUNDEF_P(rv)) { @@ -443,14 +443,14 @@ static zval *spl_array_read_dimension_ex(int check_inherited, zval *object, zval return ret; } /* }}} */ -static zval *spl_array_read_dimension(zval *object, zval *offset, int type, zval *rv) /* {{{ */ +static zval *spl_array_read_dimension(zend_object *object, zval *offset, int type, zval *rv) /* {{{ */ { return spl_array_read_dimension_ex(1, object, offset, type, rv); } /* }}} */ -static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval *offset, zval *value) /* {{{ */ +static void spl_array_write_dimension_ex(int check_inherited, zend_object *object, zval *offset, zval *value) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); zend_long index; HashTable *ht; @@ -463,7 +463,7 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval } else { SEPARATE_ARG_IF_REF(offset); } - zend_call_method_with_2_params(object, Z_OBJCE_P(object), &intern->fptr_offset_set, "offsetSet", NULL, offset, value); + zend_call_method_with_2_params(object, object->ce, &intern->fptr_offset_set, "offsetSet", NULL, offset, value); zval_ptr_dtor(offset); return; } @@ -518,20 +518,20 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval } } /* }}} */ -static void spl_array_write_dimension(zval *object, zval *offset, zval *value) /* {{{ */ +static void spl_array_write_dimension(zend_object *object, zval *offset, zval *value) /* {{{ */ { spl_array_write_dimension_ex(1, object, offset, value); } /* }}} */ -static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval *offset) /* {{{ */ +static void spl_array_unset_dimension_ex(int check_inherited, zend_object *object, zval *offset) /* {{{ */ { zend_long index; HashTable *ht; - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); if (check_inherited && intern->fptr_offset_del) { SEPARATE_ARG_IF_REF(offset); - zend_call_method_with_1_params(object, Z_OBJCE_P(object), &intern->fptr_offset_del, "offsetUnset", NULL, offset); + zend_call_method_with_1_params(object, object->ce, &intern->fptr_offset_del, "offsetUnset", NULL, offset); zval_ptr_dtor(offset); return; } @@ -603,20 +603,20 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval } } /* }}} */ -static void spl_array_unset_dimension(zval *object, zval *offset) /* {{{ */ +static void spl_array_unset_dimension(zend_object *object, zval *offset) /* {{{ */ { spl_array_unset_dimension_ex(1, object, offset); } /* }}} */ -static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *offset, int check_empty) /* {{{ */ +static int spl_array_has_dimension_ex(int check_inherited, zend_object *object, zval *offset, int check_empty) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); zend_long index; zval rv, *value = NULL, *tmp; if (check_inherited && intern->fptr_offset_has) { SEPARATE_ARG_IF_REF(offset); - zend_call_method_with_1_params(object, Z_OBJCE_P(object), &intern->fptr_offset_has, "offsetExists", &rv, offset); + zend_call_method_with_1_params(object, object->ce, &intern->fptr_offset_has, "offsetExists", &rv, offset); zval_ptr_dtor(offset); if (zend_is_true(&rv)) { @@ -694,7 +694,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o } } /* }}} */ -static int spl_array_has_dimension(zval *object, zval *offset, int check_empty) /* {{{ */ +static int spl_array_has_dimension(zend_object *object, zval *offset, int check_empty) /* {{{ */ { return spl_array_has_dimension_ex(1, object, offset, check_empty); } /* }}} */ @@ -708,7 +708,7 @@ SPL_METHOD(Array, offsetExists) if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &index) == FAILURE) { return; } - RETURN_BOOL(spl_array_has_dimension_ex(0, ZEND_THIS, index, 2)); + RETURN_BOOL(spl_array_has_dimension_ex(0, Z_OBJ_P(ZEND_THIS), index, 2)); } /* }}} */ /* {{{ proto mixed ArrayObject::offsetGet(mixed $index) @@ -720,7 +720,7 @@ SPL_METHOD(Array, offsetGet) if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &index) == FAILURE) { return; } - value = spl_array_read_dimension_ex(0, ZEND_THIS, index, BP_VAR_R, return_value); + value = spl_array_read_dimension_ex(0, Z_OBJ_P(ZEND_THIS), index, BP_VAR_R, return_value); if (value != return_value) { ZVAL_COPY_DEREF(return_value, value); } @@ -735,7 +735,7 @@ SPL_METHOD(Array, offsetSet) if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &index, &value) == FAILURE) { return; } - spl_array_write_dimension_ex(0, ZEND_THIS, index, value); + spl_array_write_dimension_ex(0, Z_OBJ_P(ZEND_THIS), index, value); } /* }}} */ void spl_array_iterator_append(zval *object, zval *append_value) /* {{{ */ @@ -747,7 +747,7 @@ void spl_array_iterator_append(zval *object, zval *append_value) /* {{{ */ return; } - spl_array_write_dimension(object, NULL, append_value); + spl_array_write_dimension(Z_OBJ_P(object), NULL, append_value); } /* }}} */ /* {{{ proto void ArrayObject::append(mixed $newval) @@ -772,7 +772,7 @@ SPL_METHOD(Array, offsetUnset) if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &index) == FAILURE) { return; } - spl_array_unset_dimension_ex(0, ZEND_THIS, index); + spl_array_unset_dimension_ex(0, Z_OBJ_P(ZEND_THIS), index); } /* }}} */ /* {{{ proto array ArrayObject::getArrayCopy() @@ -786,9 +786,9 @@ SPL_METHOD(Array, getArrayCopy) RETURN_ARR(zend_array_dup(spl_array_get_hash_table(intern))); } /* }}} */ -static HashTable *spl_array_get_properties_for(zval *object, zend_prop_purpose purpose) /* {{{ */ +static HashTable *spl_array_get_properties_for(zend_object *object, zend_prop_purpose purpose) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); HashTable *ht; zend_bool dup; @@ -823,12 +823,12 @@ static HashTable *spl_array_get_properties_for(zval *object, zend_prop_purpose p return ht; } /* }}} */ -static HashTable* spl_array_get_debug_info(zval *obj, int *is_temp) /* {{{ */ +static HashTable* spl_array_get_debug_info(zend_object *obj, int *is_temp) /* {{{ */ { zval *storage; zend_string *zname; zend_class_entry *base; - spl_array_object *intern = Z_SPLARRAY_P(obj); + spl_array_object *intern = spl_array_from_obj(obj); if (!intern->std.properties) { rebuild_object_properties(&intern->std); @@ -847,7 +847,7 @@ static HashTable* spl_array_get_debug_info(zval *obj, int *is_temp) /* {{{ */ storage = &intern->array; Z_TRY_ADDREF_P(storage); - base = Z_OBJ_HT_P(obj) == &spl_handler_ArrayIterator + base = obj->handlers == &spl_handler_ArrayIterator ? spl_ce_ArrayIterator : spl_ce_ArrayObject; zname = spl_gen_private_prop_name(base, "storage", sizeof("storage")-1); zend_symtable_update(debug_info, zname, storage); @@ -858,75 +858,85 @@ static HashTable* spl_array_get_debug_info(zval *obj, int *is_temp) /* {{{ */ } /* }}} */ -static HashTable *spl_array_get_gc(zval *obj, zval **gc_data, int *gc_data_count) /* {{{ */ +static HashTable *spl_array_get_gc(zend_object *obj, zval **gc_data, int *gc_data_count) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(obj); + spl_array_object *intern = spl_array_from_obj(obj); *gc_data = &intern->array; *gc_data_count = 1; return zend_std_get_properties(obj); } /* }}} */ -static zval *spl_array_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */ +static zval *spl_array_read_property(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 - && !zend_std_has_property(object, member, ZEND_PROPERTY_EXISTS, NULL)) { - return spl_array_read_dimension(object, member, type, rv); + && !zend_std_has_property(object, name, ZEND_PROPERTY_EXISTS, NULL)) { + zval member; + ZVAL_STR(&member, name); + return spl_array_read_dimension(object, &member, type, rv); } - return zend_std_read_property(object, member, type, cache_slot, rv); + return zend_std_read_property(object, name, type, cache_slot, rv); } /* }}} */ -static zval *spl_array_write_property(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */ +static zval *spl_array_write_property(zend_object *object, zend_string *name, zval *value, void **cache_slot) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 - && !zend_std_has_property(object, member, ZEND_PROPERTY_EXISTS, NULL)) { - spl_array_write_dimension(object, member, value); + && !zend_std_has_property(object, name, ZEND_PROPERTY_EXISTS, NULL)) { + zval member; + ZVAL_STR(&member, name); + spl_array_write_dimension(object, &member, value); return value; } - return zend_std_write_property(object, member, value, cache_slot); + return zend_std_write_property(object, name, value, cache_slot); } /* }}} */ -static zval *spl_array_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ +static zval *spl_array_get_property_ptr_ptr(zend_object *object, zend_string *name, int type, void **cache_slot) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 - && !zend_std_has_property(object, member, ZEND_PROPERTY_EXISTS, NULL)) { + && !zend_std_has_property(object, name, ZEND_PROPERTY_EXISTS, NULL)) { /* If object has offsetGet() overridden, then fallback to read_property, * which will call offsetGet(). */ + zval member; if (intern->fptr_offset_get) { return NULL; } - return spl_array_get_dimension_ptr(1, intern, member, type); + ZVAL_STR(&member, name); + return spl_array_get_dimension_ptr(1, intern, &member, type); } - return zend_std_get_property_ptr_ptr(object, member, type, cache_slot); + return zend_std_get_property_ptr_ptr(object, name, type, cache_slot); } /* }}} */ -static int spl_array_has_property(zval *object, zval *member, int has_set_exists, void **cache_slot) /* {{{ */ +static int spl_array_has_property(zend_object *object, zend_string *name, int has_set_exists, void **cache_slot) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 - && !zend_std_has_property(object, member, ZEND_PROPERTY_EXISTS, NULL)) { - return spl_array_has_dimension(object, member, has_set_exists); + && !zend_std_has_property(object, name, ZEND_PROPERTY_EXISTS, NULL)) { + zval member; + ZVAL_STR(&member, name); + return spl_array_has_dimension(object, &member, has_set_exists); } - return zend_std_has_property(object, member, has_set_exists, cache_slot); + return zend_std_has_property(object, name, has_set_exists, cache_slot); } /* }}} */ -static void spl_array_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */ +static void spl_array_unset_property(zend_object *object, zend_string *name, void **cache_slot) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 - && !zend_std_has_property(object, member, ZEND_PROPERTY_EXISTS, NULL)) { - spl_array_unset_dimension(object, member); + && !zend_std_has_property(object, name, ZEND_PROPERTY_EXISTS, NULL)) { + zval member; + ZVAL_STR(&member, name); + spl_array_unset_dimension(object, &member); return; } - zend_std_unset_property(object, member, cache_slot); + zend_std_unset_property(object, name, cache_slot); } /* }}} */ static int spl_array_compare_objects(zval *o1, zval *o2) /* {{{ */ @@ -1323,7 +1333,7 @@ SPL_METHOD(Array, getIterator) return; } - ZVAL_OBJ(return_value, spl_array_object_new_ex(intern->ce_get_iterator, object, 0)); + ZVAL_OBJ(return_value, spl_array_object_new_ex(intern->ce_get_iterator, Z_OBJ_P(object), 0)); } /* }}} */ @@ -1392,9 +1402,9 @@ static zend_long spl_array_object_count_elements_helper(spl_array_object *intern } } /* }}} */ -int spl_array_object_count_elements(zval *object, zend_long *count) /* {{{ */ +int spl_array_object_count_elements(zend_object *object, zend_long *count) /* {{{ */ { - spl_array_object *intern = Z_SPLARRAY_P(object); + spl_array_object *intern = spl_array_from_obj(object); if (intern->fptr_count) { zval rv; @@ -1985,12 +1995,3 @@ PHP_MINIT_FUNCTION(spl_array) return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_array.h b/ext/spl/spl_array.h index b6e982142a77b..ed5dec3e628b0 100644 --- a/ext/spl/spl_array.h +++ b/ext/spl/spl_array.h @@ -33,12 +33,3 @@ extern void spl_array_iterator_append(zval *object, zval *append_value); extern void spl_array_iterator_key(zval *object, zval *return_value); #endif /* SPL_ARRAY_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index e5550b88142fd..119ba42556ec8 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -337,15 +337,13 @@ static int spl_filesystem_file_open(spl_filesystem_object *intern, int use_inclu Open the directory Clone other members (properties) */ -static zend_object *spl_filesystem_object_clone(zval *zobject) +static zend_object *spl_filesystem_object_clone(zend_object *old_object) { - zend_object *old_object; zend_object *new_object; spl_filesystem_object *intern; spl_filesystem_object *source; int index, skip_dots; - old_object = Z_OBJ_P(zobject); source = spl_filesystem_from_obj(old_object); new_object = spl_filesystem_object_new_ex(old_object->ce); intern = spl_filesystem_from_obj(new_object); @@ -457,7 +455,7 @@ static spl_filesystem_object *spl_filesystem_object_create_info(spl_filesystem_o if (ce->constructor->common.scope != spl_ce_SplFileInfo) { ZVAL_STRINGL(&arg1, file_path, file_path_len); - zend_call_method_with_1_params(return_value, ce, &ce->constructor, "__construct", NULL, &arg1); + zend_call_method_with_1_params(Z_OBJ_P(return_value), ce, &ce->constructor, "__construct", NULL, &arg1); zval_ptr_dtor(&arg1); } else { spl_filesystem_info_set_filename(intern, file_path, file_path_len, use_copy); @@ -502,7 +500,7 @@ static spl_filesystem_object *spl_filesystem_object_create_type(int ht, spl_file spl_filesystem_object_get_file_name(source); if (ce->constructor->common.scope != spl_ce_SplFileInfo) { ZVAL_STRINGL(&arg1, source->file_name, source->file_name_len); - zend_call_method_with_1_params(return_value, ce, &ce->constructor, "__construct", NULL, &arg1); + zend_call_method_with_1_params(Z_OBJ_P(return_value), ce, &ce->constructor, "__construct", NULL, &arg1); zval_ptr_dtor(&arg1); } else { intern->file_name = estrndup(source->file_name, source->file_name_len); @@ -527,7 +525,7 @@ static spl_filesystem_object *spl_filesystem_object_create_type(int ht, spl_file if (ce->constructor->common.scope != spl_ce_SplFileObject) { ZVAL_STRINGL(&arg1, source->file_name, source->file_name_len); ZVAL_STRINGL(&arg2, "r", 1); - zend_call_method_with_2_params(return_value, ce, &ce->constructor, "__construct", NULL, &arg1, &arg2); + zend_call_method_with_2_params(Z_OBJ_P(return_value), ce, &ce->constructor, "__construct", NULL, &arg1, &arg2); zval_ptr_dtor(&arg1); zval_ptr_dtor(&arg2); } else { @@ -591,9 +589,9 @@ static char *spl_filesystem_object_get_pathname(spl_filesystem_object *intern, s } /* }}} */ -static HashTable *spl_filesystem_object_get_debug_info(zval *object, int *is_temp) /* {{{ */ +static HashTable *spl_filesystem_object_get_debug_info(zend_object *object, int *is_temp) /* {{{ */ { - spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(object); + spl_filesystem_object *intern = spl_filesystem_from_obj(object); zval tmp; HashTable *rv; zend_string *pnstr; @@ -840,19 +838,19 @@ SPL_METHOD(DirectoryIterator, seek) if (intern->u.dir.index > pos) { /* we first rewind */ - zend_call_method_with_0_params(ZEND_THIS, Z_OBJCE_P(ZEND_THIS), &intern->u.dir.func_rewind, "rewind", NULL); + zend_call_method_with_0_params(Z_OBJ_P(ZEND_THIS), Z_OBJCE_P(ZEND_THIS), &intern->u.dir.func_rewind, "rewind", NULL); } while (intern->u.dir.index < pos) { int valid = 0; - zend_call_method_with_0_params(ZEND_THIS, Z_OBJCE_P(ZEND_THIS), &intern->u.dir.func_valid, "valid", &retval); + zend_call_method_with_0_params(Z_OBJ_P(ZEND_THIS), Z_OBJCE_P(ZEND_THIS), &intern->u.dir.func_valid, "valid", &retval); valid = zend_is_true(&retval); zval_ptr_dtor(&retval); if (!valid) { zend_throw_exception_ex(spl_ce_OutOfBoundsException, 0, "Seek position " ZEND_LONG_FMT " is out of range", pos); return; } - zend_call_method_with_0_params(ZEND_THIS, Z_OBJCE_P(ZEND_THIS), &intern->u.dir.func_next, "next", NULL); + zend_call_method_with_0_params(Z_OBJ_P(ZEND_THIS), Z_OBJCE_P(ZEND_THIS), &intern->u.dir.func_next, "next", NULL); } } /* }}} */ @@ -1851,12 +1849,12 @@ zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zva /* }}} */ /* {{{ spl_filesystem_object_cast */ -static int spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type) +static int spl_filesystem_object_cast(zend_object *readobj, zval *writeobj, int type) { - spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(readobj); + spl_filesystem_object *intern = spl_filesystem_from_obj(readobj); if (type == IS_STRING) { - if (Z_OBJCE_P(readobj)->__tostring) { + if (readobj->ce->__tostring) { return zend_std_cast_object_tostring(readobj, writeobj, type); } @@ -2153,7 +2151,7 @@ static int spl_filesystem_file_read_line_ex(zval * this_ptr, spl_filesystem_obje return spl_filesystem_file_read_csv(intern, intern->u.file.delimiter, intern->u.file.enclosure, intern->u.file.escape, NULL); } else { zend_execute_data *execute_data = EG(current_execute_data); - zend_call_method_with_0_params(this_ptr, Z_OBJCE_P(ZEND_THIS), &intern->u.file.func_getCurr, "getCurrentLine", &retval); + zend_call_method_with_0_params(Z_OBJ_P(this_ptr), Z_OBJCE_P(ZEND_THIS), &intern->u.file.func_getCurr, "getCurrentLine", &retval); } if (!Z_ISUNDEF(retval)) { if (intern->u.file.current_line || !Z_ISUNDEF(intern->u.file.current_zval)) { @@ -3146,12 +3144,3 @@ PHP_MINIT_FUNCTION(spl_directory) return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_directory.h b/ext/spl/spl_directory.h index e8c267e1bbfe3..90e8945a165d8 100644 --- a/ext/spl/spl_directory.h +++ b/ext/spl/spl_directory.h @@ -147,12 +147,3 @@ static inline spl_filesystem_object* spl_filesystem_iterator_to_object(spl_files #define SPL_FILE_DIR_OTHERS_MASK 0x00003000 /* mask used for get/setFlags */ #endif /* SPL_DIRECTORY_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index 4f96777ea6684..fd59724b5ad14 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -365,7 +365,7 @@ static void spl_dllist_object_free_storage(zend_object *object) /* {{{ */ zend_object_iterator *spl_dllist_get_iterator(zend_class_entry *ce, zval *object, int by_ref); -static zend_object *spl_dllist_object_new_ex(zend_class_entry *class_type, zval *orig, int clone_orig) /* {{{ */ +static zend_object *spl_dllist_object_new_ex(zend_class_entry *class_type, zend_object *orig, int clone_orig) /* {{{ */ { spl_dllist_object *intern; zend_class_entry *parent = class_type; @@ -380,7 +380,7 @@ static zend_object *spl_dllist_object_new_ex(zend_class_entry *class_type, zval intern->traverse_position = 0; if (orig) { - spl_dllist_object *other = Z_SPLDLLIST_P(orig); + spl_dllist_object *other = spl_dllist_from_obj(orig); intern->ce_get_iterator = other->ce_get_iterator; if (clone_orig) { @@ -455,13 +455,9 @@ static zend_object *spl_dllist_object_new(zend_class_entry *class_type) /* {{{ * } /* }}} */ -static zend_object *spl_dllist_object_clone(zval *zobject) /* {{{ */ +static zend_object *spl_dllist_object_clone(zend_object *old_object) /* {{{ */ { - zend_object *old_object; - zend_object *new_object; - - old_object = Z_OBJ_P(zobject); - new_object = spl_dllist_object_new_ex(old_object->ce, zobject, 1); + zend_object *new_object = spl_dllist_object_new_ex(old_object->ce, old_object, 1); zend_objects_clone_members(new_object, old_object); @@ -469,9 +465,9 @@ static zend_object *spl_dllist_object_clone(zval *zobject) /* {{{ */ } /* }}} */ -static int spl_dllist_object_count_elements(zval *object, zend_long *count) /* {{{ */ +static int spl_dllist_object_count_elements(zend_object *object, zend_long *count) /* {{{ */ { - spl_dllist_object *intern = Z_SPLDLLIST_P(object); + spl_dllist_object *intern = spl_dllist_from_obj(object); if (intern->fptr_count) { zval rv; @@ -490,9 +486,9 @@ static int spl_dllist_object_count_elements(zval *object, zend_long *count) /* { } /* }}} */ -static HashTable* spl_dllist_object_get_debug_info(zval *obj, int *is_temp) /* {{{{ */ +static HashTable* spl_dllist_object_get_debug_info(zend_object *obj, int *is_temp) /* {{{{ */ { - spl_dllist_object *intern = Z_SPLDLLIST_P(obj); + spl_dllist_object *intern = spl_dllist_from_obj(obj); spl_ptr_llist_element *current = intern->llist->head, *next; zval tmp, dllist_array; zend_string *pnstr; @@ -534,9 +530,9 @@ static HashTable* spl_dllist_object_get_debug_info(zval *obj, int *is_temp) /* { } /* }}}} */ -static HashTable *spl_dllist_object_get_gc(zval *obj, zval **gc_data, int *gc_data_count) /* {{{ */ +static HashTable *spl_dllist_object_get_gc(zend_object *obj, zval **gc_data, int *gc_data_count) /* {{{ */ { - spl_dllist_object *intern = Z_SPLDLLIST_P(obj); + spl_dllist_object *intern = spl_dllist_from_obj(obj); spl_ptr_llist_element *current = intern->llist->head; int i = 0; @@ -704,7 +700,7 @@ SPL_METHOD(SplDoublyLinkedList, isEmpty) return; } - spl_dllist_object_count_elements(ZEND_THIS, &count); + spl_dllist_object_count_elements(Z_OBJ_P(ZEND_THIS), &count); RETURN_BOOL(count == 0); } /* }}} */ @@ -1412,12 +1408,3 @@ PHP_MINIT_FUNCTION(spl_dllist) /* {{{ */ return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_dllist.h b/ext/spl/spl_dllist.h index 66c32a5866e6d..3f53864d258b1 100644 --- a/ext/spl/spl_dllist.h +++ b/ext/spl/spl_dllist.h @@ -29,12 +29,3 @@ extern PHPAPI zend_class_entry *spl_ce_SplStack; PHP_MINIT_FUNCTION(spl_dllist); #endif /* SPL_DLLIST_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_engine.c b/ext/spl/spl_engine.c index fdc400fbb6764..7bedefe2c484f 100644 --- a/ext/spl/spl_engine.c +++ b/ext/spl/spl_engine.c @@ -66,12 +66,3 @@ PHPAPI zend_long spl_offset_convert_to_long(zval *offset) /* {{{ */ return -1; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h index aa62d7f5e412c..bf14c78b11de7 100644 --- a/ext/spl/spl_engine.h +++ b/ext/spl/spl_engine.h @@ -33,7 +33,7 @@ static inline int spl_instantiate_arg_ex1(zend_class_entry *pce, zval *retval, z zend_function *func = pce->constructor; spl_instantiate(pce, retval); - zend_call_method(retval, pce, &func, ZSTR_VAL(func->common.function_name), ZSTR_LEN(func->common.function_name), NULL, 1, arg1, NULL); + zend_call_method(Z_OBJ_P(retval), pce, &func, ZSTR_VAL(func->common.function_name), ZSTR_LEN(func->common.function_name), NULL, 1, arg1, NULL); return 0; } /* }}} */ @@ -44,7 +44,7 @@ static inline int spl_instantiate_arg_ex2(zend_class_entry *pce, zval *retval, z zend_function *func = pce->constructor; spl_instantiate(pce, retval); - zend_call_method(retval, pce, &func, ZSTR_VAL(func->common.function_name), ZSTR_LEN(func->common.function_name), NULL, 2, arg1, arg2); + zend_call_method(Z_OBJ_P(retval), pce, &func, ZSTR_VAL(func->common.function_name), ZSTR_LEN(func->common.function_name), NULL, 2, arg1, arg2); return 0; } /* }}} */ @@ -76,12 +76,3 @@ static inline void spl_instantiate_arg_n(zend_class_entry *pce, zval *retval, in /* }}} */ #endif /* SPL_ENGINE_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_exceptions.c b/ext/spl/spl_exceptions.c index cb7934423821f..abe70c2b34219 100644 --- a/ext/spl/spl_exceptions.c +++ b/ext/spl/spl_exceptions.c @@ -68,12 +68,3 @@ PHP_MINIT_FUNCTION(spl_exceptions) return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_exceptions.h b/ext/spl/spl_exceptions.h index 6399f530f1824..2c36287bbbd05 100644 --- a/ext/spl/spl_exceptions.h +++ b/ext/spl/spl_exceptions.h @@ -40,12 +40,3 @@ extern PHPAPI zend_class_entry *spl_ce_UnexpectedValueException; PHP_MINIT_FUNCTION(spl_exceptions); #endif /* SPL_EXCEPTIONS_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 0239f71467dbb..0399c3ce379e4 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -141,9 +141,9 @@ static void spl_fixedarray_copy(spl_fixedarray *to, spl_fixedarray *from) /* {{{ } /* }}} */ -static HashTable* spl_fixedarray_object_get_gc(zval *obj, zval **table, int *n) /* {{{{ */ +static HashTable* spl_fixedarray_object_get_gc(zend_object *obj, zval **table, int *n) /* {{{{ */ { - spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(obj); + spl_fixedarray_object *intern = spl_fixed_array_from_obj(obj); HashTable *ht = zend_std_get_properties(obj); *table = intern->array.elements; @@ -153,9 +153,9 @@ static HashTable* spl_fixedarray_object_get_gc(zval *obj, zval **table, int *n) } /* }}}} */ -static HashTable* spl_fixedarray_object_get_properties(zval *obj) /* {{{{ */ +static HashTable* spl_fixedarray_object_get_properties(zend_object *obj) /* {{{{ */ { - spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(obj); + spl_fixedarray_object *intern = spl_fixed_array_from_obj(obj); HashTable *ht = zend_std_get_properties(obj); zend_long i = 0; @@ -202,7 +202,7 @@ static void spl_fixedarray_object_free_storage(zend_object *object) /* {{{ */ zend_object_iterator *spl_fixedarray_get_iterator(zend_class_entry *ce, zval *object, int by_ref); -static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, zval *orig, int clone_orig) /* {{{ */ +static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, zend_object *orig, int clone_orig) /* {{{ */ { spl_fixedarray_object *intern; zend_class_entry *parent = class_type; @@ -218,7 +218,7 @@ static zend_object *spl_fixedarray_object_new_ex(zend_class_entry *class_type, z intern->flags = 0; if (orig && clone_orig) { - spl_fixedarray_object *other = Z_SPLFIXEDARRAY_P(orig); + spl_fixedarray_object *other = spl_fixed_array_from_obj(orig); intern->ce_get_iterator = other->ce_get_iterator; spl_fixedarray_init(&intern->array, other->array.size); spl_fixedarray_copy(&intern->array, &other->array); @@ -296,13 +296,9 @@ static zend_object *spl_fixedarray_new(zend_class_entry *class_type) /* {{{ */ } /* }}} */ -static zend_object *spl_fixedarray_object_clone(zval *zobject) /* {{{ */ +static zend_object *spl_fixedarray_object_clone(zend_object *old_object) /* {{{ */ { - zend_object *old_object; - zend_object *new_object; - - old_object = Z_OBJ_P(zobject); - new_object = spl_fixedarray_object_new_ex(old_object->ce, zobject, 1); + zend_object *new_object = spl_fixedarray_object_new_ex(old_object->ce, old_object, 1); zend_objects_clone_members(new_object, old_object); @@ -338,11 +334,11 @@ static inline zval *spl_fixedarray_object_read_dimension_helper(spl_fixedarray_o } /* }}} */ -static zval *spl_fixedarray_object_read_dimension(zval *object, zval *offset, int type, zval *rv) /* {{{ */ +static zval *spl_fixedarray_object_read_dimension(zend_object *object, zval *offset, int type, zval *rv) /* {{{ */ { spl_fixedarray_object *intern; - intern = Z_SPLFIXEDARRAY_P(object); + intern = spl_fixed_array_from_obj(object); if (type == BP_VAR_IS && intern->fptr_offset_has) { SEPARATE_ARG_IF_REF(offset); @@ -407,12 +403,12 @@ static inline void spl_fixedarray_object_write_dimension_helper(spl_fixedarray_o } /* }}} */ -static void spl_fixedarray_object_write_dimension(zval *object, zval *offset, zval *value) /* {{{ */ +static void spl_fixedarray_object_write_dimension(zend_object *object, zval *offset, zval *value) /* {{{ */ { spl_fixedarray_object *intern; zval tmp; - intern = Z_SPLFIXEDARRAY_P(object); + intern = spl_fixed_array_from_obj(object); if (intern->fptr_offset_set) { if (!offset) { @@ -452,11 +448,11 @@ static inline void spl_fixedarray_object_unset_dimension_helper(spl_fixedarray_o } /* }}} */ -static void spl_fixedarray_object_unset_dimension(zval *object, zval *offset) /* {{{ */ +static void spl_fixedarray_object_unset_dimension(zend_object *object, zval *offset) /* {{{ */ { spl_fixedarray_object *intern; - intern = Z_SPLFIXEDARRAY_P(object); + intern = spl_fixed_array_from_obj(object); if (intern->fptr_offset_del) { SEPARATE_ARG_IF_REF(offset); @@ -501,11 +497,11 @@ static inline int spl_fixedarray_object_has_dimension_helper(spl_fixedarray_obje } /* }}} */ -static int spl_fixedarray_object_has_dimension(zval *object, zval *offset, int check_empty) /* {{{ */ +static int spl_fixedarray_object_has_dimension(zend_object *object, zval *offset, int check_empty) /* {{{ */ { spl_fixedarray_object *intern; - intern = Z_SPLFIXEDARRAY_P(object); + intern = spl_fixed_array_from_obj(object); if (intern->fptr_offset_has) { zval rv; @@ -523,11 +519,11 @@ static int spl_fixedarray_object_has_dimension(zval *object, zval *offset, int c } /* }}} */ -static int spl_fixedarray_object_count_elements(zval *object, zend_long *count) /* {{{ */ +static int spl_fixedarray_object_count_elements(zend_object *object, zend_long *count) /* {{{ */ { spl_fixedarray_object *intern; - intern = Z_SPLFIXEDARRAY_P(object); + intern = spl_fixed_array_from_obj(object); if (intern->fptr_count) { zval rv; zend_call_method_with_0_params(object, intern->std.ce, &intern->fptr_count, "count", &rv); @@ -577,7 +573,7 @@ SPL_METHOD(SplFixedArray, __construct) SPL_METHOD(SplFixedArray, __wakeup) { spl_fixedarray_object *intern = Z_SPLFIXEDARRAY_P(ZEND_THIS); - HashTable *intern_ht = zend_std_get_properties(ZEND_THIS); + HashTable *intern_ht = zend_std_get_properties(Z_OBJ_P(ZEND_THIS)); zval *data; if (zend_parse_parameters_none() == FAILURE) { @@ -1091,13 +1087,3 @@ PHP_MINIT_FUNCTION(spl_fixedarray) return SUCCESS; } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_fixedarray.h b/ext/spl/spl_fixedarray.h index b15413735b345..9be62d4b89cd2 100644 --- a/ext/spl/spl_fixedarray.h +++ b/ext/spl/spl_fixedarray.h @@ -25,12 +25,3 @@ extern PHPAPI zend_class_entry *spl_ce_SplFixedArray; PHP_MINIT_FUNCTION(spl_fixedarray); #endif /* SPL_FIXEDARRAY_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c index 6ae272727b9d3..74d7e756674fd 100644 --- a/ext/spl/spl_functions.c +++ b/ext/spl/spl_functions.c @@ -142,12 +142,3 @@ zend_string * spl_gen_private_prop_name(zend_class_entry *ce, char *prop_name, i return zend_mangle_property_name(ZSTR_VAL(ce->name), ZSTR_LEN(ce->name), prop_name, prop_len, 0); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_functions.h b/ext/spl/spl_functions.h index dc85ab84ff9d3..2b9ff7890ded3 100644 --- a/ext/spl/spl_functions.h +++ b/ext/spl/spl_functions.h @@ -78,12 +78,3 @@ zend_string *spl_gen_private_prop_name(zend_class_entry *ce, char *prop_name, in #define SPL_MA(class_name, function_name, alias_class, alias_function, arg_info, flags) \ PHP_MALIAS(spl_ ## alias_class, function_name, alias_function, arg_info, flags) #endif /* PHP_FUNCTIONS_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index a0cbd41560399..ebb63481a77ce 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -126,7 +126,7 @@ static void spl_ptr_heap_pqueue_elem_ctor(zval *zv) { /* {{{ */ static int spl_ptr_heap_cmp_cb_helper(zval *object, spl_heap_object *heap_object, zval *a, zval *b, zend_long *result) { /* {{{ */ zval zresult; - zend_call_method_with_2_params(object, heap_object->std.ce, &heap_object->fptr_cmp, "compare", &zresult, a, b); + zend_call_method_with_2_params(Z_OBJ_P(object), heap_object->std.ce, &heap_object->fptr_cmp, "compare", &zresult, a, b); if (EG(exception)) { return FAILURE; @@ -378,7 +378,7 @@ static void spl_heap_object_free_storage(zend_object *object) /* {{{ */ } /* }}} */ -static zend_object *spl_heap_object_new_ex(zend_class_entry *class_type, zval *orig, int clone_orig) /* {{{ */ +static zend_object *spl_heap_object_new_ex(zend_class_entry *class_type, zend_object *orig, int clone_orig) /* {{{ */ { spl_heap_object *intern; zend_class_entry *parent = class_type; @@ -393,7 +393,7 @@ static zend_object *spl_heap_object_new_ex(zend_class_entry *class_type, zval *o intern->fptr_cmp = NULL; if (orig) { - spl_heap_object *other = Z_SPLHEAP_P(orig); + spl_heap_object *other = spl_heap_from_obj(orig); intern->ce_get_iterator = other->ce_get_iterator; if (clone_orig) { @@ -462,13 +462,9 @@ static zend_object *spl_heap_object_new(zend_class_entry *class_type) /* {{{ */ } /* }}} */ -static zend_object *spl_heap_object_clone(zval *zobject) /* {{{ */ +static zend_object *spl_heap_object_clone(zend_object *old_object) /* {{{ */ { - zend_object *old_object; - zend_object *new_object; - - old_object = Z_OBJ_P(zobject); - new_object = spl_heap_object_new_ex(old_object->ce, zobject, 1); + zend_object *new_object = spl_heap_object_new_ex(old_object->ce, old_object, 1); zend_objects_clone_members(new_object, old_object); @@ -476,9 +472,9 @@ static zend_object *spl_heap_object_clone(zval *zobject) /* {{{ */ } /* }}} */ -static int spl_heap_object_count_elements(zval *object, zend_long *count) /* {{{ */ +static int spl_heap_object_count_elements(zend_object *object, zend_long *count) /* {{{ */ { - spl_heap_object *intern = Z_SPLHEAP_P(object); + spl_heap_object *intern = spl_heap_from_obj(object); if (intern->fptr_count) { zval rv; @@ -498,8 +494,8 @@ static int spl_heap_object_count_elements(zval *object, zend_long *count) /* {{{ } /* }}} */ -static HashTable* spl_heap_object_get_debug_info_helper(zend_class_entry *ce, zval *obj, int *is_temp) { /* {{{ */ - spl_heap_object *intern = Z_SPLHEAP_P(obj); +static HashTable* spl_heap_object_get_debug_info_helper(zend_class_entry *ce, zend_object *obj, int *is_temp) { /* {{{ */ + spl_heap_object *intern = spl_heap_from_obj(obj); zval tmp, heap_array; zend_string *pnstr; HashTable *debug_info; @@ -545,9 +541,9 @@ static HashTable* spl_heap_object_get_debug_info_helper(zend_class_entry *ce, zv } /* }}} */ -static HashTable *spl_heap_object_get_gc(zval *obj, zval **gc_data, int *gc_data_count) /* {{{ */ +static HashTable *spl_heap_object_get_gc(zend_object *obj, zval **gc_data, int *gc_data_count) /* {{{ */ { - spl_heap_object *intern = Z_SPLHEAP_P(obj); + spl_heap_object *intern = spl_heap_from_obj(obj); *gc_data = intern->heap->elements; *gc_data_count = intern->heap->count; @@ -555,13 +551,13 @@ static HashTable *spl_heap_object_get_gc(zval *obj, zval **gc_data, int *gc_data } /* }}} */ -static HashTable* spl_heap_object_get_debug_info(zval *obj, int *is_temp) /* {{{ */ +static HashTable* spl_heap_object_get_debug_info(zend_object *obj, int *is_temp) /* {{{ */ { return spl_heap_object_get_debug_info_helper(spl_ce_SplHeap, obj, is_temp); } /* }}} */ -static HashTable* spl_pqueue_object_get_debug_info(zval *obj, int *is_temp) /* {{{ */ +static HashTable* spl_pqueue_object_get_debug_info(zend_object *obj, int *is_temp) /* {{{ */ { return spl_heap_object_get_debug_info_helper(spl_ce_SplPriorityQueue, obj, is_temp); } @@ -1244,12 +1240,3 @@ PHP_MINIT_FUNCTION(spl_heap) /* {{{ */ return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_heap.h b/ext/spl/spl_heap.h index c8227ccde96c7..d73fca545e3c8 100644 --- a/ext/spl/spl_heap.h +++ b/ext/spl/spl_heap.h @@ -31,12 +31,3 @@ extern PHPAPI zend_class_entry *spl_ce_SplPriorityQueue; PHP_MINIT_FUNCTION(spl_heap); #endif /* SPL_HEAP_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index dd3d8d084af68..dcd9a05f9e316 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -201,7 +201,7 @@ static int spl_recursive_it_valid_ex(spl_recursive_it_object *object, zval *zthi level--; } if (object->endIteration && object->in_iteration) { - zend_call_method_with_0_params(zthis, object->ce, &object->endIteration, "endIteration", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->endIteration, "endIteration", NULL); } object->in_iteration = 0; return FAILURE; @@ -267,9 +267,9 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv ce = object->iterators[object->level].ce; zobject = &object->iterators[object->level].zobject; if (object->callHasChildren) { - zend_call_method_with_0_params(zthis, object->ce, &object->callHasChildren, "callHasChildren", &retval); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->callHasChildren, "callHasChildren", &retval); } else { - zend_call_method_with_0_params(zobject, ce, NULL, "haschildren", &retval); + zend_call_method_with_0_params(Z_OBJ_P(zobject), ce, NULL, "haschildren", &retval); } if (EG(exception)) { if (!(object->flags & RIT_CATCH_GET_CHILD)) { @@ -304,7 +304,7 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv } } if (object->nextElement) { - zend_call_method_with_0_params(zthis, object->ce, &object->nextElement, "nextelement", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->nextElement, "nextelement", NULL); } object->iterators[object->level].state = RS_NEXT; if (EG(exception)) { @@ -317,7 +317,7 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv return /* self */; case RS_SELF: if (object->nextElement && (object->mode == RIT_SELF_FIRST || object->mode == RIT_CHILD_FIRST)) { - zend_call_method_with_0_params(zthis, object->ce, &object->nextElement, "nextelement", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->nextElement, "nextelement", NULL); } if (object->mode == RIT_SELF_FIRST) { object->iterators[object->level].state = RS_CHILD; @@ -329,9 +329,9 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv ce = object->iterators[object->level].ce; zobject = &object->iterators[object->level].zobject; if (object->callGetChildren) { - zend_call_method_with_0_params(zthis, object->ce, &object->callGetChildren, "callGetChildren", &child); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->callGetChildren, "callGetChildren", &child); } else { - zend_call_method_with_0_params(zobject, ce, NULL, "getchildren", &child); + zend_call_method_with_0_params(Z_OBJ_P(zobject), ce, NULL, "getchildren", &child); } if (EG(exception)) { @@ -367,7 +367,7 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv sub_iter->funcs->rewind(sub_iter); } if (object->beginChildren) { - zend_call_method_with_0_params(zthis, object->ce, &object->beginChildren, "beginchildren", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->beginChildren, "beginchildren", NULL); if (EG(exception)) { if (!(object->flags & RIT_CATCH_GET_CHILD)) { return; @@ -381,7 +381,7 @@ static void spl_recursive_it_move_forward_ex(spl_recursive_it_object *object, zv /* no more elements */ if (object->level > 0) { if (object->endChildren) { - zend_call_method_with_0_params(zthis, object->ce, &object->endChildren, "endchildren", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->endChildren, "endchildren", NULL); if (EG(exception)) { if (!(object->flags & RIT_CATCH_GET_CHILD)) { return; @@ -415,7 +415,7 @@ static void spl_recursive_it_rewind_ex(spl_recursive_it_object *object, zval *zt zend_iterator_dtor(sub_iter); zval_ptr_dtor(&object->iterators[object->level--].zobject); if (!EG(exception) && (!object->endChildren || object->endChildren->common.scope != spl_ce_RecursiveIteratorIterator)) { - zend_call_method_with_0_params(zthis, object->ce, &object->endChildren, "endchildren", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->endChildren, "endchildren", NULL); } } object->iterators = erealloc(object->iterators, sizeof(spl_sub_iterator)); @@ -425,7 +425,7 @@ static void spl_recursive_it_rewind_ex(spl_recursive_it_object *object, zval *zt sub_iter->funcs->rewind(sub_iter); } if (!EG(exception) && object->beginIteration && !object->in_iteration) { - zend_call_method_with_0_params(zthis, object->ce, &object->beginIteration, "beginIteration", NULL); + zend_call_method_with_0_params(Z_OBJ_P(zthis), object->ce, &object->beginIteration, "beginIteration", NULL); } object->in_iteration = 1; spl_recursive_it_move_forward_ex(object, zthis); @@ -494,7 +494,7 @@ static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_cla if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "o|lzl", &iterator, &flags, &user_caching_it_flags, &mode) == SUCCESS) { if (instanceof_function(Z_OBJCE_P(iterator), zend_ce_aggregate)) { - zend_call_method_with_0_params(iterator, Z_OBJCE_P(iterator), &Z_OBJCE_P(iterator)->iterator_funcs_ptr->zf_new_iterator, "getiterator", &aggregate_retval); + zend_call_method_with_0_params(Z_OBJ_P(iterator), Z_OBJCE_P(iterator), &Z_OBJCE_P(iterator)->iterator_funcs_ptr->zf_new_iterator, "getiterator", &aggregate_retval); iterator = &aggregate_retval; } else { Z_ADDREF_P(iterator); @@ -522,7 +522,7 @@ static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_cla if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "o|ll", &iterator, &mode, &flags) == SUCCESS) { if (instanceof_function(Z_OBJCE_P(iterator), zend_ce_aggregate)) { - zend_call_method_with_0_params(iterator, Z_OBJCE_P(iterator), &Z_OBJCE_P(iterator)->iterator_funcs_ptr->zf_new_iterator, "getiterator", &aggregate_retval); + zend_call_method_with_0_params(Z_OBJ_P(iterator), Z_OBJCE_P(iterator), &Z_OBJCE_P(iterator)->iterator_funcs_ptr->zf_new_iterator, "getiterator", &aggregate_retval); iterator = &aggregate_retval; } else { Z_ADDREF_P(iterator); @@ -783,7 +783,7 @@ SPL_METHOD(RecursiveIteratorIterator, callHasChildren) if (Z_TYPE_P(zobject) == IS_UNDEF) { RETURN_FALSE; } else { - zend_call_method_with_0_params(zobject, ce, NULL, "haschildren", return_value); + zend_call_method_with_0_params(Z_OBJ_P(zobject), ce, NULL, "haschildren", return_value); if (Z_TYPE_P(return_value) == IS_UNDEF) { RETURN_FALSE; } @@ -808,7 +808,7 @@ SPL_METHOD(RecursiveIteratorIterator, callGetChildren) if (Z_TYPE_P(zobject) == IS_UNDEF) { return; } else { - zend_call_method_with_0_params(zobject, ce, NULL, "getchildren", return_value); + zend_call_method_with_0_params(Z_OBJ_P(zobject), ce, NULL, "getchildren", return_value); if (Z_TYPE_P(return_value) == IS_UNDEF) { RETURN_NULL(); } @@ -1035,7 +1035,7 @@ static void spl_recursive_tree_iterator_get_prefix(spl_recursive_it_object *obje smart_str_appendl(&str, ZSTR_VAL(object->prefix[0].s), ZSTR_LEN(object->prefix[0].s)); for (level = 0; level < object->level; ++level) { - zend_call_method_with_0_params(&object->iterators[level].zobject, object->iterators[level].ce, NULL, "hasnext", &has_next); + zend_call_method_with_0_params(Z_OBJ(object->iterators[level].zobject), object->iterators[level].ce, NULL, "hasnext", &has_next); if (Z_TYPE(has_next) != IS_UNDEF) { if (Z_TYPE(has_next) == IS_TRUE) { smart_str_appendl(&str, ZSTR_VAL(object->prefix[1].s), ZSTR_LEN(object->prefix[1].s)); @@ -1045,7 +1045,7 @@ static void spl_recursive_tree_iterator_get_prefix(spl_recursive_it_object *obje zval_ptr_dtor(&has_next); } } - zend_call_method_with_0_params(&object->iterators[level].zobject, object->iterators[level].ce, NULL, "hasnext", &has_next); + zend_call_method_with_0_params(Z_OBJ(object->iterators[level].zobject), object->iterators[level].ce, NULL, "hasnext", &has_next); if (Z_TYPE(has_next) != IS_UNDEF) { if (Z_TYPE(has_next) == IS_TRUE) { smart_str_appendl(&str, ZSTR_VAL(object->prefix[3].s), ZSTR_LEN(object->prefix[3].s)); @@ -1498,7 +1498,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z ce = ce_cast; } if (instanceof_function(ce, zend_ce_aggregate)) { - zend_call_method_with_0_params(zobject, ce, &ce->iterator_funcs_ptr->zf_new_iterator, "getiterator", &retval); + zend_call_method_with_0_params(Z_OBJ_P(zobject), ce, &ce->iterator_funcs_ptr->zf_new_iterator, "getiterator", &retval); if (EG(exception)) { zval_ptr_dtor(&retval); return NULL; @@ -1517,7 +1517,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z case DIT_AppendIterator: zend_replace_error_handling(EH_THROW, spl_ce_InvalidArgumentException, &error_handling); spl_instantiate(spl_ce_ArrayIterator, &intern->u.append.zarrayit); - zend_call_method_with_0_params(&intern->u.append.zarrayit, spl_ce_ArrayIterator, &spl_ce_ArrayIterator->constructor, "__construct", NULL); + zend_call_method_with_0_params(Z_OBJ(intern->u.append.zarrayit), spl_ce_ArrayIterator, &spl_ce_ArrayIterator->constructor, "__construct", NULL); intern->u.append.iterator = spl_ce_ArrayIterator->get_iterator(spl_ce_ArrayIterator, &intern->u.append.zarrayit, 0); zend_restore_error_handling(&error_handling); return intern; @@ -1815,7 +1815,7 @@ static inline void spl_filter_it_fetch(zval *zthis, spl_dual_it_object *intern) zval retval; while (spl_dual_it_fetch(intern, 1) == SUCCESS) { - zend_call_method_with_0_params(zthis, intern->std.ce, NULL, "accept", &retval); + zend_call_method_with_0_params(Z_OBJ_P(zthis), intern->std.ce, NULL, "accept", &retval); if (Z_TYPE(retval) != IS_UNDEF) { if (zend_is_true(&retval)) { zval_ptr_dtor(&retval); @@ -1899,7 +1899,7 @@ SPL_METHOD(RecursiveFilterIterator, hasChildren) SPL_FETCH_AND_CHECK_DUAL_IT(intern, ZEND_THIS); - zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "haschildren", &retval); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "haschildren", &retval); if (Z_TYPE(retval) != IS_UNDEF) { RETURN_ZVAL(&retval, 0, 1); } else { @@ -1920,7 +1920,7 @@ SPL_METHOD(RecursiveFilterIterator, getChildren) SPL_FETCH_AND_CHECK_DUAL_IT(intern, ZEND_THIS); - zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "getchildren", &retval); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getchildren", &retval); if (!EG(exception) && Z_TYPE(retval) != IS_UNDEF) { spl_instantiate_arg_ex1(Z_OBJCE_P(ZEND_THIS), return_value, &retval); } @@ -1940,7 +1940,7 @@ SPL_METHOD(RecursiveCallbackFilterIterator, getChildren) SPL_FETCH_AND_CHECK_DUAL_IT(intern, ZEND_THIS); - zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "getchildren", &retval); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getchildren", &retval); if (!EG(exception) && Z_TYPE(retval) != IS_UNDEF) { spl_instantiate_arg_ex2(Z_OBJCE_P(ZEND_THIS), return_value, &retval, &intern->u.cbfilter->fci.function_name); } @@ -2228,7 +2228,7 @@ SPL_METHOD(RecursiveRegexIterator, getChildren) SPL_FETCH_AND_CHECK_DUAL_IT(intern, ZEND_THIS); - zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "getchildren", &retval); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getchildren", &retval); if (!EG(exception)) { zval args[5]; @@ -2262,7 +2262,7 @@ SPL_METHOD(RecursiveRegexIterator, accept) RETURN_BOOL(zend_hash_num_elements(Z_ARRVAL(intern->current.data)) > 0); } - zend_call_method_with_0_params(ZEND_THIS, spl_ce_RegexIterator, NULL, "accept", return_value); + zend_call_method_with_0_params(Z_OBJ_P(ZEND_THIS), spl_ce_RegexIterator, NULL, "accept", return_value); } #endif @@ -2480,7 +2480,7 @@ static inline void spl_limit_it_seek(spl_dual_it_object *intern, zend_long pos) if (pos != intern->current.pos && instanceof_function(intern->inner.ce, spl_ce_SeekableIterator)) { ZVAL_LONG(&zpos, pos); spl_dual_it_free(intern); - zend_call_method_with_1_params(&intern->inner.zobject, intern->inner.ce, NULL, "seek", NULL, &zpos); + zend_call_method_with_1_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "seek", NULL, &zpos); if (!EG(exception)) { intern->current.pos = pos; if (spl_limit_it_valid(intern) == SUCCESS) { @@ -2630,7 +2630,7 @@ static inline void spl_caching_it_next(spl_dual_it_object *intern) /* Recursion ? */ if (intern->dit_type == DIT_RecursiveCachingIterator) { zval retval, zchildren, zflags; - zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "haschildren", &retval); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "haschildren", &retval); if (EG(exception)) { zval_ptr_dtor(&retval); if (intern->u.caching.flags & CIT_CATCH_GET_CHILD) { @@ -2640,7 +2640,7 @@ static inline void spl_caching_it_next(spl_dual_it_object *intern) } } else { if (zend_is_true(&retval)) { - zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "getchildren", &zchildren); + zend_call_method_with_0_params(Z_OBJ(intern->inner.zobject), intern->inner.ce, NULL, "getchildren", &zchildren); if (EG(exception)) { zval_ptr_dtor(&zchildren); if (intern->u.caching.flags & CIT_CATCH_GET_CHILD) { @@ -3774,12 +3774,3 @@ PHP_MINIT_FUNCTION(spl_iterators) return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_iterators.h b/ext/spl/spl_iterators.h index cb8e454254344..4e314eb203547 100644 --- a/ext/spl/spl_iterators.h +++ b/ext/spl/spl_iterators.h @@ -176,12 +176,3 @@ typedef int (*spl_iterator_apply_func_t)(zend_object_iterator *iter, void *puser PHPAPI int spl_iterator_apply(zval *obj, spl_iterator_apply_func_t apply_func, void *puser); #endif /* SPL_ITERATORS_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index 72fa507938c16..a072b3b537b8d 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -115,7 +115,7 @@ void spl_SplObjectStorage_free_storage(zend_object *object) /* {{{ */ } /* }}} */ -static int spl_object_storage_get_hash(zend_hash_key *key, spl_SplObjectStorage *intern, zval *this, zval *obj) { +static int spl_object_storage_get_hash(zend_hash_key *key, spl_SplObjectStorage *intern, zend_object *this, zval *obj) { if (intern->fptr_get_hash) { zval rv; zend_call_method_with_1_params(this, intern->std.ce, &intern->fptr_get_hash, "getHash", &rv, obj); @@ -162,7 +162,7 @@ static spl_SplObjectStorageElement* spl_object_storage_get(spl_SplObjectStorage } } /* }}} */ -spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *intern, zval *this, zval *obj, zval *inf) /* {{{ */ +spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *intern, zend_object *this, zval *obj, zval *inf) /* {{{ */ { spl_SplObjectStorageElement *pelement, element; zend_hash_key key; @@ -202,7 +202,7 @@ static int spl_object_storage_detach(spl_SplObjectStorage *intern, zval *this, z { int ret = FAILURE; zend_hash_key key; - if (spl_object_storage_get_hash(&key, intern, this, obj) == FAILURE) { + if (spl_object_storage_get_hash(&key, intern, Z_OBJ_P(this), obj) == FAILURE) { return ret; } if (key.key) { @@ -215,7 +215,7 @@ static int spl_object_storage_detach(spl_SplObjectStorage *intern, zval *this, z return ret; } /* }}}*/ -void spl_object_storage_addall(spl_SplObjectStorage *intern, zval *this, spl_SplObjectStorage *other) { /* {{{ */ +void spl_object_storage_addall(spl_SplObjectStorage *intern, zend_object *this, spl_SplObjectStorage *other) { /* {{{ */ spl_SplObjectStorageElement *element; ZEND_HASH_FOREACH_PTR(&other->storage, element) { @@ -225,7 +225,7 @@ void spl_object_storage_addall(spl_SplObjectStorage *intern, zval *this, spl_Spl intern->index = 0; } /* }}} */ -static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval *orig) /* {{{ */ +static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zend_object *orig) /* {{{ */ { spl_SplObjectStorage *intern; zend_class_entry *parent = class_type; @@ -256,7 +256,7 @@ static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval } if (orig) { - spl_SplObjectStorage *other = Z_SPLOBJSTORAGE_P(orig); + spl_SplObjectStorage *other = spl_object_storage_from_obj(orig); spl_object_storage_addall(intern, orig, other); } @@ -265,13 +265,11 @@ static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zval /* }}} */ /* {{{ spl_object_storage_clone */ -static zend_object *spl_object_storage_clone(zval *zobject) +static zend_object *spl_object_storage_clone(zend_object *old_object) { - zend_object *old_object; zend_object *new_object; - old_object = Z_OBJ_P(zobject); - new_object = spl_object_storage_new_ex(old_object->ce, zobject); + new_object = spl_object_storage_new_ex(old_object->ce, old_object); zend_objects_clone_members(new_object, old_object); @@ -279,9 +277,9 @@ static zend_object *spl_object_storage_clone(zval *zobject) } /* }}} */ -static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp) /* {{{ */ +static HashTable* spl_object_storage_debug_info(zend_object *obj, int *is_temp) /* {{{ */ { - spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(obj); + spl_SplObjectStorage *intern = spl_object_storage_from_obj(obj); spl_SplObjectStorageElement *element; HashTable *props; zval tmp, storage; @@ -291,7 +289,7 @@ static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp) /* {{{ *is_temp = 1; - props = Z_OBJPROP_P(obj); + props = obj->handlers->get_properties(obj); debug_info = zend_new_array(zend_hash_num_elements(props) + 1); zend_hash_copy(debug_info, props, (copy_ctor_func_t)zval_add_ref); @@ -319,10 +317,10 @@ static HashTable* spl_object_storage_debug_info(zval *obj, int *is_temp) /* {{{ /* }}} */ /* overridden for garbage collection */ -static HashTable *spl_object_storage_get_gc(zval *obj, zval **table, int *n) /* {{{ */ +static HashTable *spl_object_storage_get_gc(zend_object *obj, zval **table, int *n) /* {{{ */ { int i = 0; - spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(obj); + spl_SplObjectStorage *intern = spl_object_storage_from_obj(obj); spl_SplObjectStorageElement *element; if (intern->storage.nNumOfElements * 2 > intern->gcdata_num) { @@ -380,7 +378,7 @@ int spl_object_storage_contains(spl_SplObjectStorage *intern, zval *this, zval * { int found; zend_hash_key key; - if (spl_object_storage_get_hash(&key, intern, this, obj) == FAILURE) { + if (spl_object_storage_get_hash(&key, intern, Z_OBJ_P(this), obj) == FAILURE) { return 0; } @@ -404,7 +402,7 @@ SPL_METHOD(SplObjectStorage, attach) if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|z!", &obj, &inf) == FAILURE) { return; } - spl_object_storage_attach(intern, ZEND_THIS, obj, inf); + spl_object_storage_attach(intern, Z_OBJ_P(ZEND_THIS), obj, inf); } /* }}} */ /* {{{ proto void SplObjectStorage::detach(object obj) @@ -450,7 +448,7 @@ SPL_METHOD(SplObjectStorage, offsetGet) return; } - if (spl_object_storage_get_hash(&key, intern, ZEND_THIS, obj) == FAILURE) { + if (spl_object_storage_get_hash(&key, intern, Z_OBJ_P(ZEND_THIS), obj) == FAILURE) { return; } @@ -480,7 +478,7 @@ SPL_METHOD(SplObjectStorage, addAll) other = Z_SPLOBJSTORAGE_P(obj); - spl_object_storage_addall(intern, ZEND_THIS, other); + spl_object_storage_addall(intern, Z_OBJ_P(ZEND_THIS), other); RETURN_LONG(zend_hash_num_elements(&intern->storage)); } /* }}} */ @@ -729,7 +727,7 @@ SPL_METHOD(SplObjectStorage, serialize) /* members */ smart_str_appendl(&buf, "m:", 2); - ZVAL_ARR(&members, zend_array_dup(zend_std_get_properties(ZEND_THIS))); + ZVAL_ARR(&members, zend_array_dup(zend_std_get_properties(Z_OBJ_P(ZEND_THIS)))); php_var_serialize(&buf, &members, &var_hash); /* finishes the string */ zval_ptr_dtor(&members); @@ -815,7 +813,7 @@ SPL_METHOD(SplObjectStorage, unserialize) goto outexcept; } - if (spl_object_storage_get_hash(&key, intern, ZEND_THIS, &entry) == FAILURE) { + if (spl_object_storage_get_hash(&key, intern, Z_OBJ_P(ZEND_THIS), &entry) == FAILURE) { zval_ptr_dtor(&entry); zval_ptr_dtor(&inf); goto outexcept; @@ -830,7 +828,7 @@ SPL_METHOD(SplObjectStorage, unserialize) var_push_dtor(&var_hash, &pelement->obj); } } - element = spl_object_storage_attach(intern, ZEND_THIS, &entry, Z_ISUNDEF(inf)?NULL:&inf); + element = spl_object_storage_attach(intern, Z_OBJ_P(ZEND_THIS), &entry, Z_ISUNDEF(inf)?NULL:&inf); var_replace(&var_hash, &entry, &element->obj); var_replace(&var_hash, &inf, &element->inf); zval_ptr_dtor(&entry); @@ -1008,7 +1006,7 @@ SPL_METHOD(MultipleIterator, attachIterator) } } - spl_object_storage_attach(intern, ZEND_THIS, iterator, info); + spl_object_storage_attach(intern, Z_OBJ_P(ZEND_THIS), iterator, info); } /* }}} */ @@ -1029,7 +1027,7 @@ SPL_METHOD(MultipleIterator, rewind) zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); while ((element = zend_hash_get_current_data_ptr_ex(&intern->storage, &intern->pos)) != NULL && !EG(exception)) { it = &element->obj; - zend_call_method_with_0_params(it, Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_rewind, "rewind", NULL); + zend_call_method_with_0_params(Z_OBJ_P(it), Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_rewind, "rewind", NULL); zend_hash_move_forward_ex(&intern->storage, &intern->pos); } } @@ -1052,7 +1050,7 @@ SPL_METHOD(MultipleIterator, next) zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); while ((element = zend_hash_get_current_data_ptr_ex(&intern->storage, &intern->pos)) != NULL && !EG(exception)) { it = &element->obj; - zend_call_method_with_0_params(it, Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_next, "next", NULL); + zend_call_method_with_0_params(Z_OBJ_P(it), Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_next, "next", NULL); zend_hash_move_forward_ex(&intern->storage, &intern->pos); } } @@ -1082,7 +1080,7 @@ SPL_METHOD(MultipleIterator, valid) zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); while ((element = zend_hash_get_current_data_ptr_ex(&intern->storage, &intern->pos)) != NULL && !EG(exception)) { it = &element->obj; - zend_call_method_with_0_params(it, Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_valid, "valid", &retval); + zend_call_method_with_0_params(Z_OBJ_P(it), Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_valid, "valid", &retval); if (!Z_ISUNDEF(retval)) { valid = (Z_TYPE(retval) == IS_TRUE); @@ -1118,7 +1116,7 @@ static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_ zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); while ((element = zend_hash_get_current_data_ptr_ex(&intern->storage, &intern->pos)) != NULL && !EG(exception)) { it = &element->obj; - zend_call_method_with_0_params(it, Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_valid, "valid", &retval); + zend_call_method_with_0_params(Z_OBJ_P(it), Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_valid, "valid", &retval); if (!Z_ISUNDEF(retval)) { valid = Z_TYPE(retval) == IS_TRUE; @@ -1129,9 +1127,9 @@ static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_ if (valid) { if (SPL_MULTIPLE_ITERATOR_GET_ALL_CURRENT == get_type) { - zend_call_method_with_0_params(it, Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_current, "current", &retval); + zend_call_method_with_0_params(Z_OBJ_P(it), Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_current, "current", &retval); } else { - zend_call_method_with_0_params(it, Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_key, "key", &retval); + zend_call_method_with_0_params(Z_OBJ_P(it), Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs_ptr->zf_key, "key", &retval); } if (Z_ISUNDEF(retval)) { zend_throw_exception(spl_ce_RuntimeException, "Failed to call sub iterator method", 0); @@ -1267,12 +1265,3 @@ PHP_MINIT_FUNCTION(spl_observer) return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/spl_observer.h b/ext/spl/spl_observer.h index 26a8cd6eecec3..50d65f63ab0d9 100644 --- a/ext/spl/spl_observer.h +++ b/ext/spl/spl_observer.h @@ -30,12 +30,3 @@ extern PHPAPI zend_class_entry *spl_ce_MultipleIterator; PHP_MINIT_FUNCTION(spl_observer); #endif /* SPL_OBSERVER_H */ - -/* - * Local Variables: - * c-basic-offset: 4 - * tab-width: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/spl/tests/bug38618.phpt b/ext/spl/tests/bug38618.phpt index 95a3da83cc57b..097d169a985e3 100644 --- a/ext/spl/tests/bug38618.phpt +++ b/ext/spl/tests/bug38618.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #38618 (RecursiveArrayIterator::hasChildren() follows objects) --FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - //resource - 'resource' => $res, -); - -// loop through each element of the array for pattern - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( class_implements($class, $value) ); -}; - -fclose($res); - -?> -===DONE=== ---EXPECTF-- -*** Testing class_implements() : variation *** - ---int 0-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---int 1-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---int 12345-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---int -12345-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---float 10.5-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---float -10.5-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---float 12.3456789000e10-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---float -12.3456789000e10-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---float .5-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---empty array-- -Error: 2 - class_implements() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - class_implements() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - class_implements() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - class_implements() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---uppercase NULL-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---lowercase null-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---lowercase true-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---lowercase false-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---uppercase TRUE-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---uppercase FALSE-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---empty string DQ-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---empty string SQ-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---instance of classWithToString-- -Error: 2 - class_implements() expects parameter 2 to be bool, object given, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - class_implements() expects parameter 2 to be bool, object given, %s(%d) -bool(false) - ---undefined var-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---unset var-- -array(1) { - ["Traversable"]=> - string(11) "Traversable" -} - ---resource-- -Error: 2 - class_implements() expects parameter 2 to be bool, resource given, %s(%d) -bool(false) -===DONE=== diff --git a/ext/spl/tests/class_uses_variation1.phpt b/ext/spl/tests/class_uses_variation1.phpt index be6aa9ac7f25d..fbf476b493642 100644 --- a/ext/spl/tests/class_uses_variation1.phpt +++ b/ext/spl/tests/class_uses_variation1.phpt @@ -12,7 +12,7 @@ echo "*** Testing class_uses() : variation ***\n"; // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/spl/tests/class_uses_variation2.phpt b/ext/spl/tests/class_uses_variation2.phpt deleted file mode 100644 index 6458bd178cf47..0000000000000 --- a/ext/spl/tests/class_uses_variation2.phpt +++ /dev/null @@ -1,261 +0,0 @@ ---TEST-- -SPL: Test class_uses() function : variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - //resource - 'resource' => $res, -); - -// loop through each element of the array for pattern - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( class_uses($class, $value) ); -}; - -fclose($res); - -?> -===DONE=== ---EXPECTF-- -*** Testing class_uses() : variation *** - ---int 0-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---int 1-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---int 12345-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---int -12345-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---float 10.5-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---float -10.5-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---float 12.3456789000e10-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---float -12.3456789000e10-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---float .5-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---empty array-- -Error: 2 - class_uses() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - class_uses() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - class_uses() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - class_uses() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---uppercase NULL-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---lowercase null-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---lowercase true-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---lowercase false-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---uppercase TRUE-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---uppercase FALSE-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---empty string DQ-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---empty string SQ-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---instance of classWithToString-- -Error: 2 - class_uses() expects parameter 2 to be bool, object given, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - class_uses() expects parameter 2 to be bool, object given, %s(%d) -bool(false) - ---undefined var-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---unset var-- -array(1) { - ["foo"]=> - string(3) "foo" -} - ---resource-- -Error: 2 - class_uses() expects parameter 2 to be bool, resource given, %s(%d) -bool(false) -===DONE=== diff --git a/ext/sqlite3/config0.m4 b/ext/sqlite3/config0.m4 index e4405499fe559..b4ae84ea2139d 100644 --- a/ext/sqlite3/config0.m4 +++ b/ext/sqlite3/config0.m4 @@ -1,5 +1,4 @@ dnl config.m4 for extension sqlite3 -dnl vim:et:ts=2:sw=2 PHP_ARG_WITH(sqlite3, whether to enable the SQLite3 extension, [ --without-sqlite3[=DIR] Do not include SQLite3 support. DIR is the prefix to diff --git a/ext/sqlite3/php_sqlite3.h b/ext/sqlite3/php_sqlite3.h index 515229e5d8dc1..cfb3327d715e6 100644 --- a/ext/sqlite3/php_sqlite3.h +++ b/ext/sqlite3/php_sqlite3.h @@ -42,11 +42,3 @@ ZEND_TSRMLS_CACHE_EXTERN() #define PHP_SQLITE3_BOTH (PHP_SQLITE3_ASSOC|PHP_SQLITE3_NUM) #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/sqlite3/php_sqlite3_structs.h b/ext/sqlite3/php_sqlite3_structs.h index 5027dc06d709a..f189ea30af7e1 100644 --- a/ext/sqlite3/php_sqlite3_structs.h +++ b/ext/sqlite3/php_sqlite3_structs.h @@ -138,12 +138,3 @@ static inline php_sqlite3_stmt *php_sqlite3_stmt_from_obj(zend_object *obj) { #define Z_SQLITE3_STMT_P(zv) php_sqlite3_stmt_from_obj(Z_OBJ_P((zv))) #endif - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 3dd1fd813686e..45c5b4e5bb451 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -2475,12 +2475,3 @@ ZEND_TSRMLS_CACHE_DEFINE() #endif ZEND_GET_MODULE(sqlite3) #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/array.c b/ext/standard/array.c index a8532e4191b13..e8b0c64f3cd69 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -799,13 +799,13 @@ PHP_FUNCTION(count) /* first, we check if the handler is defined */ if (Z_OBJ_HT_P(array)->count_elements) { RETVAL_LONG(1); - if (SUCCESS == Z_OBJ_HT(*array)->count_elements(array, &Z_LVAL_P(return_value))) { + if (SUCCESS == Z_OBJ_HT(*array)->count_elements(Z_OBJ_P(array), &Z_LVAL_P(return_value))) { return; } } /* if not and the object implements Countable we call its count() method */ if (instanceof_function(Z_OBJCE_P(array), zend_ce_countable)) { - zend_call_method_with_0_params(array, NULL, NULL, "count", &retval); + zend_call_method_with_0_params(Z_OBJ_P(array), NULL, NULL, "count", &retval); if (Z_TYPE(retval) != IS_UNDEF) { RETVAL_LONG(zval_get_long(&retval)); zval_ptr_dtor(&retval); @@ -3470,14 +3470,14 @@ PHP_FUNCTION(array_splice) Returns elements specified by offset and length */ PHP_FUNCTION(array_slice) { - zval *input, /* Input array */ - *z_length = NULL, /* How many elements to get */ - *entry; /* An array entry */ - zend_long offset, /* Offset to get elements from */ - length = 0; - zend_bool preserve_keys = 0; /* Whether to preserve keys while copying to the new array or not */ - int num_in, /* Number of elements in the input array */ - pos; /* Current position in the array */ + zval *input; /* Input array */ + zval *entry; /* An array entry */ + zend_long offset; /* Offset to get elements from */ + zend_long length = 0; /* How many elements to get */ + zend_bool length_is_null = 1; /* Whether an explicit length has been omitted */ + zend_bool preserve_keys = 0; /* Whether to preserve keys while copying to the new array */ + uint32_t num_in; /* Number of elements in the input array */ + uint32_t pos; /* Current position in the array */ zend_string *string_key; zend_ulong num_key; @@ -3485,7 +3485,7 @@ PHP_FUNCTION(array_slice) Z_PARAM_ARRAY(input) Z_PARAM_LONG(offset) Z_PARAM_OPTIONAL - Z_PARAM_ZVAL(z_length) + Z_PARAM_LONG_EX(length, length_is_null, 1, 0) Z_PARAM_BOOL(preserve_keys) ZEND_PARSE_PARAMETERS_END(); @@ -3493,10 +3493,8 @@ PHP_FUNCTION(array_slice) num_in = zend_hash_num_elements(Z_ARRVAL_P(input)); /* We want all entries from offset to the end if length is not passed or is null */ - if (ZEND_NUM_ARGS() < 3 || Z_TYPE_P(z_length) == IS_NULL) { + if (length_is_null) { length = num_in; - } else { - length = zval_get_long(z_length); } /* Clamp the offset.. */ @@ -4152,9 +4150,12 @@ static inline zval *array_column_fetch_prop(zval *data, zval *name, zval *rv) /* /* The has_property check is first performed in "exists" mode (which returns true for * properties that are null but exist) and then in "has" mode to handle objects that * implement __isset (which is not called in "exists" mode). */ - if (Z_OBJ_HANDLER_P(data, has_property)(data, name, ZEND_PROPERTY_EXISTS, NULL) - || Z_OBJ_HANDLER_P(data, has_property)(data, name, ZEND_PROPERTY_ISSET, NULL)) { - prop = Z_OBJ_HANDLER_P(data, read_property)(data, name, BP_VAR_R, NULL, rv); + zend_string *str, *tmp_str; + + str = zval_get_tmp_string(name, &tmp_str); + if (Z_OBJ_HANDLER_P(data, has_property)(Z_OBJ_P(data), str, ZEND_PROPERTY_EXISTS, NULL) + || Z_OBJ_HANDLER_P(data, has_property)(Z_OBJ_P(data), str, ZEND_PROPERTY_ISSET, NULL)) { + prop = Z_OBJ_HANDLER_P(data, read_property)(Z_OBJ_P(data), str, BP_VAR_R, NULL, rv); if (prop) { ZVAL_DEREF(prop); if (prop != rv) { @@ -4162,6 +4163,7 @@ static inline zval *array_column_fetch_prop(zval *data, zval *name, zval *rv) /* } } } + zend_tmp_string_release(tmp_str); } else if (Z_TYPE_P(data) == IS_ARRAY) { if (Z_TYPE_P(name) == IS_STRING) { prop = zend_symtable_find(Z_ARRVAL_P(data), Z_STR_P(name)); @@ -6454,12 +6456,3 @@ PHP_FUNCTION(array_combine) } ZEND_HASH_FOREACH_END(); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/assert.c b/ext/standard/assert.c index 99e56c450fbac..607704d9a8cf4 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -307,12 +307,3 @@ PHP_FUNCTION(assert_options) RETURN_FALSE; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/base64.c b/ext/standard/base64.c index e911455cfeedd..3553e79f4ed13 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -819,12 +819,3 @@ PHP_FUNCTION(base64_decode) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/base64.h b/ext/standard/base64.h index b4d6016e97042..b0ed3f6dfc741 100644 --- a/ext/standard/base64.h +++ b/ext/standard/base64.h @@ -78,10 +78,3 @@ static inline zend_string *php_base64_decode_str(const zend_string *str) { } #endif /* BASE64_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 66c41e1c6b045..a8bc5ca64978e 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -6150,12 +6150,3 @@ PHP_FUNCTION(sys_getloadavg) } /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 3a88058aae909..237517c91f554 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -791,12 +791,3 @@ PHP_FUNCTION(get_browser) zend_string_release_ex(lookup_browser_name, 0); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c index a328600f9d95e..fb6e85ab071be 100644 --- a/ext/standard/crc32.c +++ b/ext/standard/crc32.c @@ -41,12 +41,3 @@ PHP_NAMED_FUNCTION(php_if_crc32) RETVAL_LONG(crc^0xFFFFFFFF); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/crc32.h b/ext/standard/crc32.h index 45b4349f591b0..300af378fc171 100644 --- a/ext/standard/crc32.h +++ b/ext/standard/crc32.h @@ -96,12 +96,3 @@ static const unsigned int crc32tab[256] = { 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/credits.c b/ext/standard/credits.c index 47de382db2ef9..8f4c6b95dadf5 100644 --- a/ext/standard/credits.c +++ b/ext/standard/credits.c @@ -128,12 +128,3 @@ PHPAPI void php_print_credits(int flag) /* {{{ */ } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index 34a06cb52046b..068d743d1a92c 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -275,12 +275,3 @@ PHP_FUNCTION(crypt) RETURN_STR(result); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/css.c b/ext/standard/css.c index 2252ee14c6ec5..ac1e2cf4bb7cc 100644 --- a/ext/standard/css.c +++ b/ext/standard/css.c @@ -42,12 +42,3 @@ PHPAPI void php_info_print_css(void) /* {{{ */ PUTS("hr {width: 934px; background-color: #ccc; border: 0; height: 1px;}\n"); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c index 113f9257114d9..e9f45eb61f11d 100644 --- a/ext/standard/cyr_convert.c +++ b/ext/standard/cyr_convert.c @@ -284,12 +284,3 @@ PHP_FUNCTION(convert_cyr_string) RETVAL_NEW_STR(str); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index ffc365296c709..b1f0f265573ca 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -106,12 +106,3 @@ PHP_FUNCTION(strptime) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 5ddec81381269..e81855fc29f28 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -597,12 +597,3 @@ PHP_FUNCTION(scandir) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 19b1cf7649922..226474efbfded 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -267,12 +267,3 @@ PHP_MINFO_FUNCTION(dl) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 3d327b48d9c10..3f34ba67eecad 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -1152,12 +1152,3 @@ PHP_MINIT_FUNCTION(dns) { return SUCCESS; } #endif /* HAVE_FULL_DNS_FUNCS */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 31a901d6758ee..63e1d97e1d8b3 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -579,12 +579,3 @@ PHP_FUNCTION(proc_nice) } /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/file.c b/ext/standard/file.c index fea9d7a7cbcd7..df4c50545b180 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -691,7 +691,7 @@ PHP_FUNCTION(file_put_contents) if (Z_OBJ_HT_P(data) != NULL) { zval out; - if (zend_std_cast_object_tostring(data, &out, IS_STRING) == SUCCESS) { + if (zend_std_cast_object_tostring(Z_OBJ_P(data), &out, IS_STRING) == SUCCESS) { numbytes = php_stream_write(stream, Z_STRVAL(out), Z_STRLEN(out)); if (numbytes != Z_STRLEN(out)) { php_error_docref(NULL, E_WARNING, "Only "ZEND_LONG_FMT" of %zd bytes written, possibly out of free disk space", numbytes, Z_STRLEN(out)); @@ -2467,12 +2467,3 @@ PHP_FUNCTION(sys_get_temp_dir) RETURN_STRING((char *)php_get_temporary_directory()); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index d39461a98d9d5..bf2bc752b0315 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -1134,12 +1134,3 @@ PHP_FUNCTION(realpath_cache_get) buckets++; } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/filters.c b/ext/standard/filters.c index a77d90e4b2f51..5df7c623fd909 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -1947,12 +1947,3 @@ PHP_MSHUTDOWN_FUNCTION(standard_filters) return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c index fa78b1af01199..fd9a2e098516e 100644 --- a/ext/standard/flock_compat.c +++ b/ext/standard/flock_compat.c @@ -228,12 +228,3 @@ int inet_aton(const char *cp, struct in_addr *ap) /* }}} */ #endif /* !HAVE_INET_ATON */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index b2245745840f2..ae1e529f1dd0e 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -833,12 +833,3 @@ PHP_FUNCTION(vfprintf) zend_string_efree(result); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index 9ec91a78d351d..aecca52d0ef4d 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -138,12 +138,3 @@ PHP_FUNCTION(pfsockopen) php_fsockopen_stream(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h index caf76c8d900b0..b6fee88d89b0a 100644 --- a/ext/standard/fsock.h +++ b/ext/standard/fsock.h @@ -28,11 +28,4 @@ PHP_FUNCTION(fsockopen); PHP_FUNCTION(pfsockopen); -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim: sw=4 ts=4 - */ #endif /* FSOCK_H */ diff --git a/ext/standard/ftok.c b/ext/standard/ftok.c index 2d87b3005a1ae..9e4af788e3abc 100644 --- a/ext/standard/ftok.c +++ b/ext/standard/ftok.c @@ -65,10 +65,3 @@ PHP_FUNCTION(ftok) } /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 2f64dadbaf867..dc97fa83a073c 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -1196,13 +1196,3 @@ PHPAPI const php_stream_wrapper php_stream_ftp_wrapper = { NULL, 1 /* is_url */ }; - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/head.c b/ext/standard/head.c index 52af960611afc..0ab0293109754 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -443,11 +443,3 @@ PHP_FUNCTION(http_response_code) RETURN_LONG(SG(sapi_headers).http_response_code); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 * End: - */ diff --git a/ext/standard/hrtime.c b/ext/standard/hrtime.c index 7aa2eff1c4df8..2a6707f7bda64 100644 --- a/ext/standard/hrtime.c +++ b/ext/standard/hrtime.c @@ -192,12 +192,3 @@ PHPAPI php_hrtime_t php_hrtime_current(void) {/*{{{*/ return _timer_current(); }/*}}}*/ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/html.c b/ext/standard/html.c index 701a65835ef49..d69082939c6b0 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1710,12 +1710,3 @@ PHP_FUNCTION(get_html_translation_table) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/http.c b/ext/standard/http.c index 218ce805ab1c3..40c53d3b67899 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -267,12 +267,3 @@ PHP_FUNCTION(http_build_query) RETURN_NEW_STR(formstr.s); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index bd02e883953d3..611cbccdbea90 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -1021,12 +1021,3 @@ PHPAPI const php_stream_wrapper php_stream_http_wrapper = { NULL, 1 /* is_url */ }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/image.c b/ext/standard/image.c index 387baf60534dd..9df5290ad847b 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -1533,12 +1533,3 @@ PHP_FUNCTION(getimagesizefromstring) php_getimagesize_from_any(INTERNAL_FUNCTION_PARAM_PASSTHRU, FROM_DATA); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c index 2ae96b4a8fd9c..0df21e37d7c7f 100644 --- a/ext/standard/incomplete_class.c +++ b/ext/standard/incomplete_class.c @@ -32,7 +32,7 @@ static zend_object_handlers php_incomplete_object_handlers; /* {{{ incomplete_class_message */ -static void incomplete_class_message(zval *object, int error_type) +static void incomplete_class_message(zend_object *object, int error_type) { zend_string *class_name; @@ -47,7 +47,7 @@ static void incomplete_class_message(zval *object, int error_type) } /* }}} */ -static zval *incomplete_class_get_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */ +static zval *incomplete_class_get_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) /* {{{ */ { incomplete_class_message(object, E_NOTICE); @@ -60,27 +60,27 @@ static zval *incomplete_class_get_property(zval *object, zval *member, int type, } /* }}} */ -static zval *incomplete_class_write_property(zval *object, zval *member, zval *value, void **cache_slot) /* {{{ */ +static zval *incomplete_class_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) /* {{{ */ { incomplete_class_message(object, E_NOTICE); return value; } /* }}} */ -static zval *incomplete_class_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ +static zval *incomplete_class_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) /* {{{ */ { incomplete_class_message(object, E_NOTICE); return &EG(error_zval); } /* }}} */ -static void incomplete_class_unset_property(zval *object, zval *member, void **cache_slot) /* {{{ */ +static void incomplete_class_unset_property(zend_object *object, zend_string *member, void **cache_slot) /* {{{ */ { incomplete_class_message(object, E_NOTICE); } /* }}} */ -static int incomplete_class_has_property(zval *object, zval *member, int check_empty, void **cache_slot) /* {{{ */ +static int incomplete_class_has_property(zend_object *object, zend_string *member, int check_empty, void **cache_slot) /* {{{ */ { incomplete_class_message(object, E_NOTICE); return 0; @@ -89,10 +89,7 @@ static int incomplete_class_has_property(zval *object, zval *member, int check_e static zend_function *incomplete_class_get_method(zend_object **object, zend_string *method, const zval *key) /* {{{ */ { - zval zobject; - - ZVAL_OBJ(&zobject, *object); - incomplete_class_message(&zobject, E_ERROR); + incomplete_class_message(*object, E_ERROR); return NULL; } /* }}} */ @@ -132,15 +129,14 @@ PHPAPI zend_class_entry *php_create_incomplete_class(void) /* {{{ php_lookup_class_name */ -PHPAPI zend_string *php_lookup_class_name(zval *object) +PHPAPI zend_string *php_lookup_class_name(zend_object *object) { - zval *val; - HashTable *object_properties; - - object_properties = Z_OBJPROP_P(object); + if (object->properties) { + zval *val = zend_hash_str_find(object->properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER)-1); - if ((val = zend_hash_str_find(object_properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER)-1)) != NULL && Z_TYPE_P(val) == IS_STRING) { - return zend_string_copy(Z_STR_P(val)); + if (val != NULL && Z_TYPE_P(val) == IS_STRING) { + return zend_string_copy(Z_STR_P(val)); + } } return NULL; @@ -158,12 +154,3 @@ PHPAPI void php_store_class_name(zval *object, const char *name, size_t len) zend_hash_str_update(Z_OBJPROP_P(object), MAGIC_MEMBER, sizeof(MAGIC_MEMBER)-1, &val); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/info.c b/ext/standard/info.c index 5c4fc4083d449..570c92393c73a 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -1370,12 +1370,3 @@ PHP_FUNCTION(php_ini_loaded_file) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index 0dffdb31d2e94..f3c17dadd9254 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -385,12 +385,3 @@ PHP_FUNCTION(iptcparse) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c index b16105014fd19..c649137eb6c62 100644 --- a/ext/standard/lcg.c +++ b/ext/standard/lcg.c @@ -122,12 +122,3 @@ PHP_FUNCTION(lcg_value) RETURN_DOUBLE(php_combined_lcg()); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c index 0628054d7939a..a03e3441cb352 100644 --- a/ext/standard/levenshtein.c +++ b/ext/standard/levenshtein.c @@ -131,12 +131,3 @@ PHP_FUNCTION(levenshtein) RETURN_LONG(distance); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/link.c b/ext/standard/link.c index 8231c13f2a4e0..705c293f7437a 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -221,12 +221,3 @@ PHP_FUNCTION(link) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/link_win32.c b/ext/standard/link_win32.c index 46ec89dcaae3c..e8f9e5f8524b8 100644 --- a/ext/standard/link_win32.c +++ b/ext/standard/link_win32.c @@ -225,12 +225,3 @@ PHP_FUNCTION(link) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 931c27ce719c4..53f75bf32ac5e 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -657,12 +657,3 @@ PHP_MINFO_FUNCTION(mail) #endif } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/math.c b/ext/standard/math.c index dfb664c81ef13..cefcd38769353 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -1318,12 +1318,3 @@ PHP_FUNCTION(intdiv) RETURN_LONG(dividend / divisor); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/ext/standard/md5.c b/ext/standard/md5.c index f59c3362f1718..d6ec2ffa6642a 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -389,12 +389,3 @@ PHPAPI void PHP_MD5Final(unsigned char *result, PHP_MD5_CTX *ctx) ZEND_SECURE_ZERO(ctx, sizeof(*ctx)); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index 61338390f6213..16fd14957134f 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -470,12 +470,3 @@ static int metaphone(unsigned char *word, size_t word_len, zend_long max_phoneme return 0; } /* END metaphone */ /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index d68437139eda2..46d1a7b2784aa 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -156,12 +156,3 @@ PHP_FUNCTION(getrusage) #endif /* HAVE_GETRUSAGE */ /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/mt_rand.c b/ext/standard/mt_rand.c index dc7b98e31511e..a176b95231e88 100644 --- a/ext/standard/mt_rand.c +++ b/ext/standard/mt_rand.c @@ -358,12 +358,3 @@ PHP_MINIT_FUNCTION(mt_rand) return SUCCESS; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 0f1af1d69edb6..5f375585d4122 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -1331,12 +1331,3 @@ PHP_MINIT_FUNCTION(pack) return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index 5fa00aa130004..e0533efdd01ef 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -188,12 +188,3 @@ PHP_FUNCTION(getlastmod) } } /* }}} */ - -/*nma - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/password.c b/ext/standard/password.c index 1a6f8729c970a..4a4d99dc6e019 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -681,12 +681,3 @@ PHP_FUNCTION(password_algos) { } ZEND_HASH_FOREACH_END(); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h index 6bd7dc3abcffe..38410c9d20530 100644 --- a/ext/standard/php_crypt.h +++ b/ext/standard/php_crypt.h @@ -28,10 +28,3 @@ PHP_MSHUTDOWN_FUNCTION(crypt); PHP_RINIT_FUNCTION(crypt); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index ab20eb8e9f0a5..36fe523d92d7a 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -441,13 +441,3 @@ PHPAPI const php_stream_wrapper php_stream_php_wrapper = { NULL, 0, /* is_url */ }; - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h index 9c4b6b4bbf50d..b8ce4b1722b7f 100644 --- a/ext/standard/php_http.h +++ b/ext/standard/php_http.h @@ -32,12 +32,3 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, PHP_FUNCTION(http_build_query); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/php_incomplete_class.h b/ext/standard/php_incomplete_class.h index d768f25bdb638..eeb446196579f 100644 --- a/ext/standard/php_incomplete_class.h +++ b/ext/standard/php_incomplete_class.h @@ -27,7 +27,7 @@ #define PHP_SET_CLASS_ATTRIBUTES(struc) \ /* OBJECTS_FIXME: Fix for new object model */ \ if (Z_OBJCE_P(struc) == BG(incomplete_class)) { \ - class_name = php_lookup_class_name(struc); \ + class_name = php_lookup_class_name(Z_OBJ_P(struc)); \ if (!class_name) { \ class_name = zend_string_init(INCOMPLETE_CLASS, sizeof(INCOMPLETE_CLASS) - 1, 0); \ } \ @@ -51,7 +51,7 @@ extern "C" { #endif PHPAPI zend_class_entry *php_create_incomplete_class(void); -PHPAPI zend_string *php_lookup_class_name(zval *object); +PHPAPI zend_string *php_lookup_class_name(zend_object *object); PHPAPI void php_store_class_name(zval *object, const char *name, size_t len); #ifdef __cplusplus diff --git a/ext/standard/php_password.h b/ext/standard/php_password.h index 7d02d77b9014b..ecb34780c70a6 100644 --- a/ext/standard/php_password.h +++ b/ext/standard/php_password.h @@ -66,11 +66,3 @@ static inline const php_password_algo* php_password_algo_identify(const zend_str #endif - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/standard/php_random.h b/ext/standard/php_random.h index 7660f746c54ef..3398ddb534655 100644 --- a/ext/standard/php_random.h +++ b/ext/standard/php_random.h @@ -49,10 +49,3 @@ extern PHPAPI php_random_globals random_globals; #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/standard/php_standard.h b/ext/standard/php_standard.h index 30a1ce68c3878..615264282efe4 100644 --- a/ext/standard/php_standard.h +++ b/ext/standard/php_standard.h @@ -66,11 +66,3 @@ #define phpext_standard_ptr basic_functions_module_ptr PHP_MINIT_FUNCTION(standard_filters); PHP_MSHUTDOWN_FUNCTION(standard_filters); - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/standard/php_uuencode.h b/ext/standard/php_uuencode.h index dd17ee54f8067..7c350b4f18de1 100644 --- a/ext/standard/php_uuencode.h +++ b/ext/standard/php_uuencode.h @@ -26,10 +26,3 @@ PHPAPI zend_string *php_uudecode(char *src, size_t src_len); PHPAPI zend_string *php_uuencode(char *src, size_t src_len); #endif /* PHP_UUENCODE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 0cc2fa9d74941..d4cee29452453 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -970,12 +970,3 @@ PHP_FUNCTION(proc_open) /* }}} */ #endif /* PHP_CAN_SUPPORT_PROC_OPEN */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c index 34de3a0cd1ecb..336a4cc0bb448 100644 --- a/ext/standard/quot_print.c +++ b/ext/standard/quot_print.c @@ -277,12 +277,3 @@ PHP_FUNCTION(quoted_printable_encode) RETURN_STR(new_str); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/rand.c b/ext/standard/rand.c index aa1b33a4adfcd..8c47a89f4f132 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -68,12 +68,3 @@ PHP_FUNCTION(rand) RETURN_LONG(php_mt_rand_common(min, max)); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/random.c b/ext/standard/random.c index 6d3bfdae4ecb4..f6568a658fd8e 100644 --- a/ext/standard/random.c +++ b/ext/standard/random.c @@ -285,12 +285,3 @@ PHP_FUNCTION(random_int) RETURN_LONG(result); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c index 58bcd13637c56..b128f0d54fa53 100644 --- a/ext/standard/scanf.c +++ b/ext/standard/scanf.c @@ -1201,12 +1201,3 @@ static inline void scan_set_error_return(int numVars, zval *return_value) /* {{{ } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/sha1.c b/ext/standard/sha1.c index 5d64e42cb3452..886c98cc6b72a 100644 --- a/ext/standard/sha1.c +++ b/ext/standard/sha1.c @@ -395,12 +395,3 @@ unsigned int len; (((uint32_t) input[j + 1]) << 16) | (((uint32_t) input[j]) << 24); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/soundex.c b/ext/standard/soundex.c index a8125a27b558d..0f46fbfdfe887 100644 --- a/ext/standard/soundex.c +++ b/ext/standard/soundex.c @@ -104,12 +104,3 @@ PHP_FUNCTION(soundex) RETURN_STRINGL(soundex, _small); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index e6eebe3df399f..ebb4d2593fb5c 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -1736,12 +1736,3 @@ PHP_FUNCTION(stream_socket_shutdown) } /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/streamsfuncs.h b/ext/standard/streamsfuncs.h index 2754f4b1c66e4..bcd2afdcc4035 100644 --- a/ext/standard/streamsfuncs.h +++ b/ext/standard/streamsfuncs.h @@ -67,12 +67,3 @@ PHP_FUNCTION(sapi_windows_vt100_support); #if HAVE_SOCKETPAIR PHP_FUNCTION(stream_socket_pair); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/string.c b/ext/standard/string.c index 5311d73beca7b..8009889b96011 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -6173,12 +6173,3 @@ PHP_FUNCTION(utf8_decode) RETURN_STR(php_utf8_decode(arg, arg_len)); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c index 9e54a7f94edfc..c088fd8438b47 100644 --- a/ext/standard/strnatcmp.c +++ b/ext/standard/strnatcmp.c @@ -172,12 +172,3 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 9a671373b670e..29967df34af63 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -196,12 +196,3 @@ PHP_FUNCTION(syslog) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/tests/array/array_change_key_case_variation1.phpt b/ext/standard/tests/array/array_change_key_case_variation1.phpt deleted file mode 100644 index 14626deb86e18..0000000000000 --- a/ext/standard/tests/array/array_change_key_case_variation1.phpt +++ /dev/null @@ -1,223 +0,0 @@ ---TEST-- -Test array_change_key_case() function : usage variations - Pass different data types as $input arg ---FILE-- - ---EXPECTF-- -*** Testing array_change_key_case() : usage variations *** - --- Iteration 1 -- - -Warning: array_change_key_case() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: array_change_key_case() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: array_change_key_case() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: array_change_key_case() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: array_change_key_case() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: array_change_key_case() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: array_change_key_case() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: array_change_key_case() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: array_change_key_case() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: array_change_key_case() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: array_change_key_case() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: array_change_key_case() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: array_change_key_case() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -array(0) { -} - --- Iteration 19 -- - -Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: array_change_key_case() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: array_change_key_case() expects parameter 1 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_change_key_case_variation2.phpt b/ext/standard/tests/array/array_change_key_case_variation2.phpt deleted file mode 100644 index b0b90bd926d46..0000000000000 --- a/ext/standard/tests/array/array_change_key_case_variation2.phpt +++ /dev/null @@ -1,289 +0,0 @@ ---TEST-- -Test array_change_key_case() function : usage variations - Pass different data types as $case arg ---SKIPIF-- - 1, 'TWO' => 2, 'Three' => 3); - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// heredoc string -$heredoc = << ---EXPECTF-- -*** Testing array_change_key_case() : usage variations *** - --- Iteration 1 -- -array(3) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) -} - --- Iteration 2 -- -array(3) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) -} - --- Iteration 3 -- -array(3) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) -} - --- Iteration 4 -- -array(3) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) -} - --- Iteration 5 -- -array(3) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) -} - --- Iteration 6 -- -array(3) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) -} - --- Iteration 7 -- -array(3) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) -} - --- Iteration 8 -- -array(3) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) -} - --- Iteration 9 -- -array(3) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) -} - --- Iteration 10 -- -array(3) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) -} - --- Iteration 11 -- -array(3) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) -} - --- Iteration 12 -- -array(3) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) -} - --- Iteration 13 -- -array(3) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) -} - --- Iteration 14 -- -array(3) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) -} - --- Iteration 15 -- -array(3) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) -} - --- Iteration 16 -- - -Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: array_change_key_case() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_change_key_case() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- -array(3) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) -} - --- Iteration 23 -- -array(3) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) -} -Done diff --git a/ext/standard/tests/array/array_chunk_variation1.phpt b/ext/standard/tests/array/array_chunk_variation1.phpt deleted file mode 100644 index e48f28f8be9b5..0000000000000 --- a/ext/standard/tests/array/array_chunk_variation1.phpt +++ /dev/null @@ -1,325 +0,0 @@ ---TEST-- -Test array_chunk() function : usage variations - unexpected values for 'array' argument ---FILE-- - ---EXPECTF-- -*** Testing array_chunk() : usage variations *** - --- Iteration 1 -- - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_chunk_variation2.phpt b/ext/standard/tests/array/array_chunk_variation2.phpt deleted file mode 100644 index b3f66a005a09a..0000000000000 --- a/ext/standard/tests/array/array_chunk_variation2.phpt +++ /dev/null @@ -1,429 +0,0 @@ ---TEST-- -Test array_chunk() function : usage variations - unexpected values for 'size' argument ---SKIPIF-- - 'red', 'item' => 'pen'), - - // null data -/*11*/ NULL, - null, - - // boolean data -/*13*/ true, - false, - TRUE, - FALSE, - - // empty data -/*17*/ "", - '', - - // string data -/*19*/ "string", - 'string', - - // object data -/*21*/ new stdclass(), - - // undefined data -/*22*/ @$undefined_var, - - // unset data -/*23*/ @$unset_var - -); - -// loop through each element of the array for size -$count = 1; -foreach($values as $value){ - echo "\n-- Iteration $count --\n"; - var_dump( array_chunk($input, $value) ); - var_dump( array_chunk($input, $value, true) ); - var_dump( array_chunk($input, $value, false) ); - $count++; -} - -echo "Done"; -?> ---EXPECTF-- -*** Testing array_chunk() : usage variations *** - --- Iteration 1 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 2 -- - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - --- Iteration 3 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 4 -- - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - --- Iteration 5 -- - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - --- Iteration 6 -- - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - --- Iteration 12 -- - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - --- Iteration 13 -- -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [1]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} - --- Iteration 14 -- - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - --- Iteration 15 -- -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [1]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} - --- Iteration 16 -- - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_chunk() expects parameter 2 to be int, object given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, object given in %s on line %d -NULL - -Warning: array_chunk() expects parameter 2 to be int, object given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - --- Iteration 23 -- - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL - -Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_chunk_variation3.phpt b/ext/standard/tests/array/array_chunk_variation3.phpt deleted file mode 100644 index 228490e442005..0000000000000 --- a/ext/standard/tests/array/array_chunk_variation3.phpt +++ /dev/null @@ -1,268 +0,0 @@ ---TEST-- -Test array_chunk() function : usage variations - unexpected values for 'preserve_keys' ---FILE-- - ---EXPECTF-- -*** Testing array_chunk() : usage variations *** - --- Iteration 1 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 2 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 3 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 4 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 5 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 6 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 7 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 8 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 9 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 10 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 11 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 12 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 13 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 14 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 15 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 16 -- - -Warning: array_chunk() expects parameter 3 to be bool, object given in %s on line %d -NULL - --- Iteration 17 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - --- Iteration 18 -- -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} -Done diff --git a/ext/standard/tests/array/array_combine_variation1.phpt b/ext/standard/tests/array/array_combine_variation1.phpt deleted file mode 100644 index f9978f5476015..0000000000000 --- a/ext/standard/tests/array/array_combine_variation1.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -Test array_combine() function : usage variations - unexpected values for 'keys' argument ---FILE-- - ---EXPECTF-- -*** Testing array_combine() : Passing non-array values to $keys argument *** --- Iteration 1 -- - -Warning: array_combine() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 2 -- - -Warning: array_combine() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 3 -- - -Warning: array_combine() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 4 -- - -Warning: array_combine() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 5 -- - -Warning: array_combine() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 6 -- - -Warning: array_combine() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_combine() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_combine() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_combine() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_combine() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_combine() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_combine() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 15 -- - -Warning: array_combine() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 16 -- - -Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_combine() expects parameter 1 to be array, object given in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 23 -- - -Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 24 -- - -Warning: array_combine() expects parameter 1 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_combine_variation2.phpt b/ext/standard/tests/array/array_combine_variation2.phpt deleted file mode 100644 index 2d888df6949f1..0000000000000 --- a/ext/standard/tests/array/array_combine_variation2.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -Test array_combine() function : usage variations - unexpected values for 'values' argument ---FILE-- - ---EXPECTF-- -*** Testing array_combine() : Passing non-array values to $values argument *** --- Iteration 1 -- - -Warning: array_combine() expects parameter 2 to be array, int given in %s on line %d -NULL --- Iteration 2 -- - -Warning: array_combine() expects parameter 2 to be array, int given in %s on line %d -NULL --- Iteration 3 -- - -Warning: array_combine() expects parameter 2 to be array, int given in %s on line %d -NULL --- Iteration 4 -- - -Warning: array_combine() expects parameter 2 to be array, int given in %s on line %d -NULL --- Iteration 5 -- - -Warning: array_combine() expects parameter 2 to be array, float given in %s on line %d -NULL --- Iteration 6 -- - -Warning: array_combine() expects parameter 2 to be array, float given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_combine() expects parameter 2 to be array, float given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_combine() expects parameter 2 to be array, float given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_combine() expects parameter 2 to be array, float given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_combine() expects parameter 2 to be array, bool given in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_combine() expects parameter 2 to be array, bool given in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_combine() expects parameter 2 to be array, bool given in %s on line %d -NULL --- Iteration 15 -- - -Warning: array_combine() expects parameter 2 to be array, bool given in %s on line %d -NULL --- Iteration 16 -- - -Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_combine() expects parameter 2 to be array, object given in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d -NULL --- Iteration 23 -- - -Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d -NULL --- Iteration 24 -- - -Warning: array_combine() expects parameter 2 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_diff_uassoc_variation14.phpt b/ext/standard/tests/array/array_diff_uassoc_variation14.phpt index eff559e03ac67..97a9d8a9d2b4b 100644 --- a/ext/standard/tests/array/array_diff_uassoc_variation14.phpt +++ b/ext/standard/tests/array/array_diff_uassoc_variation14.phpt @@ -19,7 +19,7 @@ class classWithoutToString } // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/standard/tests/array/array_diff_ukey_variation11.phpt b/ext/standard/tests/array/array_diff_ukey_variation11.phpt index c759189aa0132..5c2859a78dad8 100644 --- a/ext/standard/tests/array/array_diff_ukey_variation11.phpt +++ b/ext/standard/tests/array/array_diff_ukey_variation11.phpt @@ -15,7 +15,7 @@ $array2 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array3 = array(1, 2, 3, 4, 5); // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/standard/tests/array/array_fill_variation1.phpt b/ext/standard/tests/array/array_fill_variation1.phpt deleted file mode 100644 index f3bdef1b61f61..0000000000000 --- a/ext/standard/tests/array/array_fill_variation1.phpt +++ /dev/null @@ -1,244 +0,0 @@ ---TEST-- -Test array_fill() function : usage variations - unexpected values for 'start_key' argument ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null values - /* 11 */ NULL, - null, - - // boolean values - /* 13 */ true, - false, - TRUE, - FALSE, - - // empty string - /* 17 */ "", - '', - - // string values - /* 19 */ "string", - 'string', - - // objects - /* 21 */ new test(), - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var, - - // resource variable - /* 24 */ $fp -); - -// loop through each element of the array for start_key -// check the working of array_fill() -echo "--- Testing array_fill() with different values for 'start_key' arg ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) -{ - echo "-- Iteration $counter --\n"; - $start_key = $values[$index]; - - var_dump( array_fill($start_key,$num,$val) ); - - $counter ++; -} - -// close the resource used -fclose($fp); - -echo "Done"; -?> ---EXPECTF-- -*** Testing array_fill() : usage variations *** ---- Testing array_fill() with different values for 'start_key' arg --- --- Iteration 1 -- -array(2) { - [10]=> - int(100) - [11]=> - int(100) -} --- Iteration 2 -- -array(2) { - [-10]=> - int(100) - [0]=> - int(100) -} --- Iteration 3 -- - -Warning: array_fill() expects parameter 1 to be int, float given in %s%eext%estandard%etests%earray%earray_fill_variation1.php on line 92 -NULL --- Iteration 4 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 5 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 6 -- - -Warning: array_fill() expects parameter 1 to be int, array given in %sarray_fill_variation1.php on line %d -NULL --- Iteration 7 -- - -Warning: array_fill() expects parameter 1 to be int, array given in %sarray_fill_variation1.php on line %d -NULL --- Iteration 8 -- - -Warning: array_fill() expects parameter 1 to be int, array given in %sarray_fill_variation1.php on line %d -NULL --- Iteration 9 -- - -Warning: array_fill() expects parameter 1 to be int, array given in %sarray_fill_variation1.php on line %d -NULL --- Iteration 10 -- - -Warning: array_fill() expects parameter 1 to be int, array given in %sarray_fill_variation1.php on line %d -NULL --- Iteration 11 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 12 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 13 -- -array(2) { - [1]=> - int(100) - [2]=> - int(100) -} --- Iteration 14 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 15 -- -array(2) { - [1]=> - int(100) - [2]=> - int(100) -} --- Iteration 16 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 17 -- - -Warning: array_fill() expects parameter 1 to be int, string given in %sarray_fill_variation1.php on line %d -NULL --- Iteration 18 -- - -Warning: array_fill() expects parameter 1 to be int, string given in %sarray_fill_variation1.php on line %d -NULL --- Iteration 19 -- - -Warning: array_fill() expects parameter 1 to be int, string given in %sarray_fill_variation1.php on line %d -NULL --- Iteration 20 -- - -Warning: array_fill() expects parameter 1 to be int, string given in %sarray_fill_variation1.php on line %d -NULL --- Iteration 21 -- - -Warning: array_fill() expects parameter 1 to be int, object given in %sarray_fill_variation1.php on line %d -NULL --- Iteration 22 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 23 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 24 -- - -Warning: array_fill() expects parameter 1 to be int, resource given in %sarray_fill_variation1.php on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_fill_variation1_64bit.phpt b/ext/standard/tests/array/array_fill_variation1_64bit.phpt deleted file mode 100644 index ba3a70c4824ab..0000000000000 --- a/ext/standard/tests/array/array_fill_variation1_64bit.phpt +++ /dev/null @@ -1,247 +0,0 @@ ---TEST-- -Test array_fill() function : usage variations - unexpected values for 'start_key' argument ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null values - /* 11 */ NULL, - null, - - // boolean values - /* 13 */ true, - false, - TRUE, - FALSE, - - // empty string - /* 17 */ "", - '', - - // string values - /* 19 */ "string", - 'string', - - // objects - /* 21 */ new test(), - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var, - - // resource variable - /* 24 */ $fp -); - -// loop through each element of the array for start_key -// check the working of array_fill() -echo "--- Testing array_fill() with different values for 'start_key' arg ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) -{ - echo "-- Iteration $counter --\n"; - $start_key = $values[$index]; - - var_dump( array_fill($start_key,$num,$val) ); - - $counter ++; -} - -// close the resource used -fclose($fp); - -echo "Done"; -?> ---EXPECTF-- -*** Testing array_fill() : usage variations *** ---- Testing array_fill() with different values for 'start_key' arg --- --- Iteration 1 -- -array(2) { - [10]=> - int(100) - [11]=> - int(100) -} --- Iteration 2 -- -array(2) { - [-10]=> - int(100) - [0]=> - int(100) -} --- Iteration 3 -- -array(2) { - [123456789000]=> - int(100) - [123456789001]=> - int(100) -} --- Iteration 4 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 5 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 6 -- - -Warning: array_fill() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_fill() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_fill() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_fill() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_fill() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 11 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 12 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 13 -- -array(2) { - [1]=> - int(100) - [2]=> - int(100) -} --- Iteration 14 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 15 -- -array(2) { - [1]=> - int(100) - [2]=> - int(100) -} --- Iteration 16 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 17 -- - -Warning: array_fill() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_fill() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_fill() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_fill() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_fill() expects parameter 1 to be int, object given in %s on line %d -NULL --- Iteration 22 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 23 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 24 -- - -Warning: array_fill() expects parameter 1 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_fill_variation2.phpt b/ext/standard/tests/array/array_fill_variation2.phpt deleted file mode 100644 index 1209aea44d85d..0000000000000 --- a/ext/standard/tests/array/array_fill_variation2.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -Test array_fill() function : usage variations - unexpected values for 'num' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null values - /* 11 */ NULL, - null, - - // boolean values - /* 13 */ true, - false, - TRUE, - FALSE, - - // empty string - /* 17 */ "", - '', - - // string values - /* 19 */ "string", - 'string', - - // objects - /* 21 */ new test(), - - // undefined variable - @$undefined_var, - - // unset variable - /* 24 */ @$unset_var, - -); - -// loop through each element of the array for num -// check the working of array_fill -echo "--- Testing array_fill() with different values for 'num' arg ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) -{ - echo "-- Iteration $counter --\n"; - $num = $values[$index]; - - var_dump( array_fill($start_key,$num,$val) ); - - $counter ++; -} - -echo "Done"; -?> ---EXPECTF-- -*** Testing array_fill() : usage variations *** ---- Testing array_fill() with different values for 'num' arg --- --- Iteration 1 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} --- Iteration 2 -- - -Warning: array_fill(): Number of elements can't be negative in %s on line %d -bool(false) --- Iteration 3 -- -array(5) { - [0]=> - int(100) - [1]=> - int(100) - [2]=> - int(100) - [3]=> - int(100) - [4]=> - int(100) -} --- Iteration 4 -- -array(0) { -} --- Iteration 5 -- -array(0) { -} --- Iteration 6 -- - -Warning: array_fill() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_fill() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_fill() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_fill() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_fill() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 11 -- -array(0) { -} --- Iteration 12 -- -array(0) { -} --- Iteration 13 -- -array(1) { - [0]=> - int(100) -} --- Iteration 14 -- -array(0) { -} --- Iteration 15 -- -array(1) { - [0]=> - int(100) -} --- Iteration 16 -- -array(0) { -} --- Iteration 17 -- - -Warning: array_fill() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_fill() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_fill() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_fill() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_fill() expects parameter 2 to be int, object given in %s on line %d -NULL --- Iteration 22 -- -array(0) { -} --- Iteration 23 -- -array(0) { -} -Done diff --git a/ext/standard/tests/array/array_filter_variation1.phpt b/ext/standard/tests/array/array_filter_variation1.phpt deleted file mode 100644 index f75b03cbed818..0000000000000 --- a/ext/standard/tests/array/array_filter_variation1.phpt +++ /dev/null @@ -1,195 +0,0 @@ ---TEST-- -Test array_filter() function : usage variations - Unexpected values for 'input' argument ---FILE-- - ---EXPECTF-- -*** Testing array_filter() : usage variations - unexpected values for 'input'*** --- Iteration 1 -- - -Warning: array_filter() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 2 -- - -Warning: array_filter() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 3 -- - -Warning: array_filter() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 4 -- - -Warning: array_filter() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 5 -- - -Warning: array_filter() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 6 -- - -Warning: array_filter() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_filter() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_filter() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_filter() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_filter() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_filter() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_filter() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 15 -- - -Warning: array_filter() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 16 -- - -Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_filter() expects parameter 1 to be array, object given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_filter() expects parameter 1 to be array, resource given in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 23 -- - -Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_filter_variation2.phpt b/ext/standard/tests/array/array_filter_variation2.phpt deleted file mode 100644 index d47761f4701aa..0000000000000 --- a/ext/standard/tests/array/array_filter_variation2.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test array_filter() function : usage variations - Unexpected values for 'callback' function argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data -/*15*/ NULL, - null, - - // boolean data -/*17*/ true, - false, - TRUE, - FALSE, - - // empty data -/*21*/ "", - '', - - // string data -/*23*/ "string", - 'string', - - // object data -/*25*/ new MyClass(), - - // resource data - $fp, - - // undefined data - @$undefined_var, - - // unset data -/*28*/ @$unset_var, -); - -// loop through each element of the 'values' for callback -for($count = 0; $count < count($values); $count++) { - echo "-- Iteration ".($count + 1)." --"; - var_dump( array_filter($input, $values[$count]) ); -}; - -// closing resource -fclose($fp); - -echo "Done" -?> ---EXPECTF-- -*** Testing array_filter() : usage variations - unexpected values for 'callback' function*** --- Iteration 1 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 2 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 3 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 4 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 5 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 6 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 7 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 8 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 9 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 10 -- -Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 11 -- -Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 12 -- -Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 13 -- -Warning: array_filter() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d -NULL --- Iteration 14 -- -Warning: array_filter() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d -NULL --- Iteration 15 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 16 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 17 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 18 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 19 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 20 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 21 -- -Warning: array_filter() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL --- Iteration 22 -- -Warning: array_filter() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL --- Iteration 23 -- -Warning: array_filter() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d -NULL --- Iteration 24 -- -Warning: array_filter() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d -NULL --- Iteration 25 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 26 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 27 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 28 -- -Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_flip_variation1.phpt b/ext/standard/tests/array/array_flip_variation1.phpt deleted file mode 100644 index 98aa459362b3e..0000000000000 --- a/ext/standard/tests/array/array_flip_variation1.phpt +++ /dev/null @@ -1,179 +0,0 @@ ---TEST-- -Test array_flip() function : usage variations - unexpected values for 'input' argument ---FILE-- - value flipped - * Source code: ext/standard/array.c -*/ - -echo "*** Testing array_flip() : usage variations - unexpected values for 'input' ***\n"; - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//class definition for object variable -class MyClass -{ - public function __toString() - { - return 'object'; - } -} - -//resource variable -$fp = fopen(__FILE__,'r'); - -//array of values for 'input' argument -$values = array( - // int data - /*1*/ 0, - 1, - 12345, - -2345, - - // float data - /*5*/ 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // null data - /*10*/ NULL, - null, - - // boolean data - /*12*/ true, - false, - TRUE, - /*15*/ FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - /*20*/ new MyClass(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - //resource data - /*23*/ $fp -); - -// loop through each element of $values for 'input' argument -for($count = 0; $count < count($values); $count++) { - echo "-- Iteration ".($count + 1). " --\n"; - var_dump( array_flip($values[$count]) ); -}; - -//closing resource -fclose($fp); - -echo "Done" -?> ---EXPECTF-- -*** Testing array_flip() : usage variations - unexpected values for 'input' *** --- Iteration 1 -- - -Warning: array_flip() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 2 -- - -Warning: array_flip() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 3 -- - -Warning: array_flip() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 4 -- - -Warning: array_flip() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 5 -- - -Warning: array_flip() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 6 -- - -Warning: array_flip() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_flip() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_flip() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_flip() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_flip() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_flip() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_flip() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 15 -- - -Warning: array_flip() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 16 -- - -Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_flip() expects parameter 1 to be array, object given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 23 -- - -Warning: array_flip() expects parameter 1 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation11.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation11.phpt index fe9a17983f44f..a39bac2e545f0 100644 --- a/ext/standard/tests/array/array_intersect_uassoc_variation11.phpt +++ b/ext/standard/tests/array/array_intersect_uassoc_variation11.phpt @@ -14,7 +14,7 @@ $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "yellow", "red"); $array3 = array("a"=>"green", "brown"); // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/standard/tests/array/array_intersect_ukey_variation10.phpt b/ext/standard/tests/array/array_intersect_ukey_variation10.phpt index ca70e5e78a0b9..b5b6439be1ade 100644 --- a/ext/standard/tests/array/array_intersect_ukey_variation10.phpt +++ b/ext/standard/tests/array/array_intersect_ukey_variation10.phpt @@ -15,7 +15,7 @@ $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); $array3 = array("a"=>"green", "cyan"); // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/standard/tests/array/array_key_exists_variation2.phpt b/ext/standard/tests/array/array_key_exists_variation2.phpt deleted file mode 100644 index b1e30330025cd..0000000000000 --- a/ext/standard/tests/array/array_key_exists_variation2.phpt +++ /dev/null @@ -1,224 +0,0 @@ ---TEST-- -Test array_key_exists() function : usage variations - Pass different data types to $search arg ---FILE-- - ---EXPECTF-- -*** Testing array_key_exists() : usage variations *** - --- Iteration 1 -- - -Warning: array_key_exists() expects parameter 2 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: array_key_exists() expects parameter 2 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: array_key_exists() expects parameter 2 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: array_key_exists() expects parameter 2 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: array_key_exists() expects parameter 2 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: array_key_exists() expects parameter 2 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: array_key_exists() expects parameter 2 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: array_key_exists() expects parameter 2 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- - -Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_key_exists() expects parameter 2 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- - -Warning: array_key_exists() expects parameter 2 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: array_key_exists() expects parameter 2 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: array_key_exists() expects parameter 2 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_map_variation18.phpt b/ext/standard/tests/array/array_map_variation18.phpt deleted file mode 100644 index 4c85d12e881e1..0000000000000 --- a/ext/standard/tests/array/array_map_variation18.phpt +++ /dev/null @@ -1,205 +0,0 @@ ---TEST-- -Test array_map() function : usage variations - unexpected values for 'arr1' argument ---FILE-- - ---EXPECTF-- -*** Testing array_map() : unexpected values for 'arr1' *** --- Iteration 1 -- - -Warning: array_map(): Expected parameter 2 to be an array, int given in %s on line %d%d -NULL --- Iteration 2 -- - -Warning: array_map(): Expected parameter 2 to be an array, int given in %s on line %d%d -NULL --- Iteration 3 -- - -Warning: array_map(): Expected parameter 2 to be an array, int given in %s on line %d%d -NULL --- Iteration 4 -- - -Warning: array_map(): Expected parameter 2 to be an array, int given in %s on line %d%d -NULL --- Iteration 5 -- - -Warning: array_map(): Expected parameter 2 to be an array, float given in %s on line %d%d -NULL --- Iteration 6 -- - -Warning: array_map(): Expected parameter 2 to be an array, float given in %s on line %d%d -NULL --- Iteration 7 -- - -Warning: array_map(): Expected parameter 2 to be an array, float given in %s on line %d%d -NULL --- Iteration 8 -- - -Warning: array_map(): Expected parameter 2 to be an array, float given in %s on line %d%d -NULL --- Iteration 9 -- - -Warning: array_map(): Expected parameter 2 to be an array, float given in %s on line %d%d -NULL --- Iteration 10 -- - -Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d%d -NULL --- Iteration 11 -- - -Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d%d -NULL --- Iteration 12 -- - -Warning: array_map(): Expected parameter 2 to be an array, bool given in %s on line %d%d -NULL --- Iteration 13 -- - -Warning: array_map(): Expected parameter 2 to be an array, bool given in %s on line %d%d -NULL --- Iteration 14 -- - -Warning: array_map(): Expected parameter 2 to be an array, bool given in %s on line %d%d -NULL --- Iteration 15 -- - -Warning: array_map(): Expected parameter 2 to be an array, bool given in %s on line %d%d -NULL --- Iteration 16 -- - -Warning: array_map(): Expected parameter 2 to be an array, string given in %s on line %d%d -NULL --- Iteration 17 -- - -Warning: array_map(): Expected parameter 2 to be an array, string given in %s on line %d%d -NULL --- Iteration 18 -- - -Warning: array_map(): Expected parameter 2 to be an array, string given in %s on line %d%d -NULL --- Iteration 19 -- - -Warning: array_map(): Expected parameter 2 to be an array, string given in %s on line %d%d -NULL --- Iteration 20 -- - -Warning: array_map(): Expected parameter 2 to be an array, string given in %s on line %d%d -NULL --- Iteration 21 -- - -Warning: array_map(): Expected parameter 2 to be an array, object given in %s on line %d%d -NULL --- Iteration 22 -- - -Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d%d -NULL --- Iteration 23 -- - -Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d%d -NULL --- Iteration 24 -- - -Warning: array_map(): Expected parameter 2 to be an array, null given in %s on line %d%d -NULL --- Iteration 25 -- - -Warning: array_map(): Expected parameter 2 to be an array, resource given in %s on line %d%d -NULL -Done diff --git a/ext/standard/tests/array/array_multisort_variation1.phpt b/ext/standard/tests/array/array_multisort_variation1.phpt index 9a33a270f1d83..4d7281b92b71d 100644 --- a/ext/standard/tests/array/array_multisort_variation1.phpt +++ b/ext/standard/tests/array/array_multisort_variation1.phpt @@ -11,7 +11,7 @@ Test array_multisort() function : usage variation echo "*** Testing array_multisort() : usage variation ***\n"; // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/standard/tests/array/array_multisort_variation2.phpt b/ext/standard/tests/array/array_multisort_variation2.phpt index 8c26a8347be07..994e27ecd04a7 100644 --- a/ext/standard/tests/array/array_multisort_variation2.phpt +++ b/ext/standard/tests/array/array_multisort_variation2.phpt @@ -11,7 +11,7 @@ Test array_multisort() function : usage variation echo "*** Testing array_multisort() : usage variation ***\n"; // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/standard/tests/array/array_multisort_variation3.phpt b/ext/standard/tests/array/array_multisort_variation3.phpt index 28130e31fd223..5939b7bef994f 100644 --- a/ext/standard/tests/array/array_multisort_variation3.phpt +++ b/ext/standard/tests/array/array_multisort_variation3.phpt @@ -11,7 +11,7 @@ Test array_multisort() function : usage variation echo "*** Testing array_multisort() : usage variation ***\n"; // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/standard/tests/array/array_multisort_variation8.phpt b/ext/standard/tests/array/array_multisort_variation8.phpt index 6d89dd0c6c0b3..e6ff858b16cfd 100644 --- a/ext/standard/tests/array/array_multisort_variation8.phpt +++ b/ext/standard/tests/array/array_multisort_variation8.phpt @@ -11,7 +11,7 @@ Test array_multisort() function : usage variation - test sort order of all types echo "*** Testing array_multisort() : usage variation - test sort order of all types***\n"; // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { // We're testing sort order not errors so ignore. } set_error_handler('test_error_handler'); diff --git a/ext/standard/tests/array/array_pad_variation1.phpt b/ext/standard/tests/array/array_pad_variation1.phpt deleted file mode 100644 index b806139d57ffc..0000000000000 --- a/ext/standard/tests/array/array_pad_variation1.phpt +++ /dev/null @@ -1,270 +0,0 @@ ---TEST-- -Test array_pad() function : usage variations - unexpected values for 'input' argument ---FILE-- - ---EXPECTF-- -*** Testing array_pad() : passing non array values to $input argument *** - --- Iteration 1 -- -Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- -Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- -Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- -Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- -Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- -Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- -Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- -Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- -Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- -Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- -Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- -Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- -Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- -Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- -Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- -Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- -Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 19 -- -Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- -Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- -Warning: array_pad() expects parameter 1 to be array, object given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 22 -- -Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 23 -- -Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- -Warning: array_pad() expects parameter 1 to be array, resource given in %s on line %d -NULL - -Warning: array_pad() expects parameter 1 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_pad_variation2.phpt b/ext/standard/tests/array/array_pad_variation2.phpt deleted file mode 100644 index c95303974d4f6..0000000000000 --- a/ext/standard/tests/array/array_pad_variation2.phpt +++ /dev/null @@ -1,258 +0,0 @@ ---TEST-- -Test array_pad() function : usage variations - unexpected values for 'pad_size' argument(Bug#43482) ---SKIPIF-- - 'red', 'item' => 'pen'), - - // null data -/*11*/ NULL, - null, - - // boolean data -/*13*/ true, - false, - TRUE, - FALSE, - - // empty data -/*17*/ "", - '', - - // string data -/*19*/ "string", - 'string', - - // object data -/*21*/ new classA(), - - // undefined data -/*22*/ @$undefined_var, - - // unset data -/*23*/ @$unset_var, -); - -// loop through each element of $pad_sizes to check the behavior of array_pad() -$iterator = 1; -foreach($pad_sizes as $pad_size) { - echo "-- Iteration $iterator --\n"; - var_dump( array_pad($input, $pad_size, $pad_value) ); - $iterator++; -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing array_pad() : passing non integer values to $pad_size argument *** --- Iteration 1 -- -array(10) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(1) - [3]=> - int(1) - [4]=> - int(1) - [5]=> - int(1) - [6]=> - int(1) - [7]=> - int(1) - [8]=> - int(1) - [9]=> - int(1) -} --- Iteration 2 -- -array(10) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - int(1) - [3]=> - int(1) - [4]=> - int(1) - [5]=> - int(1) - [6]=> - int(1) - [7]=> - int(1) - [8]=> - int(1) - [9]=> - int(2) -} --- Iteration 3 -- - -Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d -bool(false) --- Iteration 5 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} --- Iteration 6 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} --- Iteration 7 -- - -Warning: array_pad() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_pad() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_pad() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_pad() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_pad() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 12 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} --- Iteration 13 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} --- Iteration 14 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} --- Iteration 15 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} --- Iteration 16 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} --- Iteration 17 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} --- Iteration 18 -- - -Warning: array_pad() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_pad() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_pad() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_pad() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_pad() expects parameter 2 to be int, object given in %s on line %d -NULL --- Iteration 23 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} --- Iteration 24 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} -Done diff --git a/ext/standard/tests/array/array_product_variation5.phpt b/ext/standard/tests/array/array_product_variation5.phpt deleted file mode 100644 index 09284d90962eb..0000000000000 --- a/ext/standard/tests/array/array_product_variation5.phpt +++ /dev/null @@ -1,223 +0,0 @@ ---TEST-- -Test array_product() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for input - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( array_product($value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing array_product() : usage variation *** - ---int 0-- - -Warning: array_product() expects parameter 1 to be array, int given in %sarray_product_variation5.php on line %d -NULL - ---int 1-- - -Warning: array_product() expects parameter 1 to be array, int given in %sarray_product_variation5.php on line %d -NULL - ---int 12345-- - -Warning: array_product() expects parameter 1 to be array, int given in %sarray_product_variation5.php on line %d -NULL - ---int -12345-- - -Warning: array_product() expects parameter 1 to be array, int given in %sarray_product_variation5.php on line %d -NULL - ---float 10.5-- - -Warning: array_product() expects parameter 1 to be array, float given in %sarray_product_variation5.php on line %d -NULL - ---float -10.5-- - -Warning: array_product() expects parameter 1 to be array, float given in %sarray_product_variation5.php on line %d -NULL - ---float 12.3456789000e10-- - -Warning: array_product() expects parameter 1 to be array, float given in %sarray_product_variation5.php on line %d -NULL - ---float -12.3456789000e10-- - -Warning: array_product() expects parameter 1 to be array, float given in %sarray_product_variation5.php on line %d -NULL - ---float .5-- - -Warning: array_product() expects parameter 1 to be array, float given in %sarray_product_variation5.php on line %d -NULL - ---uppercase NULL-- - -Warning: array_product() expects parameter 1 to be array, null given in %sarray_product_variation5.php on line %d -NULL - ---lowercase null-- - -Warning: array_product() expects parameter 1 to be array, null given in %sarray_product_variation5.php on line %d -NULL - ---lowercase true-- - -Warning: array_product() expects parameter 1 to be array, bool given in %sarray_product_variation5.php on line %d -NULL - ---lowercase false-- - -Warning: array_product() expects parameter 1 to be array, bool given in %sarray_product_variation5.php on line %d -NULL - ---uppercase TRUE-- - -Warning: array_product() expects parameter 1 to be array, bool given in %sarray_product_variation5.php on line %d -NULL - ---uppercase FALSE-- - -Warning: array_product() expects parameter 1 to be array, bool given in %sarray_product_variation5.php on line %d -NULL - ---empty string DQ-- - -Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d -NULL - ---empty string SQ-- - -Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d -NULL - ---string DQ-- - -Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d -NULL - ---string SQ-- - -Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d -NULL - ---mixed case string-- - -Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d -NULL - ---heredoc-- - -Warning: array_product() expects parameter 1 to be array, string given in %sarray_product_variation5.php on line %d -NULL - ---instance of classWithToString-- - -Warning: array_product() expects parameter 1 to be array, object given in %sarray_product_variation5.php on line %d -NULL - ---instance of classWithoutToString-- - -Warning: array_product() expects parameter 1 to be array, object given in %sarray_product_variation5.php on line %d -NULL - ---undefined var-- - -Warning: array_product() expects parameter 1 to be array, null given in %sarray_product_variation5.php on line %d -NULL - ---unset var-- - -Warning: array_product() expects parameter 1 to be array, null given in %sarray_product_variation5.php on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/array/array_push_variation1.phpt b/ext/standard/tests/array/array_push_variation1.phpt deleted file mode 100644 index c04cf4073f85e..0000000000000 --- a/ext/standard/tests/array/array_push_variation1.phpt +++ /dev/null @@ -1,225 +0,0 @@ ---TEST-- -Test array_push() function : usage variations - Pass different data types as $stack arg ---FILE-- - ---EXPECTF-- -*** Testing array_push() : usage variations *** - --- Iteration 1 -- - -Warning: array_push() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: array_push() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: array_push() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: array_push() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: array_push() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: array_push() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: array_push() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: array_push() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: array_push() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: array_push() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: array_push() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: array_push() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: array_push() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: array_push() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: array_push() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: array_push() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_push() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -int(1) - --- Iteration 19 -- - -Warning: array_push() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_push() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_push() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: array_push() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: array_push() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: array_push() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: array_push() expects parameter 1 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_rand_variation1.phpt b/ext/standard/tests/array/array_rand_variation1.phpt deleted file mode 100644 index 7aaf48f99f0dd..0000000000000 --- a/ext/standard/tests/array/array_rand_variation1.phpt +++ /dev/null @@ -1,216 +0,0 @@ ---TEST-- -Test array_rand() function : usage variations - unexpected values for 'input' parameter ---FILE-- - ---EXPECTF-- -*** Testing array_rand() : unexpected values for 'input' parameter *** - --- Iteration 1 -- - -Warning: array_rand() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: array_rand() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: array_rand() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: array_rand() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: array_rand() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: array_rand() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: array_rand() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: array_rand() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: array_rand() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: array_rand() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: array_rand() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: array_rand() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: array_rand() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_rand() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_rand() expects parameter 1 to be array, resource given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_rand_variation2.phpt b/ext/standard/tests/array/array_rand_variation2.phpt deleted file mode 100644 index 1182d1aeea63a..0000000000000 --- a/ext/standard/tests/array/array_rand_variation2.phpt +++ /dev/null @@ -1,216 +0,0 @@ ---TEST-- -Test array_rand() function : usage variations - unexpected values for 'num_req' parameter ---SKIPIF-- - ---EXPECTF-- -*** Testing array_rand() : unexpected values for 'num_req' parameter *** - --- Iteration 1 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 2 -- -int(%d) - --- Iteration 3 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 4 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 5 -- -array(10) { - [0]=> - int(%d) - [1]=> - int(%d) - [2]=> - int(%d) - [3]=> - int(%d) - [4]=> - int(%d) - [5]=> - int(%d) - [6]=> - int(%d) - [7]=> - int(%d) - [8]=> - int(%d) - [9]=> - int(%d) -} - --- Iteration 6 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 7 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 8 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 9 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 10 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 11 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 12 -- -int(%d) - --- Iteration 13 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 14 -- -int(%d) - --- Iteration 15 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 16 -- - -Warning: array_rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: array_rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: array_rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_rand() expects parameter 2 to be int, object given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL - --- Iteration 22 -- - -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_reverse_variation1.phpt b/ext/standard/tests/array/array_reverse_variation1.phpt deleted file mode 100644 index b2936c171cc13..0000000000000 --- a/ext/standard/tests/array/array_reverse_variation1.phpt +++ /dev/null @@ -1,340 +0,0 @@ ---TEST-- -Test array_reverse() function : usage variations - unexpected values for 'array' argument ---FILE-- - ---EXPECTF-- -*** Testing array_reverse() : usage variations - unexpected values for 'array' argument *** - --- Iteration 1 -- -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 19 -- -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- -Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 22 -- -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 23 -- -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- -Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d -NULL - -Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_reverse_variation2.phpt b/ext/standard/tests/array/array_reverse_variation2.phpt deleted file mode 100644 index 1cc9a3088ef5f..0000000000000 --- a/ext/standard/tests/array/array_reverse_variation2.phpt +++ /dev/null @@ -1,414 +0,0 @@ ---TEST-- -Test array_reverse() function : usage variations - unexpected values for 'preserve_keys' argument ---FILE-- - "green", "red", "blue", "red", "orange", "pink"); - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//get a resource variable -$fp = fopen(__FILE__, "r"); - -//get a class -class classA -{ - public function __toString(){ - return "Class A object"; - } -} - -//array of values to iterate over -$preserve_keys = array ( - - // int data -/*1*/ 0, - 1, - 12345, - -2345, - - // float data -/*5*/ 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array data -/*10*/ array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // null data -/*15*/ NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data -/*21*/ - "", - '', - - // object data - new classA(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - // resource variable -/*26*/ $fp - -); - -// loop through each element of the array $preserve_keys to check the behavior of array_reverse() -$iterator = 1; -foreach($preserve_keys as $preserve_key) { - echo "-- Iteration $iterator --\n"; - var_dump( array_reverse($array, $preserve_key) ); - $iterator++; -}; - -// close the file resouce used -fclose($fp); - -echo "Done"; -?> ---EXPECTF-- -*** Testing array_reverse() : usage variations *** --- Iteration 1 -- -array(6) { - [0]=> - string(4) "pink" - [1]=> - string(6) "orange" - [2]=> - string(3) "red" - [3]=> - string(4) "blue" - [4]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 2 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 3 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 4 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 5 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 6 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 7 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 8 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 9 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 10 -- - -Warning: array_reverse() expects parameter 2 to be bool, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_reverse() expects parameter 2 to be bool, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_reverse() expects parameter 2 to be bool, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_reverse() expects parameter 2 to be bool, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_reverse() expects parameter 2 to be bool, array given in %s on line %d -NULL --- Iteration 15 -- -array(6) { - [0]=> - string(4) "pink" - [1]=> - string(6) "orange" - [2]=> - string(3) "red" - [3]=> - string(4) "blue" - [4]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 16 -- -array(6) { - [0]=> - string(4) "pink" - [1]=> - string(6) "orange" - [2]=> - string(3) "red" - [3]=> - string(4) "blue" - [4]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 17 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 18 -- -array(6) { - [0]=> - string(4) "pink" - [1]=> - string(6) "orange" - [2]=> - string(3) "red" - [3]=> - string(4) "blue" - [4]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 19 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 20 -- -array(6) { - [0]=> - string(4) "pink" - [1]=> - string(6) "orange" - [2]=> - string(3) "red" - [3]=> - string(4) "blue" - [4]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 21 -- -array(6) { - [0]=> - string(4) "pink" - [1]=> - string(6) "orange" - [2]=> - string(3) "red" - [3]=> - string(4) "blue" - [4]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 22 -- -array(6) { - [0]=> - string(4) "pink" - [1]=> - string(6) "orange" - [2]=> - string(3) "red" - [3]=> - string(4) "blue" - [4]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 23 -- - -Warning: array_reverse() expects parameter 2 to be bool, object given in %s on line %d -NULL --- Iteration 24 -- -array(6) { - [0]=> - string(4) "pink" - [1]=> - string(6) "orange" - [2]=> - string(3) "red" - [3]=> - string(4) "blue" - [4]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 25 -- -array(6) { - [0]=> - string(4) "pink" - [1]=> - string(6) "orange" - [2]=> - string(3) "red" - [3]=> - string(4) "blue" - [4]=> - string(3) "red" - ["a"]=> - string(5) "green" -} --- Iteration 26 -- - -Warning: array_reverse() expects parameter 2 to be bool, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_shift_variation1.phpt b/ext/standard/tests/array/array_shift_variation1.phpt deleted file mode 100644 index 5734da4fb9cd3..0000000000000 --- a/ext/standard/tests/array/array_shift_variation1.phpt +++ /dev/null @@ -1,218 +0,0 @@ ---TEST-- -Test array_shift() function : usage variations - Pass different data types as $stack arg ---FILE-- - ---EXPECTF-- -*** Testing array_shift() : usage variations *** - --- Iteration 1 -- - -Warning: array_shift() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: array_shift() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: array_shift() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: array_shift() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: array_shift() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: array_shift() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: array_shift() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: array_shift() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: array_shift() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: array_shift() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: array_shift() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: array_shift() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: array_shift() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_shift() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: array_shift() expects parameter 1 to be array, resource given in %s on line 85 -NULL -Done diff --git a/ext/standard/tests/array/array_slice_variation1.phpt b/ext/standard/tests/array/array_slice_variation1.phpt index 7b6d712a1f4bc..f0c30ba53d390 100644 --- a/ext/standard/tests/array/array_slice_variation1.phpt +++ b/ext/standard/tests/array/array_slice_variation1.phpt @@ -20,7 +20,7 @@ var_dump(array_slice(range(1, 3), 0, $a)); var_dump($a); ?> ---EXPECT-- +--EXPECTF-- array(3) { [0]=> int(1) @@ -53,8 +53,10 @@ array(1) { [2]=> int(3) } -array(0) { -} -array(0) { -} + +Warning: array_slice() expects parameter 3 to be int, string given in %s on line %d +NULL + +Warning: array_slice() expects parameter 3 to be int, string given in %s on line %d +NULL string(3) "foo" diff --git a/ext/standard/tests/array/array_slice_variation3.phpt b/ext/standard/tests/array/array_slice_variation3.phpt index 6cec0bc4bacd3..cf01db2429162 100644 --- a/ext/standard/tests/array/array_slice_variation3.phpt +++ b/ext/standard/tests/array/array_slice_variation3.phpt @@ -81,7 +81,7 @@ foreach($inputs as $input) { echo "Done"; ?> ---EXPECT-- +--EXPECTF-- *** Testing array_slice() : usage variations *** -- Iteration 1 -- @@ -171,28 +171,34 @@ array(0) { } -- Iteration 16 -- -array(0) { -} + +Warning: array_slice() expects parameter 3 to be int, string given in %s on line %d +NULL -- Iteration 17 -- -array(0) { -} + +Warning: array_slice() expects parameter 3 to be int, string given in %s on line %d +NULL -- Iteration 18 -- -array(0) { -} + +Warning: array_slice() expects parameter 3 to be int, array given in %s on line %d +NULL -- Iteration 19 -- -array(0) { -} + +Warning: array_slice() expects parameter 3 to be int, string given in %s on line %d +NULL -- Iteration 20 -- -array(0) { -} + +Warning: array_slice() expects parameter 3 to be int, string given in %s on line %d +NULL -- Iteration 21 -- -array(0) { -} + +Warning: array_slice() expects parameter 3 to be int, string given in %s on line %d +NULL -- Iteration 22 -- array(2) { diff --git a/ext/standard/tests/array/array_slice_variation4.phpt b/ext/standard/tests/array/array_slice_variation4.phpt deleted file mode 100644 index 6591e113afd21..0000000000000 --- a/ext/standard/tests/array/array_slice_variation4.phpt +++ /dev/null @@ -1,326 +0,0 @@ ---TEST-- -Test array_slice() function : usage variations - Pass different data types as $preserve_keys arg ---FILE-- - 1, 2, 99 => 3, 4); -$offset = 0; -$length = 3; - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = << ---EXPECTF-- -*** Testing array_slice() : usage variations *** - --- Iteration 1 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [1]=> - int(3) -} - --- Iteration 2 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 3 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 4 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 5 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 6 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 7 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 8 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 9 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 10 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [1]=> - int(3) -} - --- Iteration 11 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [1]=> - int(3) -} - --- Iteration 12 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 13 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [1]=> - int(3) -} - --- Iteration 14 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 15 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [1]=> - int(3) -} - --- Iteration 16 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [1]=> - int(3) -} - --- Iteration 17 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [1]=> - int(3) -} - --- Iteration 18 -- - -Warning: array_slice() expects parameter 4 to be bool, array given in %s on line %d -NULL - --- Iteration 19 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 20 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 21 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [99]=> - int(3) -} - --- Iteration 22 -- - -Warning: array_slice() expects parameter 4 to be bool, object given in %s on line %d -NULL - --- Iteration 23 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [1]=> - int(3) -} - --- Iteration 24 -- -array(3) { - ["one"]=> - int(1) - [0]=> - int(2) - [1]=> - int(3) -} -Done diff --git a/ext/standard/tests/array/array_sum_variation1.phpt b/ext/standard/tests/array/array_sum_variation1.phpt deleted file mode 100644 index 30e284700436b..0000000000000 --- a/ext/standard/tests/array/array_sum_variation1.phpt +++ /dev/null @@ -1,179 +0,0 @@ ---TEST-- -Test array_sum() function : usage variations - unexpected values for 'input' argument ---FILE-- - ---EXPECTF-- -*** Testing array_sum() : unexpected values for 'input' *** --- Iteration 1 -- - -Warning: array_sum() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 2 -- - -Warning: array_sum() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 3 -- - -Warning: array_sum() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 4 -- - -Warning: array_sum() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 5 -- - -Warning: array_sum() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 6 -- - -Warning: array_sum() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_sum() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_sum() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_sum() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_sum() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_sum() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_sum() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 15 -- - -Warning: array_sum() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 16 -- - -Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_sum() expects parameter 1 to be array, object given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_sum() expects parameter 1 to be array, resource given in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 23 -- - -Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_unique_variation1.phpt b/ext/standard/tests/array/array_unique_variation1.phpt deleted file mode 100644 index cc9a695c866a3..0000000000000 --- a/ext/standard/tests/array/array_unique_variation1.phpt +++ /dev/null @@ -1,195 +0,0 @@ ---TEST-- -Test array_unique() function : usage variations - unexpected values for 'input' argument ---FILE-- - ---EXPECTF-- -*** Testing array_unique() : Passing non array values to $input argument *** --- Iteration 1 -- - -Warning: array_unique() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 2 -- - -Warning: array_unique() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 3 -- - -Warning: array_unique() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 4 -- - -Warning: array_unique() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 5 -- - -Warning: array_unique() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 6 -- - -Warning: array_unique() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_unique() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_unique() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_unique() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_unique() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_unique() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_unique() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_unique() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_unique() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 15 -- - -Warning: array_unique() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 16 -- - -Warning: array_unique() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: array_unique() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_unique() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_unique() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_unique() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_unique() expects parameter 1 to be array, object given in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_unique() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 23 -- - -Warning: array_unique() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 24 -- - -Warning: array_unique() expects parameter 1 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_unshift_variation1.phpt b/ext/standard/tests/array/array_unshift_variation1.phpt deleted file mode 100644 index f80fc0ebc6396..0000000000000 --- a/ext/standard/tests/array/array_unshift_variation1.phpt +++ /dev/null @@ -1,338 +0,0 @@ ---TEST-- -Test array_unshift() function : usage variations - unexpected values for 'array' argument ---FILE-- - ---EXPECTF-- -*** Testing array_unshift() : unexpected values for $array argument *** - --- Iteration 1 -- -Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d -NULL -int(0) - -Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d -NULL -int(0) - --- Iteration 2 -- -Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d -NULL -int(1) - -Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d -NULL -int(1) - --- Iteration 3 -- -Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d -NULL -int(12345) - -Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d -NULL -int(12345) - --- Iteration 4 -- -Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d -NULL -int(-2345) - -Warning: array_unshift() expects parameter 1 to be array, int given in %s on line %d -NULL -int(-2345) - --- Iteration 5 -- -Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d -NULL -float(10.5) - -Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d -NULL -float(10.5) - --- Iteration 6 -- -Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d -NULL -float(-10.5) - -Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d -NULL -float(-10.5) - --- Iteration 7 -- -Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d -NULL -float(123456789000) - -Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d -NULL -float(123456789000) - --- Iteration 8 -- -Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d -NULL -float(1.23456789E-9) - -Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d -NULL -float(1.23456789E-9) - --- Iteration 9 -- -Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d -NULL -float(0.5) - -Warning: array_unshift() expects parameter 1 to be array, float given in %s on line %d -NULL -float(0.5) - --- Iteration 10 -- -Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d -NULL -NULL - -Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d -NULL -NULL - --- Iteration 11 -- -Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d -NULL -NULL - -Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d -NULL -NULL - --- Iteration 12 -- -Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d -NULL -bool(true) - -Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d -NULL -bool(true) - --- Iteration 13 -- -Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d -NULL -bool(false) - -Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d -NULL -bool(false) - --- Iteration 14 -- -Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d -NULL -bool(true) - -Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d -NULL -bool(true) - --- Iteration 15 -- -Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d -NULL -bool(false) - -Warning: array_unshift() expects parameter 1 to be array, bool given in %s on line %d -NULL -bool(false) - --- Iteration 16 -- -Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d -NULL -string(0) "" - -Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d -NULL -string(0) "" - --- Iteration 17 -- -Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d -NULL -string(0) "" - -Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d -NULL -string(0) "" - --- Iteration 18 -- -Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d -NULL -string(6) "string" - -Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d -NULL -string(6) "string" - --- Iteration 19 -- -Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d -NULL -string(6) "string" - -Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d -NULL -string(6) "string" - --- Iteration 20 -- -Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d -NULL -string(11) "hello world" - -Warning: array_unshift() expects parameter 1 to be array, string given in %s on line %d -NULL -string(11) "hello world" - --- Iteration 21 -- -Warning: array_unshift() expects parameter 1 to be array, object given in %s on line %d -NULL -object(classA)#1 (0) { -} - -Warning: array_unshift() expects parameter 1 to be array, object given in %s on line %d -NULL -object(classA)#1 (0) { -} - --- Iteration 22 -- -Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d -NULL -NULL - -Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d -NULL -NULL - --- Iteration 23 -- -Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d -NULL -NULL - -Warning: array_unshift() expects parameter 1 to be array, null given in %s on line %d -NULL -NULL - --- Iteration 24 -- -Warning: array_unshift() expects parameter 1 to be array, resource given in %s on line %d -NULL -resource(%d) of type (stream) - -Warning: array_unshift() expects parameter 1 to be array, resource given in %s on line %d -NULL -resource(%d) of type (stream) -Done diff --git a/ext/standard/tests/array/array_values_variation1.phpt b/ext/standard/tests/array/array_values_variation1.phpt deleted file mode 100644 index 0ee93e2a129f3..0000000000000 --- a/ext/standard/tests/array/array_values_variation1.phpt +++ /dev/null @@ -1,223 +0,0 @@ ---TEST-- -Test array_values() function : usage variations - Pass different data types as $input arg ---FILE-- - ---EXPECTF-- -*** Testing array_values() : usage variations *** - --- Iteration 1 -- - -Warning: array_values() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: array_values() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: array_values() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: array_values() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: array_values() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: array_values() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: array_values() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: array_values() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: array_values() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: array_values() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: array_values() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: array_values() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: array_values() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: array_values() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: array_values() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: array_values() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_values() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -array(0) { -} - --- Iteration 19 -- - -Warning: array_values() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_values() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_values() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: array_values() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: array_values() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: array_values() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: array_values() expects parameter 1 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_walk_recursive_variation1.phpt b/ext/standard/tests/array/array_walk_recursive_variation1.phpt deleted file mode 100644 index 56abaca83dadb..0000000000000 --- a/ext/standard/tests/array/array_walk_recursive_variation1.phpt +++ /dev/null @@ -1,250 +0,0 @@ ---TEST-- -Test array_walk_recursive() function : usage variations - unexpected values for 'input' argument ---FILE-- - ---EXPECTF-- -*** Testing array_walk_recursive() : unexpected values for 'input' argument *** --- Iteration 1 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 2 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 3 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 4 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 5 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 6 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 15 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 16 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, resource given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, resource given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 1 to be array, null given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_walk_recursive_variation2.phpt b/ext/standard/tests/array/array_walk_recursive_variation2.phpt deleted file mode 100644 index 5c8c56dcc2d38..0000000000000 --- a/ext/standard/tests/array/array_walk_recursive_variation2.phpt +++ /dev/null @@ -1,268 +0,0 @@ ---TEST-- -Test array_walk_recursive() function : usage variations - unexpected values in place of 'funcname' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data -/* 14*/ NULL, - null, - - // boolean data -/* 16*/ true, - false, - TRUE, - FALSE, - - // empty data -/* 20*/ "", - '', - - // object data - new MyClass(), - - // resource data -/* 23*/ $fp = fopen(__FILE__, 'r'), - - // undefined data - @$undefined_var, - - // unset data -/* 25*/ @$unset_var, -); - -for($count = 0; $count < count($funcname_values); $count++) { - echo "-- Iteration ".($count + 1)." --\n"; - var_dump( array_walk_recursive($input, $funcname_values[$count]) ); - var_dump( array_walk_recursive($input, $funcname_values[$count], $user_data )); -} - -fclose($fp); -echo "Done" -?> ---EXPECTF-- -*** Testing array_walk_recursive() : unexpected values for 'funcname' argument *** --- Iteration 1 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 2 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 3 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 4 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 5 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 6 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 15 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 16 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 23 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 24 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 25 -- - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_walk_variation1.phpt b/ext/standard/tests/array/array_walk_variation1.phpt deleted file mode 100644 index 5fc3e62f2a938..0000000000000 --- a/ext/standard/tests/array/array_walk_variation1.phpt +++ /dev/null @@ -1,250 +0,0 @@ ---TEST-- -Test array_walk() function : usage variations - unexpected values for 'input' argument ---FILE-- - ---EXPECTF-- -*** Testing array_walk() : unexpected values for 'input' argument *** --- Iteration 1 -- - -Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 2 -- - -Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 3 -- - -Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 4 -- - -Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 5 -- - -Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 6 -- - -Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_walk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_walk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_walk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 15 -- - -Warning: array_walk() expects parameter 1 to be array, bool given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 16 -- - -Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_walk() expects parameter 1 to be array, resource given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, resource given in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d -NULL - -Warning: array_walk() expects parameter 1 to be array, null given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_walk_variation2.phpt b/ext/standard/tests/array/array_walk_variation2.phpt deleted file mode 100644 index 1780f66bae2a8..0000000000000 --- a/ext/standard/tests/array/array_walk_variation2.phpt +++ /dev/null @@ -1,268 +0,0 @@ ---TEST-- -Test array_walk() function : usage variations - unexpected values in place of 'funcname' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data -/* 14*/ NULL, - null, - - // boolean data -/* 16*/ true, - false, - TRUE, - FALSE, - - // empty data -/* 20*/ "", - '', - - // object data - new MyClass(), - - // resource data -/* 23*/ $fp = fopen(__FILE__, 'r'), - - // undefined data - @$undefined_var, - - // unset data -/* 25*/ @$unset_var, -); - -for($count = 0; $count < count($funcname_values); $count++) { - echo "-- Iteration ".($count + 1)." --\n"; - var_dump( array_walk($input, $funcname_values[$count]) ); - var_dump( array_walk($input, $funcname_values[$count], $user_data )); -} - -fclose($fp); -echo "Done" -?> ---EXPECTF-- -*** Testing array_walk() : unexpected values for 'funcname' argument *** --- Iteration 1 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 2 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 3 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 4 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 5 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 6 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 7 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 8 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 9 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 10 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 11 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 12 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 13 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d -NULL --- Iteration 14 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 15 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 16 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL --- Iteration 21 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL --- Iteration 22 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 23 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 24 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 25 -- - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - -Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/arsort_variation1.phpt b/ext/standard/tests/array/arsort_variation1.phpt deleted file mode 100644 index d4156e3a9c734..0000000000000 --- a/ext/standard/tests/array/arsort_variation1.phpt +++ /dev/null @@ -1,399 +0,0 @@ ---TEST-- -Test arsort() function : usage variations - unexpected values for 'array_arg' argument ---FILE-- - 0, - 1 => 1, - 2 => 12345, - 3 => -2345, - - // float data - 4 => 10.5, - 5 => -10.5, - 6 => 10.5e3, - 7 => 10.6E-2, - 8 => .5, - - // null data - 9 => NULL, - 10 => null, - - // boolean data - 11 => true, - 12 => false, - 13 => TRUE, - 14 => FALSE, - - // empty data - 15 => "", - 16 => '', - - // string data - 17 => "string", - 18 => 'string', - - // object data - 19 => new stdclass(), - - // undefined data - 20 => @$undefined_var, - - // unset data - 21 => @$unset_var, - - // resource variable - 22 => $fp - -); - -// loop though each element of the array and check the working of arsort() -// when $array argument is supplied with different values from $unexpected_values -echo "\n-- Testing arsort() by supplying different unexpected values for 'array' argument --\n"; -echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n"; - -$counter = 1; -for($index = 0; $index < count($unexpected_values); $index ++) { - echo "-- Iteration $counter --\n"; - $value = $unexpected_values [$index]; - var_dump( arsort($value) ); // expecting : bool(false) - var_dump( arsort($value, SORT_REGULAR) ); // expecting : bool(false) - var_dump( arsort($value, SORT_NUMERIC) ); // expecting : bool(false) - var_dump( arsort($value, SORT_STRING) ); // expecting : bool(false) - $counter++; -} - -echo "Done"; -?> ---EXPECTF-- -*** Testing arsort() : usage variations *** - --- Testing arsort() by supplying different unexpected values for 'array' argument -- - --- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING -- --- Iteration 1 -- - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 2 -- - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 3 -- - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 5 -- - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 6 -- - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 7 -- - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 8 -- - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 9 -- - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 10 -- - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 11 -- - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 12 -- - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 14 -- - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 15 -- - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 16 -- - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 17 -- - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 19 -- - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 20 -- - -Warning: arsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/array/arsort_variation2.phpt b/ext/standard/tests/array/arsort_variation2.phpt deleted file mode 100644 index b2c4385d6e199..0000000000000 --- a/ext/standard/tests/array/arsort_variation2.phpt +++ /dev/null @@ -1,304 +0,0 @@ ---TEST-- -Test arsort() function : usage variations - unexpected values for 'sort_flags' argument ---FILE-- - 10, 2 => 2, 3 => 45); - -//array of values to iterate over -$unexpected_values = array( - - // int data -/*1*/ -2345, - - // float data -/*2*/ 10.5, - -10.5, - 10.5e2, - 10.6E-2, - .5, - - // null data -/*7*/ NULL, - null, - - // boolean data -/*9*/ true, - false, - TRUE, - FALSE, - - // empty data -/*13*/ "", - '', - - // string data -/*15*/ "string", - 'string', - - // object data -/*16*/ new stdclass(), - - // undefined data -/*17*/ @$undefined_var, - - // unset data -/*18*/ @$unset_var, - - // resource variable -/*19*/ $fp - -); - -// loop though each element of the array and check the working of arsort() -// when $flag argument is supplied with different values from $unexpected_values -echo "\n-- Testing arsort() by supplying different unexpected values for 'sort_flags' argument --\n"; - -$counter = 1; -for($index = 0; $index < count($unexpected_values); $index ++) { - echo "-- Iteration $counter --\n"; - $value = $unexpected_values [$index]; - $temp_array = $unsorted_values; - var_dump( arsort($temp_array, $value) ); - var_dump($temp_array); - $counter++; -} - -echo "Done"; -?> ---EXPECTF-- -*** Testing arsort() : usage variations *** - --- Testing arsort() by supplying different unexpected values for 'sort_flags' argument -- --- Iteration 1 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 2 -- -bool(true) -array(3) { - [3]=> - int(45) - [2]=> - int(2) - [1]=> - int(10) -} --- Iteration 3 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 4 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 5 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 6 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 7 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 8 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 9 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 10 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 11 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 12 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 13 -- - -Warning: arsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 14 -- - -Warning: arsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 15 -- - -Warning: arsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 16 -- - -Warning: arsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 17 -- - -Warning: arsort() expects parameter 2 to be int, object given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 18 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 19 -- -bool(true) -array(3) { - [3]=> - int(45) - [1]=> - int(10) - [2]=> - int(2) -} --- Iteration 20 -- - -Warning: arsort() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} -Done diff --git a/ext/standard/tests/array/asort_variation1.phpt b/ext/standard/tests/array/asort_variation1.phpt deleted file mode 100644 index efc109d28f61d..0000000000000 --- a/ext/standard/tests/array/asort_variation1.phpt +++ /dev/null @@ -1,399 +0,0 @@ ---TEST-- -Test asort() function : usage variations - unexpected values for 'array_arg' argument ---FILE-- - 0, - 1 => 1, - 2 => 12345, - 3 => -2345, - - // float data - 4 => 10.5, - 5 => -10.5, - 6 => 10.5e3, - 7 => 10.6E-2, - 8 => .5, - - // null data - 9 => NULL, - 10 => null, - - // boolean data - 11 => true, - 12 => false, - 13 => TRUE, - 14 => FALSE, - - // empty data - 15 => "", - 16 => '', - - // string data - 17 => "string", - 18 => 'string', - - // object data - 19 => new stdclass(), - - // undefined data - 20 => @$undefined_var, - - // unset data - 21 => @$unset_var, - - // resource variable - 22 => $fp - -); - -// loop though each element of the array and check the working of asort() -// when $array argument is supplied with different values from $unexpected_values -echo "\n-- Testing asort() by supplying different unexpected values for 'array' argument --\n"; -echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n"; - -$counter = 1; -for($index = 0; $index < count($unexpected_values); $index ++) { - echo "-- Iteration $counter --\n"; - $value = $unexpected_values [$index]; - var_dump( asort($value) ); // expecting : bool(false) - var_dump( asort($value, SORT_REGULAR) ); // expecting : bool(false) - var_dump( asort($value, SORT_NUMERIC) ); // expecting : bool(false) - var_dump( asort($value, SORT_STRING) ); // expecting : bool(false) - $counter++; -} - -echo "Done"; -?> ---EXPECTF-- -*** Testing asort() : usage variations *** - --- Testing asort() by supplying different unexpected values for 'array' argument -- - --- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING -- --- Iteration 1 -- - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 2 -- - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 3 -- - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 5 -- - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 6 -- - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 7 -- - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 8 -- - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 9 -- - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 10 -- - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 11 -- - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 12 -- - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 14 -- - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 15 -- - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 16 -- - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 17 -- - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 19 -- - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 20 -- - -Warning: asort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, object given in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: asort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: asort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/array/asort_variation2.phpt b/ext/standard/tests/array/asort_variation2.phpt deleted file mode 100644 index a3960cfdddc4a..0000000000000 --- a/ext/standard/tests/array/asort_variation2.phpt +++ /dev/null @@ -1,304 +0,0 @@ ---TEST-- -Test asort() function : usage variations - unexpected values for 'sort_flags' argument ---FILE-- - 10, 2 => 2, 3 => 45); - -//array of values to iterate over -$unexpected_values = array( - - // int data -/*1*/ -2345, - - // float data -/*2*/ 10.5, - -10.5, - 10.5e2, - 10.6E-2, - .5, - - // null data -/*7*/ NULL, - null, - - // boolean data -/*9*/ true, - false, - TRUE, - FALSE, - - // empty data -/*13*/ "", - '', - - // string data -/*15*/ "string", - 'string', - - // object data -/*16*/ new stdclass(), - - // undefined data -/*17*/ @$undefined_var, - - // unset data -/*18*/ @$unset_var, - - // resource variable -/*19*/ $fp - -); - -// loop though each element of the array and check the working of asort() -// when $flag argument is supplied with different values from $unexpected_values -echo "\n-- Testing asort() by supplying different unexpected values for 'sort_flags' argument --\n"; - -$counter = 1; -for($index = 0; $index < count($unexpected_values); $index ++) { - echo "-- Iteration $counter --\n"; - $value = $unexpected_values [$index]; - $temp_array = $unsorted_values; - var_dump( asort($temp_array, $value) ); - var_dump($temp_array); - $counter++; -} - -echo "Done"; -?> ---EXPECTF-- -*** Testing asort() : usage variations *** - --- Testing asort() by supplying different unexpected values for 'sort_flags' argument -- --- Iteration 1 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 2 -- -bool(true) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 3 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 4 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 5 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 6 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 7 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 8 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 9 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 10 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 11 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 12 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 13 -- - -Warning: asort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 14 -- - -Warning: asort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 15 -- - -Warning: asort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 16 -- - -Warning: asort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 17 -- - -Warning: asort() expects parameter 2 to be int, object given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} --- Iteration 18 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 19 -- -bool(true) -array(3) { - [2]=> - int(2) - [1]=> - int(10) - [3]=> - int(45) -} --- Iteration 20 -- - -Warning: asort() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -array(3) { - [1]=> - int(10) - [2]=> - int(2) - [3]=> - int(45) -} -Done diff --git a/ext/standard/tests/array/count_variation1.phpt b/ext/standard/tests/array/count_variation1.phpt deleted file mode 100644 index 10406f71ff08c..0000000000000 --- a/ext/standard/tests/array/count_variation1.phpt +++ /dev/null @@ -1,218 +0,0 @@ ---TEST-- -Test count() function : usage variations - Pass different data types as $var arg ---FILE-- - ---EXPECTF-- -*** Testing count() : usage variations *** - --- Iteration 1 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 2 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 3 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 4 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 5 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 6 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 7 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 8 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 9 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 10 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(0) - --- Iteration 11 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(0) - --- Iteration 12 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 13 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 14 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 15 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 16 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 17 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 18 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 19 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 20 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 21 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) - --- Iteration 22 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(0) - --- Iteration 23 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(0) - --- Iteration 24 -- - -Warning: count(): Parameter must be an array or an object that implements Countable in %s on line %d -int(1) -Done diff --git a/ext/standard/tests/array/count_variation2.phpt b/ext/standard/tests/array/count_variation2.phpt deleted file mode 100644 index 0a654be1837a6..0000000000000 --- a/ext/standard/tests/array/count_variation2.phpt +++ /dev/null @@ -1,189 +0,0 @@ ---TEST-- -Test count() function : usage variations - Pass different data types as $mode arg ---SKIPIF-- - ---EXPECTF-- -*** Testing count() : usage variations *** - --- Iteration 1 -- -int(3) - --- Iteration 2 -- -int(5) - --- Iteration 3 -- -int(3) - --- Iteration 4 -- -int(3) - --- Iteration 5 -- -int(3) - --- Iteration 6 -- -int(3) - --- Iteration 7 -- -int(3) - --- Iteration 8 -- -int(3) - --- Iteration 9 -- -int(3) - --- Iteration 10 -- -int(3) - --- Iteration 11 -- -int(3) - --- Iteration 12 -- -int(5) - --- Iteration 13 -- -int(3) - --- Iteration 14 -- -int(5) - --- Iteration 15 -- -int(3) - --- Iteration 16 -- - -Warning: count() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: count() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: count() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: count() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: count() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: count() expects parameter 2 to be int, object given in %s on line %d -NULL - --- Iteration 22 -- -int(3) - --- Iteration 23 -- -int(3) - --- Iteration 24 -- - -Warning: count() expects parameter 2 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/current_variation1.phpt b/ext/standard/tests/array/current_variation1.phpt deleted file mode 100644 index c6c66f43c9606..0000000000000 --- a/ext/standard/tests/array/current_variation1.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test current() function : usage variations - Pass different data types as $array_arg arg ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing current() : usage variations *** - --- Iteration 1 -- - -Warning: current() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: current() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: current() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: current() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: current() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: current() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: current() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: current() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: current() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: current() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: current() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: current() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: current() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: current() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: current() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: current() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: current() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: current() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: current() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: current() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- -NULL - --- Iteration 22 -- - -Warning: current() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: current() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: current() expects parameter 1 to be array, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/array/end_variation1.phpt b/ext/standard/tests/array/end_variation1.phpt deleted file mode 100644 index 2b7f4cd9d4bbd..0000000000000 --- a/ext/standard/tests/array/end_variation1.phpt +++ /dev/null @@ -1,220 +0,0 @@ ---TEST-- -Test end() function : usage variations - Pass different data types as $array_arg ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing end() : usage variations *** - --- Iteration 1 -- - -Warning: end() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: end() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: end() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: end() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: end() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: end() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: end() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: end() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: end() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: end() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: end() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: end() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: end() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: end() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: end() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: end() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: end() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- - -Warning: end() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: end() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: end() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- -string(12) "hello, world" - --- Iteration 23 -- - -Warning: end() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: end() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: end() expects parameter 1 to be array, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/array/key_variation1.phpt b/ext/standard/tests/array/key_variation1.phpt deleted file mode 100644 index 12a97e14211b6..0000000000000 --- a/ext/standard/tests/array/key_variation1.phpt +++ /dev/null @@ -1,220 +0,0 @@ ---TEST-- -Test key() function : usage variations - Pass different data types as $array_arg arg. ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing key() : usage variations *** - --- Iteration 1 -- - -Warning: key() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: key() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: key() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: key() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: key() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: key() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: key() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: key() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: key() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: key() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: key() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: key() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: key() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: key() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: key() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: key() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: key() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -NULL - --- Iteration 19 -- - -Warning: key() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: key() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: key() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- -string(4) "var1" - --- Iteration 23 -- - -Warning: key() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: key() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: key() expects parameter 1 to be array, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/array/krsort_variation1.phpt b/ext/standard/tests/array/krsort_variation1.phpt deleted file mode 100644 index aaba5b91ce84f..0000000000000 --- a/ext/standard/tests/array/krsort_variation1.phpt +++ /dev/null @@ -1,397 +0,0 @@ ---TEST-- -Test krsort() function : usage variations - unexpected values for 'array' argument ---FILE-- - ---EXPECTF-- -*** Testing krsort() : usage variations *** - --- Testing krsort() by supplying different unexpected values for 'array' argument -- - --- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING -- --- Iteration 1 -- - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 2 -- - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 3 -- - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 5 -- - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 6 -- - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 7 -- - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 8 -- - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 9 -- - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 10 -- - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 11 -- - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 12 -- - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 14 -- - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 15 -- - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 16 -- - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 17 -- - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 19 -- - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 20 -- - -Warning: krsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/array/krsort_variation2.phpt b/ext/standard/tests/array/krsort_variation2.phpt deleted file mode 100644 index 303a9a1eb663d..0000000000000 --- a/ext/standard/tests/array/krsort_variation2.phpt +++ /dev/null @@ -1,303 +0,0 @@ ---TEST-- -Test krsort() function : usage variations - unexpected values for 'sort_flags' argument ---FILE-- - 10, 2 => 2, 45 => 45); - -//array of unexpected values to iterate over -$unexpected_values = array ( - - // int data -/*1*/ -2345, - - // float data -/*2*/ 10.5, - -10.5, - 10.5e2, - 10.6E-2, - .5, - - // null data -/*7*/ NULL, - null, - - // boolean data -/*9*/ true, - false, - TRUE, - FALSE, - - // empty data -/*13*/ "", - '', - - // string data -/*15*/ "string", - 'string', - - // object data -/*16*/ new stdclass(), - - // undefined data -/*17*/ @$undefined_var, - - // unset data -/*18*/ @$unset_var, - - // resource variable -/*19*/ $fp - -); - -// loop though each element of the array and check the working of krsort() -// when 'sort_flags' argument is supplied with different values -echo "\n-- Testing krsort() by supplying different unexpected values for 'sort_flags' argument --\n"; - -$counter = 1; -for($index = 0; $index < count($unexpected_values); $index ++) { - echo "-- Iteration $counter --\n"; - $value = $unexpected_values [$index]; - $temp_array = $unsorted_values; - var_dump( krsort($temp_array, $value) ); - var_dump($temp_array); - $counter++; -} - -echo "Done"; -?> ---EXPECTF-- -*** Testing krsort() : usage variations *** - --- Testing krsort() by supplying different unexpected values for 'sort_flags' argument -- --- Iteration 1 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 2 -- -bool(true) -array(3) { - [45]=> - int(45) - [2]=> - int(2) - [10]=> - int(10) -} --- Iteration 3 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 4 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 5 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 6 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 7 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 8 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 9 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 10 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 11 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 12 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 13 -- - -Warning: krsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 14 -- - -Warning: krsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 15 -- - -Warning: krsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 16 -- - -Warning: krsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 17 -- - -Warning: krsort() expects parameter 2 to be int, object given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 18 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 19 -- -bool(true) -array(3) { - [45]=> - int(45) - [10]=> - int(10) - [2]=> - int(2) -} --- Iteration 20 -- - -Warning: krsort() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} -Done diff --git a/ext/standard/tests/array/ksort_variation1.phpt b/ext/standard/tests/array/ksort_variation1.phpt deleted file mode 100644 index 87de1647d7f76..0000000000000 --- a/ext/standard/tests/array/ksort_variation1.phpt +++ /dev/null @@ -1,397 +0,0 @@ ---TEST-- -Test ksort() function : usage variations - unexpected values for 'array' argument ---FILE-- - ---EXPECTF-- -*** Testing ksort() : usage variations *** - --- Testing ksort() by supplying different unexpected values for 'array' argument -- - --- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING -- --- Iteration 1 -- - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 2 -- - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 3 -- - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 5 -- - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 6 -- - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 7 -- - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 8 -- - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 9 -- - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 10 -- - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 11 -- - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 12 -- - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 14 -- - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 15 -- - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 16 -- - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 17 -- - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 19 -- - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 20 -- - -Warning: ksort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, object given in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/array/ksort_variation2.phpt b/ext/standard/tests/array/ksort_variation2.phpt deleted file mode 100644 index 83130d543e587..0000000000000 --- a/ext/standard/tests/array/ksort_variation2.phpt +++ /dev/null @@ -1,303 +0,0 @@ ---TEST-- -Test ksort() function : usage variations - unexpected values for 'sort_flags' argument ---FILE-- - 10, 2 => 2, 45 => 45); - -//array of unexpected values to iterate over -$unexpected_values = array ( - - // int data -/*1*/ -2345, - - // float data -/*2*/ 10.5, - -10.5, - 10.5e2, - 10.6E-2, - .5, - - // null data -/*7*/ NULL, - null, - - // boolean data -/*9*/ true, - false, - TRUE, - FALSE, - - // empty data -/*13*/ "", - '', - - // string data -/*15*/ "string", - 'string', - - // object data -/*16*/ new stdclass(), - - // undefined data -/*17*/ @$undefined_var, - - // unset data -/*18*/ @$unset_var, - - // resource variable -/*19*/ $fp - -); - -// loop though each element of the array and check the working of ksort() -// when 'sort_flags' argument is supplied with different values -echo "\n-- Testing ksort() by supplying different unexpected values for 'sort_flags' argument --\n"; - -$counter = 1; -for($index = 0; $index < count($unexpected_values); $index ++) { - echo "-- Iteration $counter --\n"; - $value = $unexpected_values [$index]; - $temp_array = $unsorted_values; - var_dump( ksort($temp_array, $value) ); - var_dump($temp_array); - $counter++; -} - -echo "Done"; -?> ---EXPECTF-- -*** Testing ksort() : usage variations *** - --- Testing ksort() by supplying different unexpected values for 'sort_flags' argument -- --- Iteration 1 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 2 -- -bool(true) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 3 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 4 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 5 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 6 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 7 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 8 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 9 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 10 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 11 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 12 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 13 -- - -Warning: ksort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 14 -- - -Warning: ksort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 15 -- - -Warning: ksort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 16 -- - -Warning: ksort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 17 -- - -Warning: ksort() expects parameter 2 to be int, object given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} --- Iteration 18 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 19 -- -bool(true) -array(3) { - [2]=> - int(2) - [10]=> - int(10) - [45]=> - int(45) -} --- Iteration 20 -- - -Warning: ksort() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -array(3) { - [10]=> - int(10) - [2]=> - int(2) - [45]=> - int(45) -} -Done diff --git a/ext/standard/tests/array/natcasesort_variation1.phpt b/ext/standard/tests/array/natcasesort_variation1.phpt deleted file mode 100644 index 98d6297a3f07b..0000000000000 --- a/ext/standard/tests/array/natcasesort_variation1.phpt +++ /dev/null @@ -1,222 +0,0 @@ ---TEST-- -Test natcasesort() function : usage variations - Pass different data types as $array_arg arg ---FILE-- - ---EXPECTF-- -*** Testing natcasesort() : usage variation *** - --- Iteration 1 -- - -Warning: natcasesort() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: natcasesort() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: natcasesort() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: natcasesort() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: natcasesort() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: natcasesort() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: natcasesort() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: natcasesort() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: natcasesort() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: natcasesort() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: natcasesort() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: natcasesort() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: natcasesort() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: natcasesort() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: natcasesort() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: natcasesort() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: natcasesort() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -bool(true) - --- Iteration 19 -- - -Warning: natcasesort() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: natcasesort() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: natcasesort() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: natcasesort() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: natcasesort() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: natcasesort() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: natcasesort() expects parameter 1 to be array, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/next_variation1.phpt b/ext/standard/tests/array/next_variation1.phpt deleted file mode 100644 index 405f34a435c77..0000000000000 --- a/ext/standard/tests/array/next_variation1.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test next() function : usage variation - Pass different data types as $array_arg ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing next() : variation *** - --- Iteration 1 -- - -Warning: next() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: next() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: next() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: next() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: next() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: next() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: next() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: next() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: next() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: next() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: next() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: next() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: next() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: next() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: next() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: next() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: next() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- - -Warning: next() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: next() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: next() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- - -Warning: next() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: next() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: next() expects parameter 1 to be array, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/array/prev_variation1.phpt b/ext/standard/tests/array/prev_variation1.phpt deleted file mode 100644 index 01156d82394d4..0000000000000 --- a/ext/standard/tests/array/prev_variation1.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test prev() function : usage variation - Pass different data types as $array_arg ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing prev() : variation *** - --- Iteration 1 -- - -Warning: prev() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: prev() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: prev() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: prev() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: prev() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: prev() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: prev() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: prev() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: prev() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: prev() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: prev() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: prev() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: prev() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: prev() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: prev() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: prev() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: prev() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- - -Warning: prev() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: prev() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: prev() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- - -Warning: prev() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: prev() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: prev() expects parameter 1 to be array, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/array/reset_variation1.phpt b/ext/standard/tests/array/reset_variation1.phpt deleted file mode 100644 index f273324902321..0000000000000 --- a/ext/standard/tests/array/reset_variation1.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test reset() function : usage variations - Pass different data types as $array_arg arg. ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing reset() : usage variations *** - --- Iteration 1 -- - -Warning: reset() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: reset() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: reset() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: reset() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: reset() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: reset() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: reset() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: reset() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: reset() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: reset() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: reset() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: reset() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: reset() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: reset() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: reset() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: reset() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: reset() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- - -Warning: reset() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: reset() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: reset() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- - -Warning: reset() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: reset() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: reset() expects parameter 1 to be array, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/array/rsort_variation1.phpt b/ext/standard/tests/array/rsort_variation1.phpt deleted file mode 100644 index 5b83c89a29b9c..0000000000000 --- a/ext/standard/tests/array/rsort_variation1.phpt +++ /dev/null @@ -1,513 +0,0 @@ ---TEST-- -Test rsort() function : usage variations - Pass different data types as $array_arg arg ---FILE-- - ---EXPECTF-- -*** Testing rsort() : variation *** --- Iteration 1 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 2 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 3 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 4 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 5 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 6 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 7 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 8 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 9 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 10 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 11 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 12 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 13 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 14 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 15 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 16 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 17 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 18 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 19 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 20 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 21 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, object given in %s on line %d -bool(false) --- Iteration 22 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 23 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 24 -- -Flag = default: - -Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) -Flag = SORT_REGULAR: - -Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) -Flag = SORT_NUMERIC: - -Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) -Flag = SORT_STRING: - -Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/array/rsort_variation2.phpt b/ext/standard/tests/array/rsort_variation2.phpt deleted file mode 100644 index d2b3e0e423451..0000000000000 --- a/ext/standard/tests/array/rsort_variation2.phpt +++ /dev/null @@ -1,485 +0,0 @@ ---TEST-- -Test rsort() function : usage variations - Pass different data types as $sort_flags arg ---SKIPIF-- - ---EXPECTF-- -*** Testing rsort() : variation *** - --- Iteration 1 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 2 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 3 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 4 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 5 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 6 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 7 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 8 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 9 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 10 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 11 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 12 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 13 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 14 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 15 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 16 -- - -Warning: rsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(5) { - [0]=> - int(1) - [1]=> - int(5) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(1) -} - --- Iteration 17 -- - -Warning: rsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(5) { - [0]=> - int(1) - [1]=> - int(5) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(1) -} - --- Iteration 18 -- - -Warning: rsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(5) { - [0]=> - int(1) - [1]=> - int(5) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(1) -} - --- Iteration 19 -- - -Warning: rsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(5) { - [0]=> - int(1) - [1]=> - int(5) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(1) -} - --- Iteration 20 -- - -Warning: rsort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(5) { - [0]=> - int(1) - [1]=> - int(5) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(1) -} - --- Iteration 21 -- - -Warning: rsort() expects parameter 2 to be int, object given in %s on line %d -bool(false) -array(5) { - [0]=> - int(1) - [1]=> - int(5) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(1) -} - --- Iteration 22 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 23 -- -bool(true) -array(5) { - [0]=> - int(5) - [1]=> - int(3) - [2]=> - int(2) - [3]=> - int(1) - [4]=> - int(1) -} - --- Iteration 24 -- - -Warning: rsort() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -array(5) { - [0]=> - int(1) - [1]=> - int(5) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(1) -} -Done diff --git a/ext/standard/tests/array/shuffle_variation1.phpt b/ext/standard/tests/array/shuffle_variation1.phpt deleted file mode 100644 index 3c0ab5051a98b..0000000000000 --- a/ext/standard/tests/array/shuffle_variation1.phpt +++ /dev/null @@ -1,213 +0,0 @@ ---TEST-- -Test shuffle() function : usage variations - unexpected values for 'array_arg' argument ---FILE-- - ---EXPECTF-- -*** Testing shuffle() : with unexpected values for 'array_arg' argument *** - --- Iteration 1 -- - -Warning: shuffle() expects parameter 1 to be array, int given in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: shuffle() expects parameter 1 to be array, int given in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: shuffle() expects parameter 1 to be array, int given in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: shuffle() expects parameter 1 to be array, int given in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d -bool(false) - --- Iteration 6 -- - -Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: shuffle() expects parameter 1 to be array, float given in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: shuffle() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: shuffle() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: shuffle() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: shuffle() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d -bool(false) - --- Iteration 18 -- - -Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d -bool(false) - --- Iteration 20 -- - -Warning: shuffle() expects parameter 1 to be array, object given in %s on line %d -bool(false) - --- Iteration 21 -- - -Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d -bool(false) - --- Iteration 22 -- - -Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d -bool(false) - --- Iteration 23 -- - -Warning: shuffle() expects parameter 1 to be array, resource given in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/array/sort_variation1.phpt b/ext/standard/tests/array/sort_variation1.phpt deleted file mode 100644 index e8365ea131055..0000000000000 --- a/ext/standard/tests/array/sort_variation1.phpt +++ /dev/null @@ -1,398 +0,0 @@ ---TEST-- -Test sort() function : usage variations - unexpected values for 'array_arg' argument ---FILE-- - ---EXPECTF-- -*** Testing sort() : usage variations *** - --- Testing sort() by supplying different unexpected values for 'array' argument -- - --- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING -- --- Iteration 1 -- - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 2 -- - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 3 -- - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, int given in %s on line %d -bool(false) --- Iteration 5 -- - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 6 -- - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 7 -- - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 8 -- - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 9 -- - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, float given in %s on line %d -bool(false) --- Iteration 10 -- - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 11 -- - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 12 -- - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 14 -- - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 15 -- - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, bool given in %s on line %d -bool(false) --- Iteration 16 -- - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 17 -- - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 19 -- - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, string given in %s on line %d -bool(false) --- Iteration 20 -- - -Warning: sort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, object given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, object given in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, null given in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: sort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) - -Warning: sort() expects parameter 1 to be array, resource given in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/array/sort_variation2.phpt b/ext/standard/tests/array/sort_variation2.phpt deleted file mode 100644 index ee0e4b8b17a95..0000000000000 --- a/ext/standard/tests/array/sort_variation2.phpt +++ /dev/null @@ -1,307 +0,0 @@ ---TEST-- -Test sort() function : usage variations - unexpected values for 'sort_flags' argument ---FILE-- - ---EXPECTF-- -*** Testing sort() : usage variations *** - --- Testing sort() by supplying different unexpected values for 'flag' argument -- --- Iteration 1 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 2 -- -bool(true) -array(3) { - [0]=> - int(10) - [1]=> - int(2) - [2]=> - int(45) -} --- Iteration 3 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 4 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 5 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 6 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 7 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 8 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 9 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 10 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 11 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 12 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 13 -- - -Warning: sort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [0]=> - int(10) - [1]=> - int(2) - [2]=> - int(45) -} --- Iteration 14 -- - -Warning: sort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [0]=> - int(10) - [1]=> - int(2) - [2]=> - int(45) -} --- Iteration 15 -- - -Warning: sort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [0]=> - int(10) - [1]=> - int(2) - [2]=> - int(45) -} --- Iteration 16 -- - -Warning: sort() expects parameter 2 to be int, string given in %s on line %d -bool(false) -array(3) { - [0]=> - int(10) - [1]=> - int(2) - [2]=> - int(45) -} --- Iteration 17 -- - -Warning: sort() expects parameter 2 to be int, object given in %s on line %d -bool(false) -array(3) { - [0]=> - int(10) - [1]=> - int(2) - [2]=> - int(45) -} --- Iteration 18 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 19 -- -bool(true) -array(3) { - [0]=> - int(2) - [1]=> - int(10) - [2]=> - int(45) -} --- Iteration 20 -- - -Warning: sort() expects parameter 2 to be int, resource given in %s on line %d -bool(false) -array(3) { - [0]=> - int(10) - [1]=> - int(2) - [2]=> - int(45) -} -Done diff --git a/ext/standard/tests/array/uasort_variation1.phpt b/ext/standard/tests/array/uasort_variation1.phpt deleted file mode 100644 index f3a849b9380cd..0000000000000 --- a/ext/standard/tests/array/uasort_variation1.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test uasort() function : usage variations - unexpected values for 'array_arg' argument ---FILE-- - $value2) { - return 1; - } - else { - return -1; - } -} - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get resource variable -$fp = fopen(__FILE__,'r'); - -//array of values to iterate over -$input_values = array( - - // int data -/*1*/ 0, - 1, - 12345, - -2345, - - // float data -/*5*/ 10.5, - -10.5, - 10.1234567e8, - 10.7654321E-8, - .5, - - // null data -/*10*/ NULL, - null, - - // boolean data -/*12*/ true, - false, - TRUE, - FALSE, - - // empty data -/*16*/ "", - '', - - // string data -/*18*/ "string", - 'string', - - // resource data -/*20*/ $fp, - - // undefined data - @$undefined_var, - - // unset data -/*22*/ @$unset_var, -); - -// loop through each value of input_values -for($count = 0; $count < count($input_values); $count++) { - echo "-- Iteration ".($count + 1)." --\n"; - var_dump( uasort($input_values[$count], 'cmp_function') ); -}; - -//closing resource -fclose($fp); -echo "Done" -?> ---EXPECTF-- -*** Testing uasort() : unexpected values for 'array_arg' *** --- Iteration 1 -- - -Warning: uasort() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 2 -- - -Warning: uasort() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 3 -- - -Warning: uasort() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 4 -- - -Warning: uasort() expects parameter 1 to be array, int given in %s on line %d -NULL --- Iteration 5 -- - -Warning: uasort() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 6 -- - -Warning: uasort() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 7 -- - -Warning: uasort() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 8 -- - -Warning: uasort() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 9 -- - -Warning: uasort() expects parameter 1 to be array, float given in %s on line %d -NULL --- Iteration 10 -- - -Warning: uasort() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 11 -- - -Warning: uasort() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 12 -- - -Warning: uasort() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 13 -- - -Warning: uasort() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 14 -- - -Warning: uasort() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 15 -- - -Warning: uasort() expects parameter 1 to be array, bool given in %s on line %d -NULL --- Iteration 16 -- - -Warning: uasort() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: uasort() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: uasort() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: uasort() expects parameter 1 to be array, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: uasort() expects parameter 1 to be array, resource given in %s on line %d -NULL --- Iteration 21 -- - -Warning: uasort() expects parameter 1 to be array, null given in %s on line %d -NULL --- Iteration 22 -- - -Warning: uasort() expects parameter 1 to be array, null given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/uasort_variation2.phpt b/ext/standard/tests/array/uasort_variation2.phpt deleted file mode 100644 index e5278fbab757d..0000000000000 --- a/ext/standard/tests/array/uasort_variation2.phpt +++ /dev/null @@ -1,212 +0,0 @@ ---TEST-- -Test uasort() function : usage variations - unexpected values for 'cmp_function' argument ---FILE-- - 1, 1 => -1, 2 => 3, 3 => 10, 4 => 4, 5 => 2, 6 => 8, 7 => 5); - -// Get an unset variable -$unset_var = 10; -unset ($unset_var); - -// Get resource variable -$fp = fopen(__FILE__,'r'); - -// different values for 'cmp_function' -$cmp_values = array( - - // int data -/*1*/ 0, - 1, - 12345, - -2345, - - // float data -/*5*/ 10.5, - -10.5, - 10.1234567e8, - 10.7654321E-8, - .5, - - // array data -/*10*/ array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // null data -/*15*/ NULL, - null, - - // boolean data -/*17*/ true, - false, - TRUE, - FALSE, - - // empty data -/*21*/ "", - '', - - // string data - "string", - 'string', - - // object data -/*25*/ new MyClass(), - - // resource data - $fp, - - // undefined data - @$undefined_var, - - // unset data -/*28*/ @$unset_var, -); - -// loop through each element of the cmp_values for 'cmp_function' -for($count = 0; $count < count($cmp_values); $count++) { - echo "-- Iteration ".($count + 1)." --\n"; - var_dump( uasort($array_arg, $cmp_values[$count]) ); -}; - -//closing resource -fclose($fp); -echo "Done" -?> ---EXPECTF-- -*** Testing uasort() : Unexpected values in place of comparison function *** --- Iteration 1 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 2 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 3 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 4 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 5 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 6 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 7 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 8 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 9 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 10 -- - -Warning: uasort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 11 -- - -Warning: uasort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 12 -- - -Warning: uasort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL --- Iteration 13 -- - -Warning: uasort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d -NULL --- Iteration 14 -- - -Warning: uasort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d -NULL --- Iteration 15 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 16 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 18 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 21 -- - -Warning: uasort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL --- Iteration 22 -- - -Warning: uasort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL --- Iteration 23 -- - -Warning: uasort() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d -NULL --- Iteration 24 -- - -Warning: uasort() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d -NULL --- Iteration 25 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 26 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 27 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL --- Iteration 28 -- - -Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/uksort_variation1.phpt b/ext/standard/tests/array/uksort_variation1.phpt deleted file mode 100644 index 21210dee7b8d7..0000000000000 --- a/ext/standard/tests/array/uksort_variation1.phpt +++ /dev/null @@ -1,224 +0,0 @@ ---TEST-- -Test uksort() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array_arg - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( uksort($value, $cmp_function) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing uksort() : usage variation *** - ---int 0-- - -Warning: uksort() expects parameter 1 to be array, int given in %suksort_variation1.php on line %d -NULL - ---int 1-- - -Warning: uksort() expects parameter 1 to be array, int given in %suksort_variation1.php on line %d -NULL - ---int 12345-- - -Warning: uksort() expects parameter 1 to be array, int given in %suksort_variation1.php on line %d -NULL - ---int -12345-- - -Warning: uksort() expects parameter 1 to be array, int given in %suksort_variation1.php on line %d -NULL - ---float 10.5-- - -Warning: uksort() expects parameter 1 to be array, float given in %suksort_variation1.php on line %d -NULL - ---float -10.5-- - -Warning: uksort() expects parameter 1 to be array, float given in %suksort_variation1.php on line %d -NULL - ---float 12.3456789000e10-- - -Warning: uksort() expects parameter 1 to be array, float given in %suksort_variation1.php on line %d -NULL - ---float -12.3456789000e10-- - -Warning: uksort() expects parameter 1 to be array, float given in %suksort_variation1.php on line %d -NULL - ---float .5-- - -Warning: uksort() expects parameter 1 to be array, float given in %suksort_variation1.php on line %d -NULL - ---uppercase NULL-- - -Warning: uksort() expects parameter 1 to be array, null given in %suksort_variation1.php on line %d -NULL - ---lowercase null-- - -Warning: uksort() expects parameter 1 to be array, null given in %suksort_variation1.php on line %d -NULL - ---lowercase true-- - -Warning: uksort() expects parameter 1 to be array, bool given in %suksort_variation1.php on line %d -NULL - ---lowercase false-- - -Warning: uksort() expects parameter 1 to be array, bool given in %suksort_variation1.php on line %d -NULL - ---uppercase TRUE-- - -Warning: uksort() expects parameter 1 to be array, bool given in %suksort_variation1.php on line %d -NULL - ---uppercase FALSE-- - -Warning: uksort() expects parameter 1 to be array, bool given in %suksort_variation1.php on line %d -NULL - ---empty string DQ-- - -Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d -NULL - ---empty string SQ-- - -Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d -NULL - ---string DQ-- - -Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d -NULL - ---string SQ-- - -Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d -NULL - ---mixed case string-- - -Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d -NULL - ---heredoc-- - -Warning: uksort() expects parameter 1 to be array, string given in %suksort_variation1.php on line %d -NULL - ---instance of classWithToString-- - -Warning: uksort() expects parameter 1 to be array, object given in %suksort_variation1.php on line %d -NULL - ---instance of classWithoutToString-- - -Warning: uksort() expects parameter 1 to be array, object given in %suksort_variation1.php on line %d -NULL - ---undefined var-- - -Warning: uksort() expects parameter 1 to be array, null given in %suksort_variation1.php on line %d -NULL - ---unset var-- - -Warning: uksort() expects parameter 1 to be array, null given in %suksort_variation1.php on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/array/uksort_variation2.phpt b/ext/standard/tests/array/uksort_variation2.phpt deleted file mode 100644 index 5ac32f02b863c..0000000000000 --- a/ext/standard/tests/array/uksort_variation2.phpt +++ /dev/null @@ -1,224 +0,0 @@ ---TEST-- -Test uksort() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for cmp_function - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( uksort($array_arg, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing uksort() : usage variation *** - ---int 0-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---int 1-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---int 12345-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---int -12345-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---float 10.5-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---float -10.5-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---float 12.3456789000e10-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---float -12.3456789000e10-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---float .5-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---empty array-- - -Warning: uksort() expects parameter 2 to be a valid callback, array must have exactly two members in %suksort_variation2.php on line %d -NULL - ---int indexed array-- - -Warning: uksort() expects parameter 2 to be a valid callback, array must have exactly two members in %suksort_variation2.php on line %d -NULL - ---associative array-- - -Warning: uksort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %suksort_variation2.php on line %d -NULL - ---nested arrays-- - -Warning: uksort() expects parameter 2 to be a valid callback, array must have exactly two members in %suksort_variation2.php on line %d -NULL - ---uppercase NULL-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---lowercase null-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---lowercase true-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---lowercase false-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---uppercase TRUE-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---uppercase FALSE-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---empty string DQ-- - -Warning: uksort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %suksort_variation2.php on line %d -NULL - ---empty string SQ-- - -Warning: uksort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %suksort_variation2.php on line %d -NULL - ---instance of classWithToString-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---instance of classWithoutToString-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---undefined var-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL - ---unset var-- - -Warning: uksort() expects parameter 2 to be a valid callback, no array or string given in %suksort_variation2.php on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/array/usort_variation1.phpt b/ext/standard/tests/array/usort_variation1.phpt deleted file mode 100644 index 14d740dd86dcc..0000000000000 --- a/ext/standard/tests/array/usort_variation1.phpt +++ /dev/null @@ -1,236 +0,0 @@ ---TEST-- -Test usort() function : usage variations - Pass different data types as $array_arg arg ---FILE-- - $value2) { - return 1; - } - else { - return -1; - } -} - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = << -===DONE=== ---EXPECTF-- -*** Testing usort() : usage variations *** - --- Iteration 1 -- - -Warning: usort() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: usort() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: usort() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: usort() expects parameter 1 to be array, int given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: usort() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: usort() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: usort() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: usort() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: usort() expects parameter 1 to be array, float given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: usort() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: usort() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: usort() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: usort() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: usort() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: usort() expects parameter 1 to be array, bool given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: usort() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: usort() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 18 -- -bool(true) - --- Iteration 19 -- - -Warning: usort() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: usort() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: usort() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: usort() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: usort() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: usort() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: usort() expects parameter 1 to be array, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/array/usort_variation2.phpt b/ext/standard/tests/array/usort_variation2.phpt deleted file mode 100644 index 9e31b2fcbf299..0000000000000 --- a/ext/standard/tests/array/usort_variation2.phpt +++ /dev/null @@ -1,242 +0,0 @@ ---TEST-- -Test usort() function : usage variations - Pass different data types as $cmp_function arg ---FILE-- - 1, 1 => -1, 2 => 3, 3 => 10, 4 => 4, 5 => 2, 6 => 8, 7 => 5); - -// Get an unset variable -$unset_var = 10; -unset ($unset_var); - -// Get resource variable -$fp = fopen(__FILE__,'r'); - -// different values for $cmp_function -$inputs = array( - - // int data -/*1*/ 0, - 1, - 12345, - -2345, - - // float data -/*5*/ 10.5, - -10.5, - 10.1234567e8, - 10.7654321E-8, - .5, - - // array data -/*10*/ array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // null data -/*15*/ NULL, - null, - - // boolean data -/*17*/ true, - false, - TRUE, - FALSE, - - // empty data -/*21*/ "", - '', - - // string data - "string", - 'string', - - // object data -/*25*/ new MyClass(), - - // resource data - $fp, - - // undefined data - @$undefined_var, - - // unset data -/*28*/ @$unset_var, -); - -// loop through each element of $inputs to check the behavior of usort() -$iterator = 1; -foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump( usort($array_arg, $input) ); - $iterator++; -}; - -//closing resource -fclose($fp); -?> -===DONE=== ---EXPECTF-- -*** Testing usort() : usage variation *** - --- Iteration 1 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: usort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL - --- Iteration 11 -- - -Warning: usort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL - --- Iteration 12 -- - -Warning: usort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d -NULL - --- Iteration 13 -- - -Warning: usort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d -NULL - --- Iteration 14 -- - -Warning: usort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d -NULL - --- Iteration 15 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: usort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL - --- Iteration 22 -- - -Warning: usort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d -NULL - --- Iteration 23 -- - -Warning: usort() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d -NULL - --- Iteration 24 -- - -Warning: usort() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d -NULL - --- Iteration 25 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 26 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 27 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL - --- Iteration 28 -- - -Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/class_object/class_exists_variation_001.phpt b/ext/standard/tests/class_object/class_exists_variation_001.phpt deleted file mode 100644 index 561a77fa2c088..0000000000000 --- a/ext/standard/tests/class_object/class_exists_variation_001.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test class_exists() function : usage variations - unexpected types for argument 1 ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for classname - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( class_exists($value, $autoload) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing class_exists() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(67) -Error: 8 - Undefined variable: unset_var, %s(70) - -Arg value 0 -In autoload(0) -bool(false) - -Arg value 1 -In autoload(1) -bool(false) - -Arg value 12345 -In autoload(12345) -bool(false) - -Arg value -2345 -bool(false) - -Arg value 10.5 -bool(false) - -Arg value -10.5 -bool(false) - -Arg value 101234567000 -In autoload(101234567000) -bool(false) - -Arg value 1.07654321E-9 -bool(false) - -Arg value 0.5 -bool(false) -Error: 8 - Array to string conversion, %sclass_exists_variation_001.php(%d) - -Arg value Array -Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %sclass_exists_variation_001.php(%d) - -Arg value Array -Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %sclass_exists_variation_001.php(%d) - -Arg value Array -Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %sclass_exists_variation_001.php(%d) - -Arg value Array -Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %sclass_exists_variation_001.php(%d) - -Arg value Array -Error: 2 - class_exists() expects parameter 1 to be string, array given, %s(77) -NULL - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -In autoload(1) -bool(false) - -Arg value -bool(false) - -Arg value 1 -In autoload(1) -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) -Error: 4096 - Object of class stdClass could not be converted to string, %s(76) - -Arg value -Error: 2 - class_exists() expects parameter 1 to be string, object given, %s(77) -NULL - -Arg value -bool(false) - -Arg value -bool(false) -Done diff --git a/ext/standard/tests/class_object/class_exists_variation_002.phpt b/ext/standard/tests/class_object/class_exists_variation_002.phpt deleted file mode 100644 index 4b77d032ea341..0000000000000 --- a/ext/standard/tests/class_object/class_exists_variation_002.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -Test class_exists() function : usage variations - unexpected types for argument 2 ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for autoload - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( class_exists($classname, $value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing class_exists() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(71) -Error: 8 - Undefined variable: unset_var, %s(74) - -Arg value 0 -bool(false) - -Arg value 1 -In autoload(string_val) -bool(false) - -Arg value 12345 -In autoload(string_val) -bool(false) - -Arg value -2345 -In autoload(string_val) -bool(false) - -Arg value 10.5 -In autoload(string_val) -bool(false) - -Arg value -10.5 -In autoload(string_val) -bool(false) - -Arg value 101234567000 -In autoload(string_val) -bool(false) - -Arg value 1.07654321E-9 -In autoload(string_val) -bool(false) - -Arg value 0.5 -In autoload(string_val) -bool(false) -Error: 8 - Array to string conversion, %sclass_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - class_exists() expects parameter 2 to be bool, array given, %s(81) -NULL -Error: 8 - Array to string conversion, %sclass_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - class_exists() expects parameter 2 to be bool, array given, %s(81) -NULL -Error: 8 - Array to string conversion, %sclass_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - class_exists() expects parameter 2 to be bool, array given, %s(81) -NULL -Error: 8 - Array to string conversion, %sclass_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - class_exists() expects parameter 2 to be bool, array given, %s(81) -NULL -Error: 8 - Array to string conversion, %sclass_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - class_exists() expects parameter 2 to be bool, array given, %s(81) -NULL - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -In autoload(string_val) -bool(false) - -Arg value -bool(false) - -Arg value 1 -In autoload(string_val) -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value string -In autoload(string_val) -bool(false) - -Arg value string -In autoload(string_val) -bool(false) -Error: 4096 - Object of class stdClass could not be converted to string, %s(80) - -Arg value -Error: 2 - class_exists() expects parameter 2 to be bool, object given, %s(81) -NULL - -Arg value -bool(false) - -Arg value -bool(false) -Done diff --git a/ext/standard/tests/class_object/get_class_methods_variation_001.phpt b/ext/standard/tests/class_object/get_class_methods_variation_001.phpt index 16a728e088f7e..f3ab471b1fb30 100644 --- a/ext/standard/tests/class_object/get_class_methods_variation_001.phpt +++ b/ext/standard/tests/class_object/get_class_methods_variation_001.phpt @@ -9,7 +9,7 @@ Test get_class_methods() function : usage variations - unexpected types */ -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } set_error_handler('test_error_handler'); diff --git a/ext/standard/tests/class_object/get_object_vars_variation_003.phpt b/ext/standard/tests/class_object/get_object_vars_variation_003.phpt deleted file mode 100644 index 10be39bb7f723..0000000000000 --- a/ext/standard/tests/class_object/get_object_vars_variation_003.phpt +++ /dev/null @@ -1,210 +0,0 @@ ---TEST-- -Test get_object_vars() function : usage variations - unexpected types for argument 1 ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for obj - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( get_object_vars($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing get_object_vars() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line 56 - -Notice: Undefined variable: unset_var in %s on line 59 - -Arg value 0 - -Warning: get_object_vars() expects parameter 1 to be object, int given in %s on line %d -NULL - -Arg value 1 - -Warning: get_object_vars() expects parameter 1 to be object, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: get_object_vars() expects parameter 1 to be object, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: get_object_vars() expects parameter 1 to be object, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d -NULL - -Arg value Array - -Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d -NULL - -Arg value Array - -Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d -NULL - -Arg value Array - -Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d -NULL - -Arg value Array - -Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d -NULL - -Arg value Array - -Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d -NULL - -Arg value - -Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d -NULL - -Arg value - -Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d -NULL - -Arg value 1 - -Warning: get_object_vars() expects parameter 1 to be object, bool given in %s on line %d -NULL - -Arg value - -Warning: get_object_vars() expects parameter 1 to be object, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: get_object_vars() expects parameter 1 to be object, bool given in %s on line %d -NULL - -Arg value - -Warning: get_object_vars() expects parameter 1 to be object, bool given in %s on line %d -NULL - -Arg value - -Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d -NULL - -Arg value - -Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d -NULL - -Arg value string - -Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d -NULL - -Arg value string - -Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d -NULL - -Arg value - -Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d -NULL - -Arg value - -Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/class_object/get_parent_class_variation_002.phpt b/ext/standard/tests/class_object/get_parent_class_variation_002.phpt index 8dde525ae82e7..d331e9a0d1aa9 100644 --- a/ext/standard/tests/class_object/get_parent_class_variation_002.phpt +++ b/ext/standard/tests/class_object/get_parent_class_variation_002.phpt @@ -12,7 +12,7 @@ spl_autoload_register(function ($className) { echo "In autoload($className)\n"; }); -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } set_error_handler('test_error_handler'); diff --git a/ext/standard/tests/class_object/interface_exists_variation1.phpt b/ext/standard/tests/class_object/interface_exists_variation1.phpt deleted file mode 100644 index 3aee5037a5093..0000000000000 --- a/ext/standard/tests/class_object/interface_exists_variation1.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test interface_exists() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for classname - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( interface_exists($value, $autoload) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing interface_exists() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- - -Warning: interface_exists() expects parameter 1 to be string, array given in %sinterface_exists_variation1.php on line %d -NULL - ---int indexed array-- - -Warning: interface_exists() expects parameter 1 to be string, array given in %sinterface_exists_variation1.php on line %d -NULL - ---associative array-- - -Warning: interface_exists() expects parameter 1 to be string, array given in %sinterface_exists_variation1.php on line %d -NULL - ---nested arrays-- - -Warning: interface_exists() expects parameter 1 to be string, array given in %sinterface_exists_variation1.php on line %d -NULL - ---uppercase NULL-- -bool(false) - ---lowercase null-- -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -bool(false) - ---empty string DQ-- -bool(false) - ---empty string SQ-- -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- - -Warning: interface_exists() expects parameter 1 to be string, object given in %sinterface_exists_variation1.php on line %d -NULL - ---undefined var-- -bool(false) - ---unset var-- -bool(false) -===DONE=== diff --git a/ext/standard/tests/class_object/interface_exists_variation2.phpt b/ext/standard/tests/class_object/interface_exists_variation2.phpt deleted file mode 100644 index 1f9a0af422d6d..0000000000000 --- a/ext/standard/tests/class_object/interface_exists_variation2.phpt +++ /dev/null @@ -1,204 +0,0 @@ ---TEST-- -Test interface_exists() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for autoload - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( interface_exists($classname, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing interface_exists() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- - -Warning: interface_exists() expects parameter 2 to be bool, array given in %sinterface_exists_variation2.php on line %d -NULL - ---int indexed array-- - -Warning: interface_exists() expects parameter 2 to be bool, array given in %sinterface_exists_variation2.php on line %d -NULL - ---associative array-- - -Warning: interface_exists() expects parameter 2 to be bool, array given in %sinterface_exists_variation2.php on line %d -NULL - ---nested arrays-- - -Warning: interface_exists() expects parameter 2 to be bool, array given in %sinterface_exists_variation2.php on line %d -NULL - ---uppercase NULL-- -bool(false) - ---lowercase null-- -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -bool(false) - ---empty string DQ-- -bool(false) - ---empty string SQ-- -bool(false) - ---string DQ-- -bool(false) - ---string SQ-- -bool(false) - ---mixed case string-- -bool(false) - ---heredoc-- -bool(false) - ---instance of classWithToString-- - -Warning: interface_exists() expects parameter 2 to be bool, object given in %sinterface_exists_variation2.php on line %d -NULL - ---instance of classWithoutToString-- - -Warning: interface_exists() expects parameter 2 to be bool, object given in %sinterface_exists_variation2.php on line %d -NULL - ---undefined var-- -bool(false) - ---unset var-- -bool(false) -===DONE=== diff --git a/ext/standard/tests/class_object/is_a_variation_002.phpt b/ext/standard/tests/class_object/is_a_variation_002.phpt deleted file mode 100644 index 615a45ba3396e..0000000000000 --- a/ext/standard/tests/class_object/is_a_variation_002.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test is_a() function : usage variations - wrong type for arg 2 ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new C, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for class_name - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( is_a($object, $value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing is_a() : usage variations *** - -Notice: Undefined variable: undefined_var in %s on line 64 - -Notice: Undefined variable: unset_var in %s on line 67 - -Arg value 0 -bool(false) - -Arg value 1 -bool(false) - -Arg value 12345 -bool(false) - -Arg value -2345 -bool(false) - -Arg value 10.5 -bool(false) - -Arg value -10.5 -bool(false) - -Arg value 101234567000 -bool(false) - -Arg value 1.07654321E-9 -bool(false) - -Arg value 0.5 -bool(false) - -Arg value Array - -Warning: is_a() expects parameter 2 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: is_a() expects parameter 2 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: is_a() expects parameter 2 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: is_a() expects parameter 2 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: is_a() expects parameter 2 to be string, array given in %s on line %d -NULL - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value C Instance -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) -Done diff --git a/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt b/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt index d65bfcbc26ba4..e545616667780 100644 --- a/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt +++ b/ext/standard/tests/class_object/is_subclass_of_variation_001.phpt @@ -12,7 +12,7 @@ spl_autoload_register(function ($className) { echo "In autoload($className)\n"; }); -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } set_error_handler('test_error_handler'); diff --git a/ext/standard/tests/class_object/is_subclass_of_variation_002.phpt b/ext/standard/tests/class_object/is_subclass_of_variation_002.phpt deleted file mode 100644 index a7ebab59c5412..0000000000000 --- a/ext/standard/tests/class_object/is_subclass_of_variation_002.phpt +++ /dev/null @@ -1,176 +0,0 @@ ---TEST-- -Test is_subclass_of() function : usage variations - unexpected type for arg 2 ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for class_name - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( is_subclass_of($object, $value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing is_subclass_of() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(67) -Error: 8 - Undefined variable: unset_var, %s(70) - -Arg value 0 -bool(false) - -Arg value 1 -bool(false) - -Arg value 12345 -bool(false) - -Arg value -2345 -bool(false) - -Arg value 10.5 -bool(false) - -Arg value -10.5 -bool(false) - -Arg value 101234567000 -bool(false) - -Arg value 1.07654321E-9 -bool(false) - -Arg value 0.5 -bool(false) -Error: 8 - Array to string conversion, %sis_subclass_of_variation_002.php(%d) - -Arg value Array -Error: 2 - is_subclass_of() expects parameter 2 to be string, array given, %s(%d) -NULL -Error: 8 - Array to string conversion, %sis_subclass_of_variation_002.php(%d) - -Arg value Array -Error: 2 - is_subclass_of() expects parameter 2 to be string, array given, %s(%d) -NULL -Error: 8 - Array to string conversion, %sis_subclass_of_variation_002.php(%d) - -Arg value Array -Error: 2 - is_subclass_of() expects parameter 2 to be string, array given, %s(%d) -NULL -Error: 8 - Array to string conversion, %sis_subclass_of_variation_002.php(%d) - -Arg value Array -Error: 2 - is_subclass_of() expects parameter 2 to be string, array given, %s(%d) -NULL -Error: 8 - Array to string conversion, %sis_subclass_of_variation_002.php(%d) - -Arg value Array -Error: 2 - is_subclass_of() expects parameter 2 to be string, array given, %s(%d) -NULL - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) -Error: 4096 - Object of class stdClass could not be converted to string, %s(%d) - -Arg value -Error: 2 - is_subclass_of() expects parameter 2 to be string, object given, %s(%d) -NULL - -Arg value -bool(false) - -Arg value -bool(false) -Done diff --git a/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt b/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt index 0a4c5752580d7..3e5447308b72f 100644 --- a/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt +++ b/ext/standard/tests/class_object/is_subclass_of_variation_004.phpt @@ -12,7 +12,7 @@ spl_autoload_register(function ($className) { echo "In autoload($className)\n"; }); -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } set_error_handler('test_error_handler'); diff --git a/ext/standard/tests/class_object/method_exists_variation_001.phpt b/ext/standard/tests/class_object/method_exists_variation_001.phpt index 4accebe20af1e..93497c34b1832 100644 --- a/ext/standard/tests/class_object/method_exists_variation_001.phpt +++ b/ext/standard/tests/class_object/method_exists_variation_001.phpt @@ -12,7 +12,7 @@ spl_autoload_register(function ($className) { echo "In autoload($className)\n"; }); -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } set_error_handler('test_error_handler'); diff --git a/ext/standard/tests/class_object/method_exists_variation_002.phpt b/ext/standard/tests/class_object/method_exists_variation_002.phpt deleted file mode 100644 index ad97d49df7e23..0000000000000 --- a/ext/standard/tests/class_object/method_exists_variation_002.phpt +++ /dev/null @@ -1,176 +0,0 @@ ---TEST-- -Test method_exists() function : usage variations - unexpected type for arg 2 ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for method - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( method_exists($object, $value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing method_exists() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(67) -Error: 8 - Undefined variable: unset_var, %s(70) - -Arg value 0 -bool(false) - -Arg value 1 -bool(false) - -Arg value 12345 -bool(false) - -Arg value -2345 -bool(false) - -Arg value 10.5 -bool(false) - -Arg value -10.5 -bool(false) - -Arg value 101234567000 -bool(false) - -Arg value 1.07654321E-9 -bool(false) - -Arg value 0.5 -bool(false) -Error: 8 - Array to string conversion, %smethod_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - method_exists() expects parameter 2 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %smethod_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - method_exists() expects parameter 2 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %smethod_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - method_exists() expects parameter 2 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %smethod_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - method_exists() expects parameter 2 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %smethod_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - method_exists() expects parameter 2 to be string, array given, %s(77) -NULL - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value 1 -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) -Error: 4096 - Object of class stdClass could not be converted to string, %s(76) - -Arg value -Error: 2 - method_exists() expects parameter 2 to be string, object given, %s(77) -NULL - -Arg value -bool(false) - -Arg value -bool(false) -Done diff --git a/ext/standard/tests/class_object/trait_exists_variation_001.phpt b/ext/standard/tests/class_object/trait_exists_variation_001.phpt deleted file mode 100644 index b51126c1edeaa..0000000000000 --- a/ext/standard/tests/class_object/trait_exists_variation_001.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test trait_exists() function : usage variations - unexpected types for argument 1 ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for traitname - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( trait_exists($value, $autoload) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing trait_exists() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(67) -Error: 8 - Undefined variable: unset_var, %s(70) - -Arg value 0 -In autoload(0) -bool(false) - -Arg value 1 -In autoload(1) -bool(false) - -Arg value 12345 -In autoload(12345) -bool(false) - -Arg value -2345 -bool(false) - -Arg value 10.5 -bool(false) - -Arg value -10.5 -bool(false) - -Arg value 101234567000 -In autoload(101234567000) -bool(false) - -Arg value 1.07654321E-9 -bool(false) - -Arg value 0.5 -bool(false) -Error: 8 - Array to string conversion, %strait_exists_variation_001.php(%d) - -Arg value Array -Error: 2 - trait_exists() expects parameter 1 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %strait_exists_variation_001.php(%d) - -Arg value Array -Error: 2 - trait_exists() expects parameter 1 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %strait_exists_variation_001.php(%d) - -Arg value Array -Error: 2 - trait_exists() expects parameter 1 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %strait_exists_variation_001.php(%d) - -Arg value Array -Error: 2 - trait_exists() expects parameter 1 to be string, array given, %s(77) -NULL -Error: 8 - Array to string conversion, %strait_exists_variation_001.php(%d) - -Arg value Array -Error: 2 - trait_exists() expects parameter 1 to be string, array given, %s(77) -NULL - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -In autoload(1) -bool(false) - -Arg value -bool(false) - -Arg value 1 -In autoload(1) -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) -Error: 4096 - Object of class stdClass could not be converted to string, %s(76) - -Arg value -Error: 2 - trait_exists() expects parameter 1 to be string, object given, %s(77) -NULL - -Arg value -bool(false) - -Arg value -bool(false) -Done diff --git a/ext/standard/tests/class_object/trait_exists_variation_002.phpt b/ext/standard/tests/class_object/trait_exists_variation_002.phpt deleted file mode 100644 index a4a4a209ec192..0000000000000 --- a/ext/standard/tests/class_object/trait_exists_variation_002.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -Test trait_exists() function : usage variations - unexpected types for argument 2 ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for autoload - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( trait_exists($traitname, $value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing trait_exists() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(71) -Error: 8 - Undefined variable: unset_var, %s(74) - -Arg value 0 -bool(false) - -Arg value 1 -In autoload(string_val) -bool(false) - -Arg value 12345 -In autoload(string_val) -bool(false) - -Arg value -2345 -In autoload(string_val) -bool(false) - -Arg value 10.5 -In autoload(string_val) -bool(false) - -Arg value -10.5 -In autoload(string_val) -bool(false) - -Arg value 101234567000 -In autoload(string_val) -bool(false) - -Arg value 1.07654321E-9 -In autoload(string_val) -bool(false) - -Arg value 0.5 -In autoload(string_val) -bool(false) -Error: 8 - Array to string conversion, %strait_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - trait_exists() expects parameter 2 to be bool, array given, %s(81) -NULL -Error: 8 - Array to string conversion, %strait_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - trait_exists() expects parameter 2 to be bool, array given, %s(81) -NULL -Error: 8 - Array to string conversion, %strait_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - trait_exists() expects parameter 2 to be bool, array given, %s(81) -NULL -Error: 8 - Array to string conversion, %strait_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - trait_exists() expects parameter 2 to be bool, array given, %s(81) -NULL -Error: 8 - Array to string conversion, %strait_exists_variation_002.php(%d) - -Arg value Array -Error: 2 - trait_exists() expects parameter 2 to be bool, array given, %s(81) -NULL - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value 1 -In autoload(string_val) -bool(false) - -Arg value -bool(false) - -Arg value 1 -In autoload(string_val) -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value -bool(false) - -Arg value string -In autoload(string_val) -bool(false) - -Arg value string -In autoload(string_val) -bool(false) -Error: 4096 - Object of class stdClass could not be converted to string, %s(80) - -Arg value -Error: 2 - trait_exists() expects parameter 2 to be bool, object given, %s(81) -NULL - -Arg value -bool(false) - -Arg value -bool(false) -Done diff --git a/ext/standard/tests/file/basename_variation3.phpt b/ext/standard/tests/file/basename_variation3.phpt deleted file mode 100644 index 684e538d76893..0000000000000 --- a/ext/standard/tests/file/basename_variation3.phpt +++ /dev/null @@ -1,185 +0,0 @@ ---TEST-- -Test basename() function : first parameter type variations ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for path - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( basename($value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing basename() : usage variation *** - ---int 0-- -string(1) "0" - ---int 1-- -string(1) "1" - ---int 12345-- -string(5) "12345" - ---int -12345-- -string(5) "-2345" - ---float 10.5-- -string(4) "10.5" - ---float -10.5-- -string(5) "-10.5" - ---float 12.3456789000e10-- -string(12) "123456789000" - ---float -12.3456789000e10-- -string(13) "-123456789000" - ---float .5-- -string(3) "0.5" - ---empty array-- -Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - basename() expects parameter 1 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -string(0) "" - ---lowercase null-- -string(0) "" - ---lowercase true-- -string(1) "1" - ---lowercase false-- -string(0) "" - ---uppercase TRUE-- -string(1) "1" - ---uppercase FALSE-- -string(0) "" - ---empty string DQ-- -string(0) "" - ---empty string SQ-- -string(0) "" - ---instance of classWithToString-- -string(14) "Class A object" - ---instance of classWithoutToString-- -Error: 2 - basename() expects parameter 1 to be string, object given, %s(%d) -NULL - ---undefined var-- -string(0) "" - ---unset var-- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/file/basename_variation4.phpt b/ext/standard/tests/file/basename_variation4.phpt deleted file mode 100644 index 2bb94870dfea9..0000000000000 --- a/ext/standard/tests/file/basename_variation4.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test basename() function : second parameter type variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for suffix - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( basename($path, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing basename() : usage variation *** - ---int 0-- -string(4) "path" - ---int 1-- -string(4) "path" - ---int 12345-- -string(4) "path" - ---int -12345-- -string(4) "path" - ---float 10.5-- -string(4) "path" - ---float -10.5-- -string(4) "path" - ---float 12.3456789000e10-- -string(4) "path" - ---float -12.3456789000e10-- -string(4) "path" - ---float .5-- -string(4) "path" - ---empty array-- -Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - basename() expects parameter 2 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -string(4) "path" - ---lowercase null-- -string(4) "path" - ---lowercase true-- -string(4) "path" - ---lowercase false-- -string(4) "path" - ---uppercase TRUE-- -string(4) "path" - ---uppercase FALSE-- -string(4) "path" - ---empty string DQ-- -string(4) "path" - ---empty string SQ-- -string(4) "path" - ---instance of classWithToString-- -string(4) "path" - ---instance of classWithoutToString-- -Error: 2 - basename() expects parameter 2 to be string, object given, %s(%d) -NULL - ---undefined var-- -string(4) "path" - ---unset var-- -string(4) "path" -===DONE=== diff --git a/ext/standard/tests/file/bug27508.phpt b/ext/standard/tests/file/bug27508.phpt index e342a173488e2..82cafd735d3f9 100644 --- a/ext/standard/tests/file/bug27508.phpt +++ b/ext/standard/tests/file/bug27508.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #27508 (userspace wrappers have bogus eof indicator) --FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for filename - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( chmod($value, $mode) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing chmod() : usage variation *** - ---int 0-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---int 1-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---float .5-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---empty array-- -Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - chmod() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - chmod(): %s, %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - chmod(): %s, %s(%d) -bool(false) - ---lowercase true-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - chmod(): %s, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - chmod(): %s, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - chmod(): %s, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - chmod(): %s, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - chmod(): No such file or directory, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - chmod() expects parameter 1 to be a valid path, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - chmod(): %s, %s(%d) -bool(false) - ---unset var-- -Error: 2 - chmod(): %s, %s(%d) -bool(false) -===DONE=== diff --git a/ext/standard/tests/file/chmod_variation4.phpt b/ext/standard/tests/file/chmod_variation4.phpt deleted file mode 100644 index e0da9f66ee37c..0000000000000 --- a/ext/standard/tests/file/chmod_variation4.phpt +++ /dev/null @@ -1,202 +0,0 @@ ---TEST-- -Test chmod() function : second parameter variation ---SKIPIF-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for mode - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( chmod($filename, $value) ); -}; - -chmod($filename, 0777); -unlink($filename); - -?> -===DONE=== ---EXPECTF-- -*** Testing chmod() : usage variation *** - ---float 10.5-- -bool(true) - ---float -10.5-- -bool(true) - ---float 12.3456789000e10-- -bool(true) - ---float -12.3456789000e10-- -bool(true) - ---float .5-- -bool(true) - ---empty array-- -Error: 2 - chmod() expects parameter 2 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - chmod() expects parameter 2 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - chmod() expects parameter 2 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - chmod() expects parameter 2 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(true) - ---lowercase null-- -bool(true) - ---lowercase true-- -bool(true) - ---lowercase false-- -bool(true) - ---uppercase TRUE-- -bool(true) - ---uppercase FALSE-- -bool(true) - ---empty string DQ-- -Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - chmod() expects parameter 2 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - chmod() expects parameter 2 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - chmod() expects parameter 2 to be int, object given, %s(%d) -NULL - ---undefined var-- -bool(true) - ---unset var-- -bool(true) -===DONE=== diff --git a/ext/standard/tests/file/dirname_variation1.phpt b/ext/standard/tests/file/dirname_variation1.phpt deleted file mode 100644 index 5e97982a9a696..0000000000000 --- a/ext/standard/tests/file/dirname_variation1.phpt +++ /dev/null @@ -1,189 +0,0 @@ ---TEST-- -Test dirname() function : usage variation ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for path - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( dirname($value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing dirname() : usage variation *** - ---int 0-- -string(1) "." - ---int 1-- -string(1) "." - ---int 12345-- -string(1) "." - ---int -12345-- -string(1) "." - ---float 10.5-- -string(1) "." - ---float -10.5-- -string(1) "." - ---float 12.3456789000e10-- -string(1) "." - ---float -12.3456789000e10-- -string(1) "." - ---float .5-- -string(1) "." - ---empty array-- -Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - dirname() expects parameter 1 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -string(0) "" - ---lowercase null-- -string(0) "" - ---lowercase true-- -string(1) "." - ---lowercase false-- -string(0) "" - ---uppercase TRUE-- -string(1) "." - ---uppercase FALSE-- -string(0) "" - ---empty string DQ-- -string(0) "" - ---empty string SQ-- -string(0) "" - ---instance of classWithToString-- -string(1) "." - ---instance of classWithoutToString-- -Error: 2 - dirname() expects parameter 1 to be string, object given, %s(%d) -NULL - ---undefined var-- -string(0) "" - ---unset var-- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/file/file_get_contents_variation3.phpt b/ext/standard/tests/file/file_get_contents_variation3.phpt deleted file mode 100644 index 9e8de27f3f8ad..0000000000000 --- a/ext/standard/tests/file/file_get_contents_variation3.phpt +++ /dev/null @@ -1,218 +0,0 @@ ---TEST-- -Test file_get_contents() function : usage variation - different type for use_include_path ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for use_include_path - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( file_get_contents($absFile, $value) ); -}; - -unlink($absFile); - -?> -===DONE=== ---EXPECTF-- -*** Testing file_get_contents() : usage variation *** - ---int 0-- -string(13) "contents read" - ---int 1-- -string(13) "contents read" - ---int 12345-- -string(%d) "contents read" - ---int -12345-- -string(%d) "contents read" - ---float 10.5-- -string(%d) "contents read" - ---float -10.5-- -string(%d) "contents read" - ---float 12.3456789000e10-- -string(%d) "contents read" - ---float -12.3456789000e10-- -string(%d) "contents read" - ---float .5-- -string(%d) "contents read" - ---empty array-- -Error: 2 - file_get_contents() expects parameter 2 to be bool, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - file_get_contents() expects parameter 2 to be bool, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - file_get_contents() expects parameter 2 to be bool, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - file_get_contents() expects parameter 2 to be bool, array given, %s(%d) -NULL - ---uppercase NULL-- -string(%d) "contents read" - ---lowercase null-- -string(%d) "contents read" - ---lowercase true-- -string(%d) "contents read" - ---lowercase false-- -string(%d) "contents read" - ---uppercase TRUE-- -string(%d) "contents read" - ---uppercase FALSE-- -string(%d) "contents read" - ---empty string DQ-- -string(%d) "contents read" - ---empty string SQ-- -string(%d) "contents read" - ---string DQ-- -string(%d) "contents read" - ---string SQ-- -string(%d) "contents read" - ---mixed case string-- -string(%d) "contents read" - ---heredoc-- -string(%d) "contents read" - ---instance of classWithToString-- -Error: 2 - file_get_contents() expects parameter 2 to be bool, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - file_get_contents() expects parameter 2 to be bool, object given, %s(%d) -NULL - ---undefined var-- -string(%d) "contents read" - ---unset var-- -string(%d) "contents read" -===DONE=== diff --git a/ext/standard/tests/file/file_get_contents_variation4.phpt b/ext/standard/tests/file/file_get_contents_variation4.phpt deleted file mode 100644 index 0ca7a6bf20a0e..0000000000000 --- a/ext/standard/tests/file/file_get_contents_variation4.phpt +++ /dev/null @@ -1,251 +0,0 @@ ---TEST-- -Test file_get_contents() function : usage variation - different types for context. ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - //non context resource - 'file resource' => $fileRes, - - //valid stream context - 'stream context' => $strContext, -); - -// loop through each element of the array for context - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( file_get_contents($absFile, false, $value) ); -}; - -unlink($absFile); -fclose($fileRes); - -?> -===DONE=== ---EXPECTF-- -*** Testing file_get_contents() : usage variation *** - ---int 0-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, int given, %s(%d) -NULL - ---int 1-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, int given, %s(%d) -NULL - ---int 12345-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, int given, %s(%d) -NULL - ---int -12345-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, int given, %s(%d) -NULL - ---float 10.5-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, float given, %s(%d) -NULL - ---float -10.5-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, float given, %s(%d) -NULL - ---float 12.3456789000e10-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, float given, %s(%d) -NULL - ---float -12.3456789000e10-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, float given, %s(%d) -NULL - ---float .5-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, float given, %s(%d) -NULL - ---empty array-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, array given, %s(%d) -NULL - ---uppercase NULL-- -string(%d) "contents read" - ---lowercase null-- -string(%d) "contents read" - ---lowercase true-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, bool given, %s(%d) -NULL - ---lowercase false-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, bool given, %s(%d) -NULL - ---uppercase TRUE-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, bool given, %s(%d) -NULL - ---uppercase FALSE-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, bool given, %s(%d) -NULL - ---empty string DQ-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - file_get_contents() expects parameter 3 to be resource, object given, %s(%d) -NULL - ---undefined var-- -string(%d) "contents read" - ---unset var-- -string(%d) "contents read" - ---file resource-- -Error: 2 - file_get_contents(): supplied resource is not a valid Stream-Context resource, %s(%d) -string(%d) "contents read" - ---stream context-- -string(%d) "contents read" -===DONE=== diff --git a/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt b/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt deleted file mode 100644 index 6cc2054589d1f..0000000000000 --- a/ext/standard/tests/file/file_get_contents_variation5_32bit.phpt +++ /dev/null @@ -1,236 +0,0 @@ ---TEST-- -Test file_get_contents() function : usage variation ---CREDITS-- -Dave Kelsey ---SKIPIF-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - 'int -10' => -10, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float -22.5' => -22.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for offset - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( file_get_contents($absFile, false, null, $value) ); -}; - -unlink($absFile); - -?> -===DONE=== ---EXPECTF-- -*** Testing file_get_contents() : usage variation *** - ---int 0-- -string(%d) "contents read" - ---int 1-- -string(%d) "ontents read" - ---int 12345-- -string(%d) "" - ---int -12345-- -Error: 2 - file_get_contents(): Failed to seek to position -12345 in the stream, %s(%d) -bool(false) - ---int -10-- -string(10) "tents read" - ---float 10.5-- -string(3) "ead" - ---float -10.5-- -string(10) "tents read" - ---float -22.5-- -Error: 2 - file_get_contents(): Failed to seek to position -22 in the stream, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - file_get_contents() expects parameter 4 to be int, float given, %s(%d) -NULL - ---float -12.3456789000e10-- -Error: 2 - file_get_contents() expects parameter 4 to be int, float given, %s(%d) -NULL - ---float .5-- -string(%d) "contents read" - ---empty array-- -Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -string(%d) "contents read" - ---lowercase null-- -string(%d) "contents read" - ---lowercase true-- -string(12) "ontents read" - ---lowercase false-- -string(%d) "contents read" - ---uppercase TRUE-- -string(12) "ontents read" - ---uppercase FALSE-- -string(%d) "contents read" - ---empty string DQ-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - file_get_contents() expects parameter 4 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - file_get_contents() expects parameter 4 to be int, object given, %s(%d) -NULL - ---undefined var-- -string(%d) "contents read" - ---unset var-- -string(%d) "contents read" -===DONE=== diff --git a/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt b/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt deleted file mode 100644 index d0b74757d20d6..0000000000000 --- a/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt +++ /dev/null @@ -1,235 +0,0 @@ ---TEST-- -Test file_get_contents() function : usage variation ---CREDITS-- -Dave Kelsey ---SKIPIF-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - 'int -10' => -10, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float -22.5' => -22.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for offset - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( file_get_contents($absFile, false, null, $value) ); -}; - -unlink($absFile); - -?> -===DONE=== ---EXPECTF-- -*** Testing file_get_contents() : usage variation *** - ---int 0-- -string(%d) "contents read" - ---int 1-- -string(%d) "ontents read" - ---int 12345-- -string(%d) "" - ---int -12345-- -Error: 2 - file_get_contents(): Failed to seek to position -12345 in the stream, %s(%d) -bool(false) - ---int -10-- -string(10) "tents read" - ---float 10.5-- -string(3) "ead" - ---float -10.5-- -string(10) "tents read" - ---float -22.5-- -Error: 2 - file_get_contents(): Failed to seek to position -22 in the stream, %s(%d) -bool(false) - ---float 12.3456789000e10-- -string(%d) %s - ---float -12.3456789000e10-- -Error: 2 - file_get_contents(): Failed to seek to position -123456789000 in the stream, %s(%d) -bool(false) - ---float .5-- -string(%d) "contents read" - ---empty array-- -Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - file_get_contents() expects parameter 4 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -string(%d) "contents read" - ---lowercase null-- -string(%d) "contents read" - ---lowercase true-- -string(12) "ontents read" - ---lowercase false-- -string(%d) "contents read" - ---uppercase TRUE-- -string(12) "ontents read" - ---uppercase FALSE-- -string(%d) "contents read" - ---empty string DQ-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - file_get_contents() expects parameter 4 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - file_get_contents() expects parameter 4 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - file_get_contents() expects parameter 4 to be int, object given, %s(%d) -NULL - ---undefined var-- -string(%d) "contents read" - ---unset var-- -string(%d) "contents read" -===DONE=== diff --git a/ext/standard/tests/file/file_get_contents_variation6.phpt b/ext/standard/tests/file/file_get_contents_variation6.phpt deleted file mode 100644 index f30cac10d21ad..0000000000000 --- a/ext/standard/tests/file/file_get_contents_variation6.phpt +++ /dev/null @@ -1,215 +0,0 @@ ---TEST-- -Test file_get_contents() function : usage variation ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for maxlen - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( file_get_contents($absFile, false, null, 0, $value) ); -}; - -unlink($absFile); - -?> -===DONE=== ---EXPECTF-- -*** Testing file_get_contents() : usage variation *** - ---int 0-- -string(%d) "" - ---int 1-- -string(%d) "c" - ---int 12345-- -string(%d) "contents read" - ---int -12345-- -Error: 2 - file_get_contents(): length must be greater than or equal to zero, %s(%d) -bool(false) - ---float 10.5-- -string(%d) "contents r" - ---float -10.5-- -Error: 2 - file_get_contents(): length must be greater than or equal to zero, %s(%d) -bool(false) - ---float .5-- -string(%d) "" - ---empty array-- -Error: 2 - file_get_contents() expects parameter 5 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - file_get_contents() expects parameter 5 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - file_get_contents() expects parameter 5 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - file_get_contents() expects parameter 5 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -string(%d) "" - ---lowercase null-- -string(%d) "" - ---lowercase true-- -string(%d) "c" - ---lowercase false-- -string(%d) "" - ---uppercase TRUE-- -string(%d) "c" - ---uppercase FALSE-- -string(%d) "" - ---empty string DQ-- -Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - file_get_contents() expects parameter 5 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - file_get_contents() expects parameter 5 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - file_get_contents() expects parameter 5 to be int, object given, %s(%d) -NULL - ---undefined var-- -string(%d) "" - ---unset var-- -string(%d) "" -===DONE=== diff --git a/ext/standard/tests/file/file_put_contents_variation2.phpt b/ext/standard/tests/file/file_put_contents_variation2.phpt index ae56486d5fea9..1bf30340e4818 100644 --- a/ext/standard/tests/file/file_put_contents_variation2.phpt +++ b/ext/standard/tests/file/file_put_contents_variation2.phpt @@ -13,7 +13,7 @@ Dave Kelsey echo "*** Testing file_put_contents() : usage variation ***\n"; // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/standard/tests/file/file_put_contents_variation3.phpt b/ext/standard/tests/file/file_put_contents_variation3.phpt index 74130007a72ee..aaf18c0776558 100644 --- a/ext/standard/tests/file/file_put_contents_variation3.phpt +++ b/ext/standard/tests/file/file_put_contents_variation3.phpt @@ -13,7 +13,7 @@ Dave Kelsey echo "*** Testing file_put_contents() : usage variation ***\n"; // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/standard/tests/file/file_variation2.phpt b/ext/standard/tests/file/file_variation2.phpt deleted file mode 100644 index 9c3ad0e546ba6..0000000000000 --- a/ext/standard/tests/file/file_variation2.phpt +++ /dev/null @@ -1,210 +0,0 @@ ---TEST-- -Test file() function : first parameter variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for filename - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( file($value, $flags, $context) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing file() : usage variation *** - ---int 0-- -Error: 2 - file(0): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---int 1-- -Error: 2 - file(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - file(12345): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - file(-2345): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - file(10.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - file(-10.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - file(123456789000): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - file(-123456789000): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float .5-- -Error: 2 - file(0.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---empty array-- -Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - file() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - file(): Filename cannot be empty, %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - file(): Filename cannot be empty, %s(%d) -bool(false) - ---lowercase true-- -Error: 2 - file(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - file(): Filename cannot be empty, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - file(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - file(): Filename cannot be empty, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - file(): Filename cannot be empty, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - file(): Filename cannot be empty, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - file(Class A object): failed to open stream: %s, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - file() expects parameter 1 to be a valid path, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - file(): Filename cannot be empty, %s(%d) -bool(false) - ---unset var-- -Error: 2 - file(): Filename cannot be empty, %s(%d) -bool(false) -===DONE=== diff --git a/ext/standard/tests/file/file_variation3.phpt b/ext/standard/tests/file/file_variation3.phpt deleted file mode 100644 index 014adec6d8d7b..0000000000000 --- a/ext/standard/tests/file/file_variation3.phpt +++ /dev/null @@ -1,296 +0,0 @@ ---TEST-- -Test file() function : second parameter variation ---SKIPIF-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for flags - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( file($filename, $value, $context) ); -}; - -unlink(__FILE__ . ".tmp"); - -?> -===DONE=== ---EXPECTF-- -*** Testing file() : usage variation *** - ---float 10.5-- -array(3) { - [0]=> - string(6) "Line 1" - [1]=> - string(6) "Line 2" - [2]=> - string(6) "Line 3" -} - ---float -10.5-- -Error: 2 - file(): '-10' flag is not supported, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - file(): '%i' flag is not supported, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - file(): '%i' flag is not supported, %s(%d) -bool(false) - ---float .5-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---empty array-- -Error: 2 - file() expects parameter 2 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - file() expects parameter 2 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - file() expects parameter 2 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - file() expects parameter 2 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---lowercase null-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---lowercase true-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---lowercase false-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---uppercase TRUE-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---uppercase FALSE-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---empty string DQ-- -Error: 2 - file() expects parameter 2 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - file() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - file() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - file() expects parameter 2 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - file() expects parameter 2 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - file() expects parameter 2 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - file() expects parameter 2 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - file() expects parameter 2 to be int, object given, %s(%d) -NULL - ---undefined var-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---unset var-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} -===DONE=== diff --git a/ext/standard/tests/file/file_variation4.phpt b/ext/standard/tests/file/file_variation4.phpt deleted file mode 100644 index 103c2b0af6272..0000000000000 --- a/ext/standard/tests/file/file_variation4.phpt +++ /dev/null @@ -1,291 +0,0 @@ ---TEST-- -Test file() function : third parameter variation ---FILE-- - 1, 'two' => 2); - -// create a file stream resource -$tmp_filename = __FILE__ . ".tmp2"; -$file_stream_resource = fopen($tmp_filename, "w+"); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // file stream resource - 'file stream resource' => $file_stream_resource, -); - -// loop through each element of the array for context - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( file($filename, $flags, $value) ); -}; - -fclose($file_stream_resource); -unlink($tmp_filename); -unlink($filename); - -?> -===DONE=== ---EXPECTF-- -*** Testing file() : usage variation *** - ---int 0-- -Error: 2 - file() expects parameter 3 to be resource, int given, %s(%d) -NULL - ---int 1-- -Error: 2 - file() expects parameter 3 to be resource, int given, %s(%d) -NULL - ---int 12345-- -Error: 2 - file() expects parameter 3 to be resource, int given, %s(%d) -NULL - ---int -12345-- -Error: 2 - file() expects parameter 3 to be resource, int given, %s(%d) -NULL - ---float 10.5-- -Error: 2 - file() expects parameter 3 to be resource, float given, %s(%d) -NULL - ---float -10.5-- -Error: 2 - file() expects parameter 3 to be resource, float given, %s(%d) -NULL - ---float 12.3456789000e10-- -Error: 2 - file() expects parameter 3 to be resource, float given, %s(%d) -NULL - ---float -12.3456789000e10-- -Error: 2 - file() expects parameter 3 to be resource, float given, %s(%d) -NULL - ---float .5-- -Error: 2 - file() expects parameter 3 to be resource, float given, %s(%d) -NULL - ---empty array-- -Error: 2 - file() expects parameter 3 to be resource, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - file() expects parameter 3 to be resource, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - file() expects parameter 3 to be resource, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - file() expects parameter 3 to be resource, array given, %s(%d) -NULL - ---uppercase NULL-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---lowercase null-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---lowercase true-- -Error: 2 - file() expects parameter 3 to be resource, bool given, %s(%d) -NULL - ---lowercase false-- -Error: 2 - file() expects parameter 3 to be resource, bool given, %s(%d) -NULL - ---uppercase TRUE-- -Error: 2 - file() expects parameter 3 to be resource, bool given, %s(%d) -NULL - ---uppercase FALSE-- -Error: 2 - file() expects parameter 3 to be resource, bool given, %s(%d) -NULL - ---empty string DQ-- -Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - file() expects parameter 3 to be resource, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - file() expects parameter 3 to be resource, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - file() expects parameter 3 to be resource, object given, %s(%d) -NULL - ---undefined var-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---unset var-- -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} - ---file stream resource-- -Error: 2 - file(): supplied resource is not a valid Stream-Context resource, %s(%d) -array(3) { - [0]=> - string(7) "Line 1 -" - [1]=> - string(7) "Line 2 -" - [2]=> - string(6) "Line 3" -} -===DONE=== diff --git a/ext/standard/tests/file/fopen_variation3.phpt b/ext/standard/tests/file/fopen_variation3.phpt deleted file mode 100644 index fb00b243fc680..0000000000000 --- a/ext/standard/tests/file/fopen_variation3.phpt +++ /dev/null @@ -1,218 +0,0 @@ ---TEST-- -Test fopen() function : usage variation different datatypes for use_include_path ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for use_include_path - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $h = fopen($filename, $mode, $value); - if ($h !== false) { - echo "ok\n"; - fclose($h); - } - else { - var_dump($h); - } -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing fopen() : usage variation *** - ---int 0-- -ok - ---int 1-- -ok - ---int 12345-- -ok - ---int -12345-- -ok - ---float 10.5-- -ok - ---float -10.5-- -ok - ---float 12.3456789000e10-- -ok - ---float -12.3456789000e10-- -ok - ---float .5-- -ok - ---empty array-- -Error: 2 - fopen() expects parameter 3 to be bool, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - fopen() expects parameter 3 to be bool, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - fopen() expects parameter 3 to be bool, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - fopen() expects parameter 3 to be bool, array given, %s(%d) -bool(false) - ---uppercase NULL-- -ok - ---lowercase null-- -ok - ---lowercase true-- -ok - ---lowercase false-- -ok - ---uppercase TRUE-- -ok - ---uppercase FALSE-- -ok - ---empty string DQ-- -ok - ---empty string SQ-- -ok - ---string DQ-- -ok - ---string SQ-- -ok - ---mixed case string-- -ok - ---heredoc-- -ok - ---instance of classWithToString-- -Error: 2 - fopen() expects parameter 3 to be bool, object given, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - fopen() expects parameter 3 to be bool, object given, %s(%d) -bool(false) - ---undefined var-- -ok - ---unset var-- -ok -===DONE=== diff --git a/ext/standard/tests/file/fopen_variation4.phpt b/ext/standard/tests/file/fopen_variation4.phpt deleted file mode 100644 index 15f9e60c5a3f3..0000000000000 --- a/ext/standard/tests/file/fopen_variation4.phpt +++ /dev/null @@ -1,247 +0,0 @@ ---TEST-- -Test fopen() function : usage variation different datatypes for stream context ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - //file resource - 'file resource' => $fileresource -); - -// loop through each element of the array for context - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $h = fopen($filename, $mode, false, $value); - if ($h !== false) { - echo "ok\n"; - fclose($h); - } - else { - var_dump($h); - } -}; - -fclose($fileresource); - -?> -===DONE=== ---EXPECTF-- -*** Testing fopen() : usage variation *** - ---int 0-- -Error: 2 - fopen() expects parameter 4 to be resource, int given, %s(%d) -bool(false) - ---int 1-- -Error: 2 - fopen() expects parameter 4 to be resource, int given, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - fopen() expects parameter 4 to be resource, int given, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - fopen() expects parameter 4 to be resource, int given, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - fopen() expects parameter 4 to be resource, float given, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - fopen() expects parameter 4 to be resource, float given, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - fopen() expects parameter 4 to be resource, float given, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - fopen() expects parameter 4 to be resource, float given, %s(%d) -bool(false) - ---float .5-- -Error: 2 - fopen() expects parameter 4 to be resource, float given, %s(%d) -bool(false) - ---empty array-- -Error: 2 - fopen() expects parameter 4 to be resource, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - fopen() expects parameter 4 to be resource, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - fopen() expects parameter 4 to be resource, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - fopen() expects parameter 4 to be resource, array given, %s(%d) -bool(false) - ---uppercase NULL-- -ok - ---lowercase null-- -ok - ---lowercase true-- -Error: 2 - fopen() expects parameter 4 to be resource, bool given, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - fopen() expects parameter 4 to be resource, bool given, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - fopen() expects parameter 4 to be resource, bool given, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - fopen() expects parameter 4 to be resource, bool given, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d) -bool(false) - ---string DQ-- -Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d) -bool(false) - ---string SQ-- -Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d) -bool(false) - ---mixed case string-- -Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d) -bool(false) - ---heredoc-- -Error: 2 - fopen() expects parameter 4 to be resource, string given, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - fopen() expects parameter 4 to be resource, object given, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - fopen() expects parameter 4 to be resource, object given, %s(%d) -bool(false) - ---undefined var-- -ok - ---unset var-- -ok - ---file resource-- -Error: 2 - fopen(): supplied resource is not a valid Stream-Context resource, %s(%d) -ok -===DONE=== diff --git a/ext/standard/tests/file/fopencookie.phpt b/ext/standard/tests/file/fopencookie.phpt index 79922e31e1120..a332d378ca9df 100644 --- a/ext/standard/tests/file/fopencookie.phpt +++ b/ext/standard/tests/file/fopencookie.phpt @@ -2,7 +2,6 @@ fopencookie detected and working (or cast mechanism works) --FILE-- ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new testClass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for fp - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( fpassthru($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing fpassthru() : usage variations *** - -Arg value 0 - -Warning: fpassthru() expects parameter 1 to be resource, int given in %s on line %d -bool(false) - -Arg value 1 - -Warning: fpassthru() expects parameter 1 to be resource, int given in %s on line %d -bool(false) - -Arg value 12345 - -Warning: fpassthru() expects parameter 1 to be resource, int given in %s on line %d -bool(false) - -Arg value -2345 - -Warning: fpassthru() expects parameter 1 to be resource, int given in %s on line %d -bool(false) - -Arg value 10.5 - -Warning: fpassthru() expects parameter 1 to be resource, float given in %s on line %d -bool(false) - -Arg value -10.5 - -Warning: fpassthru() expects parameter 1 to be resource, float given in %s on line %d -bool(false) - -Arg value 101234567000 - -Warning: fpassthru() expects parameter 1 to be resource, float given in %s on line %d -bool(false) - -Arg value 1.07654321E-9 - -Warning: fpassthru() expects parameter 1 to be resource, float given in %s on line %d -bool(false) - -Arg value 0.5 - -Warning: fpassthru() expects parameter 1 to be resource, float given in %s on line %d -bool(false) - -Arg value Array - -Warning: fpassthru() expects parameter 1 to be resource, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: fpassthru() expects parameter 1 to be resource, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: fpassthru() expects parameter 1 to be resource, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: fpassthru() expects parameter 1 to be resource, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: fpassthru() expects parameter 1 to be resource, array given in %s on line %d -bool(false) - -Arg value - -Warning: fpassthru() expects parameter 1 to be resource, null given in %s on line %d -bool(false) - -Arg value - -Warning: fpassthru() expects parameter 1 to be resource, null given in %s on line %d -bool(false) - -Arg value 1 - -Warning: fpassthru() expects parameter 1 to be resource, bool given in %s on line %d -bool(false) - -Arg value - -Warning: fpassthru() expects parameter 1 to be resource, bool given in %s on line %d -bool(false) - -Arg value 1 - -Warning: fpassthru() expects parameter 1 to be resource, bool given in %s on line %d -bool(false) - -Arg value - -Warning: fpassthru() expects parameter 1 to be resource, bool given in %s on line %d -bool(false) - -Arg value - -Warning: fpassthru() expects parameter 1 to be resource, string given in %s on line %d -bool(false) - -Arg value - -Warning: fpassthru() expects parameter 1 to be resource, string given in %s on line %d -bool(false) - -Arg value string - -Warning: fpassthru() expects parameter 1 to be resource, string given in %s on line %d -bool(false) - -Arg value string - -Warning: fpassthru() expects parameter 1 to be resource, string given in %s on line %d -bool(false) - -Arg value testClass - -Warning: fpassthru() expects parameter 1 to be resource, object given in %s on line %d -bool(false) - -Arg value - -Warning: fpassthru() expects parameter 1 to be resource, null given in %s on line %d -bool(false) - -Arg value - -Warning: fpassthru() expects parameter 1 to be resource, null given in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/file/fseek_variation1.phpt b/ext/standard/tests/file/fseek_variation1.phpt deleted file mode 100644 index 0736d232c8c8c..0000000000000 --- a/ext/standard/tests/file/fseek_variation1.phpt +++ /dev/null @@ -1,197 +0,0 @@ ---TEST-- -Test fseek() function : usage variations - different types for offset ---CREDITS-- -Dave Kelsey ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new testClass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for offset - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( fseek($fp, $value, $whence) ); - var_dump( ftell($fp)); -}; -fclose($fp); - -echo "Done"; -?> ---EXPECTF-- -*** Testing fseek() : usage variations *** - -Arg value 10.5 -int(0) -int(10) - -Arg value -10.5 -int(-1) -int(10) - -Arg value 1.07654321E-9 -int(0) -int(0) - -Arg value 0.5 -int(0) -int(0) - -Arg value Array - -Warning: fseek() expects parameter 2 to be int, array given in %s on line %d -bool(false) -int(0) - -Arg value Array - -Warning: fseek() expects parameter 2 to be int, array given in %s on line %d -bool(false) -int(0) - -Arg value Array - -Warning: fseek() expects parameter 2 to be int, array given in %s on line %d -bool(false) -int(0) - -Arg value Array - -Warning: fseek() expects parameter 2 to be int, array given in %s on line %d -bool(false) -int(0) - -Arg value Array - -Warning: fseek() expects parameter 2 to be int, array given in %s on line %d -bool(false) -int(0) - -Arg value -int(0) -int(0) - -Arg value -int(0) -int(0) - -Arg value 1 -int(0) -int(1) - -Arg value -int(0) -int(0) - -Arg value 1 -int(0) -int(1) - -Arg value -int(0) -int(0) - -Arg value - -Warning: fseek() expects parameter 2 to be int, string given in %s on line %d -bool(false) -int(0) - -Arg value - -Warning: fseek() expects parameter 2 to be int, string given in %s on line %d -bool(false) -int(0) - -Arg value string - -Warning: fseek() expects parameter 2 to be int, string given in %s on line %d -bool(false) -int(0) - -Arg value string - -Warning: fseek() expects parameter 2 to be int, string given in %s on line %d -bool(false) -int(0) - -Arg value testClass - -Warning: fseek() expects parameter 2 to be int, object given in %s on line %d -bool(false) -int(0) - -Arg value -int(0) -int(0) - -Arg value -int(0) -int(0) -Done diff --git a/ext/standard/tests/file/fseek_variation2.phpt b/ext/standard/tests/file/fseek_variation2.phpt deleted file mode 100644 index 38f95613949fe..0000000000000 --- a/ext/standard/tests/file/fseek_variation2.phpt +++ /dev/null @@ -1,160 +0,0 @@ ---TEST-- -Test fseek() function : usage variations - different types for whence ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---EXPECTF-- -*** Testing fseek() : usage variations *** - -Arg value -100 -int(-1) -int(0) - -Arg value 100 -int(-1) -int(0) - -Arg value 10.5 -int(-1) -int(0) - -Arg value -10.5 -int(-1) -int(0) - -Arg value 101234567000 -int(-1) -int(0) - -Arg value 1.07654321E-9 -int(0) -int(3) - -Arg value 0.5 -int(0) -int(3) - -Arg value -int(0) -int(3) - -Arg value -int(0) -int(3) - -Arg value 1 -int(0) -int(6) - -Arg value -int(0) -int(3) - -Arg value 1 -int(0) -int(6) - -Arg value -int(0) -int(3) - -Arg value - -Warning: fseek() expects parameter 3 to be int, string given in %s on line %d -bool(false) -int(3) - -Arg value - -Warning: fseek() expects parameter 3 to be int, string given in %s on line %d -bool(false) -int(3) - -Arg value string - -Warning: fseek() expects parameter 3 to be int, string given in %s on line %d -bool(false) -int(3) - -Arg value string - -Warning: fseek() expects parameter 3 to be int, string given in %s on line %d -bool(false) -int(3) - -Arg value -int(0) -int(3) - -Arg value -int(0) -int(3) -Done diff --git a/ext/standard/tests/file/fstat_variation3.phpt b/ext/standard/tests/file/fstat_variation3.phpt deleted file mode 100644 index 829f5ba075777..0000000000000 --- a/ext/standard/tests/file/fstat_variation3.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -Test function fstat() by substituting argument 1 with emptyUnsetUndefNull values. ---FILE-- - @$unset_var, - 'undefined var' => @$undefined_var, - 'empty string DQ' => "", - 'empty string SQ' => '', - 'uppercase NULL' => NULL, - 'lowercase null' => null, - ); - - -foreach ( $variation_array as $var ) { - var_dump(fstat( $var ) ); -} -?> -===DONE=== ---EXPECTF-- -Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d -bool(false) - -Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d -bool(false) - -Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d -bool(false) - -Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d -bool(false) - -Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d -bool(false) - -Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d -bool(false) -===DONE=== diff --git a/ext/standard/tests/file/fstat_variation6.phpt b/ext/standard/tests/file/fstat_variation6.phpt deleted file mode 100644 index c720c6f25ad48..0000000000000 --- a/ext/standard/tests/file/fstat_variation6.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test function fstat() by substituting argument 1 with object values. ---FILE-- - new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(fstat( $var ) ); -} -?> -===DONE=== ---EXPECTF-- -Error: 2 - fstat() expects parameter 1 to be resource, object given, %s(%d) -bool(false) -Error: 2 - fstat() expects parameter 1 to be resource, object given, %s(%d) -bool(false) -===DONE=== diff --git a/ext/standard/tests/file/fwrite_variation5.phpt b/ext/standard/tests/file/fwrite_variation5.phpt deleted file mode 100644 index ff1214c5270d7..0000000000000 --- a/ext/standard/tests/file/fwrite_variation5.phpt +++ /dev/null @@ -1,172 +0,0 @@ ---TEST-- -Test fwrite() function : usage variation ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for str - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $fp = fopen($filename,'w'); - fwrite($fp, $value); - fclose($fp); - readfile($filename); -}; -unlink($filename); - -?> -===DONE=== ---EXPECTF-- -*** Testing fwrite() : usage variation *** - ---int 0-- -0 ---int 1-- -1 ---int 12345-- -12345 ---int -12345-- --2345 ---float 10.5-- -10.5 ---float -10.5-- --10.5 ---float 12.3456789000e10-- -123456789000 ---float -12.3456789000e10-- --123456789000 ---float .5-- -0.5 ---empty array-- -Error: 2 - fwrite() expects parameter 2 to be string, array given, %s(%d) - ---int indexed array-- -Error: 2 - fwrite() expects parameter 2 to be string, array given, %s(%d) - ---associative array-- -Error: 2 - fwrite() expects parameter 2 to be string, array given, %s(%d) - ---nested arrays-- -Error: 2 - fwrite() expects parameter 2 to be string, array given, %s(%d) - ---uppercase NULL-- - ---lowercase null-- - ---lowercase true-- -1 ---lowercase false-- - ---uppercase TRUE-- -1 ---uppercase FALSE-- - ---empty string DQ-- - ---empty string SQ-- - ---instance of classWithToString-- -Class A object ---instance of classWithoutToString-- -Error: 2 - fwrite() expects parameter 2 to be string, object given, %s(%d) - ---undefined var-- - ---unset var-- -===DONE=== diff --git a/ext/standard/tests/file/mkdir_variation1-win32.phpt b/ext/standard/tests/file/mkdir_variation1-win32.phpt deleted file mode 100644 index cee03858cb860..0000000000000 --- a/ext/standard/tests/file/mkdir_variation1-win32.phpt +++ /dev/null @@ -1,122 +0,0 @@ ---TEST-- -Test mkdir() function : usage variation: try invalid pathname ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase false' =>false, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // other - // php.net bug outputs message File Exists - 'single space' => ' ', -); - -// loop through each element of the array for pathname - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $res = mkdir($value); - if ($res == true) { - echo "directory created\n"; - rmdir($value); - } -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing mkdir() : usage variation *** - ---uppercase NULL-- -Error: 2 - mkdir(): %s, %s(%d) - ---lowercase null-- -Error: 2 - mkdir(): %s, %s(%d) - ---lowercase false-- -Error: 2 - mkdir(): %s, %s(%d) - ---uppercase FALSE-- -Error: 2 - mkdir(): %s, %s(%d) - ---empty string DQ-- -Error: 2 - mkdir(): %s, %s(%d) - ---empty string SQ-- -Error: 2 - mkdir(): %s, %s(%d) - ---undefined var-- -Error: 2 - mkdir(): %s, %s(%d) - ---unset var-- -Error: 2 - mkdir(): %s, %s(%d) - ---single space-- -Error: 2 - mkdir(): %s, %s(%d) -===DONE=== diff --git a/ext/standard/tests/file/mkdir_variation1.phpt b/ext/standard/tests/file/mkdir_variation1.phpt deleted file mode 100644 index c77c66b531292..0000000000000 --- a/ext/standard/tests/file/mkdir_variation1.phpt +++ /dev/null @@ -1,121 +0,0 @@ ---TEST-- -Test mkdir() function : usage variation: try invalid pathname ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase false' =>false, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // other - 'single space' => ' ', -); - -// loop through each element of the array for pathname - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $res = mkdir($value); - if ($res == true) { - echo "directory created\n"; - rmdir($value); - } -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing mkdir() : usage variation *** - ---uppercase NULL-- -Error: 2 - mkdir(): %s, %s(%d) - ---lowercase null-- -Error: 2 - mkdir(): %s, %s(%d) - ---lowercase false-- -Error: 2 - mkdir(): %s, %s(%d) - ---uppercase FALSE-- -Error: 2 - mkdir(): %s, %s(%d) - ---empty string DQ-- -Error: 2 - mkdir(): %s, %s(%d) - ---empty string SQ-- -Error: 2 - mkdir(): %s, %s(%d) - ---undefined var-- -Error: 2 - mkdir(): %s, %s(%d) - ---unset var-- -Error: 2 - mkdir(): %s, %s(%d) - ---single space-- -directory created -===DONE=== diff --git a/ext/standard/tests/file/mkdir_variation2.phpt b/ext/standard/tests/file/mkdir_variation2.phpt deleted file mode 100644 index 51a1c39c17623..0000000000000 --- a/ext/standard/tests/file/mkdir_variation2.phpt +++ /dev/null @@ -1,191 +0,0 @@ ---TEST-- -Test mkdir() function : usage variation: different types for mode ---CREDITS-- -Dave Kelsey ---SKIPIF-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for mode - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $h = mkdir($pathname, $value); - if ($h === true) { - echo "Directory created\n"; - rmdir($pathname); - } -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing mkdir() : usage variation *** - ---float 10.5-- -Directory created - ---float -10.5-- -Directory created - ---float 12.3456789000e10-- -Directory created - ---float -12.3456789000e10-- -Directory created - ---float .5-- -Directory created - ---empty array-- -Error: 2 - mkdir() expects parameter 2 to be int, array given, %s(%d) - ---int indexed array-- -Error: 2 - mkdir() expects parameter 2 to be int, array given, %s(%d) - ---associative array-- -Error: 2 - mkdir() expects parameter 2 to be int, array given, %s(%d) - ---nested arrays-- -Error: 2 - mkdir() expects parameter 2 to be int, array given, %s(%d) - ---uppercase NULL-- -Directory created - ---lowercase null-- -Directory created - ---lowercase true-- -Directory created - ---lowercase false-- -Directory created - ---uppercase TRUE-- -Directory created - ---uppercase FALSE-- -Directory created - ---empty string DQ-- -Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d) - ---empty string SQ-- -Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d) - ---string DQ-- -Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d) - ---string SQ-- -Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d) - ---mixed case string-- -Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d) - ---heredoc-- -Error: 2 - mkdir() expects parameter 2 to be int, string given, %s(%d) - ---instance of classWithToString-- -Error: 2 - mkdir() expects parameter 2 to be int, object given, %s(%d) - ---instance of classWithoutToString-- -Error: 2 - mkdir() expects parameter 2 to be int, object given, %s(%d) - ---undefined var-- -Directory created - ---unset var-- -Directory created -===DONE=== diff --git a/ext/standard/tests/file/mkdir_variation3.phpt b/ext/standard/tests/file/mkdir_variation3.phpt deleted file mode 100644 index 4c037b6bcab48..0000000000000 --- a/ext/standard/tests/file/mkdir_variation3.phpt +++ /dev/null @@ -1,208 +0,0 @@ ---TEST-- -Test mkdir() function : usage variation: different types for recursive ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for recursive - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $h = mkdir($pathname, $mode, $value); - if ($h === true) { - echo "Directory created\n"; - rmdir($pathname); - } -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing mkdir() : usage variation *** - ---int 0-- -Directory created - ---int 1-- -Directory created - ---int 12345-- -Directory created - ---int -12345-- -Directory created - ---float 10.5-- -Directory created - ---float -10.5-- -Directory created - ---float 12.3456789000e10-- -Directory created - ---float -12.3456789000e10-- -Directory created - ---float .5-- -Directory created - ---empty array-- -Error: 2 - mkdir() expects parameter 3 to be bool, array given, %s(%d) - ---int indexed array-- -Error: 2 - mkdir() expects parameter 3 to be bool, array given, %s(%d) - ---associative array-- -Error: 2 - mkdir() expects parameter 3 to be bool, array given, %s(%d) - ---nested arrays-- -Error: 2 - mkdir() expects parameter 3 to be bool, array given, %s(%d) - ---uppercase NULL-- -Directory created - ---lowercase null-- -Directory created - ---lowercase true-- -Directory created - ---lowercase false-- -Directory created - ---uppercase TRUE-- -Directory created - ---uppercase FALSE-- -Directory created - ---empty string DQ-- -Directory created - ---empty string SQ-- -Directory created - ---string DQ-- -Directory created - ---string SQ-- -Directory created - ---mixed case string-- -Directory created - ---heredoc-- -Directory created - ---instance of classWithToString-- -Error: 2 - mkdir() expects parameter 3 to be bool, object given, %s(%d) - ---instance of classWithoutToString-- -Error: 2 - mkdir() expects parameter 3 to be bool, object given, %s(%d) - ---undefined var-- -Directory created - ---unset var-- -Directory created -===DONE=== diff --git a/ext/standard/tests/file/mkdir_variation4.phpt b/ext/standard/tests/file/mkdir_variation4.phpt deleted file mode 100644 index a31ae722c6881..0000000000000 --- a/ext/standard/tests/file/mkdir_variation4.phpt +++ /dev/null @@ -1,220 +0,0 @@ ---TEST-- -Test mkdir() function : usage variation: different types for context ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -$fileRes = fopen(__FILE__,'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // non stream context resource - 'file resource' => $fileRes, -); - -// loop through each element of the array for context - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $h = mkdir($pathname, $mode, $recursive, $value); - if ($h === true) { - echo "Directory created\n"; - rmdir($pathname); - } -}; - -fclose($fileRes); - -?> -===DONE=== ---EXPECTF-- -*** Testing mkdir() : usage variation *** - ---int 0-- -Error: 2 - mkdir() expects parameter 4 to be resource, int given, %s(%d) - ---int 1-- -Error: 2 - mkdir() expects parameter 4 to be resource, int given, %s(%d) - ---int 12345-- -Error: 2 - mkdir() expects parameter 4 to be resource, int given, %s(%d) - ---int -12345-- -Error: 2 - mkdir() expects parameter 4 to be resource, int given, %s(%d) - ---float 10.5-- -Error: 2 - mkdir() expects parameter 4 to be resource, float given, %s(%d) - ---float -10.5-- -Error: 2 - mkdir() expects parameter 4 to be resource, float given, %s(%d) - ---float 12.3456789000e10-- -Error: 2 - mkdir() expects parameter 4 to be resource, float given, %s(%d) - ---float -12.3456789000e10-- -Error: 2 - mkdir() expects parameter 4 to be resource, float given, %s(%d) - ---float .5-- -Error: 2 - mkdir() expects parameter 4 to be resource, float given, %s(%d) - ---empty array-- -Error: 2 - mkdir() expects parameter 4 to be resource, array given, %s(%d) - ---int indexed array-- -Error: 2 - mkdir() expects parameter 4 to be resource, array given, %s(%d) - ---associative array-- -Error: 2 - mkdir() expects parameter 4 to be resource, array given, %s(%d) - ---nested arrays-- -Error: 2 - mkdir() expects parameter 4 to be resource, array given, %s(%d) - ---uppercase NULL-- -Directory created - ---lowercase null-- -Directory created - ---lowercase true-- -Error: 2 - mkdir() expects parameter 4 to be resource, bool given, %s(%d) - ---lowercase false-- -Error: 2 - mkdir() expects parameter 4 to be resource, bool given, %s(%d) - ---uppercase TRUE-- -Error: 2 - mkdir() expects parameter 4 to be resource, bool given, %s(%d) - ---uppercase FALSE-- -Error: 2 - mkdir() expects parameter 4 to be resource, bool given, %s(%d) - ---empty string DQ-- -Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d) - ---empty string SQ-- -Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d) - ---string DQ-- -Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d) - ---string SQ-- -Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d) - ---mixed case string-- -Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d) - ---heredoc-- -Error: 2 - mkdir() expects parameter 4 to be resource, string given, %s(%d) - ---instance of classWithToString-- -Error: 2 - mkdir() expects parameter 4 to be resource, object given, %s(%d) - ---instance of classWithoutToString-- -Error: 2 - mkdir() expects parameter 4 to be resource, object given, %s(%d) - ---undefined var-- -Directory created - ---unset var-- -Directory created - ---file resource-- -Error: 2 - mkdir(): supplied resource is not a valid Stream-Context resource, %s(%d) -Directory created -===DONE=== diff --git a/ext/standard/tests/file/parse_ini_file_variation4.phpt b/ext/standard/tests/file/parse_ini_file_variation4.phpt deleted file mode 100644 index 15acc9c3c5a56..0000000000000 --- a/ext/standard/tests/file/parse_ini_file_variation4.phpt +++ /dev/null @@ -1,210 +0,0 @@ ---TEST-- -Test parse_ini_file() function : usage variation ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for filename - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( parse_ini_file($value, $process_sections) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing parse_ini_file() : usage variation *** - ---int 0-- -Error: 2 - parse_ini_file(0): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---int 1-- -Error: 2 - parse_ini_file(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - parse_ini_file(12345): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - parse_ini_file(-2345): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - parse_ini_file(10.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - parse_ini_file(-10.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - parse_ini_file(123456789000): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - parse_ini_file(-123456789000): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float .5-- -Error: 2 - parse_ini_file(0.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---empty array-- -Error: 2 - parse_ini_file() expects parameter 1 to be a valid path, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - parse_ini_file() expects parameter 1 to be a valid path, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - parse_ini_file() expects parameter 1 to be a valid path, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - parse_ini_file() expects parameter 1 to be a valid path, array given, %s(%d) -bool(false) - ---uppercase NULL-- -Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) -bool(false) - ---lowercase true-- -Error: 2 - parse_ini_file(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - parse_ini_file(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - parse_ini_file(Class A object): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - parse_ini_file() expects parameter 1 to be a valid path, object given, %s(%d) -bool(false) - ---undefined var-- -Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) -bool(false) - ---unset var-- -Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) -bool(false) -===DONE=== diff --git a/ext/standard/tests/file/parse_ini_file_variation5.phpt b/ext/standard/tests/file/parse_ini_file_variation5.phpt deleted file mode 100644 index 4cfc2a661f4a1..0000000000000 --- a/ext/standard/tests/file/parse_ini_file_variation5.phpt +++ /dev/null @@ -1,253 +0,0 @@ ---TEST-- -Test parse_ini_file() function : usage variation ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for process_sections - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( parse_ini_file($filename, $value) ); -}; - -unlink($filename); -?> -===DONE=== ---EXPECTF-- -*** Testing parse_ini_file() : usage variation *** - ---int 0-- -array(1) { - ["a"]=> - string(4) "test" -} - ---int 1-- -array(1) { - ["a"]=> - string(4) "test" -} - ---int 12345-- -array(1) { - ["a"]=> - string(4) "test" -} - ---int -12345-- -array(1) { - ["a"]=> - string(4) "test" -} - ---float 10.5-- -array(1) { - ["a"]=> - string(4) "test" -} - ---float -10.5-- -array(1) { - ["a"]=> - string(4) "test" -} - ---float 12.3456789000e10-- -array(1) { - ["a"]=> - string(4) "test" -} - ---float -12.3456789000e10-- -array(1) { - ["a"]=> - string(4) "test" -} - ---float .5-- -array(1) { - ["a"]=> - string(4) "test" -} - ---empty array-- -Error: 2 - parse_ini_file() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - parse_ini_file() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - parse_ini_file() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - parse_ini_file() expects parameter 2 to be bool, array given, %s(%d) -bool(false) - ---uppercase NULL-- -array(1) { - ["a"]=> - string(4) "test" -} - ---lowercase null-- -array(1) { - ["a"]=> - string(4) "test" -} - ---empty string DQ-- -array(1) { - ["a"]=> - string(4) "test" -} - ---empty string SQ-- -array(1) { - ["a"]=> - string(4) "test" -} - ---string DQ-- -array(1) { - ["a"]=> - string(4) "test" -} - ---string SQ-- -array(1) { - ["a"]=> - string(4) "test" -} - ---mixed case string-- -array(1) { - ["a"]=> - string(4) "test" -} - ---heredoc-- -array(1) { - ["a"]=> - string(4) "test" -} - ---instance of classWithToString-- -Error: 2 - parse_ini_file() expects parameter 2 to be bool, object given, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - parse_ini_file() expects parameter 2 to be bool, object given, %s(%d) -bool(false) - ---undefined var-- -array(1) { - ["a"]=> - string(4) "test" -} - ---unset var-- -array(1) { - ["a"]=> - string(4) "test" -} -===DONE=== diff --git a/ext/standard/tests/file/pathinfo_variation1.phpt b/ext/standard/tests/file/pathinfo_variation1.phpt deleted file mode 100644 index 36d9bab5ae3af..0000000000000 --- a/ext/standard/tests/file/pathinfo_variation1.phpt +++ /dev/null @@ -1,190 +0,0 @@ ---TEST-- -Test pathinfo() function : usage variation ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for path - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( pathinfo($value, $options) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing pathinfo() : usage variation *** - ---int 0-- -string(1) "." - ---int 1-- -string(1) "." - ---int 12345-- -string(1) "." - ---int -12345-- -string(1) "." - ---float 10.5-- -string(1) "." - ---float -10.5-- -string(1) "." - ---float 12.3456789000e10-- -string(1) "." - ---float -12.3456789000e10-- -string(1) "." - ---float .5-- -string(1) "." - ---empty array-- -Error: 2 - pathinfo() expects parameter 1 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - pathinfo() expects parameter 1 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - pathinfo() expects parameter 1 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - pathinfo() expects parameter 1 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -string(0) "" - ---lowercase null-- -string(0) "" - ---lowercase true-- -string(1) "." - ---lowercase false-- -string(0) "" - ---uppercase TRUE-- -string(1) "." - ---uppercase FALSE-- -string(0) "" - ---empty string DQ-- -string(0) "" - ---empty string SQ-- -string(0) "" - ---instance of classWithToString-- -string(1) "." - ---instance of classWithoutToString-- -Error: 2 - pathinfo() expects parameter 1 to be string, object given, %s(%d) -NULL - ---undefined var-- -string(0) "" - ---unset var-- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/file/pathinfo_variation2.phpt b/ext/standard/tests/file/pathinfo_variation2.phpt deleted file mode 100644 index a39543b18ff01..0000000000000 --- a/ext/standard/tests/file/pathinfo_variation2.phpt +++ /dev/null @@ -1,199 +0,0 @@ ---TEST-- -Test pathinfo() function : usage variation ---CREDITS-- -Dave Kelsey ---SKIPIF-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for options - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( pathinfo($path, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing pathinfo() : usage variation *** - ---float 10.5-- -string(6) "inet.h" - ---float -10.5-- -string(6) "inet.h" - ---float 12.3456789000e10-- -string(%d) %s - ---float -12.3456789000e10-- -string(%d) %s - ---float .5-- -string(%d) %s - ---empty array-- -Error: 2 - pathinfo() expects parameter 2 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - pathinfo() expects parameter 2 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - pathinfo() expects parameter 2 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - pathinfo() expects parameter 2 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -string(0) "" - ---lowercase null-- -string(0) "" - ---lowercase true-- -string(17) "/usr/include/arpa" - ---lowercase false-- -string(0) "" - ---uppercase TRUE-- -string(17) "/usr/include/arpa" - ---uppercase FALSE-- -string(0) "" - ---empty string DQ-- -Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - pathinfo() expects parameter 2 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - pathinfo() expects parameter 2 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - pathinfo() expects parameter 2 to be int, object given, %s(%d) -NULL - ---undefined var-- -string(0) "" - ---unset var-- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/file/pclose_variation1.phpt b/ext/standard/tests/file/pclose_variation1.phpt deleted file mode 100644 index 7c22389646ead..0000000000000 --- a/ext/standard/tests/file/pclose_variation1.phpt +++ /dev/null @@ -1,231 +0,0 @@ ---TEST-- -Test pclose() function : usage variation ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for fp - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( pclose($value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing pclose() : usage variation *** - ---int 0-- -Error: 2 - pclose() expects parameter 1 to be resource, int given, %s(%d) -bool(false) - ---int 1-- -Error: 2 - pclose() expects parameter 1 to be resource, int given, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - pclose() expects parameter 1 to be resource, int given, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - pclose() expects parameter 1 to be resource, int given, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - pclose() expects parameter 1 to be resource, float given, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - pclose() expects parameter 1 to be resource, float given, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - pclose() expects parameter 1 to be resource, float given, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - pclose() expects parameter 1 to be resource, float given, %s(%d) -bool(false) - ---float .5-- -Error: 2 - pclose() expects parameter 1 to be resource, float given, %s(%d) -bool(false) - ---empty array-- -Error: 2 - pclose() expects parameter 1 to be resource, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - pclose() expects parameter 1 to be resource, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - pclose() expects parameter 1 to be resource, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - pclose() expects parameter 1 to be resource, array given, %s(%d) -bool(false) - ---uppercase NULL-- -Error: 2 - pclose() expects parameter 1 to be resource, null given, %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - pclose() expects parameter 1 to be resource, null given, %s(%d) -bool(false) - ---lowercase true-- -Error: 2 - pclose() expects parameter 1 to be resource, bool given, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - pclose() expects parameter 1 to be resource, bool given, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - pclose() expects parameter 1 to be resource, bool given, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - pclose() expects parameter 1 to be resource, bool given, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d) -bool(false) - ---string DQ-- -Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d) -bool(false) - ---string SQ-- -Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d) -bool(false) - ---mixed case string-- -Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d) -bool(false) - ---heredoc-- -Error: 2 - pclose() expects parameter 1 to be resource, string given, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - pclose() expects parameter 1 to be resource, object given, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - pclose() expects parameter 1 to be resource, object given, %s(%d) -bool(false) - ---undefined var-- -Error: 2 - pclose() expects parameter 1 to be resource, null given, %s(%d) -bool(false) - ---unset var-- -Error: 2 - pclose() expects parameter 1 to be resource, null given, %s(%d) -bool(false) -===DONE=== diff --git a/ext/standard/tests/file/readfile_variation4.phpt b/ext/standard/tests/file/readfile_variation4.phpt deleted file mode 100644 index 99ee79e40bad7..0000000000000 --- a/ext/standard/tests/file/readfile_variation4.phpt +++ /dev/null @@ -1,251 +0,0 @@ ---TEST-- -Test readfile() function : usage variation ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // file resource - 'file resource' => $fileRes, -); - -// loop through each element of the array for context - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $h = readfile($filename, $use_include_path, $value); - if ($h == false) { - echo "file not read\n"; - } - else { - echo "\n"; - } -}; - -unlink($filename); -fclose($fileRes); - -?> -===DONE=== ---EXPECTF-- -*** Testing readfile() : usage variation *** - ---int 0-- -Error: 2 - readfile() expects parameter 3 to be resource, int given, %s(%d) -file not read - ---int 1-- -Error: 2 - readfile() expects parameter 3 to be resource, int given, %s(%d) -file not read - ---int 12345-- -Error: 2 - readfile() expects parameter 3 to be resource, int given, %s(%d) -file not read - ---int -12345-- -Error: 2 - readfile() expects parameter 3 to be resource, int given, %s(%d) -file not read - ---float 10.5-- -Error: 2 - readfile() expects parameter 3 to be resource, float given, %s(%d) -file not read - ---float -10.5-- -Error: 2 - readfile() expects parameter 3 to be resource, float given, %s(%d) -file not read - ---float 12.3456789000e10-- -Error: 2 - readfile() expects parameter 3 to be resource, float given, %s(%d) -file not read - ---float -12.3456789000e10-- -Error: 2 - readfile() expects parameter 3 to be resource, float given, %s(%d) -file not read - ---float .5-- -Error: 2 - readfile() expects parameter 3 to be resource, float given, %s(%d) -file not read - ---empty array-- -Error: 2 - readfile() expects parameter 3 to be resource, array given, %s(%d) -file not read - ---int indexed array-- -Error: 2 - readfile() expects parameter 3 to be resource, array given, %s(%d) -file not read - ---associative array-- -Error: 2 - readfile() expects parameter 3 to be resource, array given, %s(%d) -file not read - ---nested arrays-- -Error: 2 - readfile() expects parameter 3 to be resource, array given, %s(%d) -file not read - ---uppercase NULL-- -testing readfile - ---lowercase null-- -testing readfile - ---lowercase true-- -Error: 2 - readfile() expects parameter 3 to be resource, bool given, %s(%d) -file not read - ---lowercase false-- -Error: 2 - readfile() expects parameter 3 to be resource, bool given, %s(%d) -file not read - ---uppercase TRUE-- -Error: 2 - readfile() expects parameter 3 to be resource, bool given, %s(%d) -file not read - ---uppercase FALSE-- -Error: 2 - readfile() expects parameter 3 to be resource, bool given, %s(%d) -file not read - ---empty string DQ-- -Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d) -file not read - ---empty string SQ-- -Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d) -file not read - ---string DQ-- -Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d) -file not read - ---string SQ-- -Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d) -file not read - ---mixed case string-- -Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d) -file not read - ---heredoc-- -Error: 2 - readfile() expects parameter 3 to be resource, string given, %s(%d) -file not read - ---instance of classWithToString-- -Error: 2 - readfile() expects parameter 3 to be resource, object given, %s(%d) -file not read - ---instance of classWithoutToString-- -Error: 2 - readfile() expects parameter 3 to be resource, object given, %s(%d) -file not read - ---undefined var-- -testing readfile - ---unset var-- -testing readfile - ---file resource-- -Error: 2 - readfile(): supplied resource is not a valid Stream-Context resource, %s(%d) -testing readfile -===DONE=== diff --git a/ext/standard/tests/file/readfile_variation5.phpt b/ext/standard/tests/file/readfile_variation5.phpt deleted file mode 100644 index bc9c0640551a2..0000000000000 --- a/ext/standard/tests/file/readfile_variation5.phpt +++ /dev/null @@ -1,221 +0,0 @@ ---TEST-- -Test readfile() function : usage variation ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for use_include_path - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $res = readfile($filename, $value); - if ($res == false) { - echo "File not read\n"; - } - else { - echo "\n"; - } -}; - -unlink($filename); - -?> -===DONE=== ---EXPECTF-- -*** Testing readfile() : usage variation *** - ---int 0-- -testing readfile - ---int 1-- -testing readfile - ---int 12345-- -testing readfile - ---int -12345-- -testing readfile - ---float 10.5-- -testing readfile - ---float -10.5-- -testing readfile - ---float 12.3456789000e10-- -testing readfile - ---float -12.3456789000e10-- -testing readfile - ---float .5-- -testing readfile - ---empty array-- -Error: 2 - readfile() expects parameter 2 to be bool, array given, %s(%d) -File not read - ---int indexed array-- -Error: 2 - readfile() expects parameter 2 to be bool, array given, %s(%d) -File not read - ---associative array-- -Error: 2 - readfile() expects parameter 2 to be bool, array given, %s(%d) -File not read - ---nested arrays-- -Error: 2 - readfile() expects parameter 2 to be bool, array given, %s(%d) -File not read - ---uppercase NULL-- -testing readfile - ---lowercase null-- -testing readfile - ---lowercase true-- -testing readfile - ---lowercase false-- -testing readfile - ---uppercase TRUE-- -testing readfile - ---uppercase FALSE-- -testing readfile - ---empty string DQ-- -testing readfile - ---empty string SQ-- -testing readfile - ---string DQ-- -testing readfile - ---string SQ-- -testing readfile - ---mixed case string-- -testing readfile - ---heredoc-- -testing readfile - ---instance of classWithToString-- -Error: 2 - readfile() expects parameter 2 to be bool, object given, %s(%d) -File not read - ---instance of classWithoutToString-- -Error: 2 - readfile() expects parameter 2 to be bool, object given, %s(%d) -File not read - ---undefined var-- -testing readfile - ---unset var-- -testing readfile -===DONE=== diff --git a/ext/standard/tests/file/rename_variation10.phpt b/ext/standard/tests/file/rename_variation10.phpt deleted file mode 100644 index 8ee59168b1098..0000000000000 --- a/ext/standard/tests/file/rename_variation10.phpt +++ /dev/null @@ -1,249 +0,0 @@ ---TEST-- -Test rename() function : usage variation - different types for context ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // file resource - 'file resource' => $fileRes, -); - -// loop through each element of the array for context - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - touch($old_name); - $res = rename($old_name, $new_name, $value); - var_dump($res); - if ($res == true) { - unlink($new_name); - } - else { - unlink($old_name); - } -}; - -fclose($fileRes); - -?> -===DONE=== ---EXPECTF-- -*** Testing rename() : usage variation *** - ---int 0-- -Error: 2 - rename() expects parameter 3 to be resource, int given, %s(%d) -bool(false) - ---int 1-- -Error: 2 - rename() expects parameter 3 to be resource, int given, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - rename() expects parameter 3 to be resource, int given, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - rename() expects parameter 3 to be resource, int given, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - rename() expects parameter 3 to be resource, float given, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - rename() expects parameter 3 to be resource, float given, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - rename() expects parameter 3 to be resource, float given, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - rename() expects parameter 3 to be resource, float given, %s(%d) -bool(false) - ---float .5-- -Error: 2 - rename() expects parameter 3 to be resource, float given, %s(%d) -bool(false) - ---empty array-- -Error: 2 - rename() expects parameter 3 to be resource, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - rename() expects parameter 3 to be resource, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - rename() expects parameter 3 to be resource, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - rename() expects parameter 3 to be resource, array given, %s(%d) -bool(false) - ---uppercase NULL-- -bool(true) - ---lowercase null-- -bool(true) - ---lowercase true-- -Error: 2 - rename() expects parameter 3 to be resource, bool given, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - rename() expects parameter 3 to be resource, bool given, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - rename() expects parameter 3 to be resource, bool given, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - rename() expects parameter 3 to be resource, bool given, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d) -bool(false) - ---string DQ-- -Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d) -bool(false) - ---string SQ-- -Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d) -bool(false) - ---mixed case string-- -Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d) -bool(false) - ---heredoc-- -Error: 2 - rename() expects parameter 3 to be resource, string given, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - rename() expects parameter 3 to be resource, object given, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - rename() expects parameter 3 to be resource, object given, %s(%d) -bool(false) - ---undefined var-- -bool(true) - ---unset var-- -bool(true) - ---file resource-- -Error: 2 - rename(): supplied resource is not a valid Stream-Context resource, %s(%d) -bool(true) -===DONE=== diff --git a/ext/standard/tests/file/rmdir_variation1-win32.phpt b/ext/standard/tests/file/rmdir_variation1-win32.phpt deleted file mode 100644 index 5a958631d98f9..0000000000000 --- a/ext/standard/tests/file/rmdir_variation1-win32.phpt +++ /dev/null @@ -1,127 +0,0 @@ ---TEST-- -Test rmdir() function : usage variation - invalid filenames ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase false' =>false, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // other - // php outputs Permission Denied, p8 outputs no suck file or dir - 'single space' => ' ', -); - -// loop through each element of the array for dirname - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( rmdir($value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing rmdir() : usage variation *** - ---uppercase NULL-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---undefined var-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---unset var-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---single space-- -Error: 2 - rmdir( ): %s, %s(%d) -bool(false) -===DONE=== diff --git a/ext/standard/tests/file/rmdir_variation1.phpt b/ext/standard/tests/file/rmdir_variation1.phpt deleted file mode 100644 index 0556266efabf6..0000000000000 --- a/ext/standard/tests/file/rmdir_variation1.phpt +++ /dev/null @@ -1,127 +0,0 @@ ---TEST-- -Test rmdir() function : usage variation - invalid file names ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase false' =>false, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // other - 'single space' => ' ', -); - -// loop through each element of the array for dirname - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump(rmdir($value)); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing rmdir() : usage variation *** - ---uppercase NULL-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---undefined var-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---unset var-- -Error: 2 - rmdir(): %s, %s(%d) -bool(false) - ---single space-- -Error: 2 - rmdir( ): %s, %s(%d) -bool(false) -===DONE=== diff --git a/ext/standard/tests/file/rmdir_variation2.phpt b/ext/standard/tests/file/rmdir_variation2.phpt deleted file mode 100644 index 7555200344b54..0000000000000 --- a/ext/standard/tests/file/rmdir_variation2.phpt +++ /dev/null @@ -1,240 +0,0 @@ ---TEST-- -Test rmdir() function : usage variation - different types for context ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -$fileres = fopen(__FILE__, 'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // non stream context resource - $fileres, -); - -// loop through each element of the array for context - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - @mkdir($dirname); - var_dump( rmdir($dirname, $value) ); -}; - -@rmdir($dirname); -fclose($fileres); -?> -===DONE=== ---EXPECTF-- -*** Testing rmdir() : usage variation *** - ---int 0-- -Error: 2 - rmdir() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---int 1-- -Error: 2 - rmdir() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - rmdir() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - rmdir() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - rmdir() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - rmdir() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - rmdir() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - rmdir() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float .5-- -Error: 2 - rmdir() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---empty array-- -Error: 2 - rmdir() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - rmdir() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - rmdir() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - rmdir() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---uppercase NULL-- -bool(true) - ---lowercase null-- -bool(true) - ---lowercase true-- -Error: 2 - rmdir() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - rmdir() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - rmdir() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - rmdir() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---string DQ-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---string SQ-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---mixed case string-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---heredoc-- -Error: 2 - rmdir() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - rmdir() expects parameter 2 to be resource, object given, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - rmdir() expects parameter 2 to be resource, object given, %s(%d) -bool(false) - ---undefined var-- -bool(true) - ---unset var-- -bool(true) - ---0-- -Error: 2 - rmdir(): supplied resource is not a valid Stream-Context resource, %s(%d) -bool(true) -===DONE=== diff --git a/ext/standard/tests/file/touch_variation3-win32-mb.phpt b/ext/standard/tests/file/touch_variation3-win32-mb.phpt deleted file mode 100644 index cebf6f6c95622..0000000000000 --- a/ext/standard/tests/file/touch_variation3-win32-mb.phpt +++ /dev/null @@ -1,199 +0,0 @@ ---TEST-- -Test touch() function : usage variation - different types for time ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for time - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( touch($filename, $value, $atime) ); -}; - -unlink($filename); - -?> -===DONE=== ---EXPECTF-- -*** Testing touch() : usage variation *** - ---float 10.5-- -bool(true) - ---float 12.3456789000e10-- -bool(true) - ---float .5-- -bool(true) - ---empty array-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(true) - ---lowercase null-- -bool(true) - ---lowercase true-- -bool(true) - ---lowercase false-- -bool(true) - ---uppercase TRUE-- -bool(true) - ---uppercase FALSE-- -bool(true) - ---empty string DQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d) -NULL - ---undefined var-- -bool(true) - ---unset var-- -bool(true) -===DONE=== diff --git a/ext/standard/tests/file/touch_variation3-win32.phpt b/ext/standard/tests/file/touch_variation3-win32.phpt deleted file mode 100644 index a781ffae2f75d..0000000000000 --- a/ext/standard/tests/file/touch_variation3-win32.phpt +++ /dev/null @@ -1,199 +0,0 @@ ---TEST-- -Test touch() function : usage variation - different types for time ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for time - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( touch($filename, $value, $atime) ); -}; - -unlink($filename); - -?> -===DONE=== ---EXPECTF-- -*** Testing touch() : usage variation *** - ---float 10.5-- -bool(true) - ---float 12.3456789000e10-- -bool(true) - ---float .5-- -bool(true) - ---empty array-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(true) - ---lowercase null-- -bool(true) - ---lowercase true-- -bool(true) - ---lowercase false-- -bool(true) - ---uppercase TRUE-- -bool(true) - ---uppercase FALSE-- -bool(true) - ---empty string DQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d) -NULL - ---undefined var-- -bool(true) - ---unset var-- -bool(true) -===DONE=== diff --git a/ext/standard/tests/file/touch_variation3.phpt b/ext/standard/tests/file/touch_variation3.phpt deleted file mode 100644 index 5eb6ad315efdf..0000000000000 --- a/ext/standard/tests/file/touch_variation3.phpt +++ /dev/null @@ -1,199 +0,0 @@ ---TEST-- -Test touch() function : usage variation - different types for time ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for time - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( touch($filename, $value, $atime) ); -}; - -unlink($filename); - -?> -===DONE=== ---EXPECTF-- -*** Testing touch() : usage variation *** - ---float 10.5-- -bool(true) - ---float 12.3456789000e10-- -bool(true) - ---float .5-- -bool(true) - ---empty array-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - touch() expects parameter 2 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(true) - ---lowercase null-- -bool(true) - ---lowercase true-- -bool(true) - ---lowercase false-- -bool(true) - ---uppercase TRUE-- -bool(true) - ---uppercase FALSE-- -bool(true) - ---empty string DQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - touch() expects parameter 2 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - touch() expects parameter 2 to be int, object given, %s(%d) -NULL - ---undefined var-- -bool(true) - ---unset var-- -bool(true) -===DONE=== diff --git a/ext/standard/tests/file/touch_variation4-win32.phpt b/ext/standard/tests/file/touch_variation4-win32.phpt deleted file mode 100644 index 62816e1ec631a..0000000000000 --- a/ext/standard/tests/file/touch_variation4-win32.phpt +++ /dev/null @@ -1,199 +0,0 @@ ---TEST-- -Test touch() function : usage variation - different types for atime ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for atime - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( touch($filename, $time, $value) ); -}; - -unlink($filename); - -?> -===DONE=== ---EXPECTF-- -*** Testing touch() : usage variation *** - ---float 10.5-- -bool(true) - ---float 12.3456789000e10-- -bool(true) - ---float .5-- -bool(true) - ---empty array-- -Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(true) - ---lowercase null-- -bool(true) - ---lowercase true-- -bool(true) - ---lowercase false-- -bool(true) - ---uppercase TRUE-- -bool(true) - ---uppercase FALSE-- -bool(true) - ---empty string DQ-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - touch() expects parameter 3 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - touch() expects parameter 3 to be int, object given, %s(%d) -NULL - ---undefined var-- -bool(true) - ---unset var-- -bool(true) -===DONE=== diff --git a/ext/standard/tests/file/touch_variation4.phpt b/ext/standard/tests/file/touch_variation4.phpt deleted file mode 100644 index 190d0f4b1ab93..0000000000000 --- a/ext/standard/tests/file/touch_variation4.phpt +++ /dev/null @@ -1,199 +0,0 @@ ---TEST-- -Test touch() function : usage variation - different types for atime ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for atime - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( touch($filename, $time, $value) ); -}; - -unlink($filename); - -?> -===DONE=== ---EXPECTF-- -*** Testing touch() : usage variation *** - ---float 10.5-- -bool(true) - ---float 12.3456789000e10-- -bool(true) - ---float .5-- -bool(true) - ---empty array-- -Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - touch() expects parameter 3 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(true) - ---lowercase null-- -bool(true) - ---lowercase true-- -bool(true) - ---lowercase false-- -bool(true) - ---uppercase TRUE-- -bool(true) - ---uppercase FALSE-- -bool(true) - ---empty string DQ-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - touch() expects parameter 3 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - touch() expects parameter 3 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - touch() expects parameter 3 to be int, object given, %s(%d) -NULL - ---undefined var-- -bool(true) - ---unset var-- -bool(true) -===DONE=== diff --git a/ext/standard/tests/file/umask_variation3.phpt b/ext/standard/tests/file/umask_variation3.phpt deleted file mode 100644 index 68996ab692794..0000000000000 --- a/ext/standard/tests/file/umask_variation3.phpt +++ /dev/null @@ -1,237 +0,0 @@ ---TEST-- -Test umask() function : usage variation ---CREDITS-- -Dave Kelsey ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - //out of boundary integers - 'int -100' => -100, - 'int 99999' => 99999, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - //'float -12.3456789000e10' => -12.3456789000e10, different in p8 - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for mask - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - umask(0); - var_dump(umask($value)); - var_dump( umask() & 0777); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing umask() : usage variation *** - ---int -100-- -int(0) -int(412) - ---int 99999-- -int(0) -int(159) - ---float 10.5-- -int(0) -int(10) - ---float -10.5-- -int(0) -int(502) - ---float 12.3456789000e10-- -int(0) -int(%d) - ---float .5-- -int(0) -int(0) - ---empty array-- -Error: 2 - umask() expects parameter 1 to be int, array given, %s(%d) -bool(false) -int(63) - ---int indexed array-- -Error: 2 - umask() expects parameter 1 to be int, array given, %s(%d) -bool(false) -int(63) - ---associative array-- -Error: 2 - umask() expects parameter 1 to be int, array given, %s(%d) -bool(false) -int(63) - ---nested arrays-- -Error: 2 - umask() expects parameter 1 to be int, array given, %s(%d) -bool(false) -int(63) - ---uppercase NULL-- -int(0) -int(0) - ---lowercase null-- -int(0) -int(0) - ---lowercase true-- -int(0) -int(1) - ---lowercase false-- -int(0) -int(0) - ---uppercase TRUE-- -int(0) -int(1) - ---uppercase FALSE-- -int(0) -int(0) - ---empty string DQ-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---empty string SQ-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---string DQ-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---string SQ-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---mixed case string-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---heredoc-- -Error: 2 - umask() expects parameter 1 to be int, string given, %s(%d) -bool(false) -int(63) - ---instance of classWithToString-- -Error: 2 - umask() expects parameter 1 to be int, object given, %s(%d) -bool(false) -int(63) - ---instance of classWithoutToString-- -Error: 2 - umask() expects parameter 1 to be int, object given, %s(%d) -bool(false) -int(63) - ---undefined var-- -int(0) -int(0) - ---unset var-- -int(0) -int(0) -===DONE=== diff --git a/ext/standard/tests/file/unlink_variation7.phpt b/ext/standard/tests/file/unlink_variation7.phpt deleted file mode 100644 index b4a6bd5a1f994..0000000000000 --- a/ext/standard/tests/file/unlink_variation7.phpt +++ /dev/null @@ -1,242 +0,0 @@ ---TEST-- -Test unlink() function : usage variation different types for context ---CREDITS-- -Dave Kelsey ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // file resource - 'file resource' => $fileRes -); - -// loop through each element of the array for context - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - touch($filename); // create if it doesn't exist - var_dump( unlink($filename, $value) ); -}; - -if (file_exists($filename)) { - unlink($filename); -} -fclose($fileRes); - -?> -===DONE=== ---EXPECTF-- -*** Testing unlink() : usage variation different types for context *** - ---int 0-- -Error: 2 - unlink() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---int 1-- -Error: 2 - unlink() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - unlink() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - unlink() expects parameter 2 to be resource, int given, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - unlink() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - unlink() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - unlink() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - unlink() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---float .5-- -Error: 2 - unlink() expects parameter 2 to be resource, float given, %s(%d) -bool(false) - ---empty array-- -Error: 2 - unlink() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---int indexed array-- -Error: 2 - unlink() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---associative array-- -Error: 2 - unlink() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---nested arrays-- -Error: 2 - unlink() expects parameter 2 to be resource, array given, %s(%d) -bool(false) - ---uppercase NULL-- -bool(true) - ---lowercase null-- -bool(true) - ---lowercase true-- -Error: 2 - unlink() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - unlink() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - unlink() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - unlink() expects parameter 2 to be resource, bool given, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---string DQ-- -Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---string SQ-- -Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---mixed case string-- -Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---heredoc-- -Error: 2 - unlink() expects parameter 2 to be resource, string given, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - unlink() expects parameter 2 to be resource, object given, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - unlink() expects parameter 2 to be resource, object given, %s(%d) -bool(false) - ---undefined var-- -bool(true) - ---unset var-- -bool(true) - ---file resource-- -Error: 2 - unlink(): supplied resource is not a valid Stream-Context resource, %s(%d) -bool(true) -===DONE=== diff --git a/ext/standard/tests/file/userfilters.phpt b/ext/standard/tests/file/userfilters.phpt index 73f87de61372e..40d1298fc4b44 100644 --- a/ext/standard/tests/file/userfilters.phpt +++ b/ext/standard/tests/file/userfilters.phpt @@ -2,7 +2,7 @@ stream userfilter test --FILE-- 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for function_name - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( call_user_func_array($value, $parameters) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing call_user_func_array() : usage variation *** - ---int 0-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---int 1-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---int 12345-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---int -12345-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---float 10.5-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---float -10.5-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---float 12.3456789000e10-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---float -12.3456789000e10-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---float .5-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---empty array-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members, %s(%d) -NULL - ---int indexed array-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members, %s(%d) -NULL - ---associative array-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object, %s(%d) -NULL - ---nested arrays-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---lowercase null-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---lowercase true-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---lowercase false-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---uppercase TRUE-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---uppercase FALSE-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---empty string DQ-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---undefined var-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL - ---unset var-- -Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d) -NULL -===DONE=== diff --git a/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt b/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt deleted file mode 100644 index c8c8ce6604801..0000000000000 --- a/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt +++ /dev/null @@ -1,210 +0,0 @@ ---TEST-- -Test call_user_func_array() function : second parameter variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for parameters - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( call_user_func_array($function_name, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing call_user_func_array() : usage variation *** - ---int 0-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d) -NULL - ---int 1-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d) -NULL - ---int 12345-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d) -NULL - ---int -12345-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d) -NULL - ---float 10.5-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d) -NULL - ---float -10.5-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d) -NULL - ---float 12.3456789000e10-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d) -NULL - ---float -12.3456789000e10-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d) -NULL - ---float .5-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d) -NULL - ---lowercase null-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d) -NULL - ---lowercase true-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d) -NULL - ---lowercase false-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d) -NULL - ---uppercase TRUE-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d) -NULL - ---uppercase FALSE-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d) -NULL - ---empty string DQ-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d) -NULL - ---unset var-- -Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d) -NULL -===DONE=== diff --git a/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt b/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt deleted file mode 100644 index ac4568c62186a..0000000000000 --- a/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt +++ /dev/null @@ -1,137 +0,0 @@ ---TEST-- -Test get_extension_funcs() function : error conditions ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing get_extension_funcs() function: with unexpected inputs for 'module_name' argument *** --- Iteration 1 -- -bool(false) --- Iteration 2 -- -bool(false) --- Iteration 3 -- -bool(false) --- Iteration 4 -- -bool(false) --- Iteration 5 -- -bool(false) --- Iteration 6 -- -bool(false) --- Iteration 7 -- -bool(false) --- Iteration 8 -- -bool(false) --- Iteration 9 -- -bool(false) --- Iteration 10 -- - -Warning: get_extension_funcs() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: get_extension_funcs() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: get_extension_funcs() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -bool(false) --- Iteration 14 -- -bool(false) --- Iteration 15 -- -bool(false) --- Iteration 16 -- -bool(false) --- Iteration 17 -- -bool(false) --- Iteration 18 -- -bool(false) --- Iteration 19 -- -bool(false) --- Iteration 20 -- - -Warning: get_extension_funcs() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -bool(false) --- Iteration 22 -- -bool(false) -===DONE=== diff --git a/ext/standard/tests/general_functions/getrusage_variation1.phpt b/ext/standard/tests/general_functions/getrusage_variation1.phpt deleted file mode 100644 index 0c072ed6e06f2..0000000000000 --- a/ext/standard/tests/general_functions/getrusage_variation1.phpt +++ /dev/null @@ -1,142 +0,0 @@ ---TEST-- -Test getrusage() function : usage variation - diff data types as $who arg ---SKIPIF-- - ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing getrusage() : usage variations *** - --- Iteration 1 -- -User time used (microseconds) %d - --- Iteration 2 -- -User time used (microseconds) %d - --- Iteration 3 -- -User time used (microseconds) %d - --- Iteration 4 -- -User time used (microseconds) %d - --- Iteration 5 -- -User time used (microseconds) %d - --- Iteration 6 -- -User time used (microseconds) %d - --- Iteration 7 -- -User time used (microseconds) %d - --- Iteration 8 -- -User time used (microseconds) %d - --- Iteration 9 -- -User time used (microseconds) %d - --- Iteration 10 -- -User time used (microseconds) %d - --- Iteration 11 -- -User time used (microseconds) %d - --- Iteration 12 -- -User time used (microseconds) %d - --- Iteration 13 -- -User time used (microseconds) %d - --- Iteration 14 -- -User time used (microseconds) %d - --- Iteration 15 -- -User time used (microseconds) %d - --- Iteration 16 -- -User time used (microseconds) %d - --- Iteration 17 -- -User time used (microseconds) %d - --- Iteration 18 -- -User time used (microseconds) %d - --- Iteration 19 -- -User time used (microseconds) %d - --- Iteration 20 -- -User time used (microseconds) %d - --- Iteration 21 -- -User time used (microseconds) %d -===DONE=== diff --git a/ext/standard/tests/general_functions/intval_variation1.phpt b/ext/standard/tests/general_functions/intval_variation1.phpt index e76d7083d4d28..086161de6c327 100644 --- a/ext/standard/tests/general_functions/intval_variation1.phpt +++ b/ext/standard/tests/general_functions/intval_variation1.phpt @@ -11,7 +11,7 @@ Test intval() function : usage variation echo "*** Testing intval() : usage variation ***\n"; // Define error handler -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; diff --git a/ext/standard/tests/general_functions/intval_variation2.phpt b/ext/standard/tests/general_functions/intval_variation2.phpt deleted file mode 100644 index 6a295308afcb9..0000000000000 --- a/ext/standard/tests/general_functions/intval_variation2.phpt +++ /dev/null @@ -1,199 +0,0 @@ ---TEST-- -Test intval() function : usage variation ---SKIPIF-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for base - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( intval($var, $value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing intval() : usage variation *** - ---float 10.5-- -int(1) - ---float -10.5-- -int(1) - ---float 12.3456789000e10-- -Error: 2 - intval() expects parameter 2 to be int, float given, %s(%d) -NULL - ---float -12.3456789000e10-- -Error: 2 - intval() expects parameter 2 to be int, float given, %s(%d) -NULL - ---float .5-- -int(1) - ---empty array-- -Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -int(1) - ---lowercase null-- -int(1) - ---lowercase true-- -int(1) - ---lowercase false-- -int(1) - ---uppercase TRUE-- -int(1) - ---uppercase FALSE-- -int(1) - ---empty string DQ-- -Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - intval() expects parameter 2 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - intval() expects parameter 2 to be int, object given, %s(%d) -NULL - ---undefined var-- -int(1) - ---unset var-- -int(1) -===DONE=== diff --git a/ext/standard/tests/general_functions/php_uname_variation1.phpt b/ext/standard/tests/general_functions/php_uname_variation1.phpt deleted file mode 100644 index d5b86c7b5c399..0000000000000 --- a/ext/standard/tests/general_functions/php_uname_variation1.phpt +++ /dev/null @@ -1,112 +0,0 @@ ---TEST-- -Test php_uname() function - usage variations ---FILE-- - 0, - "1" => 1, - "12345" => 12345, - "-2345" => -2345, - - // float data - "10.5" => 10.5, - "-10.5" => -10.5, - "10.1234567e10" => 10.1234567e10, - "10.7654321E-10" => 10.7654321E-10, - ".5" => .5, - - // null data - "NULL" => NULL, - "null" => null, - - // boolean data - "true" => true, - "false" => false, - "TRUE" => TRUE, - "FALSE" => FALSE, - - // empty data - "\"\"" => "", - "''" => '', - - // object data - "new fooClass()" => new fooClass(), - - // undefined data - "undefined var" => $undefined_var, - - // unset data - "unset var" => $unset_var, -); - -// loop through each element of the array for data - -foreach($values as $key => $value) { - echo "-- Iterator $key --\n"; - var_dump( php_uname($value) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing php_uname() - usage variations --- Iterator 0 -- -string(%d) "%s" --- Iterator 1 -- -string(%d) "%s" --- Iterator 12345 -- -string(%d) "%s" --- Iterator -2345 -- -string(%d) "%s" --- Iterator 10.5 -- -string(%d) "%s" --- Iterator -10.5 -- -string(%d) "%s" --- Iterator 10.1234567e10 -- -string(%d) "%s" --- Iterator 10.7654321E-10 -- -string(%d) "%s" --- Iterator .5 -- -string(%d) "%s" --- Iterator NULL -- -string(%d) "%s" --- Iterator null -- -string(%d) "%s" --- Iterator true -- -string(%d) "%s" --- Iterator false -- -string(%d) "%s" --- Iterator TRUE -- -string(%d) "%s" --- Iterator FALSE -- -string(%d) "%s" --- Iterator "" -- -string(%d) "%s" --- Iterator '' -- -string(%d) "%s" --- Iterator new fooClass() -- -string(%d) "%s" --- Iterator undefined var -- -string(%d) "%s" --- Iterator unset var -- -string(%d) "%s" -===DONE=== diff --git a/ext/standard/tests/general_functions/proc_nice_variation3.phpt b/ext/standard/tests/general_functions/proc_nice_variation3.phpt deleted file mode 100644 index c5626dd50ff8d..0000000000000 --- a/ext/standard/tests/general_functions/proc_nice_variation3.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test function proc_nice() by substituting argument 1 with emptyUnsetUndefNull values. ---CREDITS-- -Italian PHP TestFest 2009 Cesena 19-20-21 june -Fabio Fabbrucci (fabbrucci@grupporetina.com) -Michele Orselli (mo@ideato.it) -Simone Gentili (sensorario@gmail.com) ---SKIPIF-- - ---FILE-- - @$unset_var, - 'undefined var' => @$undefined_var, - 'empty string DQ' => "", - 'empty string SQ' => '', - 'uppercase NULL' => NULL, - 'lowercase null' => null, - ); - - -foreach ( $variation_array as $var ) { - var_dump(proc_nice( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with emptyUnsetUndefNull values *** -bool(true) -bool(true) - -Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d -bool(false) - -Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d -bool(false) -bool(true) -bool(true) diff --git a/ext/standard/tests/general_functions/proc_nice_variation6.phpt b/ext/standard/tests/general_functions/proc_nice_variation6.phpt deleted file mode 100644 index a3aff167ed772..0000000000000 --- a/ext/standard/tests/general_functions/proc_nice_variation6.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -Test function proc_nice() by substituting argument 1 with object values. ---CREDITS-- -Italian PHP TestFest 2009 Cesena 19-20-21 june -Fabio Fabbrucci (fabbrucci@grupporetina.com) -Michele Orselli (mo@ideato.it) -Simone Gentili (sensorario@gmail.com) ---SKIPIF-- - ---FILE-- - new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation_array as $var ) { - var_dump(proc_nice( $var ) ); -} -?> ---EXPECTF-- -*** Test substituting argument 1 with object values *** -Error: 2 - proc_nice() expects parameter 1 to be int, object given, %s(%d) -bool(false) -Error: 2 - proc_nice() expects parameter 1 to be int, object given, %s(%d) -bool(false) diff --git a/ext/standard/tests/general_functions/proc_open-mb0.phpt b/ext/standard/tests/general_functions/proc_open-mb0.phpt index f19a9fb576666..3b832f6ea406e 100644 --- a/ext/standard/tests/general_functions/proc_open-mb0.phpt +++ b/ext/standard/tests/general_functions/proc_open-mb0.phpt @@ -1,7 +1,7 @@ --TEST-- proc_open with bypass_shell subprocess parameter passing --SKIPIF-- - --FILE-- diff --git a/ext/standard/tests/general_functions/proc_open-mb1.phpt b/ext/standard/tests/general_functions/proc_open-mb1.phpt index 666779deb5efb..b91b44a739365 100644 --- a/ext/standard/tests/general_functions/proc_open-mb1.phpt +++ b/ext/standard/tests/general_functions/proc_open-mb1.phpt @@ -1,7 +1,7 @@ --TEST-- proc_open without bypass_shell subprocess parameter passing --SKIPIF-- - --FILE-- diff --git a/ext/standard/tests/general_functions/proc_open.phpt b/ext/standard/tests/general_functions/proc_open.phpt index ecf8d8ad79e86..4d0a21d1658ed 100644 --- a/ext/standard/tests/general_functions/proc_open.phpt +++ b/ext/standard/tests/general_functions/proc_open.phpt @@ -1,7 +1,7 @@ --TEST-- proc_open --SKIPIF-- - diff --git a/ext/standard/tests/image/getimagesize_variation1.phpt b/ext/standard/tests/image/getimagesize_variation1.phpt deleted file mode 100644 index 3d3814414ecc8..0000000000000 --- a/ext/standard/tests/image/getimagesize_variation1.phpt +++ /dev/null @@ -1,185 +0,0 @@ ---TEST-- -Test getimagesize() function : usage variations - unexpected type for arg 1 ---FILE-- - 0, - "1" => 1, - "12345" => 12345, - "-2345" => -2345, - - // float data - "10.5" => 10.5, - "-10.5" => -10.5, - "10.1234567e5" => 10.1234567e10, - "10.7654321e-5" => 10.7654321E-5, - .5, - - // array data - "array()" => array(), - "array(0)" => array(0), - "array(1)" => array(1), - "array(1, 2)" => array(1, 2), - "array('color' => 'red', 'item' => 'pen')" => array('color' => 'red', 'item' => 'pen'), - - // null data - "NULL" => NULL, - "null" => null, - - // boolean data - "true" => true, - "false" => false, - "TRUE" => TRUE, - "FALSE" => FALSE, - - // empty data - "\"\"" => "", - "''" => '', - - // object data - "new stdclass()" => new stdclass(), - - // undefined data - "undefined_var" => $undefined_var, - - // unset data - "unset_var" => $unset_var, -); - -// loop through each element of the array for imagefile - -foreach($values as $key => $value) { - echo "\n-- Arg value: $key --\n"; - var_dump( getimagesize($value, $info) ); -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing getimagesize() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(%d) -Error: 8 - Undefined variable: unset_var, %s(%d) - --- Arg value: 0 -- -Error: 2 - getimagesize(0): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: 1 -- -Error: 2 - getimagesize(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: 12345 -- -Error: 2 - getimagesize(12345): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: -2345 -- -Error: 2 - getimagesize(-2345): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: 10.5 -- -Error: 2 - getimagesize(10.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: -10.5 -- -Error: 2 - getimagesize(-10.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: 10.1234567e5 -- -Error: 2 - getimagesize(101234567000): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: 10.7654321e-5 -- -Error: 2 - getimagesize(0.000107654321): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: 12346 -- -Error: 2 - getimagesize(0.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: array() -- -Error: 2 - getimagesize() expects parameter 1 to be string, array given, %s(%d) -NULL - --- Arg value: array(0) -- -Error: 2 - getimagesize() expects parameter 1 to be string, array given, %s(%d) -NULL - --- Arg value: array(1) -- -Error: 2 - getimagesize() expects parameter 1 to be string, array given, %s(%d) -NULL - --- Arg value: array(1, 2) -- -Error: 2 - getimagesize() expects parameter 1 to be string, array given, %s(%d) -NULL - --- Arg value: array('color' => 'red', 'item' => 'pen') -- -Error: 2 - getimagesize() expects parameter 1 to be string, array given, %s(%d) -NULL - --- Arg value: NULL -- -Error: 2 - getimagesize(): Filename cannot be empty, %s(%d) -bool(false) - --- Arg value: null -- -Error: 2 - getimagesize(): Filename cannot be empty, %s(%d) -bool(false) - --- Arg value: true -- -Error: 2 - getimagesize(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: false -- -Error: 2 - getimagesize(): Filename cannot be empty, %s(%d) -bool(false) - --- Arg value: TRUE -- -Error: 2 - getimagesize(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - --- Arg value: FALSE -- -Error: 2 - getimagesize(): Filename cannot be empty, %s(%d) -bool(false) - --- Arg value: "" -- -Error: 2 - getimagesize(): Filename cannot be empty, %s(%d) -bool(false) - --- Arg value: '' -- -Error: 2 - getimagesize(): Filename cannot be empty, %s(%d) -bool(false) - --- Arg value: new stdclass() -- -Error: 2 - getimagesize() expects parameter 1 to be string, object given, %s(%d) -NULL - --- Arg value: undefined_var -- -Error: 2 - getimagesize(): Filename cannot be empty, %s(%d) -bool(false) - --- Arg value: unset_var -- -Error: 2 - getimagesize(): Filename cannot be empty, %s(%d) -bool(false) -===DONE=== diff --git a/ext/standard/tests/image/getimagesize_variation2.phpt b/ext/standard/tests/image/getimagesize_variation2.phpt index eec2301c40e91..1bb515fe24f67 100644 --- a/ext/standard/tests/image/getimagesize_variation2.phpt +++ b/ext/standard/tests/image/getimagesize_variation2.phpt @@ -8,7 +8,7 @@ Test getimagesize() function : usage variations - unexpected type for arg 2 * Alias to functions: */ -function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { +function test_error_handler($err_no, $err_msg, $filename, $linenum) { echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } set_error_handler('test_error_handler'); diff --git a/ext/standard/tests/image/image_type_to_mime_type_variation1.phpt b/ext/standard/tests/image/image_type_to_mime_type_variation1.phpt deleted file mode 100644 index d6276cf5598a6..0000000000000 --- a/ext/standard/tests/image/image_type_to_mime_type_variation1.phpt +++ /dev/null @@ -1,154 +0,0 @@ ---TEST-- -Test image_type_to_mime_type() function : usage variations - Pass different data types as imagetype ---SKIPIF-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new MyClass(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, -); - -// loop through each element of the array for imagetype -$iterator = 1; -foreach($values as $value) { - echo "\n-- Iteration $iterator --\n"; - var_dump( image_type_to_mime_type($value) ); - $iterator++; -}; -?> -===DONE=== ---EXPECTF-- -*** Testing image_type_to_mime_type() : usage variations *** - --- Iteration 1 -- -string(24) "application/octet-stream" - --- Iteration 2 -- -string(24) "application/octet-stream" - --- Iteration 3 -- -string(24) "application/octet-stream" - --- Iteration 4 -- -string(24) "application/octet-stream" - --- Iteration 5 -- -string(24) "application/octet-stream" - --- Iteration 6 -- - -Warning: image_type_to_mime_type() expects parameter 1 to be int, array given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: image_type_to_mime_type() expects parameter 1 to be int, array given in %s on line %d -NULL - --- Iteration 8 -- -string(24) "application/octet-stream" - --- Iteration 9 -- -string(24) "application/octet-stream" - --- Iteration 10 -- -string(9) "image/gif" - --- Iteration 11 -- -string(24) "application/octet-stream" - --- Iteration 12 -- -string(9) "image/gif" - --- Iteration 13 -- -string(24) "application/octet-stream" - --- Iteration 14 -- - -Warning: image_type_to_mime_type() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: image_type_to_mime_type() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 16 -- - -Warning: image_type_to_mime_type() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: image_type_to_mime_type() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: image_type_to_mime_type() expects parameter 1 to be int, object given in %s on line %d -NULL - --- Iteration 19 -- -string(24) "application/octet-stream" - --- Iteration 20 -- -string(24) "application/octet-stream" -===DONE=== diff --git a/ext/standard/tests/mail/ezmlm_hash_variation1.phpt b/ext/standard/tests/mail/ezmlm_hash_variation1.phpt deleted file mode 100644 index 123195e5ec74f..0000000000000 --- a/ext/standard/tests/mail/ezmlm_hash_variation1.phpt +++ /dev/null @@ -1,193 +0,0 @@ ---TEST-- -Test explode() function : usage variations - test values for $delimiter argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing explode() function: with unexpected inputs for 'delimiter' argument *** --- Iteration 1 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 2 -- -array(2) { - [0]=> - string(5) "piece" - [1]=> - string(35) " piece2 piece3 piece4 piece5 piece6" -} --- Iteration 3 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 4 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 5 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 6 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 7 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 8 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 9 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 10 -- - -Warning: explode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: explode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: explode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -array(2) { - [0]=> - string(5) "piece" - [1]=> - string(35) " piece2 piece3 piece4 piece5 piece6" -} --- Iteration 14 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) --- Iteration 15 -- -array(2) { - [0]=> - string(5) "piece" - [1]=> - string(35) " piece2 piece3 piece4 piece5 piece6" -} --- Iteration 16 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) --- Iteration 17 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) --- Iteration 19 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 20 -- - -Warning: explode() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) -===Done=== diff --git a/ext/standard/tests/math/atan2_variation1.phpt b/ext/standard/tests/math/atan2_variation1.phpt deleted file mode 100644 index a2bc481ad26e4..0000000000000 --- a/ext/standard/tests/math/atan2_variation1.phpt +++ /dev/null @@ -1,187 +0,0 @@ ---TEST-- -Test atan2() function : usage variations - different data types as $y arg ---INI-- -precision = 10 ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing atan2() : usage variations *** - --- Iteration 1 -- -float(0) - --- Iteration 2 -- -float(0.04345089539) - --- Iteration 3 -- -float(0.4808872802) - --- Iteration 4 -- -float(-0.4808872802) - --- Iteration 5 -- -float(1.570796316) - --- Iteration 6 -- -float(0.4282641529) - --- Iteration 7 -- -float(-0.4282641529) - --- Iteration 8 -- -float(1.386607742) - --- Iteration 9 -- -float(0.0005367682093) - --- Iteration 10 -- -float(0.02173570684) - --- Iteration 11 -- -float(0) - --- Iteration 12 -- -float(0) - --- Iteration 13 -- -float(0.04345089539) - --- Iteration 14 -- -float(0) - --- Iteration 15 -- -float(0.04345089539) - --- Iteration 16 -- -float(0) - --- Iteration 17 -- - -Warning: atan2() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: atan2() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: atan2() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: atan2() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: atan2() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: atan2() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: atan2() expects parameter 1 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -float(0) - --- Iteration 25 -- -float(0) - --- Iteration 26 -- - -Warning: atan2() expects parameter 1 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/atan2_variation2.phpt b/ext/standard/tests/math/atan2_variation2.phpt deleted file mode 100644 index 45c0215ea35a5..0000000000000 --- a/ext/standard/tests/math/atan2_variation2.phpt +++ /dev/null @@ -1,186 +0,0 @@ ---TEST-- -Test atan2() function : usage variations - different data types as $x arg ---INI-- -precision = 10 ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing atan2() : basic functionality *** - --- Iteration 1 -- -float(1.570796327) - --- Iteration 2 -- -float(1.527345431) - --- Iteration 3 -- -float(1.089909047) - --- Iteration 4 -- -float(2.051683607) - --- Iteration 5 -- -float(1.071020961E-8) - --- Iteration 6 -- -float(1.142532174) - --- Iteration 7 -- -float(1.99906048) - --- Iteration 8 -- -float(0.1841885846) - --- Iteration 9 -- -float(1.570259559) - --- Iteration 10 -- -float(1.54906062) - --- Iteration 11 -- -float(1.570796327) - --- Iteration 12 -- -float(1.570796327) - --- Iteration 13 -- -float(1.527345431) - --- Iteration 14 -- -float(1.570796327) - --- Iteration 15 -- -float(1.527345431) - --- Iteration 16 -- -float(1.570796327) - --- Iteration 17 -- - -Warning: atan2() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: atan2() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: atan2() expects parameter 2 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: atan2() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: atan2() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: atan2() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: atan2() expects parameter 2 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -float(1.570796327) - --- Iteration 25 -- -float(1.570796327) - --- Iteration 26 -- - -Warning: atan2() expects parameter 2 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/base_convert_variation2.phpt b/ext/standard/tests/math/base_convert_variation2.phpt deleted file mode 100644 index 23e74c621de5d..0000000000000 --- a/ext/standard/tests/math/base_convert_variation2.phpt +++ /dev/null @@ -1,193 +0,0 @@ ---TEST-- -Test base_convert() function : usage variations - different data types as $frombase argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing base_convert() : usage variations *** - --- Iteration 1 -- - -Warning: base_convert(): Invalid `from base' (0) in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: base_convert(): Invalid `from base' (1) in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: base_convert(): Invalid `from base' (-1) in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: base_convert(): Invalid `from base' (-12) in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: base_convert(): Invalid `from base' (2147483647) in %s on line %d -bool(false) - --- Iteration 6 -- -string(2) "31" - --- Iteration 7 -- - -Warning: base_convert(): Invalid `from base' (-10) in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: base_convert(): Invalid `from base' (123) in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: base_convert(): Invalid `from base' (0) in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: base_convert(): Invalid `from base' (0) in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: base_convert(): Invalid `from base' (0) in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: base_convert(): Invalid `from base' (0) in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: base_convert(): Invalid `from base' (1) in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: base_convert(): Invalid `from base' (0) in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: base_convert(): Invalid `from base' (1) in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: base_convert(): Invalid `from base' (0) in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: base_convert() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: base_convert() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: base_convert() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: base_convert() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: base_convert() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: base_convert() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: base_convert(): Invalid `from base' (0) in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: base_convert(): Invalid `from base' (0) in %s on line %d -bool(false) -===Done=== diff --git a/ext/standard/tests/math/base_convert_variation3.phpt b/ext/standard/tests/math/base_convert_variation3.phpt deleted file mode 100644 index d4b96fb1f2bdb..0000000000000 --- a/ext/standard/tests/math/base_convert_variation3.phpt +++ /dev/null @@ -1,193 +0,0 @@ ---TEST-- -Test base_convert() function : usage variations - different data types as $tobase argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing base_convert() : usage variations *** - --- Iteration 1 -- - -Warning: base_convert(): Invalid `to base' (0) in %s on line %d -bool(false) - --- Iteration 2 -- - -Warning: base_convert(): Invalid `to base' (1) in %s on line %d -bool(false) - --- Iteration 3 -- - -Warning: base_convert(): Invalid `to base' (-1) in %s on line %d -bool(false) - --- Iteration 4 -- - -Warning: base_convert(): Invalid `to base' (-12) in %s on line %d -bool(false) - --- Iteration 5 -- - -Warning: base_convert(): Invalid `to base' (2147483647) in %s on line %d -bool(false) - --- Iteration 6 -- -string(2) "25" - --- Iteration 7 -- - -Warning: base_convert(): Invalid `to base' (-10) in %s on line %d -bool(false) - --- Iteration 8 -- - -Warning: base_convert(): Invalid `to base' (123) in %s on line %d -bool(false) - --- Iteration 9 -- - -Warning: base_convert(): Invalid `to base' (0) in %s on line %d -bool(false) - --- Iteration 10 -- - -Warning: base_convert(): Invalid `to base' (0) in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: base_convert(): Invalid `to base' (0) in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: base_convert(): Invalid `to base' (0) in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: base_convert(): Invalid `to base' (1) in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: base_convert(): Invalid `to base' (0) in %s on line %d -bool(false) - --- Iteration 15 -- - -Warning: base_convert(): Invalid `to base' (1) in %s on line %d -bool(false) - --- Iteration 16 -- - -Warning: base_convert(): Invalid `to base' (0) in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: base_convert() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: base_convert() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: base_convert() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: base_convert() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: base_convert() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: base_convert() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: base_convert(): Invalid `to base' (0) in %s on line %d -bool(false) - --- Iteration 24 -- - -Warning: base_convert(): Invalid `to base' (0) in %s on line %d -bool(false) -===Done=== diff --git a/ext/standard/tests/math/bug21523.phpt b/ext/standard/tests/math/bug21523.phpt index 7589c401e30fa..20616b10b329e 100644 --- a/ext/standard/tests/math/bug21523.phpt +++ b/ext/standard/tests/math/bug21523.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #21523 (number_format tries to allocate negative amount of memory) --FILE-- - ".round($v, 2)."\n"; diff --git a/ext/standard/tests/math/exp_variation1.phpt b/ext/standard/tests/math/exp_variation1.phpt deleted file mode 100644 index 5305b636602e7..0000000000000 --- a/ext/standard/tests/math/exp_variation1.phpt +++ /dev/null @@ -1,187 +0,0 @@ ---TEST-- -Test exp() function : usage variations - different data types as $arg argument ---INI-- -precision=14 ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing exp() : usage variations *** - --- Iteration 1 -- -float(1) - --- Iteration 2 -- -float(2.718281828459) - --- Iteration 3 -- -float(INF) - --- Iteration 4 -- -float(0) - --- Iteration 5 -- -float(INF) - --- Iteration 6 -- -float(36315.502674247) - --- Iteration 7 -- -float(2.7536449349747E-5) - --- Iteration 8 -- -float(INF) - --- Iteration 9 -- -float(1.0000000012346) - --- Iteration 10 -- -float(1.6487212707001) - --- Iteration 11 -- -float(1) - --- Iteration 12 -- -float(1) - --- Iteration 13 -- -float(2.718281828459) - --- Iteration 14 -- -float(1) - --- Iteration 15 -- -float(2.718281828459) - --- Iteration 16 -- -float(1) - --- Iteration 17 -- - -Warning: exp() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: exp() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: exp() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: exp() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: exp() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: exp() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: exp() expects parameter 1 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -float(1) - --- Iteration 25 -- -float(1) - --- Iteration 26 -- - -Warning: exp() expects parameter 1 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/expm1_variation1.phpt b/ext/standard/tests/math/expm1_variation1.phpt deleted file mode 100644 index 6d93b6eab6b0f..0000000000000 --- a/ext/standard/tests/math/expm1_variation1.phpt +++ /dev/null @@ -1,199 +0,0 @@ ---TEST-- -Test expm1() function : usage variations - different data types as $arg argument ---INI-- -precision=14 ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing expm1() : usage variations *** - --- Iteration 1 -- -float(0) - --- Iteration 2 -- -float(1.718281828459) - --- Iteration 3 -- -float(INF) - --- Iteration 4 -- -float(-1) - --- Iteration 5 -- -float(36314.502674247) - --- Iteration 6 -- -float(-0.99997246355065) - --- Iteration 7 -- -float(INF) - --- Iteration 8 -- -float(0.0012353302826471) - --- Iteration 9 -- -float(0.64872127070013) - --- Iteration 10 -- -float(0) - --- Iteration 11 -- -float(0) - --- Iteration 12 -- -float(1.718281828459) - --- Iteration 13 -- -float(0) - --- Iteration 14 -- -float(1.718281828459) - --- Iteration 15 -- -float(0) - --- Iteration 16 -- - -Warning: expm1() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: expm1() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: expm1() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: expm1() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: expm1() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: expm1() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: expm1() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: expm1() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: expm1() expects parameter 1 to be float, object given in %s on line %d -NULL - --- Iteration 25 -- -float(0) - --- Iteration 26 -- -float(0) - --- Iteration 27 -- - -Warning: expm1() expects parameter 1 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/fmod_variation1.phpt b/ext/standard/tests/math/fmod_variation1.phpt deleted file mode 100644 index 345d74c43150a..0000000000000 --- a/ext/standard/tests/math/fmod_variation1.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test fmod() function : usage variations - different data types as $x argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing fmod() : usage variations *** - --- Iteration 1 -- -float(0) - --- Iteration 2 -- -float(1) - --- Iteration 3 -- -float(1) - --- Iteration 4 -- -float(-1) - --- Iteration 5 -- -float(1) - --- Iteration 6 -- -float(0.5) - --- Iteration 7 -- -float(-0.5) - --- Iteration 8 -- -float(0) - --- Iteration 9 -- -float(1.23456789E-9) - --- Iteration 10 -- -float(0.5) - --- Iteration 11 -- -float(0) - --- Iteration 12 -- -float(0) - --- Iteration 13 -- -float(1) - --- Iteration 14 -- -float(0) - --- Iteration 15 -- -float(1) - --- Iteration 16 -- -float(0) - --- Iteration 17 -- - -Warning: fmod() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: fmod() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: fmod() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: fmod() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: fmod() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: fmod() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: fmod() expects parameter 1 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -float(0) - --- Iteration 25 -- -float(0) - --- Iteration 26 -- - -Warning: fmod() expects parameter 1 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/fmod_variation2.phpt b/ext/standard/tests/math/fmod_variation2.phpt deleted file mode 100644 index 6c5fc8254167a..0000000000000 --- a/ext/standard/tests/math/fmod_variation2.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test fmod() function : usage variations - different data types as $y argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing fmod() : usage variations *** - --- Iteration 1 -- -float(NAN) - --- Iteration 2 -- -float(0) - --- Iteration 3 -- -float(6) - --- Iteration 4 -- -float(1516) - --- Iteration 5 -- -float(123456) - --- Iteration 6 -- -float(7.5) - --- Iteration 7 -- -float(7.5) - --- Iteration 8 -- -float(123456) - --- Iteration 9 -- -float(2.3605615109341E-10) - --- Iteration 10 -- -float(0) - --- Iteration 11 -- -float(NAN) - --- Iteration 12 -- -float(NAN) - --- Iteration 13 -- -float(0) - --- Iteration 14 -- -float(NAN) - --- Iteration 15 -- -float(0) - --- Iteration 16 -- -float(NAN) - --- Iteration 17 -- - -Warning: fmod() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: fmod() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: fmod() expects parameter 2 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: fmod() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: fmod() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: fmod() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: fmod() expects parameter 2 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -float(NAN) - --- Iteration 25 -- -float(NAN) - --- Iteration 26 -- - -Warning: fmod() expects parameter 2 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/hypot_variation1.phpt b/ext/standard/tests/math/hypot_variation1.phpt deleted file mode 100644 index 0fdfa253752b3..0000000000000 --- a/ext/standard/tests/math/hypot_variation1.phpt +++ /dev/null @@ -1,185 +0,0 @@ ---TEST-- -Test hypot() function : usage variations - different data types as $x argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing hypot() : usage variations *** - --- Iteration 1 -- -float(5) - --- Iteration 2 -- -float(5.0990195135928) - --- Iteration 3 -- -float(12345.001012556) - --- Iteration 4 -- -float(2345.0053304843) - --- Iteration 5 -- -float(2147483647) - --- Iteration 6 -- -float(11.629703349613) - --- Iteration 7 -- -float(11.629703349613) - --- Iteration 8 -- -float(123456789000) - --- Iteration 9 -- -float(5) - --- Iteration 10 -- -float(5.0249378105604) - --- Iteration 11 -- -float(5) - --- Iteration 12 -- -float(5) - --- Iteration 13 -- -float(5.0990195135928) - --- Iteration 14 -- -float(5) - --- Iteration 15 -- -float(5.0990195135928) - --- Iteration 16 -- -float(5) - --- Iteration 17 -- - -Warning: hypot() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: hypot() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: hypot() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: hypot() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: hypot() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: hypot() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: hypot() expects parameter 1 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -float(5) - --- Iteration 25 -- -float(5) - --- Iteration 26 -- - -Warning: hypot() expects parameter 1 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/hypot_variation2.phpt b/ext/standard/tests/math/hypot_variation2.phpt deleted file mode 100644 index 3b48b23123ce1..0000000000000 --- a/ext/standard/tests/math/hypot_variation2.phpt +++ /dev/null @@ -1,185 +0,0 @@ ---TEST-- -Test hypot() function : usage variations - different data types as $y argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing hypot() : usage variations *** - --- Iteration 1 -- -float(3) - --- Iteration 2 -- -float(3.1622776601684) - --- Iteration 3 -- -float(12345.00036452) - --- Iteration 4 -- -float(2345.0019189758) - --- Iteration 5 -- -float(2147483647) - --- Iteration 6 -- -float(10.920164833921) - --- Iteration 7 -- -float(10.920164833921) - --- Iteration 8 -- -float(123456789000) - --- Iteration 9 -- -float(3) - --- Iteration 10 -- -float(3.0413812651491) - --- Iteration 11 -- -float(3) - --- Iteration 12 -- -float(3) - --- Iteration 13 -- -float(3.1622776601684) - --- Iteration 14 -- -float(3) - --- Iteration 15 -- -float(3.1622776601684) - --- Iteration 16 -- -float(3) - --- Iteration 17 -- - -Warning: hypot() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: hypot() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: hypot() expects parameter 2 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: hypot() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: hypot() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: hypot() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: hypot() expects parameter 2 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -float(3) - --- Iteration 25 -- -float(3) - --- Iteration 26 -- - -Warning: hypot() expects parameter 2 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/is_finite_variation1.phpt b/ext/standard/tests/math/is_finite_variation1.phpt deleted file mode 100644 index 498d0b2717f55..0000000000000 --- a/ext/standard/tests/math/is_finite_variation1.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test is_finite() function : usage variations - different data types as $val argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing is_finite() : usage variations *** - --- Iteration 1 -- -bool(true) - --- Iteration 2 -- -bool(true) - --- Iteration 3 -- -bool(true) - --- Iteration 4 -- -bool(true) - --- Iteration 5 -- -bool(true) - --- Iteration 6 -- -bool(true) - --- Iteration 7 -- -bool(true) - --- Iteration 8 -- -bool(true) - --- Iteration 9 -- -bool(true) - --- Iteration 10 -- -bool(true) - --- Iteration 11 -- -bool(true) - --- Iteration 12 -- -bool(true) - --- Iteration 13 -- -bool(true) - --- Iteration 14 -- -bool(true) - --- Iteration 15 -- -bool(true) - --- Iteration 16 -- -bool(true) - --- Iteration 17 -- - -Warning: is_finite() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: is_finite() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: is_finite() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: is_finite() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: is_finite() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: is_finite() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: is_finite() expects parameter 1 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -bool(true) - --- Iteration 25 -- -bool(true) - --- Iteration 26 -- - -Warning: is_finite() expects parameter 1 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/is_infinite_variation1.phpt b/ext/standard/tests/math/is_infinite_variation1.phpt deleted file mode 100644 index 0f57209b985da..0000000000000 --- a/ext/standard/tests/math/is_infinite_variation1.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test is_infinite() function : usage variations - different data types as $val argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing is_infinite() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- - -Warning: is_infinite() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: is_infinite() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: is_infinite() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: is_infinite() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: is_infinite() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: is_infinite() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: is_infinite() expects parameter 1 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -bool(false) - --- Iteration 25 -- -bool(false) - --- Iteration 26 -- - -Warning: is_infinite() expects parameter 1 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/is_nan_variation1.phpt b/ext/standard/tests/math/is_nan_variation1.phpt deleted file mode 100644 index 9cd24cfd91119..0000000000000 --- a/ext/standard/tests/math/is_nan_variation1.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test is_nan() function : usage variations - different data types as $val argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing is_nan() : usage variations *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- -bool(false) - --- Iteration 11 -- -bool(false) - --- Iteration 12 -- -bool(false) - --- Iteration 13 -- -bool(false) - --- Iteration 14 -- -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- - -Warning: is_nan() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: is_nan() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: is_nan() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: is_nan() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: is_nan() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: is_nan() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: is_nan() expects parameter 1 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -bool(false) - --- Iteration 25 -- -bool(false) - --- Iteration 26 -- - -Warning: is_nan() expects parameter 1 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/log1p_variation1.phpt b/ext/standard/tests/math/log1p_variation1.phpt deleted file mode 100644 index 2065fb9fba1a3..0000000000000 --- a/ext/standard/tests/math/log1p_variation1.phpt +++ /dev/null @@ -1,191 +0,0 @@ ---TEST-- -Test log1p() function : usage variations - different data types as $arg argument ---INI-- -precision=14 ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing log1p() : usage variations *** - --- Iteration 1 -- -float(0) - --- Iteration 2 -- -float(0.69314718055995) - --- Iteration 3 -- -float(9.4210874029538) - --- Iteration 4 -- -float(NAN) - --- Iteration 5 -- -float(21.487562597358) - --- Iteration 6 -- -float(NAN) - --- Iteration 7 -- -float(2.4423470353692) - --- Iteration 8 -- -float(NAN) - --- Iteration 9 -- -float(11.723654587153) - --- Iteration 10 -- -float(0.0012338064377078) - --- Iteration 11 -- -float(0.40546510810816) - --- Iteration 12 -- -float(0) - --- Iteration 13 -- -float(0) - --- Iteration 14 -- -float(0.69314718055995) - --- Iteration 15 -- -float(0) - --- Iteration 16 -- -float(0.69314718055995) - --- Iteration 17 -- -float(0) - --- Iteration 18 -- - -Warning: log1p() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: log1p() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: log1p() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: log1p() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: log1p() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: log1p() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: log1p() expects parameter 1 to be float, object given in %s on line %d -NULL - --- Iteration 25 -- -float(0) - --- Iteration 26 -- -float(0) - --- Iteration 27 -- - -Warning: log1p() expects parameter 1 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/log_variation1.phpt b/ext/standard/tests/math/log_variation1.phpt deleted file mode 100644 index 06954d4173871..0000000000000 --- a/ext/standard/tests/math/log_variation1.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test log() function : usage variations - different data types as $arg argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing log() : usage variations *** - --- Iteration 1 -- -float(-INF) - --- Iteration 2 -- -float(0) - --- Iteration 3 -- -float(4.091491094268) - --- Iteration 4 -- -float(NAN) - --- Iteration 5 -- -float(9.3319298653812) - --- Iteration 6 -- -float(1.0211892990699) - --- Iteration 7 -- -float(NAN) - --- Iteration 8 -- -float(11.091514977169) - --- Iteration 9 -- -float(-8.9084850228307) - --- Iteration 10 -- -float(-0.30102999566398) - --- Iteration 11 -- -float(-INF) - --- Iteration 12 -- -float(-INF) - --- Iteration 13 -- -float(0) - --- Iteration 14 -- -float(-INF) - --- Iteration 15 -- -float(0) - --- Iteration 16 -- -float(-INF) - --- Iteration 17 -- - -Warning: log() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: log() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: log() expects parameter 1 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: log() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: log() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: log() expects parameter 1 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: log() expects parameter 1 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- -float(-INF) - --- Iteration 25 -- -float(-INF) - --- Iteration 26 -- - -Warning: log() expects parameter 1 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/log_variation2.phpt b/ext/standard/tests/math/log_variation2.phpt deleted file mode 100644 index 4e4612fdc0393..0000000000000 --- a/ext/standard/tests/math/log_variation2.phpt +++ /dev/null @@ -1,202 +0,0 @@ ---TEST-- -Test log() function : usage variations - different data types as $base argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing log() : usage variations *** - --- Iteration 1 -- - -Warning: log(): base must be greater than 0 in %s on line %d -bool(false) - --- Iteration 2 -- -float(NAN) - --- Iteration 3 -- -float(0.12145441273706) - --- Iteration 4 -- - -Warning: log(): base must be greater than 0 in %s on line %d -bool(false) - --- Iteration 5 -- -float(0.053250469650086) - --- Iteration 6 -- -float(0.48661854224853) - --- Iteration 7 -- - -Warning: log(): base must be greater than 0 in %s on line %d -bool(false) - --- Iteration 8 -- -float(0.044802684673473) - --- Iteration 9 -- -float(-0.055781611216686) - --- Iteration 10 -- -float(-1.6507645591169) - --- Iteration 11 -- - -Warning: log(): base must be greater than 0 in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: log(): base must be greater than 0 in %s on line %d -bool(false) - --- Iteration 13 -- -float(NAN) - --- Iteration 14 -- - -Warning: log(): base must be greater than 0 in %s on line %d -bool(false) - --- Iteration 15 -- -float(NAN) - --- Iteration 16 -- - -Warning: log(): base must be greater than 0 in %s on line %d -bool(false) - --- Iteration 17 -- - -Warning: log() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: log() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: log() expects parameter 2 to be float, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: log() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: log() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: log() expects parameter 2 to be float, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: log() expects parameter 2 to be float, object given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: log(): base must be greater than 0 in %s on line %d -bool(false) - --- Iteration 25 -- - -Warning: log(): base must be greater than 0 in %s on line %d -bool(false) - --- Iteration 26 -- - -Warning: log() expects parameter 2 to be float, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/mt_rand_variation1.phpt b/ext/standard/tests/math/mt_rand_variation1.phpt deleted file mode 100644 index d4f976b98a5a7..0000000000000 --- a/ext/standard/tests/math/mt_rand_variation1.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test rand() function : usage variations - different data types as $min argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing mt_rand() : usage variations *** - --- Iteration 1 -- -int(%i) - --- Iteration 2 -- -int(%i) - --- Iteration 3 -- -int(%i) - --- Iteration 4 -- -int(%i) - --- Iteration 5 -- -int(%i) - --- Iteration 6 -- -int(%i) - --- Iteration 7 -- -int(%i) - --- Iteration 8 -- -int(%i) - --- Iteration 9 -- -int(%i) - --- Iteration 10 -- -int(%i) - --- Iteration 11 -- -int(%i) - --- Iteration 12 -- -int(%i) - --- Iteration 13 -- -int(%i) - --- Iteration 14 -- -int(%i) - --- Iteration 15 -- -int(%i) - --- Iteration 16 -- -int(%i) - --- Iteration 17 -- - -Warning: mt_rand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: mt_rand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: mt_rand() expects parameter 1 to be int, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: mt_rand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: mt_rand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: mt_rand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: mt_rand() expects parameter 1 to be int, object given in %s on line %d -NULL - --- Iteration 24 -- -int(%i) - --- Iteration 25 -- -int(%i) - --- Iteration 26 -- - -Warning: mt_rand() expects parameter 1 to be int, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/mt_rand_variation2.phpt b/ext/standard/tests/math/mt_rand_variation2.phpt deleted file mode 100644 index 5a5b191b1c3c8..0000000000000 --- a/ext/standard/tests/math/mt_rand_variation2.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test mt_rand() function : usage variations - different data types as $max argument ---SKIPIF-- - -===Done=== ---EXPECTF-- -*** Testing mt_rand) : usage variations *** - --- Iteration 1 -- -int(%i) - --- Iteration 2 -- -int(%i) - --- Iteration 3 -- -int(%i) - --- Iteration 4 -- -int(%i) - --- Iteration 5 -- -int(%i) - --- Iteration 6 -- -int(%i) - --- Iteration 7 -- -int(%i) - --- Iteration 8 -- - -Warning: mt_rand() expects parameter 2 to be int, float given in %s on line %d -NULL - --- Iteration 9 -- -int(%i) - --- Iteration 10 -- -int(%i) - --- Iteration 11 -- -int(%i) - --- Iteration 12 -- -int(%i) - --- Iteration 13 -- -int(%i) - --- Iteration 14 -- -int(%i) - --- Iteration 15 -- -int(%i) - --- Iteration 16 -- -int(%i) - --- Iteration 17 -- - -Warning: mt_rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: mt_rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: mt_rand() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: mt_rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: mt_rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: mt_rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: mt_rand() expects parameter 2 to be int, object given in %s on line %d -NULL - --- Iteration 24 -- -int(%i) - --- Iteration 25 -- -int(%i) - --- Iteration 26 -- - -Warning: mt_rand() expects parameter 2 to be int, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/mt_srand_variation1.phpt b/ext/standard/tests/math/mt_srand_variation1.phpt deleted file mode 100644 index 2856446e19ed6..0000000000000 --- a/ext/standard/tests/math/mt_srand_variation1.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test mt_srand() function : usage variations - different data types as $seed argument ---SKIPIF-- - -===Done=== ---EXPECTF-- -*** Testing mt_srand() : usage variations *** - --- Iteration 1 -- -NULL - --- Iteration 2 -- -NULL - --- Iteration 3 -- -NULL - --- Iteration 4 -- -NULL - --- Iteration 5 -- -NULL - --- Iteration 6 -- -NULL - --- Iteration 7 -- -NULL - --- Iteration 8 -- - -Warning: mt_srand() expects parameter 1 to be int, float given in %s on line %d -NULL - --- Iteration 9 -- -NULL - --- Iteration 10 -- -NULL - --- Iteration 11 -- -NULL - --- Iteration 12 -- -NULL - --- Iteration 13 -- -NULL - --- Iteration 14 -- -NULL - --- Iteration 15 -- -NULL - --- Iteration 16 -- -NULL - --- Iteration 17 -- - -Warning: mt_srand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: mt_srand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: mt_srand() expects parameter 1 to be int, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: mt_srand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: mt_srand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: mt_srand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: mt_srand() expects parameter 1 to be int, object given in %s on line %d -NULL - --- Iteration 24 -- -NULL - --- Iteration 25 -- -NULL - --- Iteration 26 -- - -Warning: mt_srand() expects parameter 1 to be int, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/rand_variation1.phpt b/ext/standard/tests/math/rand_variation1.phpt deleted file mode 100644 index d77d48e6a43d2..0000000000000 --- a/ext/standard/tests/math/rand_variation1.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test rand() function : usage variations - different data types as $min argument ---SKIPIF-- - -===Done=== ---EXPECTF-- -*** Testing rand() : usage variations *** - --- Iteration 1 -- -int(%i) - --- Iteration 2 -- -int(%i) - --- Iteration 3 -- -int(%i) - --- Iteration 4 -- -int(%i) - --- Iteration 5 -- -int(%i) - --- Iteration 6 -- -int(%i) - --- Iteration 7 -- -int(%i) - --- Iteration 8 -- - -Warning: rand() expects parameter 1 to be int, float given in %s on line %d -NULL - --- Iteration 9 -- -int(%i) - --- Iteration 10 -- -int(%i) - --- Iteration 11 -- -int(%i) - --- Iteration 12 -- -int(%i) - --- Iteration 13 -- -int(%i) - --- Iteration 14 -- -int(%i) - --- Iteration 15 -- -int(%i) - --- Iteration 16 -- -int(%i) - --- Iteration 17 -- - -Warning: rand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: rand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: rand() expects parameter 1 to be int, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: rand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: rand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: rand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: rand() expects parameter 1 to be int, object given in %s on line %d -NULL - --- Iteration 24 -- -int(%i) - --- Iteration 25 -- -int(%i) - --- Iteration 26 -- - -Warning: rand() expects parameter 1 to be int, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/rand_variation2.phpt b/ext/standard/tests/math/rand_variation2.phpt deleted file mode 100644 index 1aee6af2c79b1..0000000000000 --- a/ext/standard/tests/math/rand_variation2.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test rand() function : usage variations - different data types as $max argument ---SKIPIF-- - -===Done=== ---EXPECTF-- -*** Testing rand) : usage variations *** - --- Iteration 1 -- -int(%i) - --- Iteration 2 -- -int(%i) - --- Iteration 3 -- -int(%i) - --- Iteration 4 -- -int(%i) - --- Iteration 5 -- -int(%i) - --- Iteration 6 -- -int(%i) - --- Iteration 7 -- -int(%i) - --- Iteration 8 -- - -Warning: rand() expects parameter 2 to be int, float given in %s on line %d -NULL - --- Iteration 9 -- -int(%i) - --- Iteration 10 -- -int(%i) - --- Iteration 11 -- -int(%i) - --- Iteration 12 -- -int(%i) - --- Iteration 13 -- -int(%i) - --- Iteration 14 -- -int(%i) - --- Iteration 15 -- -int(%i) - --- Iteration 16 -- -int(%i) - --- Iteration 17 -- - -Warning: rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: rand() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: rand() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: rand() expects parameter 2 to be int, object given in %s on line %d -NULL - --- Iteration 24 -- -int(%i) - --- Iteration 25 -- -int(%i) - --- Iteration 26 -- - -Warning: rand() expects parameter 2 to be int, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/round_variation2.phpt b/ext/standard/tests/math/round_variation2.phpt deleted file mode 100644 index e0358da735fe2..0000000000000 --- a/ext/standard/tests/math/round_variation2.phpt +++ /dev/null @@ -1,187 +0,0 @@ ---TEST-- -Test round() function : usage variations - different data types as $precision argument ---INI-- -precision=14 ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing round() : usage variations *** - --- Iteration 1 -- -float(123) - --- Iteration 2 -- -float(123.4) - --- Iteration 3 -- -float(123.4456789) - --- Iteration 4 -- -float(0) - --- Iteration 5 -- -float(123.4456789) - --- Iteration 6 -- -float(123.4456789) - --- Iteration 7 -- -float(0) - --- Iteration 8 -- -float(123.4456789) - --- Iteration 9 -- -float(123) - --- Iteration 10 -- -float(123) - --- Iteration 11 -- -float(123) - --- Iteration 12 -- -float(123) - --- Iteration 13 -- -float(123.4) - --- Iteration 14 -- -float(123) - --- Iteration 15 -- -float(123.4) - --- Iteration 16 -- -float(123) - --- Iteration 17 -- - -Warning: round() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: round() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: round() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: round() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: round() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: round() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: round() expects parameter 2 to be int, object given in %s on line %d -NULL - --- Iteration 24 -- -float(123) - --- Iteration 25 -- -float(123) - --- Iteration 26 -- - -Warning: round() expects parameter 2 to be int, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/math/srand_variation1.phpt b/ext/standard/tests/math/srand_variation1.phpt deleted file mode 100644 index 8e5a1cc5e89e2..0000000000000 --- a/ext/standard/tests/math/srand_variation1.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test srand() function : usage variations - different data types as $seed argument ---SKIPIF-- - -===Done=== ---EXPECTF-- -*** Testing srand() : usage variations *** - --- Iteration 1 -- -NULL - --- Iteration 2 -- -NULL - --- Iteration 3 -- -NULL - --- Iteration 4 -- -NULL - --- Iteration 5 -- -NULL - --- Iteration 6 -- -NULL - --- Iteration 7 -- -NULL - --- Iteration 8 -- - -Warning: srand() expects parameter 1 to be int, float given in %s on line %d -NULL - --- Iteration 9 -- -NULL - --- Iteration 10 -- -NULL - --- Iteration 11 -- -NULL - --- Iteration 12 -- -NULL - --- Iteration 13 -- -NULL - --- Iteration 14 -- -NULL - --- Iteration 15 -- -NULL - --- Iteration 16 -- -NULL - --- Iteration 17 -- - -Warning: srand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: srand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: srand() expects parameter 1 to be int, array given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: srand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: srand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: srand() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: srand() expects parameter 1 to be int, object given in %s on line %d -NULL - --- Iteration 24 -- -NULL - --- Iteration 25 -- -NULL - --- Iteration 26 -- - -Warning: srand() expects parameter 1 to be int, resource given in %s on line %d -NULL -===Done=== diff --git a/ext/standard/tests/network/bug20134.phpt b/ext/standard/tests/network/bug20134.phpt index e311f892f774d..8d97f5f6e887e 100644 --- a/ext/standard/tests/network/bug20134.phpt +++ b/ext/standard/tests/network/bug20134.phpt @@ -2,7 +2,7 @@ Bug #20134 (UDP reads from invalid ports) --FILE-- 1, 'two' => 2); - -// resource -$res = fopen(__FILE__,'r'); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $res, -); - -// loop through each element of the array for ip_address - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( ip2long($value) ); -}; - -fclose($res); - -?> -===DONE=== ---EXPECTF-- -*** Testing ip2long() : usage variation *** - ---int 0-- -bool(false) - ---int 1-- -bool(false) - ---int 12345-- -bool(false) - ---int -12345-- -bool(false) - ---float 10.5-- -bool(false) - ---float -10.5-- -bool(false) - ---float 12.3456789000e10-- -bool(false) - ---float -12.3456789000e10-- -bool(false) - ---float .5-- -bool(false) - ---empty array-- -Error: 2 - ip2long() expects parameter 1 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - ip2long() expects parameter 1 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - ip2long() expects parameter 1 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - ip2long() expects parameter 1 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -bool(false) - ---lowercase null-- -bool(false) - ---lowercase true-- -bool(false) - ---lowercase false-- -bool(false) - ---uppercase TRUE-- -bool(false) - ---uppercase FALSE-- -bool(false) - ---empty string DQ-- -bool(false) - ---empty string SQ-- -bool(false) - ---instance of classWithToString-- -bool(false) - ---instance of classWithoutToString-- -Error: 2 - ip2long() expects parameter 1 to be string, object given, %s(%d) -NULL - ---undefined var-- -bool(false) - ---unset var-- -bool(false) - ---resource-- -Error: 2 - ip2long() expects parameter 1 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/standard/tests/network/long2ip_variation1.phpt b/ext/standard/tests/network/long2ip_variation1.phpt deleted file mode 100644 index 93efc098b5f57..0000000000000 --- a/ext/standard/tests/network/long2ip_variation1.phpt +++ /dev/null @@ -1,203 +0,0 @@ ---TEST-- -Test long2ip() function : usage variation ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -// resource -$res = fopen(__FILE__,'r'); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource - 'resource' => $res, -); - -// loop through each element of the array for proper_address - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( long2ip($value) ); -}; - -fclose($res); - -?> -===DONE=== ---EXPECTF-- -*** Testing long2ip() : usage variation *** - ---float 10.5-- -string(8) "0.0.0.10" - ---float -10.5-- -string(15) "255.255.255.246" - ---float .5-- -string(7) "0.0.0.0" - ---empty array-- -Error: 2 - long2ip() expects parameter 1 to be int, array given, %slong2ip_variation1.php(%d) -NULL - ---int indexed array-- -Error: 2 - long2ip() expects parameter 1 to be int, array given, %slong2ip_variation1.php(%d) -NULL - ---associative array-- -Error: 2 - long2ip() expects parameter 1 to be int, array given, %slong2ip_variation1.php(%d) -NULL - ---nested arrays-- -Error: 2 - long2ip() expects parameter 1 to be int, array given, %slong2ip_variation1.php(%d) -NULL - ---uppercase NULL-- -string(7) "0.0.0.0" - ---lowercase null-- -string(7) "0.0.0.0" - ---lowercase true-- -string(7) "0.0.0.1" - ---lowercase false-- -string(7) "0.0.0.0" - ---uppercase TRUE-- -string(7) "0.0.0.1" - ---uppercase FALSE-- -string(7) "0.0.0.0" - ---empty string DQ-- -Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d) -NULL - ---empty string SQ-- -Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d) -NULL - ---string DQ-- -Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d) -NULL - ---string SQ-- -Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d) -NULL - ---mixed case string-- -Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d) -NULL - ---heredoc-- -Error: 2 - long2ip() expects parameter 1 to be int, string given, %slong2ip_variation1.php(%d) -NULL - ---instance of classWithToString-- -Error: 2 - long2ip() expects parameter 1 to be int, object given, %slong2ip_variation1.php(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - long2ip() expects parameter 1 to be int, object given, %slong2ip_variation1.php(%d) -NULL - ---undefined var-- -string(7) "0.0.0.0" - ---unset var-- -string(7) "0.0.0.0" - ---resource-- -Error: 2 - long2ip() expects parameter 1 to be int, resource given, %slong2ip_variation1.php(%d) -NULL -===DONE=== diff --git a/ext/standard/tests/network/tcp4loop.phpt b/ext/standard/tests/network/tcp4loop.phpt index a163cd9b35816..a18fa3ba57825 100644 --- a/ext/standard/tests/network/tcp4loop.phpt +++ b/ext/standard/tests/network/tcp4loop.phpt @@ -1,7 +1,7 @@ --TEST-- Streams Based IPv4 TCP Loopback test --FILE-- - diff --git a/ext/standard/tests/network/udp6loop.phpt b/ext/standard/tests/network/udp6loop.phpt index 8241d80bac838..3b70f43119a87 100644 --- a/ext/standard/tests/network/udp6loop.phpt +++ b/ext/standard/tests/network/udp6loop.phpt @@ -1,7 +1,7 @@ --TEST-- Streams Based IPv6 UDP Loopback test --SKIPIF-- - diff --git a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt index 3617458125f01..e9215cf5619a5 100644 Binary files a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt and b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt differ diff --git a/ext/standard/tests/strings/addslashes_variation1.phpt b/ext/standard/tests/strings/addslashes_variation1.phpt deleted file mode 100644 index e204498ba6765..0000000000000 --- a/ext/standard/tests/strings/addslashes_variation1.phpt +++ /dev/null @@ -1,171 +0,0 @@ ---TEST-- -Test addslashes() function : usage variations - non-string type argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values -/*15*/ true, - false, - TRUE, - FALSE, - - // empty string -/*19*/ "", - '', - - // undefined variable -/*21*/ $undefined_var, - - // unset variable -/*22*/ $unset_var, - - // objects -/*23*/ new sample(), - - // resource -/*24*/ $file_handle, - -/*25*/ NULL, - null -); - - -// loop through each element of the array and check the working of addslashes() -// when $str argument is supplied with different values -echo "\n--- Testing addslashes() by supplying different values for 'str' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str = $values [$index]; - - var_dump( addslashes($str) ); - - $counter ++; -} - -// closing the file -fclose($file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing addslashes() : with non-string type argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing addslashes() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(5) "12345" --- Iteration 4 -- -string(5) "-2345" --- Iteration 5 -- -string(4) "10.5" --- Iteration 6 -- -string(5) "-10.5" --- Iteration 7 -- -string(12) "101234567000" --- Iteration 8 -- -string(13) "1.07654321E-9" --- Iteration 9 -- -string(3) "0.5" --- Iteration 10 -- - -Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: addslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(1) "1" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(1) "1" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(0) "" --- Iteration 20 -- -string(0) "" --- Iteration 21 -- -string(0) "" --- Iteration 22 -- -string(0) "" --- Iteration 23 -- -string(7) "obj\'ct" --- Iteration 24 -- - -Warning: addslashes() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- -string(0) "" --- Iteration 26 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/bin2hex_variation1.phpt b/ext/standard/tests/strings/bin2hex_variation1.phpt deleted file mode 100644 index d7bf15f4f43d8..0000000000000 --- a/ext/standard/tests/strings/bin2hex_variation1.phpt +++ /dev/null @@ -1,128 +0,0 @@ ---TEST-- -Test bin2hex() function : usage variations - test values for $str argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing bin2hex() function: with unexpected inputs for 'str' argument *** --- Iteration 1 -- -string(2) "30" --- Iteration 2 -- -string(2) "31" --- Iteration 3 -- -string(12) "313233343536" --- Iteration 4 -- -string(8) "31302e35" --- Iteration 5 -- -string(10) "2d32302e35" --- Iteration 6 -- -string(24) "313031323334353637303030" --- Iteration 7 -- - -Warning: bin2hex() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 8 -- - -Warning: bin2hex() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 9 -- - -Warning: bin2hex() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 10 -- -string(2) "31" --- Iteration 11 -- -string(0) "" --- Iteration 12 -- -string(2) "31" --- Iteration 13 -- -string(0) "" --- Iteration 14 -- -string(0) "" --- Iteration 15 -- -string(0) "" --- Iteration 16 -- -string(26) "73616d706c65206f626a656374" --- Iteration 17 -- - -Warning: bin2hex() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/chop_variation1.phpt b/ext/standard/tests/strings/chop_variation1.phpt deleted file mode 100644 index 51f53f0153ed9..0000000000000 --- a/ext/standard/tests/strings/chop_variation1.phpt +++ /dev/null @@ -1,214 +0,0 @@ ---TEST-- -Test chop() function : usage variations - unexpected values for str argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // empty string - "", - '', - - // null values - NULL, - null, - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // object - $sample_obj, - - // resource - $file_handle -); - - -// loop through each element of the array and check the working of chop() -// when $str argument is supplied with different values - -echo "\n--- Testing chop() by supplying different values for 'str' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str = $values [$index]; - - var_dump( chop($str) ); - var_dump( chop($str, $charlist) ); - - $counter ++; -} - -// closing the resource -fclose( $file_handle); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing chop() : with unexpected values for str argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing chop() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" -string(0) "" --- Iteration 2 -- -string(1) "1" -string(0) "" --- Iteration 3 -- -string(5) "12345" -string(0) "" --- Iteration 4 -- -string(5) "-2345" -string(1) "-" --- Iteration 5 -- -string(4) "10.5" -string(3) "10." --- Iteration 6 -- -string(5) "-10.5" -string(4) "-10." --- Iteration 7 -- -string(12) "101234567000" -string(0) "" --- Iteration 8 -- -string(13) "1.07654321E-9" -string(12) "1.07654321E-" --- Iteration 9 -- -string(3) "0.5" -string(2) "0." --- Iteration 10 -- - -Warning: chop() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: chop() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: chop() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: chop() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: chop() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: chop() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: chop() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: chop() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: chop() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: chop() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(1) "1" -string(0) "" --- Iteration 16 -- -string(0) "" -string(0) "" --- Iteration 17 -- -string(1) "1" -string(0) "" --- Iteration 18 -- -string(0) "" -string(0) "" --- Iteration 19 -- -string(0) "" -string(0) "" --- Iteration 20 -- -string(0) "" -string(0) "" --- Iteration 21 -- -string(0) "" -string(0) "" --- Iteration 22 -- -string(0) "" -string(0) "" --- Iteration 23 -- -string(0) "" -string(0) "" --- Iteration 24 -- -string(0) "" -string(0) "" --- Iteration 25 -- -string(16) " @#$%Object @#$%" -string(11) " @#$%Object" --- Iteration 26 -- - -Warning: chop() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: chop() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/chop_variation2.phpt b/ext/standard/tests/strings/chop_variation2.phpt deleted file mode 100644 index cad8ec75f5ed4..0000000000000 --- a/ext/standard/tests/strings/chop_variation2.phpt +++ /dev/null @@ -1,175 +0,0 @@ ---TEST-- -Test chop() function : usage variations - unexpected values for charlist argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new sample(), - - // empty string - "", - '', - - // null values - NULL, - null, - - // resource - $file_handle, - - // undefined variable - $undefined_var, - - // unset variable - $unset_var - -); - - -// loop through each element of the array and check the working of chop() -// when $charlist argument is supplied with different values - -echo "\n--- Testing chop() by supplying different values for 'charlist' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $charlist = $values [$index]; - - var_dump( chop($str, $charlist) ); - - $counter ++; -} - -// closing the resource -fclose($file_handle); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing chop() : with different unexpected values for charlist argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing chop() by supplying different values for 'charlist' argument --- --- Iteration 1 -- -string(17) "hello world12345 " --- Iteration 2 -- -string(17) "hello world12345 " --- Iteration 3 -- -string(17) "hello world12345 " --- Iteration 4 -- -string(17) "hello world12345 " --- Iteration 5 -- -string(17) "hello world12345 " --- Iteration 6 -- -string(17) "hello world12345 " --- Iteration 7 -- -string(17) "hello world12345 " --- Iteration 8 -- -string(17) "hello world12345 " --- Iteration 9 -- -string(17) "hello world12345 " --- Iteration 10 -- - -Warning: chop() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: chop() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: chop() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: chop() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: chop() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(17) "hello world12345 " --- Iteration 16 -- -string(17) "hello world12345 " --- Iteration 17 -- -string(17) "hello world12345 " --- Iteration 18 -- -string(17) "hello world12345 " --- Iteration 19 -- -string(11) "hello world" --- Iteration 20 -- -string(17) "hello world12345 " --- Iteration 21 -- -string(17) "hello world12345 " --- Iteration 22 -- -string(17) "hello world12345 " --- Iteration 23 -- -string(17) "hello world12345 " --- Iteration 24 -- - -Warning: chop() expects parameter 2 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- -string(17) "hello world12345 " --- Iteration 26 -- -string(17) "hello world12345 " -Done diff --git a/ext/standard/tests/strings/chunk_split_variation1.phpt b/ext/standard/tests/strings/chunk_split_variation1.phpt deleted file mode 100644 index 0b24f9b6d9227..0000000000000 --- a/ext/standard/tests/strings/chunk_split_variation1.phpt +++ /dev/null @@ -1,169 +0,0 @@ ---TEST-- -Test chunk_split() function : usage variations - with unexpected values for 'str' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new MyClass(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - // resource data - $fp -); - -// loop through each element of the array for 'str' -for($count = 0; $count < count($values); $count++) { - echo "-- Iteration ".($count+1)." --\n"; - var_dump( chunk_split($values[$count], $chunklen, $ending) ); -}; - -echo "Done"; - -// close the resource -fclose($fp); - -?> ---EXPECTF-- -*** Testing chunk_split() : with unexpected values for 'str' argument *** --- Iteration 1 -- -string(2) "0 " --- Iteration 2 -- -string(2) "1 " --- Iteration 3 -- -string(8) "12 34 5 " --- Iteration 4 -- -string(8) "-2 34 5 " --- Iteration 5 -- -string(6) "10 .5 " --- Iteration 6 -- -string(8) "-1 0. 5 " --- Iteration 7 -- -string(18) "10 12 34 56 70 00 " --- Iteration 8 -- -string(20) "1. 07 65 43 21 E- 9 " --- Iteration 9 -- -string(5) "0. 5 " --- Iteration 10 -- - -Warning: chunk_split() expects parameter 1 to be string, array given in %s on line 87 -NULL --- Iteration 11 -- - -Warning: chunk_split() expects parameter 1 to be string, array given in %s on line 87 -NULL --- Iteration 12 -- - -Warning: chunk_split() expects parameter 1 to be string, array given in %s on line 87 -NULL --- Iteration 13 -- - -Warning: chunk_split() expects parameter 1 to be string, array given in %s on line 87 -NULL --- Iteration 14 -- - -Warning: chunk_split() expects parameter 1 to be string, array given in %s on line 87 -NULL --- Iteration 15 -- -string(1) " " --- Iteration 16 -- -string(1) " " --- Iteration 17 -- -string(2) "1 " --- Iteration 18 -- -string(1) " " --- Iteration 19 -- -string(2) "1 " --- Iteration 20 -- -string(1) " " --- Iteration 21 -- -string(1) " " --- Iteration 22 -- -string(1) " " --- Iteration 23 -- -string(9) "st ri ng " --- Iteration 24 -- -string(9) "st ri ng " --- Iteration 25 -- -string(9) "ob je ct " --- Iteration 26 -- -string(1) " " --- Iteration 27 -- -string(1) " " --- Iteration 28 -- - -Warning: chunk_split() expects parameter 1 to be string, resource given in %s on line 87 -NULL -Done diff --git a/ext/standard/tests/strings/chunk_split_variation2.phpt b/ext/standard/tests/strings/chunk_split_variation2.phpt deleted file mode 100644 index b5d58b0d0093c..0000000000000 --- a/ext/standard/tests/strings/chunk_split_variation2.phpt +++ /dev/null @@ -1,185 +0,0 @@ ---TEST-- -Test chunk_split() function : usage variations - unexpected values for 'chunklen' argument(Bug#42796) ---SKIPIF-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new MyClass(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - // resource variable - $fp -); - -// loop through each element of the values for 'chunklen' -for($count = 0; $count < count($values); $count++) { - echo "-- Iteration ".($count+1)." --\n"; - var_dump( chunk_split($str, $values[$count], $ending) ); -} - -//closing resource -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing chunk_split() : with unexpected values for 'chunklen' argument *** --- Iteration 1 -- -string(28) "This is ch*uklen vari*ation*" --- Iteration 2 -- - -Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d -bool(false) --- Iteration 3 -- - -Warning: chunk_split() expects parameter 2 to be int, float given in %s on line %d -NULL --- Iteration 4 -- - -Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d -bool(false) --- Iteration 5 -- - -Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d -bool(false) --- Iteration 6 -- - -Warning: chunk_split() expects parameter 2 to be int, array given in %schunk_split_variation2.php on line %d -NULL --- Iteration 7 -- - -Warning: chunk_split() expects parameter 2 to be int, array given in %schunk_split_variation2.php on line %d -NULL --- Iteration 8 -- - -Warning: chunk_split() expects parameter 2 to be int, array given in %schunk_split_variation2.php on line %d -NULL --- Iteration 9 -- - -Warning: chunk_split() expects parameter 2 to be int, array given in %schunk_split_variation2.php on line %d -NULL --- Iteration 10 -- - -Warning: chunk_split() expects parameter 2 to be int, array given in %schunk_split_variation2.php on line %d -NULL --- Iteration 11 -- - -Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d -bool(false) --- Iteration 12 -- - -Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d -bool(false) --- Iteration 13 -- -string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*" --- Iteration 14 -- - -Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d -bool(false) --- Iteration 15 -- -string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*" --- Iteration 16 -- - -Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d -bool(false) --- Iteration 17 -- - -Warning: chunk_split() expects parameter 2 to be int, string given in %schunk_split_variation2.php on line %d -NULL --- Iteration 18 -- - -Warning: chunk_split() expects parameter 2 to be int, string given in %schunk_split_variation2.php on line %d -NULL --- Iteration 19 -- - -Warning: chunk_split() expects parameter 2 to be int, string given in %schunk_split_variation2.php on line %d -NULL --- Iteration 20 -- - -Warning: chunk_split() expects parameter 2 to be int, string given in %schunk_split_variation2.php on line %d -NULL --- Iteration 21 -- - -Warning: chunk_split() expects parameter 2 to be int, object given in %schunk_split_variation2.php on line %d -NULL --- Iteration 22 -- - -Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d -bool(false) --- Iteration 23 -- - -Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d -bool(false) --- Iteration 24 -- - -Warning: chunk_split() expects parameter 2 to be int, resource given in %schunk_split_variation2.php on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/chunk_split_variation3.phpt b/ext/standard/tests/strings/chunk_split_variation3.phpt deleted file mode 100644 index 791535371f87e..0000000000000 --- a/ext/standard/tests/strings/chunk_split_variation3.phpt +++ /dev/null @@ -1,160 +0,0 @@ ---TEST-- -Test chunk_split() function : usage variations - unexpected values for 'ending' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new MyClass(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - // resource data - $fp -); - -// loop through each element of values for 'ending' -for($count = 0; $count < count($values); $count++) { - echo "-- Iteration ".($count+1)." --\n"; - var_dump( chunk_split($str, $chunklen, $values[$count]) ); -} - -echo "Done"; - -//closing resource -fclose($fp); -?> ---EXPECTF-- -*** Testing chunk_split() : unexpected values for 'ending' *** --- Iteration 1 -- -string(28) "This0 is 0simp0le s0trin0g.0" --- Iteration 2 -- -string(28) "This1 is 1simp1le s1trin1g.1" --- Iteration 3 -- -string(52) "This12345 is 12345simp12345le s12345trin12345g.12345" --- Iteration 4 -- -string(52) "This-2345 is -2345simp-2345le s-2345trin-2345g.-2345" --- Iteration 5 -- -string(46) "This10.5 is 10.5simp10.5le s10.5trin10.5g.10.5" --- Iteration 6 -- -string(52) "This-10.5 is -10.5simp-10.5le s-10.5trin-10.5g.-10.5" --- Iteration 7 -- -string(94) "This101234560000 is 101234560000simp101234560000le s101234560000trin101234560000g.101234560000" --- Iteration 8 -- -string(100) "This1.07654321E-9 is 1.07654321E-9simp1.07654321E-9le s1.07654321E-9trin1.07654321E-9g.1.07654321E-9" --- Iteration 9 -- -string(40) "This0.5 is 0.5simp0.5le s0.5trin0.5g.0.5" --- Iteration 10 -- - -Warning: chunk_split() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: chunk_split() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: chunk_split() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: chunk_split() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: chunk_split() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(22) "This is simple string." --- Iteration 16 -- -string(22) "This is simple string." --- Iteration 17 -- -string(28) "This1 is 1simp1le s1trin1g.1" --- Iteration 18 -- -string(22) "This is simple string." --- Iteration 19 -- -string(28) "This1 is 1simp1le s1trin1g.1" --- Iteration 20 -- -string(22) "This is simple string." --- Iteration 21 -- -string(22) "This is simple string." --- Iteration 22 -- -string(22) "This is simple string." --- Iteration 23 -- -string(58) "Thisobject is objectsimpobjectle sobjecttrinobjectg.object" --- Iteration 24 -- -string(22) "This is simple string." --- Iteration 25 -- -string(22) "This is simple string." --- Iteration 26 -- - -Warning: chunk_split() expects parameter 3 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/convert_cyr_string_variation1.phpt b/ext/standard/tests/strings/convert_cyr_string_variation1.phpt deleted file mode 100644 index 89cb6ccc4ba2b..0000000000000 --- a/ext/standard/tests/strings/convert_cyr_string_variation1.phpt +++ /dev/null @@ -1,139 +0,0 @@ ---TEST-- -Test convert_cyr_string() function : usage variations - test values for $str argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing convert_cyr_string() function: with unexpected inputs for 'str' argument *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(3) "255" --- Iteration 4 -- -string(3) "256" --- Iteration 5 -- -string(10) "2147483647" --- Iteration 6 -- -string(11) "-2147483648" --- Iteration 7 -- -string(4) "10.5" --- Iteration 8 -- -string(5) "-20.5" --- Iteration 9 -- -string(12) "101234567000" --- Iteration 10 -- - -Warning: convert_cyr_string() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: convert_cyr_string() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: convert_cyr_string() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -string(1) "1" --- Iteration 14 -- -string(0) "" --- Iteration 15 -- -string(1) "1" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(0) "" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(13) "sample object" --- Iteration 20 -- - -Warning: convert_cyr_string() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -string(0) "" --- Iteration 22 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/convert_uudecode_variation1.phpt b/ext/standard/tests/strings/convert_uudecode_variation1.phpt deleted file mode 100644 index 4c66f076a50a2..0000000000000 --- a/ext/standard/tests/strings/convert_uudecode_variation1.phpt +++ /dev/null @@ -1,161 +0,0 @@ ---TEST-- -Test convert_uudecode() function : usage variations - test values for $data argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing convert_uudecode() function: with unexpected inputs for 'data' argument *** --- Iteration 1 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 2 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 3 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 5 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 6 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 7 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 8 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 9 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 10 -- - -Warning: convert_uudecode() expects parameter 1 to be string, array given in %s on line %d -bool(false) --- Iteration 11 -- - -Warning: convert_uudecode() expects parameter 1 to be string, array given in %s on line %d -bool(false) --- Iteration 12 -- - -Warning: convert_uudecode() expects parameter 1 to be string, array given in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 14 -- -bool(false) --- Iteration 15 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 16 -- -bool(false) --- Iteration 17 -- -bool(false) --- Iteration 18 -- -bool(false) --- Iteration 19 -- - -Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d -bool(false) --- Iteration 20 -- - -Warning: convert_uudecode() expects parameter 1 to be string, resource given in %s on line %d -bool(false) --- Iteration 21 -- -bool(false) --- Iteration 22 -- -bool(false) -===DONE=== diff --git a/ext/standard/tests/strings/convert_uuencode_variation1.phpt b/ext/standard/tests/strings/convert_uuencode_variation1.phpt deleted file mode 100644 index c9ef4335be1f7..0000000000000 --- a/ext/standard/tests/strings/convert_uuencode_variation1.phpt +++ /dev/null @@ -1,137 +0,0 @@ ---TEST-- -Test convert_uuencode() function : usage variations - test values for $data argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing convert_uuencode() function: with unexpected inputs for 'data' argument *** --- Iteration 1 -- -string(16) "212c6060600a600a" --- Iteration 2 -- -string(16) "212c3060600a600a" --- Iteration 3 -- -string(16) "232c4334550a600a" --- Iteration 4 -- -string(16) "232c4334560a600a" --- Iteration 5 -- -string(40) "2a2c4324542d5330582c5338542d5060600a600a" --- Iteration 6 -- -string(40) "2b2b3328512d233c542e232c562d2340600a600a" --- Iteration 7 -- -string(24) "242c33604e2d3060600a600a" --- Iteration 8 -- -string(24) "252b3328502b4334600a600a" --- Iteration 9 -- -string(40) "2c2c3360512c432c542d3338572c2360500a600a" --- Iteration 10 -- - -Warning: convert_uuencode() expects parameter 1 to be string, array given in %s on line %d -string(0) "" --- Iteration 11 -- - -Warning: convert_uuencode() expects parameter 1 to be string, array given in %s on line %d -string(0) "" --- Iteration 12 -- - -Warning: convert_uuencode() expects parameter 1 to be string, array given in %s on line %d -string(0) "" --- Iteration 13 -- -string(16) "212c3060600a600a" --- Iteration 14 -- -string(0) "" --- Iteration 15 -- -string(16) "212c3060600a600a" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(0) "" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(48) "2d3c56254d3c26514528265d423a4635433d6060600a600a" --- Iteration 20 -- - -Warning: convert_uuencode() expects parameter 1 to be string, resource given in %s on line %d -string(0) "" --- Iteration 21 -- -string(0) "" --- Iteration 22 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/count_chars_variation1.phpt b/ext/standard/tests/strings/count_chars_variation1.phpt deleted file mode 100644 index 9e78219dbec86..0000000000000 --- a/ext/standard/tests/strings/count_chars_variation1.phpt +++ /dev/null @@ -1,262 +0,0 @@ ---TEST-- -Test count_chars() function : usage variations - test values for $string argument ---FILE-- - 0 - var_dump(count_chars($input, 1)); - $count ++; -} - -fclose($file_handle); //closing the file handle - -?> -===DONE=== ---EXPECTF-- -*** Testing count_chars() function: with unexpected inputs for 'string' argument *** --- Iteration 1 -- -array(1) { - [48]=> - int(1) -} --- Iteration 2 -- -array(1) { - [49]=> - int(1) -} --- Iteration 3 -- -array(2) { - [50]=> - int(1) - [53]=> - int(2) -} --- Iteration 4 -- -array(3) { - [50]=> - int(1) - [53]=> - int(1) - [54]=> - int(1) -} --- Iteration 5 -- -array(7) { - [49]=> - int(1) - [50]=> - int(1) - [51]=> - int(1) - [52]=> - int(3) - [54]=> - int(1) - [55]=> - int(2) - [56]=> - int(1) -} --- Iteration 6 -- -array(8) { - [45]=> - int(1) - [49]=> - int(1) - [50]=> - int(1) - [51]=> - int(1) - [52]=> - int(3) - [54]=> - int(1) - [55]=> - int(1) - [56]=> - int(2) -} --- Iteration 7 -- -array(4) { - [46]=> - int(1) - [48]=> - int(1) - [49]=> - int(1) - [53]=> - int(1) -} --- Iteration 8 -- -array(5) { - [45]=> - int(1) - [46]=> - int(1) - [48]=> - int(1) - [50]=> - int(1) - [53]=> - int(1) -} --- Iteration 9 -- -array(8) { - [48]=> - int(4) - [49]=> - int(2) - [50]=> - int(1) - [51]=> - int(1) - [52]=> - int(1) - [53]=> - int(1) - [54]=> - int(1) - [55]=> - int(1) -} --- Iteration 10 -- - -Warning: count_chars() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: count_chars() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: count_chars() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -array(1) { - [49]=> - int(1) -} --- Iteration 14 -- -array(0) { -} --- Iteration 15 -- -array(1) { - [49]=> - int(1) -} --- Iteration 16 -- -array(0) { -} --- Iteration 17 -- -array(0) { -} --- Iteration 18 -- -array(0) { -} --- Iteration 19 -- -array(12) { - [32]=> - int(1) - [97]=> - int(1) - [98]=> - int(1) - [99]=> - int(1) - [101]=> - int(2) - [106]=> - int(1) - [108]=> - int(1) - [109]=> - int(1) - [111]=> - int(1) - [112]=> - int(1) - [115]=> - int(1) - [116]=> - int(1) -} --- Iteration 20 -- - -Warning: count_chars() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -array(0) { -} --- Iteration 22 -- -array(0) { -} -===DONE=== diff --git a/ext/standard/tests/strings/count_chars_variation2.phpt b/ext/standard/tests/strings/count_chars_variation2.phpt deleted file mode 100644 index 986312a930866..0000000000000 --- a/ext/standard/tests/strings/count_chars_variation2.phpt +++ /dev/null @@ -1,164 +0,0 @@ ---TEST-- -Test count_chars() function : usage variations - test values for $mode argument ---SKIPIF-- - 0 - var_dump(is_array(count_chars($string, $input))); - $count ++; -} - - -?> -===DONE=== ---EXPECTF-- -*** Testing count_chars() function: with unexpected inputs for 'mode' argument *** --- Iteration 1 -- -bool(true) --- Iteration 2 -- -bool(true) --- Iteration 3 -- - -Warning: count_chars(): Unknown mode in %s on line %d -bool(false) --- Iteration 4 -- - -Warning: count_chars(): Unknown mode in %s on line %d -bool(false) --- Iteration 5 -- - -Warning: count_chars(): Unknown mode in %s on line %d -bool(false) --- Iteration 6 -- -bool(true) --- Iteration 7 -- -bool(true) --- Iteration 8 -- - -Warning: count_chars(): Unknown mode in %s on line %d -bool(false) --- Iteration 9 -- - -Warning: count_chars(): Unknown mode in %s on line %d -bool(false) --- Iteration 10 -- - -Warning: count_chars(): Unknown mode in %s on line %d -bool(false) --- Iteration 11 -- - -Warning: count_chars() expects parameter 2 to be int, array given in %s on line %d -bool(false) --- Iteration 12 -- - -Warning: count_chars() expects parameter 2 to be int, array given in %s on line %d -bool(false) --- Iteration 13 -- -bool(true) --- Iteration 14 -- -bool(true) --- Iteration 15 -- -bool(true) --- Iteration 16 -- -bool(true) --- Iteration 17 -- -bool(true) --- Iteration 18 -- -bool(true) --- Iteration 19 -- - -Warning: count_chars() expects parameter 2 to be int, string given in %s on line %d -bool(false) --- Iteration 20 -- - -Warning: count_chars() expects parameter 2 to be int, string given in %s on line %d -bool(false) --- Iteration 21 -- - -Notice: A non well formed numeric value encountered in %s on line %d -bool(true) --- Iteration 22 -- - -Notice: A non well formed numeric value encountered in %s on line %d - -Warning: count_chars(): Unknown mode in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: count_chars() expects parameter 2 to be int, object given in %s on line %d -bool(false) --- Iteration 24 -- -bool(true) --- Iteration 25 -- -bool(true) -===DONE=== diff --git a/ext/standard/tests/strings/crc32_variation1.phpt b/ext/standard/tests/strings/crc32_variation1.phpt deleted file mode 100644 index 21d3fbe0dcfc2..0000000000000 --- a/ext/standard/tests/strings/crc32_variation1.phpt +++ /dev/null @@ -1,196 +0,0 @@ ---TEST-- -Test crc32() function : usage variations - unexpected values ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new sample(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for str - -$count = 1; -foreach($values as $value) { - echo "\n-- Iteration $count --\n"; - var_dump( crc32($value) ); - $count++; -}; - -// closing the resource -fclose($file_handle); - -echo "Done"; -?> ---EXPECTF-- -*** Testing crc32() : with unexpected values for str argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - --- Iteration 1 -- -int(-186917087) - --- Iteration 2 -- -int(-2082672713) - --- Iteration 3 -- -int(-873121252) - --- Iteration 4 -- -int(1860518047) - --- Iteration 5 -- -int(269248583) - --- Iteration 6 -- -int(-834950157) - --- Iteration 7 -- -int(-965354630) - --- Iteration 8 -- -int(1376932222) - --- Iteration 9 -- -int(-2036403827) - --- Iteration 10 -- - -Warning: crc32() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: crc32() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: crc32() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: crc32() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: crc32() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 15 -- -int(0) - --- Iteration 16 -- -int(0) - --- Iteration 17 -- -int(-2082672713) - --- Iteration 18 -- -int(0) - --- Iteration 19 -- -int(-2082672713) - --- Iteration 20 -- -int(0) - --- Iteration 21 -- -int(0) - --- Iteration 22 -- -int(0) - --- Iteration 23 -- -int(-1465013268) - --- Iteration 24 -- -int(0) - --- Iteration 25 -- -int(0) - --- Iteration 26 -- - -Warning: crc32() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/explode_variation1.phpt b/ext/standard/tests/strings/explode_variation1.phpt deleted file mode 100644 index 7ced1dc822dbc..0000000000000 --- a/ext/standard/tests/strings/explode_variation1.phpt +++ /dev/null @@ -1,193 +0,0 @@ ---TEST-- -Test explode() function : usage variations - test values for $delimiter argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing explode() function: with unexpected inputs for 'delimiter' argument *** --- Iteration 1 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 2 -- -array(2) { - [0]=> - string(5) "piece" - [1]=> - string(35) " piece2 piece3 piece4 piece5 piece6" -} --- Iteration 3 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 4 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 5 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 6 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 7 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 8 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 9 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 10 -- - -Warning: explode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: explode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: explode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -array(2) { - [0]=> - string(5) "piece" - [1]=> - string(35) " piece2 piece3 piece4 piece5 piece6" -} --- Iteration 14 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) --- Iteration 15 -- -array(2) { - [0]=> - string(5) "piece" - [1]=> - string(35) " piece2 piece3 piece4 piece5 piece6" -} --- Iteration 16 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) --- Iteration 17 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) --- Iteration 19 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 20 -- - -Warning: explode() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: explode(): Empty delimiter in %s on line %d -bool(false) -===DONE=== diff --git a/ext/standard/tests/strings/explode_variation2.phpt b/ext/standard/tests/strings/explode_variation2.phpt deleted file mode 100644 index 9377f3084226c..0000000000000 --- a/ext/standard/tests/strings/explode_variation2.phpt +++ /dev/null @@ -1,195 +0,0 @@ ---TEST-- -Test explode() function : usage variations - test values for $string argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing explode() function: with unexpected inputs for 'string' argument *** --- Iteration 1 -- -array(1) { - [0]=> - string(1) "0" -} --- Iteration 2 -- -array(1) { - [0]=> - string(1) "1" -} --- Iteration 3 -- -array(1) { - [0]=> - string(3) "255" -} --- Iteration 4 -- -array(1) { - [0]=> - string(3) "256" -} --- Iteration 5 -- -array(1) { - [0]=> - string(10) "2147483647" -} --- Iteration 6 -- -array(1) { - [0]=> - string(11) "-2147483648" -} --- Iteration 7 -- -array(1) { - [0]=> - string(4) "10.5" -} --- Iteration 8 -- -array(1) { - [0]=> - string(5) "-20.5" -} --- Iteration 9 -- -array(1) { - [0]=> - string(12) "101234567000" -} --- Iteration 10 -- - -Warning: explode() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: explode() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: explode() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -array(1) { - [0]=> - string(1) "1" -} --- Iteration 14 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 15 -- -array(1) { - [0]=> - string(1) "1" -} --- Iteration 16 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 17 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 18 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 19 -- -array(2) { - [0]=> - string(6) "sample" - [1]=> - string(6) "object" -} --- Iteration 20 -- - -Warning: explode() expects parameter 2 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 22 -- -array(1) { - [0]=> - string(0) "" -} -===DONE=== diff --git a/ext/standard/tests/strings/explode_variation3.phpt b/ext/standard/tests/strings/explode_variation3.phpt deleted file mode 100644 index 34c1cdffc32ad..0000000000000 --- a/ext/standard/tests/strings/explode_variation3.phpt +++ /dev/null @@ -1,238 +0,0 @@ ---TEST-- -Test explode() function : usage variations - test values for $limit argument ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing explode() function: with unexpected inputs for 'limit' argument *** --- Iteration 1 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 2 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 3 -- -array(6) { - [0]=> - string(6) "piece1" - [1]=> - string(6) "piece2" - [2]=> - string(6) "piece3" - [3]=> - string(6) "piece4" - [4]=> - string(6) "piece5" - [5]=> - string(6) "piece6" -} --- Iteration 4 -- -array(6) { - [0]=> - string(6) "piece1" - [1]=> - string(6) "piece2" - [2]=> - string(6) "piece3" - [3]=> - string(6) "piece4" - [4]=> - string(6) "piece5" - [5]=> - string(6) "piece6" -} --- Iteration 5 -- -array(6) { - [0]=> - string(6) "piece1" - [1]=> - string(6) "piece2" - [2]=> - string(6) "piece3" - [3]=> - string(6) "piece4" - [4]=> - string(6) "piece5" - [5]=> - string(6) "piece6" -} --- Iteration 6 -- -array(0) { -} --- Iteration 7 -- -array(6) { - [0]=> - string(6) "piece1" - [1]=> - string(6) "piece2" - [2]=> - string(6) "piece3" - [3]=> - string(6) "piece4" - [4]=> - string(6) "piece5" - [5]=> - string(6) "piece6" -} --- Iteration 8 -- -array(0) { -} --- Iteration 9 -- -array(6) { - [0]=> - string(6) "piece1" - [1]=> - string(6) "piece2" - [2]=> - string(6) "piece3" - [3]=> - string(6) "piece4" - [4]=> - string(6) "piece5" - [5]=> - string(6) "piece6" -} --- Iteration 10 -- - -Warning: explode() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: explode() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: explode() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 13 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 14 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 15 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 16 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 17 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 18 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 19 -- - -Warning: explode() expects parameter 3 to be int, object given in %s on line %d -NULL --- Iteration 20 -- - -Warning: explode() expects parameter 3 to be int, resource given in %s on line %d -NULL --- Iteration 21 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} --- Iteration 22 -- -array(1) { - [0]=> - string(41) "piece1 piece2 piece3 piece4 piece5 piece6" -} -===Done=== diff --git a/ext/standard/tests/strings/get_html_translation_table_variation1.phpt b/ext/standard/tests/strings/get_html_translation_table_variation1.phpt deleted file mode 100644 index 0794853e8e1d2..0000000000000 --- a/ext/standard/tests/strings/get_html_translation_table_variation1.phpt +++ /dev/null @@ -1,316 +0,0 @@ ---TEST-- -Test get_html_translation_table() function : usage variations - unexpected table values ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // string values - "string", - 'string', - - // objects - new stdclass(), - - // empty string - "", - '', - - // null values - NULL, - null, - - // resource var - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop through each element of the array and check the working of get_html_translation_table() -// when $table argument is supplied with different values -echo "\n--- Testing get_html_translation_table() by supplying different values for 'table' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $table = $values [$index]; - - $v = get_html_translation_table($table, ENT_COMPAT, "UTF-8"); - if (is_array($v) && count($v) > 100) - var_dump(count($v)); - elseif (is_array($v)) { - asort($v); - var_dump($v); - } else { - var_dump($v); - } - - $v = get_html_translation_table($table, $quote_style, "UTF-8"); - if (is_array($v) && count($v) > 100) - var_dump(count($v)); - elseif (is_array($v)) { - asort($v); - var_dump($v); - } else { - var_dump($v); - } - - $counter ++; -} - -// close resource -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing get_html_translation_table() : usage variations *** - ---- Testing get_html_translation_table() by supplying different values for 'table' argument --- --- Iteration 1 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 2 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 3 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 4 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 5 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, array given in %s on line %d -NULL --- Iteration 6 -- -int(252) -int(252) --- Iteration 7 -- -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} --- Iteration 8 -- -int(252) -int(252) --- Iteration 9 -- -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} --- Iteration 10 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 11 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 12 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, object given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, object given in %s on line %d -NULL --- Iteration 13 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 14 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, string given in %s on line %d -NULL --- Iteration 15 -- -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} --- Iteration 16 -- -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} --- Iteration 17 -- - -Warning: get_html_translation_table() expects parameter 1 to be int, resource given in %s on line %d -NULL - -Warning: get_html_translation_table() expects parameter 1 to be int, resource given in %s on line %d -NULL --- Iteration 18 -- -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} --- Iteration 19 -- -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} -array(4) { - ["&"]=> - string(5) "&" - [">"]=> - string(4) ">" - ["<"]=> - string(4) "<" - ["""]=> - string(6) """ -} -Done diff --git a/ext/standard/tests/strings/get_html_translation_table_variation2.phpt b/ext/standard/tests/strings/get_html_translation_table_variation2.phpt deleted file mode 100644 index 8d9fe0af5636a..0000000000000 --- a/ext/standard/tests/strings/get_html_translation_table_variation2.phpt +++ /dev/null @@ -1,209 +0,0 @@ ---TEST-- -Test get_html_translation_table() function : usage variations - unexpected quote_style values ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // string values - "string", - 'string', - - // objects - new stdclass(), - - // empty string - "", - '', - - // null values - NULL, - null, - - // resource var - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop through each element of the array and check the working of get_html_translation_table() -// when $quote_style argument is supplied with different values -echo "\n--- Testing get_html_translation_table() by supplying different values for 'quote_style' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $quote_style = $values [$index]; - - var_dump( get_html_translation_table($table, $quote_style) ); - - $counter ++; -} - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing get_html_translation_table() : usage variations *** - ---- Testing get_html_translation_table() by supplying different values for 'quote_style' argument --- --- Iteration 1 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 2 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 3 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 4 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 5 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 6 -- -array(4) { - ["&"]=> - string(5) "&" - ["'"]=> - string(6) "'" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" -} --- Iteration 7 -- -array(3) { - ["&"]=> - string(5) "&" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" -} --- Iteration 8 -- -array(4) { - ["&"]=> - string(5) "&" - ["'"]=> - string(6) "'" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" -} --- Iteration 9 -- -array(3) { - ["&"]=> - string(5) "&" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" -} --- Iteration 10 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 11 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 12 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, object given in %s on line %d -NULL --- Iteration 13 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 14 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 15 -- -array(3) { - ["&"]=> - string(5) "&" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" -} --- Iteration 16 -- -array(3) { - ["&"]=> - string(5) "&" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" -} --- Iteration 17 -- - -Warning: get_html_translation_table() expects parameter 2 to be int, resource given in %s on line %d -NULL --- Iteration 18 -- -array(3) { - ["&"]=> - string(5) "&" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" -} --- Iteration 19 -- -array(3) { - ["&"]=> - string(5) "&" - ["<"]=> - string(4) "<" - [">"]=> - string(4) ">" -} -Done diff --git a/ext/standard/tests/strings/hebrev_variation1.phpt b/ext/standard/tests/strings/hebrev_variation1.phpt deleted file mode 100644 index 33fd974eb7c7a..0000000000000 --- a/ext/standard/tests/strings/hebrev_variation1.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test hebrev() function : usage variations - test values for $hebrew_text argument ---FILE-- -', - - // text with a less than char - 'text with a less than char <' -); - -// loop through with each element of the $texts array to test hebrev() function -$count = 1; - -foreach($texts as $hebrew_text) { - echo "-- Iteration $count --\n"; - var_dump( hebrev($hebrew_text) ); - $count ++; -} - -fclose($file_handle); //closing the file handle - -?> -===DONE=== ---EXPECTF-- -*** Testing hebrev() function: with unexpected inputs for 'hebrew_text' argument *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(3) "255" --- Iteration 4 -- -string(3) "256" --- Iteration 5 -- -string(10) "2147483647" --- Iteration 6 -- -string(11) "-2147483648" --- Iteration 7 -- -string(4) "10.5" --- Iteration 8 -- -string(5) "-20.5" --- Iteration 9 -- -string(10) "1012345.67" --- Iteration 10 -- - -Warning: hebrev() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: hebrev() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: hebrev() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -string(1) "1" --- Iteration 14 -- -bool(false) --- Iteration 15 -- -string(1) "1" --- Iteration 16 -- -bool(false) --- Iteration 17 -- -bool(false) --- Iteration 18 -- -bool(false) --- Iteration 19 -- -string(13) "sample object" --- Iteration 20 -- - -Warning: hebrev() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -bool(false) --- Iteration 22 -- -bool(false) --- Iteration 23 -- -string(23) ") text with parentheses" --- Iteration 24 -- -string(23) "( text with parentheses" --- Iteration 25 -- -string(19) "] text with bracket" --- Iteration 26 -- -string(19) "[ text with bracket" --- Iteration 27 -- -string(25) "} text with curly bracket" --- Iteration 28 -- -string(25) "{ text with curly bracket" --- Iteration 29 -- -string(28) "/ text with backslash escape" --- Iteration 30 -- -string(24) "text with a slash char /" --- Iteration 31 -- -string(31) "< text with a greater than char" --- Iteration 32 -- -string(28) "> text with a less than char" -===DONE=== diff --git a/ext/standard/tests/strings/hebrev_variation2.phpt b/ext/standard/tests/strings/hebrev_variation2.phpt deleted file mode 100644 index f312472c82ad2..0000000000000 --- a/ext/standard/tests/strings/hebrev_variation2.phpt +++ /dev/null @@ -1,283 +0,0 @@ ---TEST-- -Test hebrev() function : usage variations - test values for $max_chars_per_line argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing hebrev() function: with unexpected inputs for 'max_chars_per_line' argument *** --- Iteration 1 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 2 -- -string(109) "xttel uaisv -tot ext -ewbrHel cagilos rtveonc -ontincfuv reebh -he.Ts -rdwog inakreb -idvoa -tos ietrn ioctunf -he.T -" --- Iteration 3 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 4 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 5 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 6 -- -string(109) "txet -lausiv -ot -txet -werbeH -lacigol -strevnoc -noitcnuf -verbeh -ehT. -sdrow -gnikaerb -diova -ot -seirt -noitcnuf -ehT. -" --- Iteration 7 -- -string(109) "text -to visual -text -Hebrew -logical -converts -function -hebrev -.The -words -breaking -to avoid -tries -function -.The -" --- Iteration 8 -- -string(109) "txet -lausiv -ot -txet -werbeH -lacigol -strevnoc -noitcnuf -verbeh -ehT. -sdrow -gnikaerb -diova -ot -seirt -noitcnuf -ehT. -" --- Iteration 9 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 10 -- - -Warning: hebrev() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: hebrev() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: hebrev() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 13 -- -string(109) "xttel uaisv -tot ext -ewbrHel cagilos rtveonc -ontincfuv reebh -he.Ts -rdwog inakreb -idvoa -tos ietrn ioctunf -he.T -" --- Iteration 14 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 15 -- -string(109) "xttel uaisv -tot ext -ewbrHel cagilos rtveonc -ontincfuv reebh -he.Ts -rdwog inakreb -idvoa -tos ietrn ioctunf -he.T -" --- Iteration 16 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 17 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 18 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 19 -- - -Warning: hebrev() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: hebrev() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 21 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string(109) "textual vis -to -textrew Heb -icallog -ertsconvion unctf -brevhe -.Therds -wo -kingbreaoid av -to -riest -tionfuncThe . -" --- Iteration 22 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 23 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 24 -- - -Warning: hebrev() expects parameter 2 to be int, object given in %s on line %d -NULL --- Iteration 25 -- - -Warning: hebrev() expects parameter 2 to be int, resource given in %s on line %d -NULL --- Iteration 26 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" --- Iteration 27 -- -string(109) ".The hebrev function converts logical Hebrew text to visual text -.The function tries to avoid breaking words -" -===DONE=== diff --git a/ext/standard/tests/strings/hebrevc_variation1.phpt b/ext/standard/tests/strings/hebrevc_variation1.phpt deleted file mode 100644 index c16780e769c14..0000000000000 --- a/ext/standard/tests/strings/hebrevc_variation1.phpt +++ /dev/null @@ -1,138 +0,0 @@ ---TEST-- -Test hebrevc() function : usage variations - test values for $hebrew_text argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing hebrevc() function: with unexpected inputs for 'hebrew_text' argument *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(3) "255" --- Iteration 4 -- -string(3) "256" --- Iteration 5 -- -string(10) "2147483647" --- Iteration 6 -- -string(11) "-2147483648" --- Iteration 7 -- -string(4) "10.5" --- Iteration 8 -- -string(5) "-20.5" --- Iteration 9 -- -string(10) "1012345.67" --- Iteration 10 -- - -Warning: hebrevc() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: hebrevc() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: hebrevc() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -string(1) "1" --- Iteration 14 -- -bool(false) --- Iteration 15 -- -string(1) "1" --- Iteration 16 -- -bool(false) --- Iteration 17 -- -bool(false) --- Iteration 18 -- -bool(false) --- Iteration 19 -- -string(13) "sample object" --- Iteration 20 -- - -Warning: hebrevc() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -bool(false) --- Iteration 22 -- -bool(false) -===DONE=== diff --git a/ext/standard/tests/strings/hebrevc_variation2.phpt b/ext/standard/tests/strings/hebrevc_variation2.phpt deleted file mode 100644 index 334d128989cf0..0000000000000 --- a/ext/standard/tests/strings/hebrevc_variation2.phpt +++ /dev/null @@ -1,414 +0,0 @@ ---TEST-- -Test hebrevc() function : usage variations - test values for $max_chars_per_line argument ---FILE-- -\n'.\nThe function tries to avoid breaking words.\n"; - -foreach($inputs as $max_chars_per_line) { - echo "-- Iteration $count --\n"; - var_dump( hebrevc($hebrew_text, $max_chars_per_line) ); - $count ++; -} - -fclose($file_handle); //closing the file handle - -?> -===DONE=== ---EXPECTF-- -*** Testing hebrevc() function: with unexpected inputs for 'max_chars_per_line' argument *** --- Iteration 1 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 2 -- -string(331) "xttel uaisv
-tot ext
-ewbrHel cagilos rtveonc
-ontincfuc vcreebh
-he.Ts
-neliewn
-tsernvcot i
-atthe ncrefeifd
-het
-thwi) c(evbrheo t
-arilims
-isn ioctunf
-isTh) (
-r -to<
-.'s
-rdwog inakreb
-idvoa
-tos ietrn ioctunf
-he.T
-" --- Iteration 3 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 4 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 5 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 6 -- -string(421) "txet
-lausiv
-ot
-txet
-werbeH
-lacigol
-strevnoc
-noitcnuf
-ccverbeh
-ehT.
-senilwen
-strevnoc
-ti
-taht
-ecnereffid
-eht
-htiw
-)(cverbeh
-ot
-ralimis
-si
-noitcnuf
-sihT
-)
-(
-rb<'
-ot<
-'.
-sdrow
-gnikaerb
-diova
-ot
-seirt
-noitcnuf
-ehT.
-" --- Iteration 7 -- -string(373) "text
-to visual
-text
-Hebrew
-logical
-converts
-function
-hebrevcc
-.The
-newlines
-converts
-that it
-difference
-with the
-hebrevc()
-similar to
-is
-function
-) This
- -.'
-words
-breaking
-to avoid
-tries
-function
-.The
-" --- Iteration 8 -- -string(421) "txet
-lausiv
-ot
-txet
-werbeH
-lacigol
-strevnoc
-noitcnuf
-ccverbeh
-ehT.
-senilwen
-strevnoc
-ti
-taht
-ecnereffid
-eht
-htiw
-)(cverbeh
-ot
-ralimis
-si
-noitcnuf
-sihT
-)
-(
-rb<'
-ot<
-'.
-sdrow
-gnikaerb
-diova
-ot
-seirt
-noitcnuf
-ehT.
-" --- Iteration 9 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 10 -- - -Warning: hebrevc() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: hebrevc() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: hebrevc() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 13 -- -string(331) "xttel uaisv
-tot ext
-ewbrHel cagilos rtveonc
-ontincfuc vcreebh
-he.Ts
-neliewn
-tsernvcot i
-atthe ncrefeifd
-het
-thwi) c(evbrheo t
-arilims
-isn ioctunf
-isTh) (
-r -to<
-.'s
-rdwog inakreb
-idvoa
-tos ietrn ioctunf
-he.T
-" --- Iteration 14 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 15 -- -string(331) "xttel uaisv
-tot ext
-ewbrHel cagilos rtveonc
-ontincfuc vcreebh
-he.Ts
-neliewn
-tsernvcot i
-atthe ncrefeifd
-het
-thwi) c(evbrheo t
-arilims
-isn ioctunf
-isTh) (
-r -to<
-.'s
-rdwog inakreb
-idvoa
-tos ietrn ioctunf
-he.T
-" --- Iteration 16 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 17 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 18 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 19 -- - -Warning: hebrevc() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: hebrevc() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 21 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string(349) "textual vis
-to
-textrew Heb
-icallog
-ertsconvion unctf
-evcchebrThe .
-inesnewlrts onvec
-it
-thatnce feredif
-the
-withc() brevhe
-to
-ilarsim
-is
-tionfunchis ) T
-(
-' -
-ordsw
-kingbreaoid av
-to
-riest
-tionfuncThe .
-" --- Iteration 22 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 23 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 24 -- - -Warning: hebrevc() expects parameter 2 to be int, object given in %s on line %d -NULL --- Iteration 25 -- - -Warning: hebrevc() expects parameter 2 to be int, resource given in %s on line %d -NULL --- Iteration 26 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" --- Iteration 27 -- -string(241) ".The hebrevcc function converts logical Hebrew text to visual text
-) This function is similar to hebrevc() with the difference that it converts newlines
- -.'
-.The function tries to avoid breaking words
-" -===DONE=== diff --git a/ext/standard/tests/strings/htmlspecialchars_decode_variation1.phpt b/ext/standard/tests/strings/htmlspecialchars_decode_variation1.phpt deleted file mode 100644 index 35719186e4c97..0000000000000 --- a/ext/standard/tests/strings/htmlspecialchars_decode_variation1.phpt +++ /dev/null @@ -1,161 +0,0 @@ ---TEST-- -Test htmlspecialchars_decode() function : usage variations - unexpected values for 'string' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new classA(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - //resource - $file_handle -); - -// loop through each element of the array for string -$iterator = 1; -foreach($values as $value) { - echo "-- Iterator $iterator --\n"; - var_dump( htmlspecialchars_decode($value) ); - $iterator++; -}; - -// close the file resource used -fclose($file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing htmlspecialchars_decode() : usage variations *** --- Iterator 1 -- -string(1) "0" --- Iterator 2 -- -string(1) "1" --- Iterator 3 -- -string(5) "12345" --- Iterator 4 -- -string(5) "-2345" --- Iterator 5 -- -string(4) "10.5" --- Iterator 6 -- -string(5) "-10.5" --- Iterator 7 -- -string(12) "101234567000" --- Iterator 8 -- -string(13) "1.07654321E-9" --- Iterator 9 -- -string(3) "0.5" --- Iterator 10 -- - -Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iterator 11 -- - -Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iterator 12 -- - -Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iterator 13 -- - -Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iterator 14 -- - -Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iterator 15 -- -string(0) "" --- Iterator 16 -- -string(0) "" --- Iterator 17 -- -string(1) "1" --- Iterator 18 -- -string(0) "" --- Iterator 19 -- -string(1) "1" --- Iterator 20 -- -string(0) "" --- Iterator 21 -- -string(0) "" --- Iterator 22 -- -string(0) "" --- Iterator 23 -- -string(12) "ClassAObject" --- Iterator 24 -- -string(0) "" --- Iterator 25 -- -string(0) "" --- Iterator 26 -- - -Warning: htmlspecialchars_decode() expects parameter 1 to be string, resource given in %s on line %d -NULL -===DONE=== - diff --git a/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt b/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt deleted file mode 100644 index 4a8f165e9c673..0000000000000 --- a/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt +++ /dev/null @@ -1,193 +0,0 @@ ---TEST-- -Test htmlspecialchars_decode() function : usage variations - unexpected values for 'quote_style' argument ---FILE-- - Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string " -$string = "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string ""; - -//get a class -class classA { - function __toString() { - return "Class A Object"; - } -} - -//get a resource variable -$file_handle = fopen(__FILE__, "r"); - -//get an unset variable -$unset_var = 10; -unset($unset_var); - -//array of values to iterate over -$values = array( - - // float data - 10.5, - -10.5, - 10.5e20, - 10.6E-10, - .5, - - // array data - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new classA(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - //resource - $file_handle -); - -// loop through each element of the array for quote_style -$iterator = 1; -foreach($values as $value) { - echo "\n-- Iteration $iterator --\n"; - var_dump( htmlspecialchars_decode($string, $value) ); - $iterator++; -} - -// close the file resource used -fclose($file_handle); - -echo "Done"; -?> ---EXPECTF-- -*** Testing htmlspecialchars_decode() : usage variations *** - --- Iteration 1 -- -string(104) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 2 -- -string(104) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 3 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, float given in %s on line %d -NULL - --- Iteration 4 -- -string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 5 -- -string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 6 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, array given in %shtmlspecialchars_decode_variation2.php on line %d -NULL - --- Iteration 7 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, array given in %shtmlspecialchars_decode_variation2.php on line %d -NULL - --- Iteration 8 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, array given in %shtmlspecialchars_decode_variation2.php on line %d -NULL - --- Iteration 9 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, array given in %shtmlspecialchars_decode_variation2.php on line %d -NULL - --- Iteration 10 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, array given in %shtmlspecialchars_decode_variation2.php on line %d -NULL - --- Iteration 11 -- -string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 12 -- -string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 13 -- -string(104) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 14 -- -string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 15 -- -string(104) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 16 -- -string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 17 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, string given in %shtmlspecialchars_decode_variation2.php on line %d -NULL - --- Iteration 18 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, string given in %shtmlspecialchars_decode_variation2.php on line %d -NULL - --- Iteration 19 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, string given in %shtmlspecialchars_decode_variation2.php on line %d -NULL - --- Iteration 20 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, string given in %shtmlspecialchars_decode_variation2.php on line %d -NULL - --- Iteration 21 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, object given in %shtmlspecialchars_decode_variation2.php on line %d -NULL - --- Iteration 22 -- -string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 23 -- -string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" - --- Iteration 24 -- - -Warning: htmlspecialchars_decode() expects parameter 2 to be int, resource given in %shtmlspecialchars_decode_variation2.php on line %d -NULL -Done diff --git a/ext/standard/tests/strings/ltrim_variation1.phpt b/ext/standard/tests/strings/ltrim_variation1.phpt deleted file mode 100644 index f476b9b7938e2..0000000000000 --- a/ext/standard/tests/strings/ltrim_variation1.phpt +++ /dev/null @@ -1,138 +0,0 @@ ---TEST-- -Test ltrim() function : usage variations - test values for $str argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing ltrim() function: with unexpected inputs for 'str' argument *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(3) "255" --- Iteration 4 -- -string(3) "256" --- Iteration 5 -- -string(10) "2147483647" --- Iteration 6 -- -string(10) "2147483648" --- Iteration 7 -- -string(4) "10.5" --- Iteration 8 -- -string(4) "20.5" --- Iteration 9 -- -string(12) "101234567000" --- Iteration 10 -- - -Warning: ltrim() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: ltrim() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: ltrim() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -string(1) "1" --- Iteration 14 -- -string(0) "" --- Iteration 15 -- -string(1) "1" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(0) "" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(15) "sample object " --- Iteration 20 -- - -Warning: ltrim() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -string(0) "" --- Iteration 22 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/ltrim_variation2.phpt b/ext/standard/tests/strings/ltrim_variation2.phpt deleted file mode 100644 index 5dc260e8a14a1..0000000000000 --- a/ext/standard/tests/strings/ltrim_variation2.phpt +++ /dev/null @@ -1,138 +0,0 @@ ---TEST-- -Test ltrim() function : usage variations - test values for $charlist argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing ltrim() function: with unexpected inputs for 'charlist' argument *** --- Iteration 1 -- -string(19) "!---Hello World---!" --- Iteration 2 -- -string(19) "!---Hello World---!" --- Iteration 3 -- -string(19) "!---Hello World---!" --- Iteration 4 -- -string(19) "!---Hello World---!" --- Iteration 5 -- -string(19) "!---Hello World---!" --- Iteration 6 -- -string(19) "!---Hello World---!" --- Iteration 7 -- -string(19) "!---Hello World---!" --- Iteration 8 -- -string(19) "!---Hello World---!" --- Iteration 9 -- -string(19) "!---Hello World---!" --- Iteration 10 -- - -Warning: ltrim() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: ltrim() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: ltrim() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -string(19) "!---Hello World---!" --- Iteration 14 -- -string(19) "!---Hello World---!" --- Iteration 15 -- -string(19) "!---Hello World---!" --- Iteration 16 -- -string(19) "!---Hello World---!" --- Iteration 17 -- -string(19) "!---Hello World---!" --- Iteration 18 -- -string(19) "!---Hello World---!" --- Iteration 19 -- -string(19) "!---Hello World---!" --- Iteration 20 -- - -Warning: ltrim() expects parameter 2 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -string(19) "!---Hello World---!" --- Iteration 22 -- -string(19) "!---Hello World---!" -===DONE=== diff --git a/ext/standard/tests/strings/money_format_variation1.phpt b/ext/standard/tests/strings/money_format_variation1.phpt deleted file mode 100644 index 4a381c183a7a3..0000000000000 --- a/ext/standard/tests/strings/money_format_variation1.phpt +++ /dev/null @@ -1,172 +0,0 @@ ---TEST-- -Test money_format() function : usage variations - test values for $format argument ---SKIPIF-- - ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing money_format() function: with unexpected inputs for 'format' argument *** --- Iteration 1 -- -string --- Iteration 2 -- -string --- Iteration 3 -- -string --- Iteration 4 -- -string --- Iteration 5 -- -string --- Iteration 6 -- -string --- Iteration 7 -- -string --- Iteration 8 -- -string --- Iteration 9 -- -string --- Iteration 10 -- - -Warning: money_format() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: money_format() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: money_format() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -string --- Iteration 14 -- -string --- Iteration 15 -- -string --- Iteration 16 -- -string --- Iteration 17 -- -string --- Iteration 18 -- -string --- Iteration 19 -- -string --- Iteration 20 -- -string --- Iteration 21 -- -string --- Iteration 22 -- -string --- Iteration 23 -- - -Warning: money_format() expects parameter 1 to be string, object given in %s on line %d -NULL --- Iteration 24 -- -string --- Iteration 25 -- - -Warning: money_format() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 26 -- -string --- Iteration 27 -- -string -===Done=== diff --git a/ext/standard/tests/strings/money_format_variation2.phpt b/ext/standard/tests/strings/money_format_variation2.phpt deleted file mode 100644 index c8de58bded07f..0000000000000 --- a/ext/standard/tests/strings/money_format_variation2.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test money_format() function : usage variations - test values for $number argument ---SKIPIF-- - ---FILE-- - -===Done=== ---EXPECTF-- -*** Testing money_format() function: with unexpected inputs for 'number' argument *** --- Iteration 1 -- -string --- Iteration 2 -- -string --- Iteration 3 -- -string --- Iteration 4 -- -string --- Iteration 5 -- -string --- Iteration 6 -- -string --- Iteration 7 -- -string --- Iteration 8 -- -string --- Iteration 9 -- -string --- Iteration 10 -- - -Warning: money_format() expects parameter 2 to be float, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: money_format() expects parameter 2 to be float, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: money_format() expects parameter 2 to be float, array given in %s on line %d -NULL --- Iteration 13 -- -string --- Iteration 14 -- -string --- Iteration 15 -- -string --- Iteration 16 -- -string --- Iteration 17 -- -string --- Iteration 18 -- -string --- Iteration 19 -- - -Warning: money_format() expects parameter 2 to be float, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: money_format() expects parameter 2 to be float, string given in %s on line %d -NULL --- Iteration 21 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string --- Iteration 22 -- - -Warning: money_format() expects parameter 2 to be float, string given in %s on line %d -NULL --- Iteration 23 -- - -Warning: money_format() expects parameter 2 to be float, object given in %s on line %d -NULL --- Iteration 24 -- - -Warning: money_format() expects parameter 2 to be float, object given in %s on line %d -NULL --- Iteration 25 -- - -Warning: money_format() expects parameter 2 to be float, resource given in %s on line %d -NULL --- Iteration 26 -- -string --- Iteration 27 -- -string -===Done=== diff --git a/ext/standard/tests/strings/nl2br_variation5.phpt b/ext/standard/tests/strings/nl2br_variation5.phpt deleted file mode 100644 index 06a70cbc41044..0000000000000 --- a/ext/standard/tests/strings/nl2br_variation5.phpt +++ /dev/null @@ -1,152 +0,0 @@ ---TEST-- -Test nl2br() function : usage variations - unexpected values for 'str' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - //resource - $file_handle, - - // object data - new Sample(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, -); - -// loop through $values array to test nl2br() function with each element -$count = 1; -foreach($values as $value) { - echo "-- Iteration $count --\n"; - var_dump( nl2br($value) ); - $count ++ ; -}; - -//closing the file handle -fclose( $file_handle ); - -echo "Done"; -?> ---EXPECTF-- -*** Testing nl2br() : usage variations *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(5) "12345" --- Iteration 4 -- -string(5) "-2345" --- Iteration 5 -- -string(4) "10.5" --- Iteration 6 -- -string(5) "-10.5" --- Iteration 7 -- -string(12) "105000000000" --- Iteration 8 -- -string(7) "1.06E-9" --- Iteration 9 -- -string(3) "0.5" --- Iteration 10 -- - -Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: nl2br() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(0) "" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(1) "1" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(1) "1" --- Iteration 20 -- -string(0) "" --- Iteration 21 -- - -Warning: nl2br() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 22 -- -string(9) "My String" --- Iteration 23 -- -string(0) "" --- Iteration 24 -- -string(0) "" -Done diff --git a/ext/standard/tests/strings/ord_variation1.phpt b/ext/standard/tests/strings/ord_variation1.phpt deleted file mode 100644 index ffca230dbaa36..0000000000000 --- a/ext/standard/tests/strings/ord_variation1.phpt +++ /dev/null @@ -1,136 +0,0 @@ ---TEST-- -Test ord() function : usage variations - test values for $string argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing ord() function: with unexpected inputs for 'string' argument *** --- Iteration 1 -- -int(48) --- Iteration 2 -- -int(49) --- Iteration 3 -- -int(50) --- Iteration 4 -- -int(50) --- Iteration 5 -- -int(50) --- Iteration 6 -- -int(45) --- Iteration 7 -- -int(49) --- Iteration 8 -- -int(45) --- Iteration 9 -- -int(49) --- Iteration 10 -- - -Warning: ord() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: ord() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: ord() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -int(49) --- Iteration 14 -- -int(0) --- Iteration 15 -- -int(49) --- Iteration 16 -- -int(0) --- Iteration 17 -- -int(0) --- Iteration 18 -- -int(0) --- Iteration 19 -- -int(115) --- Iteration 20 -- - -Warning: ord() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -int(0) --- Iteration 22 -- -int(0) -===DONE=== diff --git a/ext/standard/tests/strings/quoted_printable_decode_variation1.phpt b/ext/standard/tests/strings/quoted_printable_decode_variation1.phpt deleted file mode 100644 index 8d147c0e67315..0000000000000 --- a/ext/standard/tests/strings/quoted_printable_decode_variation1.phpt +++ /dev/null @@ -1,191 +0,0 @@ ---TEST-- -Test quoted_printable_decode() function : usage variations - unexpected values for 'str' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data -/*15*/ NULL, - null, - - // boolean data -/*17*/ true, - false, - TRUE, - FALSE, - - // empty data -/*21*/ "", - '', - - // object data -/*23*/ new sample(), - - // undefined data -/*24*/ @$undefined_var, - - // unset data -/*25*/ @$unset_var, - - // resource data -/*26*/ $file_handle -); - -// loop through each element of the array for 'str' - -$count = 1; -foreach($values as $value) { - echo "\n-- Iteration $count --\n"; - var_dump(bin2hex(quoted_printable_decode($value))); - $count++; -}; - -// close the resource -fclose($file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing quoted_printable_decode() : with unexpected values for 'str' argument *** - --- Iteration 1 -- -string(2) "30" - --- Iteration 2 -- -string(2) "31" - --- Iteration 3 -- -string(10) "3132333435" - --- Iteration 4 -- -string(10) "2d32333435" - --- Iteration 5 -- -string(8) "31302e35" - --- Iteration 6 -- -string(10) "2d31302e35" - --- Iteration 7 -- -string(24) "313031323334353637303030" - --- Iteration 8 -- -string(26) "312e3037363534333231452d39" - --- Iteration 9 -- -string(6) "302e35" - --- Iteration 10 -- - -Warning: quoted_printable_decode() expects parameter 1 to be string, array given in %s on line %d -string(0) "" - --- Iteration 11 -- - -Warning: quoted_printable_decode() expects parameter 1 to be string, array given in %s on line %d -string(0) "" - --- Iteration 12 -- - -Warning: quoted_printable_decode() expects parameter 1 to be string, array given in %s on line %d -string(0) "" - --- Iteration 13 -- - -Warning: quoted_printable_decode() expects parameter 1 to be string, array given in %s on line %d -string(0) "" - --- Iteration 14 -- - -Warning: quoted_printable_decode() expects parameter 1 to be string, array given in %s on line %d -string(0) "" - --- Iteration 15 -- -string(0) "" - --- Iteration 16 -- -string(0) "" - --- Iteration 17 -- -string(2) "31" - --- Iteration 18 -- -string(0) "" - --- Iteration 19 -- -string(2) "31" - --- Iteration 20 -- -string(0) "" - --- Iteration 21 -- -string(0) "" - --- Iteration 22 -- -string(0) "" - --- Iteration 23 -- -string(12) "4f626a656374" - --- Iteration 24 -- -string(0) "" - --- Iteration 25 -- -string(0) "" - --- Iteration 26 -- - -Warning: quoted_printable_decode() expects parameter 1 to be string, resource given in %s on line %d -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/rtrim_variation1.phpt b/ext/standard/tests/strings/rtrim_variation1.phpt deleted file mode 100644 index f07b7db3df1ce..0000000000000 --- a/ext/standard/tests/strings/rtrim_variation1.phpt +++ /dev/null @@ -1,138 +0,0 @@ ---TEST-- -Test rtrim() function : usage variations - test values for $str argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing rtrim() function: with unexpected inputs for 'str' argument *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(3) "255" --- Iteration 4 -- -string(3) "256" --- Iteration 5 -- -string(10) "2147483647" --- Iteration 6 -- -string(11) "-2147483648" --- Iteration 7 -- -string(4) "10.5" --- Iteration 8 -- -string(5) "-20.5" --- Iteration 9 -- -string(12) "101234567000" --- Iteration 10 -- - -Warning: rtrim() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: rtrim() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: rtrim() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -string(1) "1" --- Iteration 14 -- -string(0) "" --- Iteration 15 -- -string(1) "1" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(0) "" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(19) " !---sample object" --- Iteration 20 -- - -Warning: rtrim() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -string(0) "" --- Iteration 22 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/rtrim_variation2.phpt b/ext/standard/tests/strings/rtrim_variation2.phpt deleted file mode 100644 index 70efd09f2bb5b..0000000000000 --- a/ext/standard/tests/strings/rtrim_variation2.phpt +++ /dev/null @@ -1,138 +0,0 @@ ---TEST-- -Test rtrim() function : usage variations - test values for $charlist argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing rtrim() function: with unexpected inputs for 'charlist' argument *** --- Iteration 1 -- -string(19) "!---Hello World---!" --- Iteration 2 -- -string(19) "!---Hello World---!" --- Iteration 3 -- -string(19) "!---Hello World---!" --- Iteration 4 -- -string(19) "!---Hello World---!" --- Iteration 5 -- -string(19) "!---Hello World---!" --- Iteration 6 -- -string(19) "!---Hello World---!" --- Iteration 7 -- -string(19) "!---Hello World---!" --- Iteration 8 -- -string(19) "!---Hello World---!" --- Iteration 9 -- -string(19) "!---Hello World---!" --- Iteration 10 -- - -Warning: rtrim() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: rtrim() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: rtrim() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -string(19) "!---Hello World---!" --- Iteration 14 -- -string(19) "!---Hello World---!" --- Iteration 15 -- -string(19) "!---Hello World---!" --- Iteration 16 -- -string(19) "!---Hello World---!" --- Iteration 17 -- -string(19) "!---Hello World---!" --- Iteration 18 -- -string(19) "!---Hello World---!" --- Iteration 19 -- -string(19) "!---Hello World---!" --- Iteration 20 -- - -Warning: rtrim() expects parameter 2 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -string(19) "!---Hello World---!" --- Iteration 22 -- -string(19) "!---Hello World---!" -===DONE=== diff --git a/ext/standard/tests/strings/sha1_variation1.phpt b/ext/standard/tests/strings/sha1_variation1.phpt deleted file mode 100644 index 35fb16a87baeb..0000000000000 --- a/ext/standard/tests/strings/sha1_variation1.phpt +++ /dev/null @@ -1,157 +0,0 @@ ---TEST-- -Test sha1() function : usage variations - unexpected values for 'str' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data -/*15*/ NULL, - null, - - // boolean data -/*17*/ true, - false, - TRUE, - FALSE, - - // empty data -/*21*/ "", - '', - - // object data -/*23*/ new MyClass(), - - // undefined data -/*24*/ @$undefined_var, - - // unset data -/*25*/ @$unset_var, - - //resource data -/*26*/ $fp -); - -// loop through each element of $values for 'str' argument -for($count = 0; $count < count($values); $count++) { - echo "-- Iteration ".($count+1)." --\n"; - var_dump( sha1($values[$count], $raw) ); -} - -//closing resource -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing sha1() : unexpected values for 'str' *** --- Iteration 1 -- -string(40) "b6589fc6ab0dc82cf12099d1c2d40ab994e8410c" --- Iteration 2 -- -string(40) "356a192b7913b04c54574d18c28d46e6395428ab" --- Iteration 3 -- -string(40) "8cb2237d0679ca88db6464eac60da96345513964" --- Iteration 4 -- -string(40) "bc97c643aba3b6c6abe253222f439d4002a87528" --- Iteration 5 -- -string(40) "1287384bc5ef3ab84a36a5ef1d888df2763567f4" --- Iteration 6 -- -string(40) "c9d6e1b691f17c8ae6d458984a5f56f80e62a60b" --- Iteration 7 -- -string(40) "39493e1e645578a655f532e1f9bcff67991f2c2f" --- Iteration 8 -- -string(40) "681b45cae882ad795afd54ccc2a04ad58e056b83" --- Iteration 9 -- -string(40) "1b390cd54a0c0d4f27fa7adf23e3c45536e9f37c" --- Iteration 10 -- - -Warning: sha1() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: sha1() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: sha1() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: sha1() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: sha1() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709" --- Iteration 16 -- -string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709" --- Iteration 17 -- -string(40) "356a192b7913b04c54574d18c28d46e6395428ab" --- Iteration 18 -- -string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709" --- Iteration 19 -- -string(40) "356a192b7913b04c54574d18c28d46e6395428ab" --- Iteration 20 -- -string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709" --- Iteration 21 -- -string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709" --- Iteration 22 -- -string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709" --- Iteration 23 -- -string(40) "1615307cc4523f183e777df67f168c86908e8007" --- Iteration 24 -- -string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709" --- Iteration 25 -- -string(40) "da39a3ee5e6b4b0d3255bfef95601890afd80709" --- Iteration 26 -- - -Warning: sha1() expects parameter 1 to be string, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/sha1_variation2.phpt b/ext/standard/tests/strings/sha1_variation2.phpt deleted file mode 100644 index 13c255451a37d..0000000000000 --- a/ext/standard/tests/strings/sha1_variation2.phpt +++ /dev/null @@ -1,160 +0,0 @@ ---TEST-- -Test sha1() function : usage variations - unexpected values for 'raw' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data -/*15*/ NULL, - null, - - // string data -/*17*/ "ABC", - 'abc', - "0abc", - "123abc", - - // empty data -/*21*/ "", - '', - - // object data -/*23*/ new MyClass(), - - // undefined data -/*24*/ @$undefined_var, - - // unset data -/*25*/ @$unset_var, - - //resource data -/*26*/ $fp -); - -// loop through each element of $values for 'raw' argument -for($count = 0; $count < count($values); $count++) { - echo "-- Iteration ".($count+1)." --\n"; - // use bin2hex to catch those cases were raw is true - var_dump( bin2hex(sha1($string, $values[$count])) ); -} - -//closing resource -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing sha1() : unexpected values for 'raw' *** --- Iteration 1 -- -string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430" --- Iteration 2 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 3 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 4 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 5 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 6 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 7 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 8 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 9 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 10 -- - -Warning: sha1() expects parameter 2 to be bool, array given in %s on line %d -string(0) "" --- Iteration 11 -- - -Warning: sha1() expects parameter 2 to be bool, array given in %s on line %d -string(0) "" --- Iteration 12 -- - -Warning: sha1() expects parameter 2 to be bool, array given in %s on line %d -string(0) "" --- Iteration 13 -- - -Warning: sha1() expects parameter 2 to be bool, array given in %s on line %d -string(0) "" --- Iteration 14 -- - -Warning: sha1() expects parameter 2 to be bool, array given in %s on line %d -string(0) "" --- Iteration 15 -- -string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430" --- Iteration 16 -- -string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430" --- Iteration 17 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 18 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 19 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 20 -- -string(40) "0a4d55a8d778e5022fab701977c5d840bbc486d0" --- Iteration 21 -- -string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430" --- Iteration 22 -- -string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430" --- Iteration 23 -- - -Warning: sha1() expects parameter 2 to be bool, object given in %s on line %d -string(0) "" --- Iteration 24 -- -string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430" --- Iteration 25 -- -string(80) "30613464353561386437373865353032326661623730313937376335643834306262633438366430" --- Iteration 26 -- - -Warning: sha1() expects parameter 2 to be bool, resource given in %s on line %d -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/str_pad_variation1.phpt b/ext/standard/tests/strings/str_pad_variation1.phpt deleted file mode 100644 index 32506ab1a9f3a..0000000000000 --- a/ext/standard/tests/strings/str_pad_variation1.phpt +++ /dev/null @@ -1,140 +0,0 @@ ---TEST-- -Test str_pad() function : usage variations - unexpected inputs for '$input' argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing str_pad() function: with unexpected inputs for 'input' argument *** --- Iteration 1 -- -string(20) "0 " --- Iteration 2 -- -string(20) "1 " --- Iteration 3 -- -string(20) "-2 " --- Iteration 4 -- -string(20) "2147483647 " --- Iteration 5 -- -string(20) "-2147483648 " --- Iteration 6 -- -string(20) "10.5 " --- Iteration 7 -- -string(20) "-20.5 " --- Iteration 8 -- -string(20) "101234567000 " --- Iteration 9 -- - -Warning: str_pad() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: str_pad() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: str_pad() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- -string(20) "1 " --- Iteration 13 -- -string(20) " " --- Iteration 14 -- -string(20) "1 " --- Iteration 15 -- -string(20) " " --- Iteration 16 -- -string(20) " " --- Iteration 17 -- -string(20) " " --- Iteration 18 -- -string(20) "sample object " --- Iteration 19 -- - -Warning: str_pad() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 20 -- -string(20) " " --- Iteration 21 -- -string(20) " " -===DONE=== diff --git a/ext/standard/tests/strings/str_pad_variation2.phpt b/ext/standard/tests/strings/str_pad_variation2.phpt deleted file mode 100644 index 114d5f5ba13f7..0000000000000 --- a/ext/standard/tests/strings/str_pad_variation2.phpt +++ /dev/null @@ -1,139 +0,0 @@ ---TEST-- -Test str_pad() function : usage variations - unexpected inputs for '$pad_length' argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing str_pad() function: with unexpected inputs for 'pad_length' argument *** --- Iteration 1 -- -string(11) "Test string" --- Iteration 2 -- -string(11) "Test string" --- Iteration 3 -- -string(11) "Test string" --- Iteration 4 -- -string(255) "Test string " --- Iteration 5 -- -string(11) "Test string" --- Iteration 6 -- -string(11) "Test string" --- Iteration 7 -- -string(1012) "Test string " --- Iteration 8 -- - -Warning: str_pad() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 9 -- - -Warning: str_pad() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: str_pad() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 11 -- -string(11) "Test string" --- Iteration 12 -- -string(11) "Test string" --- Iteration 13 -- -string(11) "Test string" --- Iteration 14 -- -string(11) "Test string" --- Iteration 15 -- -string(11) "Test string" --- Iteration 16 -- -string(11) "Test string" --- Iteration 17 -- - -Warning: str_pad() expects parameter 2 to be int, object given in %s on line %d -NULL --- Iteration 18 -- - -Warning: str_pad() expects parameter 2 to be int, resource given in %s on line %d -NULL --- Iteration 19 -- -string(11) "Test string" --- Iteration 20 -- -string(11) "Test string" -===DONE=== diff --git a/ext/standard/tests/strings/str_pad_variation3.phpt b/ext/standard/tests/strings/str_pad_variation3.phpt deleted file mode 100644 index 1e58477f21f37..0000000000000 --- a/ext/standard/tests/strings/str_pad_variation3.phpt +++ /dev/null @@ -1,153 +0,0 @@ ---TEST-- -Test str_pad() function : usage variations - unexpected inputs for '$pad_string' argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing str_pad() function: with unexpected inputs for 'pad_string' argument *** --- Iteration 1 -- -string(20) "Test string000000000" --- Iteration 2 -- -string(20) "Test string111111111" --- Iteration 3 -- -string(20) "Test string-2-2-2-2-" --- Iteration 4 -- -string(20) "Test string214748364" --- Iteration 5 -- -string(20) "Test string-21474836" --- Iteration 6 -- -string(20) "Test string10.510.51" --- Iteration 7 -- -string(20) "Test string-20.5-20." --- Iteration 8 -- -string(20) "Test string101234567" --- Iteration 9 -- - -Warning: str_pad() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: str_pad() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: str_pad() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 12 -- -string(20) "Test string111111111" --- Iteration 13 -- - -Warning: str_pad(): Padding string cannot be empty in %s on line %d -NULL --- Iteration 14 -- -string(20) "Test string111111111" --- Iteration 15 -- - -Warning: str_pad(): Padding string cannot be empty in %s on line %d -NULL --- Iteration 16 -- - -Warning: str_pad(): Padding string cannot be empty in %s on line %d -NULL --- Iteration 17 -- - -Warning: str_pad(): Padding string cannot be empty in %s on line %d -NULL --- Iteration 18 -- -string(20) "Test stringsample ob" --- Iteration 19 -- - -Warning: str_pad() expects parameter 3 to be string, resource given in %s on line %d -NULL --- Iteration 20 -- - -Warning: str_pad(): Padding string cannot be empty in %s on line %d -NULL --- Iteration 21 -- - -Warning: str_pad(): Padding string cannot be empty in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/str_pad_variation4.phpt b/ext/standard/tests/strings/str_pad_variation4.phpt deleted file mode 100644 index 22ca2d527025e..0000000000000 --- a/ext/standard/tests/strings/str_pad_variation4.phpt +++ /dev/null @@ -1,172 +0,0 @@ ---TEST-- -Test str_pad() function : usage variations - unexpected inputs for '$pad_type' argument ---SKIPIF-- - -===DONE=== ---EXPECTF-- -*** Testing str_pad() function: with unexpected inputs for 'pad_type' argument *** --- Iteration 1 -- -string(20) "*********Test string" --- Iteration 2 -- -string(20) "Test string*********" --- Iteration 3 -- -string(20) "****Test string*****" --- Iteration 4 -- - -Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d -NULL --- Iteration 5 -- - -Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d -NULL --- Iteration 6 -- - -Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d -NULL --- Iteration 7 -- - -Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d -NULL --- Iteration 8 -- - -Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d -NULL --- Iteration 9 -- - -Warning: str_pad(): Padding type has to be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH in %s on line %d -NULL --- Iteration 10 -- - -Warning: str_pad() expects parameter 4 to be int, string given in %s on line %d -NULL --- Iteration 11 -- - -Warning: str_pad() expects parameter 4 to be int, string given in %s on line %d -NULL --- Iteration 12 -- -string(20) "****Test string*****" --- Iteration 13 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string(20) "*********Test string" --- Iteration 14 -- -string(20) "****Test string*****" --- Iteration 15 -- - -Warning: str_pad() expects parameter 4 to be int, array given in %s on line %d -NULL --- Iteration 16 -- - -Warning: str_pad() expects parameter 4 to be int, array given in %s on line %d -NULL --- Iteration 17 -- - -Warning: str_pad() expects parameter 4 to be int, array given in %s on line %d -NULL --- Iteration 18 -- -string(20) "Test string*********" --- Iteration 19 -- -string(20) "*********Test string" --- Iteration 20 -- -string(20) "Test string*********" --- Iteration 21 -- -string(20) "*********Test string" --- Iteration 22 -- -string(20) "*********Test string" --- Iteration 23 -- -string(20) "*********Test string" --- Iteration 24 -- - -Warning: str_pad() expects parameter 4 to be int, object given in %s on line %d -NULL --- Iteration 25 -- -string(20) "*********Test string" --- Iteration 26 -- -string(20) "*********Test string" -===DONE=== diff --git a/ext/standard/tests/strings/str_shuffle_variation1.phpt b/ext/standard/tests/strings/str_shuffle_variation1.phpt deleted file mode 100644 index d5681392b51f0..0000000000000 --- a/ext/standard/tests/strings/str_shuffle_variation1.phpt +++ /dev/null @@ -1,135 +0,0 @@ ---TEST-- -Test str_shuffle() function : usage variations - test values for $haystack argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing str_shuffle() function: with unexpected inputs for 'string' argument *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(2) "%s" --- Iteration 4 -- -string(10) "%s" --- Iteration 5 -- -string(11) "%s" --- Iteration 6 -- -string(4) "%s" --- Iteration 7 -- -string(5) "%s" --- Iteration 8 -- -string(12) "%s" --- Iteration 9 -- - -Warning: str_shuffle() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: str_shuffle() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: str_shuffle() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- -string(1) "1" --- Iteration 13 -- -string(0) "" --- Iteration 14 -- -string(1) "1" --- Iteration 15 -- -string(0) "" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(0) "" --- Iteration 18 -- -string(13) "%s" --- Iteration 19 -- - -Warning: str_shuffle() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 20 -- -string(0) "" --- Iteration 21 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/str_split_variation1.phpt b/ext/standard/tests/strings/str_split_variation1.phpt deleted file mode 100644 index 94eca406fd96a..0000000000000 --- a/ext/standard/tests/strings/str_split_variation1.phpt +++ /dev/null @@ -1,241 +0,0 @@ ---TEST-- -Test str_split() function : usage variations - unexpected values for 'str' argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new MyClass(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - //resource data - $fp -); - -// loop through each element of $values for 'str' argument -for($count = 0; $count < count($values); $count++) { - echo "-- Iteration ".($count+1)." --\n"; - var_dump( str_split($values[$count], $split_length) ); -} - -//closing resource -fclose($fp); - -echo "Done"; -?> ---EXPECTF-- -*** Testing str_split() : unexpected values for 'str' *** --- Iteration 1 -- -array(1) { - [0]=> - string(1) "0" -} --- Iteration 2 -- -array(1) { - [0]=> - string(1) "1" -} --- Iteration 3 -- -array(2) { - [0]=> - string(3) "123" - [1]=> - string(2) "45" -} --- Iteration 4 -- -array(2) { - [0]=> - string(3) "-23" - [1]=> - string(2) "45" -} --- Iteration 5 -- -array(2) { - [0]=> - string(3) "10." - [1]=> - string(1) "5" -} --- Iteration 6 -- -array(2) { - [0]=> - string(3) "-10" - [1]=> - string(2) ".5" -} --- Iteration 7 -- -array(4) { - [0]=> - string(3) "105" - [1]=> - string(3) "000" - [2]=> - string(3) "000" - [3]=> - string(3) "000" -} --- Iteration 8 -- -array(3) { - [0]=> - string(3) "1.0" - [1]=> - string(3) "6E-" - [2]=> - string(1) "9" -} --- Iteration 9 -- -array(1) { - [0]=> - string(3) "0.5" -} --- Iteration 10 -- - -Warning: str_split() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: str_split() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: str_split() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: str_split() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: str_split() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 16 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 17 -- -array(1) { - [0]=> - string(1) "1" -} --- Iteration 18 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 19 -- -array(1) { - [0]=> - string(1) "1" -} --- Iteration 20 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 21 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 22 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 23 -- -array(2) { - [0]=> - string(3) "obj" - [1]=> - string(3) "ect" -} --- Iteration 24 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 25 -- -array(1) { - [0]=> - string(0) "" -} --- Iteration 26 -- - -Warning: str_split() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/str_split_variation2.phpt b/ext/standard/tests/strings/str_split_variation2.phpt deleted file mode 100644 index 0bb8304b56d33..0000000000000 --- a/ext/standard/tests/strings/str_split_variation2.phpt +++ /dev/null @@ -1,290 +0,0 @@ ---TEST-- -Test str_split() function : usage variations - unexpected values for 'split_length' argument ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new MyClass(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - //resource data - $fp -); - -// loop through each element of $values for 'split_length' -for($count = 0; $count < count($values); $count++) { - echo "--Iteration ".($count+1)." --\n"; - var_dump( str_split($str, $values[$count]) ); -} - -//closing resource -fclose($fp); - -echo "Done"; -?> ---EXPECTF-- -*** Testing str_split() : unexpected values for 'split_length' *** ---Iteration 1 -- -array(3) { - [0]=> - string(10) "variation2" - [1]=> - string(10) ":split_len" - [2]=> - string(3) "gth" -} ---Iteration 2 -- - -Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d -bool(false) ---Iteration 3 -- - -Warning: str_split() expects parameter 2 to be int, float given in %s on line %d -NULL ---Iteration 4 -- - -Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d -bool(false) ---Iteration 5 -- - -Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d -bool(false) ---Iteration 6 -- - -Warning: str_split() expects parameter 2 to be int, array given in %sstr_split_variation2.php on line %d -NULL ---Iteration 7 -- - -Warning: str_split() expects parameter 2 to be int, array given in %sstr_split_variation2.php on line %d -NULL ---Iteration 8 -- - -Warning: str_split() expects parameter 2 to be int, array given in %sstr_split_variation2.php on line %d -NULL ---Iteration 9 -- - -Warning: str_split() expects parameter 2 to be int, array given in %sstr_split_variation2.php on line %d -NULL ---Iteration 10 -- - -Warning: str_split() expects parameter 2 to be int, array given in %sstr_split_variation2.php on line %d -NULL ---Iteration 11 -- - -Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d -bool(false) ---Iteration 12 -- - -Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d -bool(false) ---Iteration 13 -- -array(23) { - [0]=> - string(1) "v" - [1]=> - string(1) "a" - [2]=> - string(1) "r" - [3]=> - string(1) "i" - [4]=> - string(1) "a" - [5]=> - string(1) "t" - [6]=> - string(1) "i" - [7]=> - string(1) "o" - [8]=> - string(1) "n" - [9]=> - string(1) "2" - [10]=> - string(1) ":" - [11]=> - string(1) "s" - [12]=> - string(1) "p" - [13]=> - string(1) "l" - [14]=> - string(1) "i" - [15]=> - string(1) "t" - [16]=> - string(1) "_" - [17]=> - string(1) "l" - [18]=> - string(1) "e" - [19]=> - string(1) "n" - [20]=> - string(1) "g" - [21]=> - string(1) "t" - [22]=> - string(1) "h" -} ---Iteration 14 -- - -Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d -bool(false) ---Iteration 15 -- -array(23) { - [0]=> - string(1) "v" - [1]=> - string(1) "a" - [2]=> - string(1) "r" - [3]=> - string(1) "i" - [4]=> - string(1) "a" - [5]=> - string(1) "t" - [6]=> - string(1) "i" - [7]=> - string(1) "o" - [8]=> - string(1) "n" - [9]=> - string(1) "2" - [10]=> - string(1) ":" - [11]=> - string(1) "s" - [12]=> - string(1) "p" - [13]=> - string(1) "l" - [14]=> - string(1) "i" - [15]=> - string(1) "t" - [16]=> - string(1) "_" - [17]=> - string(1) "l" - [18]=> - string(1) "e" - [19]=> - string(1) "n" - [20]=> - string(1) "g" - [21]=> - string(1) "t" - [22]=> - string(1) "h" -} ---Iteration 16 -- - -Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d -bool(false) ---Iteration 17 -- - -Warning: str_split() expects parameter 2 to be int, string given in %sstr_split_variation2.php on line %d -NULL ---Iteration 18 -- - -Warning: str_split() expects parameter 2 to be int, string given in %sstr_split_variation2.php on line %d -NULL ---Iteration 19 -- - -Warning: str_split() expects parameter 2 to be int, string given in %sstr_split_variation2.php on line %d -NULL ---Iteration 20 -- - -Warning: str_split() expects parameter 2 to be int, string given in %sstr_split_variation2.php on line %d -NULL ---Iteration 21 -- - -Warning: str_split() expects parameter 2 to be int, object given in %sstr_split_variation2.php on line %d -NULL ---Iteration 22 -- - -Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d -bool(false) ---Iteration 23 -- - -Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d -bool(false) ---Iteration 24 -- - -Warning: str_split() expects parameter 2 to be int, resource given in %sstr_split_variation2.php on line %d -NULL -Done diff --git a/ext/standard/tests/strings/str_split_variation2_64bit.phpt b/ext/standard/tests/strings/str_split_variation2_64bit.phpt deleted file mode 100644 index 92a07498a4a02..0000000000000 --- a/ext/standard/tests/strings/str_split_variation2_64bit.phpt +++ /dev/null @@ -1,291 +0,0 @@ ---TEST-- -Test str_split() function : usage variations - unexpected values for 'split_length' argument ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new MyClass(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - //resource data - $fp -); - -// loop through each element of $values for 'split_length' -for($count = 0; $count < count($values); $count++) { - echo "--Iteration ".($count+1)." --\n"; - var_dump( str_split($str, $values[$count]) ); -} - -//closing resource -fclose($fp); - -echo "Done"; -?> ---EXPECTF-- -*** Testing str_split() : unexpected values for 'split_length' *** ---Iteration 1 -- -array(3) { - [0]=> - string(10) "variation2" - [1]=> - string(10) ":split_len" - [2]=> - string(3) "gth" -} ---Iteration 2 -- - -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d -bool(false) ---Iteration 3 -- -array(1) { - [0]=> - string(23) "variation2:split_length" -} ---Iteration 4 -- - -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d -bool(false) ---Iteration 5 -- - -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d -bool(false) ---Iteration 6 -- - -Warning: str_split() expects parameter 2 to be int, array given in %s on line %d -NULL ---Iteration 7 -- - -Warning: str_split() expects parameter 2 to be int, array given in %s on line %d -NULL ---Iteration 8 -- - -Warning: str_split() expects parameter 2 to be int, array given in %s on line %d -NULL ---Iteration 9 -- - -Warning: str_split() expects parameter 2 to be int, array given in %s on line %d -NULL ---Iteration 10 -- - -Warning: str_split() expects parameter 2 to be int, array given in %s on line %d -NULL ---Iteration 11 -- - -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d -bool(false) ---Iteration 12 -- - -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d -bool(false) ---Iteration 13 -- -array(23) { - [0]=> - string(1) "v" - [1]=> - string(1) "a" - [2]=> - string(1) "r" - [3]=> - string(1) "i" - [4]=> - string(1) "a" - [5]=> - string(1) "t" - [6]=> - string(1) "i" - [7]=> - string(1) "o" - [8]=> - string(1) "n" - [9]=> - string(1) "2" - [10]=> - string(1) ":" - [11]=> - string(1) "s" - [12]=> - string(1) "p" - [13]=> - string(1) "l" - [14]=> - string(1) "i" - [15]=> - string(1) "t" - [16]=> - string(1) "_" - [17]=> - string(1) "l" - [18]=> - string(1) "e" - [19]=> - string(1) "n" - [20]=> - string(1) "g" - [21]=> - string(1) "t" - [22]=> - string(1) "h" -} ---Iteration 14 -- - -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d -bool(false) ---Iteration 15 -- -array(23) { - [0]=> - string(1) "v" - [1]=> - string(1) "a" - [2]=> - string(1) "r" - [3]=> - string(1) "i" - [4]=> - string(1) "a" - [5]=> - string(1) "t" - [6]=> - string(1) "i" - [7]=> - string(1) "o" - [8]=> - string(1) "n" - [9]=> - string(1) "2" - [10]=> - string(1) ":" - [11]=> - string(1) "s" - [12]=> - string(1) "p" - [13]=> - string(1) "l" - [14]=> - string(1) "i" - [15]=> - string(1) "t" - [16]=> - string(1) "_" - [17]=> - string(1) "l" - [18]=> - string(1) "e" - [19]=> - string(1) "n" - [20]=> - string(1) "g" - [21]=> - string(1) "t" - [22]=> - string(1) "h" -} ---Iteration 16 -- - -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d -bool(false) ---Iteration 17 -- - -Warning: str_split() expects parameter 2 to be int, string given in %s on line %d -NULL ---Iteration 18 -- - -Warning: str_split() expects parameter 2 to be int, string given in %s on line %d -NULL ---Iteration 19 -- - -Warning: str_split() expects parameter 2 to be int, string given in %s on line %d -NULL ---Iteration 20 -- - -Warning: str_split() expects parameter 2 to be int, string given in %s on line %d -NULL ---Iteration 21 -- - -Warning: str_split() expects parameter 2 to be int, object given in %s on line %d -NULL ---Iteration 22 -- - -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d -bool(false) ---Iteration 23 -- - -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d -bool(false) ---Iteration 24 -- - -Warning: str_split() expects parameter 2 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strcspn_variation1.phpt b/ext/standard/tests/strings/strcspn_variation1.phpt deleted file mode 100644 index 89a4e5cc726a9..0000000000000 --- a/ext/standard/tests/strings/strcspn_variation1.phpt +++ /dev/null @@ -1,273 +0,0 @@ ---TEST-- -Test strcspn() function : usage variations - unexpected values for str argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new sample, - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for str - -foreach($values as $value) { - echo "\n-- Iteration with str value as \"$value\"\n"; - var_dump( strcspn($value,$mask) ); // with default args - var_dump( strcspn($value,$mask,$start) ); // with default len value - var_dump( strcspn($value,$mask,$start,$len) ); // with all args -}; - -// closing the resource -fclose($file_handle); - -echo "Done" -?> ---EXPECTF-- -*** Testing strcspn() : with unexpected values for str argument *** - --- Iteration with str value as "0" -int(0) -int(0) -int(0) - --- Iteration with str value as "1" -int(0) -int(0) -int(0) - --- Iteration with str value as "12345" -int(0) -int(0) -int(0) - --- Iteration with str value as "-2345" -int(1) -int(0) -int(0) - --- Iteration with str value as "10.5" -int(0) -int(0) -int(0) - --- Iteration with str value as "-10.5" -int(1) -int(0) -int(0) - --- Iteration with str value as "101234567000" -int(0) -int(0) -int(0) - --- Iteration with str value as "1.07654321E-9" -int(0) -int(1) -int(1) - --- Iteration with str value as "0.5" -int(0) -int(1) -int(1) - --- Iteration with str value as "Array" - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration with str value as "Array" - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration with str value as "Array" - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration with str value as "Array" - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration with str value as "Array" - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "1" -int(0) -int(0) -int(0) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "1" -int(0) -int(0) -int(0) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "object" -int(0) -int(0) -int(0) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "Resource id #%d" - -Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strcspn_variation2.phpt b/ext/standard/tests/strings/strcspn_variation2.phpt deleted file mode 100644 index d7d25f2ec0e1b..0000000000000 --- a/ext/standard/tests/strings/strcspn_variation2.phpt +++ /dev/null @@ -1,272 +0,0 @@ ---TEST-- -Test strcspn() function : usage variations - unexpected values for mask argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new sample(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for mask - -foreach($values as $value) { - echo "\n-- Iteration with mask value as \"$value\" --\n"; - var_dump( strcspn($str,$value) ); // with defalut args - var_dump( strcspn($str,$value,$start) ); // with default len value - var_dump( strcspn($str,$value,$start,$len) ); // with all args -}; - -// close the resource -fclose($file_handle); - -echo "Done" -?> ---EXPECTF-- -*** Testing strcspn() : with different unexpected values of mask argument *** - --- Iteration with mask value as "0" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "1" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "12345" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "-2345" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "10.5" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "-10.5" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "101234567000" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "1.07654321E-9" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "0.5" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "Array" -- - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - --- Iteration with mask value as "Array" -- - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - --- Iteration with mask value as "Array" -- - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - --- Iteration with mask value as "Array" -- - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - --- Iteration with mask value as "Array" -- - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d -NULL - --- Iteration with mask value as "" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "1" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "1" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "object" -- -int(1) -int(0) -int(0) - --- Iteration with mask value as "" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "" -- -int(10) -int(9) -int(9) - --- Iteration with mask value as "Resource id #%d" -- - -Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d -NULL - -Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strcspn_variation3.phpt b/ext/standard/tests/strings/strcspn_variation3.phpt deleted file mode 100644 index 745fe88b4c01d..0000000000000 --- a/ext/standard/tests/strings/strcspn_variation3.phpt +++ /dev/null @@ -1,243 +0,0 @@ ---TEST-- -Test strcspn() function : usage variations - unexpected values of start argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new sample(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for start - -foreach($values as $value) { - echo "\n-- Iteration with start value as \"$value\" --\n"; - var_dump( strcspn($str,$mask,$value) ); // with default len value - var_dump( strcspn($str,$mask,$value,$len) ); // with all args -}; - -// closing the resource -fclose($file_handle); - -echo "Done" -?> ---EXPECTF-- -*** Testing strcspn() : with unexpected values of start argument *** - --- Iteration with start value as "10.5" -- -int(0) -int(0) - --- Iteration with start value as "-10.5" -- -int(0) -int(0) - --- Iteration with start value as "1012345670" -- -bool(false) -bool(false) - --- Iteration with start value as "1.07654321E-7" -- -int(0) -int(0) - --- Iteration with start value as "0.5" -- -int(0) -int(0) - --- Iteration with start value as "Array" -- - -Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration with start value as "Array" -- - -Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration with start value as "Array" -- - -Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration with start value as "Array" -- - -Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration with start value as "Array" -- - -Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration with start value as "" -- -int(0) -int(0) - --- Iteration with start value as "" -- -int(0) -int(0) - --- Iteration with start value as "1" -- -int(0) -int(0) - --- Iteration with start value as "" -- -int(0) -int(0) - --- Iteration with start value as "1" -- -int(0) -int(0) - --- Iteration with start value as "" -- -int(0) -int(0) - --- Iteration with start value as "" -- - -Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration with start value as "" -- - -Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration with start value as "string" -- - -Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration with start value as "string" -- - -Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration with start value as "object" -- - -Warning: strcspn() expects parameter 3 to be int, object given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, object given in %s on line %d -NULL - --- Iteration with start value as "" -- -int(0) -int(0) - --- Iteration with start value as "" -- -int(0) -int(0) - --- Iteration with start value as "Resource id #%d" -- - -Warning: strcspn() expects parameter 3 to be int, resource given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strcspn_variation4.phpt b/ext/standard/tests/strings/strcspn_variation4.phpt deleted file mode 100644 index 0af1228293fe4..0000000000000 --- a/ext/standard/tests/strings/strcspn_variation4.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -Test strcspn() function : usage variations - unexpected values of len argument ---SKIPIF-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new sample(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for start - -foreach($values as $value) { - echo "\n-- Iteration with len value as \"$value\" --\n"; - var_dump( strcspn($str,$mask,$start,$value) ); // with all args -}; - -// closing the resource -fclose($file_handle); - -echo "Done" -?> ---EXPECTF-- -*** Testing strcspn() : with unexpected values of len argument *** - --- Iteration with len value as "10.5" -- -int(0) - --- Iteration with len value as "-10.5" -- -int(0) - --- Iteration with len value as "101234567000" -- -int(0) - --- Iteration with len value as "1.07654321E-9" -- -int(0) - --- Iteration with len value as "0.5" -- -int(0) - --- Iteration with len value as "Array" -- - -Warning: strcspn() expects parameter 4 to be int, array given in %s on line %d -NULL - --- Iteration with len value as "Array" -- - -Warning: strcspn() expects parameter 4 to be int, array given in %s on line %d -NULL - --- Iteration with len value as "Array" -- - -Warning: strcspn() expects parameter 4 to be int, array given in %s on line %d -NULL - --- Iteration with len value as "Array" -- - -Warning: strcspn() expects parameter 4 to be int, array given in %s on line %d -NULL - --- Iteration with len value as "Array" -- - -Warning: strcspn() expects parameter 4 to be int, array given in %s on line %d -NULL - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "1" -- -int(0) - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "1" -- -int(0) - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "" -- - -Warning: strcspn() expects parameter 4 to be int, string given in %s on line %d -NULL - --- Iteration with len value as "" -- - -Warning: strcspn() expects parameter 4 to be int, string given in %s on line %d -NULL - --- Iteration with len value as "string" -- - -Warning: strcspn() expects parameter 4 to be int, string given in %s on line %d -NULL - --- Iteration with len value as "string" -- - -Warning: strcspn() expects parameter 4 to be int, string given in %s on line %d -NULL - --- Iteration with len value as "object" -- - -Warning: strcspn() expects parameter 4 to be int, object given in %s on line %d -NULL - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "Resource id #%d" -- - -Warning: strcspn() expects parameter 4 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strip_tags_variation1.phpt b/ext/standard/tests/strings/strip_tags_variation1.phpt deleted file mode 100644 index cca444c0e0acf..0000000000000 --- a/ext/standard/tests/strings/strip_tags_variation1.phpt +++ /dev/null @@ -1,159 +0,0 @@ ---TEST-- -Test strip_tags() function : usage variations - unexpected values for 'str' argument ---INI-- -set short_open_tag = on ---FILE-- - 'red', 'item' => 'pen'), - - // null data -/*15*/ NULL, - null, - - // boolean data -/*17*/ true, - false, - TRUE, - FALSE, - - // empty data -/*21*/ "", - '', - - // object data -/*23*/ new classA(), - - // undefined data -/*24*/ @$undefined_var, - - // unset data -/*25*/ @$unset_var, - - // resource variable -/*26*/ $fp - -); - -// loop through each element of the array for allowable_tags -$iterator = 1; -foreach($values as $value) { - echo "-- Iteration $iterator --\n"; - var_dump( strip_tags($value) ); - $iterator++; -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing strip_tags() : usage variations *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(5) "12345" --- Iteration 4 -- -string(5) "-2345" --- Iteration 5 -- -string(4) "10.5" --- Iteration 6 -- -string(5) "-10.5" --- Iteration 7 -- -string(12) "101234567000" --- Iteration 8 -- -string(13) "1.07654321E-9" --- Iteration 9 -- -string(3) "0.5" --- Iteration 10 -- - -Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(0) "" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(1) "1" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(1) "1" --- Iteration 20 -- -string(0) "" --- Iteration 21 -- -string(0) "" --- Iteration 22 -- -string(0) "" --- Iteration 23 -- -string(14) "Class A object" --- Iteration 24 -- -string(0) "" --- Iteration 25 -- -string(0) "" --- Iteration 26 -- - -Warning: strip_tags() expects parameter 1 to be string, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/strip_tags_variation3.phpt b/ext/standard/tests/strings/strip_tags_variation3.phpt deleted file mode 100644 index d6dc34a080aa7..0000000000000 --- a/ext/standard/tests/strings/strip_tags_variation3.phpt +++ /dev/null @@ -1,159 +0,0 @@ ---TEST-- -Test strip_tags() function : usage variations - unexpected values for both 'str' and 'allowable_tags' ---INI-- -set short_open_tag = on ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new classA(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - // resource variable - $fp - -); - -// loop through each element of the array for allowable_tags -$iterator = 1; -foreach($values as $value) { - echo "-- Iteration $iterator --\n"; - var_dump( strip_tags($value, $value) ); - $iterator++; -}; - -?> -===DONE=== ---EXPECTF-- -*** Testing strip_tags() : usage variations *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(5) "12345" --- Iteration 4 -- -string(5) "-2345" --- Iteration 5 -- -string(4) "10.5" --- Iteration 6 -- -string(5) "-10.5" --- Iteration 7 -- -string(12) "101234567000" --- Iteration 8 -- -string(13) "1.07654321E-9" --- Iteration 9 -- -string(3) "0.5" --- Iteration 10 -- - -Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: strip_tags() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(0) "" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(1) "1" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(1) "1" --- Iteration 20 -- -string(0) "" --- Iteration 21 -- -string(0) "" --- Iteration 22 -- -string(0) "" --- Iteration 23 -- -string(14) "Class A object" --- Iteration 24 -- -string(0) "" --- Iteration 25 -- -string(0) "" --- Iteration 26 -- - -Warning: strip_tags() expects parameter 1 to be string, resource given in %s on line %d -NULL -===DONE=== diff --git a/ext/standard/tests/strings/stripcslashes_variation1.phpt b/ext/standard/tests/strings/stripcslashes_variation1.phpt deleted file mode 100644 index fe3a786678041..0000000000000 --- a/ext/standard/tests/strings/stripcslashes_variation1.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test stripcslashes() function : usage variations - non-string type argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values -/*15*/ true, - false, - TRUE, - FALSE, - - // empty string -/*19*/ "", - '', - - // undefined variable -/*21*/ $undefined_var, - - // unset variable -/*22*/ $unset_var, - - // objects -/*23*/ new sample(), - - // resource -/*24*/ $file_handle, - - // null values -/*25*/ NULL, - null -); - - -// loop through each element of the array and check the working of stripcslashes() -// when $str argument is supplied with different values -echo "\n--- Testing stripcslashes() by supplying different values for 'str' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str = $values [$index]; - - var_dump( stripcslashes($str) ); - - $counter ++; -} - -// closing the file -fclose($file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing stripcslashes() : with non-string type argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing stripcslashes() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(5) "12345" --- Iteration 4 -- -string(5) "-2345" --- Iteration 5 -- -string(4) "10.5" --- Iteration 6 -- -string(5) "-10.5" --- Iteration 7 -- -string(12) "101234567000" --- Iteration 8 -- -string(13) "1.07654321E-9" --- Iteration 9 -- -string(3) "0.5" --- Iteration 10 -- - -Warning: stripcslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: stripcslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: stripcslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: stripcslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: stripcslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(1) "1" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(1) "1" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(0) "" --- Iteration 20 -- -string(0) "" --- Iteration 21 -- -string(0) "" --- Iteration 22 -- -string(0) "" --- Iteration 23 -- -string(6) "obj'ct" --- Iteration 24 -- - -Warning: stripcslashes() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- -string(0) "" --- Iteration 26 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/stripos_variation14.phpt b/ext/standard/tests/strings/stripos_variation14.phpt deleted file mode 100644 index 10b481fb71972..0000000000000 --- a/ext/standard/tests/strings/stripos_variation14.phpt +++ /dev/null @@ -1,153 +0,0 @@ ---TEST-- -Test stripos() function : usage variations - unexpected inputs for 'offset' argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new sample(), - - // empty string - "", - '', - - // null values - NULL, - null, - - //resource - $file_handle, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop through each element of the array and check the working of stripos() -$counter = 1; -for($index = 0; $index < count($offsets); $index ++) { - echo "-- Iteration $counter --\n"; - var_dump( stripos($haystack, $needle, $offsets[$index]) ); - $counter ++; -} - -echo "*** Done ***"; -?> ---EXPECTF-- -*** Testing stripos() function with unexpected values for offset *** --- Iteration 1 -- -int(6) --- Iteration 2 -- -bool(false) --- Iteration 3 -- - -Warning: stripos(): Offset not contained in string in %s on line %d -bool(false) --- Iteration 4 -- -int(6) --- Iteration 5 -- -int(6) --- Iteration 6 -- - -Warning: stripos() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 7 -- - -Warning: stripos() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 8 -- - -Warning: stripos() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 9 -- - -Warning: stripos() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: stripos() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 11 -- -int(6) --- Iteration 12 -- -int(6) --- Iteration 13 -- -int(6) --- Iteration 14 -- -int(6) --- Iteration 15 -- - -Warning: stripos() expects parameter 3 to be int, object given in %s on line %d -NULL --- Iteration 16 -- - -Warning: stripos() expects parameter 3 to be int, string given in %s on line %d -NULL --- Iteration 17 -- - -Warning: stripos() expects parameter 3 to be int, string given in %s on line %d -NULL --- Iteration 18 -- -int(6) --- Iteration 19 -- -int(6) --- Iteration 20 -- - -Warning: stripos() expects parameter 3 to be int, resource given in %s on line %d -NULL --- Iteration 21 -- -int(6) --- Iteration 22 -- -int(6) -*** Done *** diff --git a/ext/standard/tests/strings/stripos_variation9.phpt b/ext/standard/tests/strings/stripos_variation9.phpt deleted file mode 100644 index c0713c57ab3a2..0000000000000 --- a/ext/standard/tests/strings/stripos_variation9.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test stripos() function : usage variations - unexpected inputs for 'haystack' argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new sample(), - - // empty string - "", - '', - - // null values - NULL, - null, - - // resource - $file_handle, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -$needle = "heredoc 0 1 2 -2 10.5 -10.5 10.5e10 10.6E-10 .5 array true false object \"\" null Resource"; - -// loop through each element of the array and check the working of stripos() -$counter = 1; -for($index = 0; $index < count($haystacks); $index ++) { - echo "\n-- Iteration $counter --\n"; - var_dump( stripos($haystacks[$index], $needle) ); - $counter ++; -} - -fclose($file_handle); //closing the file handle - -echo "*** Done ***"; -?> ---EXPECTF-- -*** Testing stripos() function with unexpected values for haystack *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- - -Warning: stripos() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: stripos() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: stripos() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: stripos() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: stripos() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- -bool(false) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: stripos() expects parameter 1 to be string, resource given in %s on line %d -NULL - --- Iteration 25 -- -bool(false) - --- Iteration 26 -- -bool(false) -*** Done *** diff --git a/ext/standard/tests/strings/stripslashes_variation1.phpt b/ext/standard/tests/strings/stripslashes_variation1.phpt deleted file mode 100644 index 2f9239ceee063..0000000000000 --- a/ext/standard/tests/strings/stripslashes_variation1.phpt +++ /dev/null @@ -1,172 +0,0 @@ ---TEST-- -Test stripslashes() function : usage variations - non-string type argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values -/*15*/ true, - false, - TRUE, - FALSE, - - // empty string -/*19*/ "", - '', - - // undefined variable -/*21*/ $undefined_var, - - // unset variable -/*22*/ $unset_var, - - // objects -/*23*/ new sample(), - - // resource -/*24*/ $file_handle, - - // null values -/*25*/ NULL, - null -); - - -// loop through each element of the array and check the working of stripslashes() -// when $str argument is supplied with different values -echo "\n--- Testing stripslashes() by supplying different values for 'str' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str = $values [$index]; - - var_dump( stripslashes($str) ); - - $counter ++; -} - -// closing the file -fclose($file_handle); - -?> -===DONE=== ---EXPECTF-- -*** Testing stripslashes() : with non-string type argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing stripslashes() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(5) "12345" --- Iteration 4 -- -string(5) "-2345" --- Iteration 5 -- -string(4) "10.5" --- Iteration 6 -- -string(5) "-10.5" --- Iteration 7 -- -string(12) "101234567000" --- Iteration 8 -- -string(13) "1.07654321E-9" --- Iteration 9 -- -string(3) "0.5" --- Iteration 10 -- - -Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: stripslashes() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(1) "1" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(1) "1" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(0) "" --- Iteration 20 -- -string(0) "" --- Iteration 21 -- -string(0) "" --- Iteration 22 -- -string(0) "" --- Iteration 23 -- -string(6) "obj'ct" --- Iteration 24 -- - -Warning: stripslashes() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- -string(0) "" --- Iteration 26 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/stristr_variation1.phpt b/ext/standard/tests/strings/stristr_variation1.phpt deleted file mode 100644 index 795bf0932386e..0000000000000 --- a/ext/standard/tests/strings/stristr_variation1.phpt +++ /dev/null @@ -1,133 +0,0 @@ ---TEST-- -Test stristr() function : usage variations - test values for $haystack argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing stristr() function: with unexpected inputs for 'string' argument *** --- Iteration 1 -- -bool(false) --- Iteration 2 -- -bool(false) --- Iteration 3 -- -bool(false) --- Iteration 4 -- -bool(false) --- Iteration 5 -- -bool(false) --- Iteration 6 -- -bool(false) --- Iteration 7 -- -bool(false) --- Iteration 8 -- - -Warning: stristr() expects parameter 1 to be string, array given in %s on line %d2 -NULL --- Iteration 9 -- - -Warning: stristr() expects parameter 1 to be string, array given in %s on line %d2 -NULL --- Iteration 10 -- - -Warning: stristr() expects parameter 1 to be string, array given in %s on line %d2 -NULL --- Iteration 11 -- -bool(false) --- Iteration 12 -- -bool(false) --- Iteration 13 -- -bool(false) --- Iteration 14 -- -bool(false) --- Iteration 15 -- -bool(false) --- Iteration 16 -- -bool(false) --- Iteration 17 -- -string(7) " object" --- Iteration 18 -- - -Warning: stristr() expects parameter 1 to be string, resource given in %s on line %d2 -NULL --- Iteration 19 -- -bool(false) --- Iteration 20 -- -bool(false) -===DONE=== diff --git a/ext/standard/tests/strings/strncasecmp_variation10.phpt b/ext/standard/tests/strings/strncasecmp_variation10.phpt deleted file mode 100644 index 1c5708ae6957f..0000000000000 --- a/ext/standard/tests/strings/strncasecmp_variation10.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test strncasecmp() function : usage variations - unexpected values for 'str1' ---FILE-- - 'red', 'item' => 'pen'), - - /* boolean values */ - true, - false, - TRUE, - FALSE, - - /* nulls */ - NULL, - null, - - /* empty string */ - "", - '', - - /* undefined variable */ - @$undefined_var, - - /* unset variable */ - @$unset_var, - - /* resource */ - $file_handle, - - /* object */ - new sample() -); - -/* loop through each element of the array and check the working of strncasecmp() */ -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str1 = $values[$index]; - $len = strlen($values[$index]) + 1; - var_dump( strncasecmp($str1, "string", $len) ); - $counter ++; -} - -fclose($file_handle); //closing the file handle - -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Testing strncasecmp() function: with unexpected values for 'str1' *** --- Iteration 1 -- -int(-%d) --- Iteration 2 -- -int(-%d) --- Iteration 3 -- -int(-%d) --- Iteration 4 -- -int(-%d) --- Iteration 5 -- -int(-%d) --- Iteration 6 -- -int(-%d) --- Iteration 7 -- -int(-%d) --- Iteration 8 -- -int(-%d) --- Iteration 9 -- -int(-%d) --- Iteration 10 -- -int(-%d) --- Iteration 11 -- -int(-%d) --- Iteration 12 -- -int(-%d) --- Iteration 13 -- -int(-%d) --- Iteration 14 -- -int(-%d) --- Iteration 15 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line 88 - -Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89 -NULL --- Iteration 16 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line 88 - -Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89 -NULL --- Iteration 17 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line 88 - -Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89 -NULL --- Iteration 18 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line 88 - -Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89 -NULL --- Iteration 19 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line 88 - -Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89 -NULL --- Iteration 20 -- -int(-%d) --- Iteration 21 -- -int(-%d) --- Iteration 22 -- -int(-%d) --- Iteration 23 -- -int(-%d) --- Iteration 24 -- -int(-%d) --- Iteration 25 -- -int(-%d) --- Iteration 26 -- -int(-%d) --- Iteration 27 -- -int(-%d) --- Iteration 28 -- -int(-%d) --- Iteration 29 -- -int(-%d) --- Iteration 30 -- - -Warning: strlen() expects parameter 1 to be string, resource given in %s on line 88 - -Warning: strncasecmp() expects parameter 1 to be string, resource given in %s on line 89 -NULL --- Iteration 31 -- -int(-%d) -*** Done *** diff --git a/ext/standard/tests/strings/strncasecmp_variation11.phpt b/ext/standard/tests/strings/strncasecmp_variation11.phpt deleted file mode 100644 index 362bbf1167621..0000000000000 --- a/ext/standard/tests/strings/strncasecmp_variation11.phpt +++ /dev/null @@ -1,189 +0,0 @@ ---TEST-- -Test strncasecmp() function : usage variations - unexpected values for 'str2' ---FILE-- - 'red', 'item' => 'pen'), - - /* boolean values */ - true, - false, - TRUE, - FALSE, - - /* nulls */ - NULL, - null, - - /* empty string */ - "", - '', - - /* undefined variable */ - @$undefined_var, - - /* unset variable */ - @$unset_var, - - /* resource */ - $file_handle, - - /* object */ - new sample() -); - -/* loop through each element of the array and check the working of strncasecmp() */ -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str1 = $values[$index]; - $str2 = $values[$index]; - $len = strlen($values[$index]) + 1; - var_dump( strncasecmp("string", $str2, $len) ); - $counter ++; -} - -fclose($file_handle); //closing the file handle - -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Testing strncasecmp() function: with unexpected values for 'str2' *** --- Iteration 1 -- -int(%d) --- Iteration 2 -- -int(%d) --- Iteration 3 -- -int(%d) --- Iteration 4 -- -int(%d) --- Iteration 5 -- -int(%d) --- Iteration 6 -- -int(%d) --- Iteration 7 -- -int(%d) --- Iteration 8 -- -int(%d) --- Iteration 9 -- -int(%d) --- Iteration 10 -- -int(%d) --- Iteration 11 -- -int(%d) --- Iteration 12 -- -int(%d) --- Iteration 13 -- -int(%d) --- Iteration 14 -- -int(%d) --- Iteration 15 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 16 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 17 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 18 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 19 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 20 -- -int(%d) --- Iteration 21 -- -int(%d) --- Iteration 22 -- -int(%d) --- Iteration 23 -- -int(%d) --- Iteration 24 -- -int(%d) --- Iteration 25 -- -int(%d) --- Iteration 26 -- -int(%d) --- Iteration 27 -- -int(%d) --- Iteration 28 -- -int(%d) --- Iteration 29 -- -int(%d) --- Iteration 30 -- - -Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d - -Warning: strncasecmp() expects parameter 2 to be string, resource given in %s on line %d -NULL --- Iteration 31 -- -int(4) -*** Done *** diff --git a/ext/standard/tests/strings/strncasecmp_variation4.phpt b/ext/standard/tests/strings/strncasecmp_variation4.phpt deleted file mode 100644 index 93968db2da768..0000000000000 --- a/ext/standard/tests/strings/strncasecmp_variation4.phpt +++ /dev/null @@ -1,189 +0,0 @@ ---TEST-- -Test strncasecmp() function : usage variations - unexpected values for 'str1' & 'str2' ---FILE-- - 'red', 'item' => 'pen'), - - /* boolean values */ - true, - false, - TRUE, - FALSE, - - /* nulls */ - NULL, - null, - - /* empty string */ - "", - '', - - /* undefined variable */ - @$undefined_var, - - /* unset variable */ - @$unset_var, - - /* resource */ - $file_handle, - - /* object */ - new sample() -); - -/* loop through each element of the array and check the working of strncasecmp() */ -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str1 = $values[$index]; - $str2 = $values[$index]; - $len = strlen($values[$index]) + 1; - var_dump( strncasecmp($str1, $str2, $len) ); - $counter ++; -} - -fclose($file_handle); //closing the file handle - -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Testing strncasecmp() function: with unexpected values for 'str1' and 'str2' *** --- Iteration 1 -- -int(0) --- Iteration 2 -- -int(0) --- Iteration 3 -- -int(0) --- Iteration 4 -- -int(0) --- Iteration 5 -- -int(0) --- Iteration 6 -- -int(0) --- Iteration 7 -- -int(0) --- Iteration 8 -- -int(0) --- Iteration 9 -- -int(0) --- Iteration 10 -- -int(0) --- Iteration 11 -- -int(0) --- Iteration 12 -- -int(0) --- Iteration 13 -- -int(0) --- Iteration 14 -- -int(0) --- Iteration 15 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 16 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 17 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 18 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 19 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 20 -- -int(0) --- Iteration 21 -- -int(0) --- Iteration 22 -- -int(0) --- Iteration 23 -- -int(0) --- Iteration 24 -- -int(0) --- Iteration 25 -- -int(0) --- Iteration 26 -- -int(0) --- Iteration 27 -- -int(0) --- Iteration 28 -- -int(0) --- Iteration 29 -- -int(0) --- Iteration 30 -- - -Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d - -Warning: strncasecmp() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 31 -- -int(0) -*** Done *** diff --git a/ext/standard/tests/strings/strncasecmp_variation5.phpt b/ext/standard/tests/strings/strncasecmp_variation5.phpt deleted file mode 100644 index 44a58f78e13c7..0000000000000 --- a/ext/standard/tests/strings/strncasecmp_variation5.phpt +++ /dev/null @@ -1,165 +0,0 @@ ---TEST-- -Test strncasecmp() function : usage variations - unexpected values for 'len' ---SKIPIF-- - 'red', 'item' => 'pen'), - - /* boolean values */ - true, - false, - TRUE, - FALSE, - - /* nulls */ - NULL, - null, - - /* empty string */ - "", - '', - - /* undefined variable */ - @$undefined_var, - - /* unset variable */ - @$unset_var, - - /* resource */ - $file_handle, - - /* object */ - new sample() -); - -/* loop through each element of the array and check the working of strncasecmp() */ -$counter = 1; -for($index = 0; $index < count($lengths); $index ++) { - $len = $lengths[$index]; - echo "-- Iteration $counter --\n"; - var_dump( strncasecmp($str1, $str2, $len) ); - $counter ++; -} -fclose($file_handle); - -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Test strncasecmp() function: unexpected values for 'len' *** --- Iteration 1 -- -int(0) --- Iteration 2 -- -int(0) --- Iteration 3 -- -int(0) --- Iteration 4 -- -int(0) --- Iteration 5 -- -int(0) --- Iteration 6 -- -int(0) --- Iteration 7 -- -int(0) --- Iteration 8 -- - -Warning: strncasecmp() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 9 -- - -Warning: strncasecmp() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 10 -- - -Warning: strncasecmp() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: strncasecmp() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: strncasecmp() expects parameter 3 to be int, array given in %s on line %d -NULL --- Iteration 13 -- -int(0) --- Iteration 14 -- -int(0) --- Iteration 15 -- -int(0) --- Iteration 16 -- -int(0) --- Iteration 17 -- -int(0) --- Iteration 18 -- -int(0) --- Iteration 19 -- - -Warning: strncasecmp() expects parameter 3 to be int, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: strncasecmp() expects parameter 3 to be int, string given in %s on line %d -NULL --- Iteration 21 -- -int(0) --- Iteration 22 -- -int(0) --- Iteration 23 -- - -Warning: strncasecmp() expects parameter 3 to be int, resource given in %s on line %d -NULL --- Iteration 24 -- - -Warning: strncasecmp() expects parameter 3 to be int, object given in %s on line %d -NULL -*** Done *** diff --git a/ext/standard/tests/strings/strncmp_variation4.phpt b/ext/standard/tests/strings/strncmp_variation4.phpt deleted file mode 100644 index 5e96e5d16ff06..0000000000000 --- a/ext/standard/tests/strings/strncmp_variation4.phpt +++ /dev/null @@ -1,192 +0,0 @@ ---TEST-- -Test strncmp() function : usage variations - different inputs(all types) ---FILE-- - 'red', 'item' => 'pen'), - - /* boolean values */ - true, - false, - TRUE, - FALSE, - - /* nulls */ - NULL, - null, - - /* empty string */ - "", - '', - - /* undefined variable */ - $undefined_var, - - /* unset variable */ - $unset_var, - - /* resource */ - $file_handle, - - /* object */ - new sample() -); - -/* loop through each element of the array and check the working of strncmp() */ -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str1 = $values[$index]; - $str2 = $values[$index]; - $len = strlen($values[$index]) + 1; - var_dump( strncmp($str1, $str2, $len) ); - $counter ++; -} -fclose($file_handle); - -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Testing strncmp() function: by supplying all types for 'str1' and 'str2' *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d --- Iteration 1 -- -int(0) --- Iteration 2 -- -int(0) --- Iteration 3 -- -int(0) --- Iteration 4 -- -int(0) --- Iteration 5 -- -int(0) --- Iteration 6 -- -int(0) --- Iteration 7 -- -int(0) --- Iteration 8 -- -int(0) --- Iteration 9 -- -int(0) --- Iteration 10 -- -int(0) --- Iteration 11 -- -int(0) --- Iteration 12 -- -int(0) --- Iteration 13 -- -int(0) --- Iteration 14 -- -int(0) --- Iteration 15 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 16 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 17 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 18 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 19 -- - -Warning: strlen() expects parameter 1 to be string, array given in %s on line %d - -Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 20 -- -int(0) --- Iteration 21 -- -int(0) --- Iteration 22 -- -int(0) --- Iteration 23 -- -int(0) --- Iteration 24 -- -int(0) --- Iteration 25 -- -int(0) --- Iteration 26 -- -int(0) --- Iteration 27 -- -int(0) --- Iteration 28 -- -int(0) --- Iteration 29 -- -int(0) --- Iteration 30 -- - -Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d - -Warning: strncmp() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 31 -- -int(0) -*** Done *** diff --git a/ext/standard/tests/strings/strncmp_variation5.phpt b/ext/standard/tests/strings/strncmp_variation5.phpt deleted file mode 100644 index 85e50f5929704..0000000000000 --- a/ext/standard/tests/strings/strncmp_variation5.phpt +++ /dev/null @@ -1,179 +0,0 @@ ---TEST-- -Test strncmp() function : usage variations - different lengths(all types) ---SKIPIF-- - 'red', 'item' => 'pen'), - - /* boolean values */ - true, - false, - TRUE, - FALSE, - - /* nulls */ - NULL, - null, - - /* empty string */ - "", - '', - - /* undefined variable */ - $undefined_var, - - /* unset variable */ - $unset_var, - - /* resource */ - $file_handle, - - /* object */ - new sample() -); - -/* loop through each element of the array and check the working of strncmp() */ -$counter = 1; -for($index = 0; $index < count($lengths); $index ++) { - $len = $lengths[$index]; - echo "-- Iteration $counter --\n"; - var_dump( strncmp($str1, $str2, $len) ); - $counter ++; -} -fclose($file_handle); - -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Test strncmp() function: by supplying all types for 'len' *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d --- Iteration 1 -- -int(0) --- Iteration 2 -- -int(0) --- Iteration 3 -- -int(0) --- Iteration 4 -- -int(0) --- Iteration 5 -- -int(0) --- Iteration 6 -- -int(0) --- Iteration 7 -- -int(0) --- Iteration 8 -- -int(0) --- Iteration 9 -- -int(0) --- Iteration 10 -- -int(0) --- Iteration 11 -- - -Warning: strncmp() expects parameter 3 to be int, array given in%s on line %d -NULL --- Iteration 12 -- - -Warning: strncmp() expects parameter 3 to be int, array given in%s on line %d -NULL --- Iteration 13 -- - -Warning: strncmp() expects parameter 3 to be int, array given in%s on line %d -NULL --- Iteration 14 -- - -Warning: strncmp() expects parameter 3 to be int, array given in%s on line %d -NULL --- Iteration 15 -- - -Warning: strncmp() expects parameter 3 to be int, array given in%s on line %d -NULL --- Iteration 16 -- -int(0) --- Iteration 17 -- -int(0) --- Iteration 18 -- -int(0) --- Iteration 19 -- -int(0) --- Iteration 20 -- -int(0) --- Iteration 21 -- -int(0) --- Iteration 22 -- - -Warning: strncmp() expects parameter 3 to be int, string given in%s on line %d -NULL --- Iteration 23 -- - -Warning: strncmp() expects parameter 3 to be int, string given in%s on line %d -NULL --- Iteration 24 -- -int(0) --- Iteration 25 -- -int(0) --- Iteration 26 -- - -Warning: strncmp() expects parameter 3 to be int, resource given in%s on line %d -NULL --- Iteration 27 -- - -Warning: strncmp() expects parameter 3 to be int, object given in%s on line %d -NULL -*** Done *** diff --git a/ext/standard/tests/strings/strrchr_variation9.phpt b/ext/standard/tests/strings/strrchr_variation9.phpt deleted file mode 100644 index 760bfa6067396..0000000000000 --- a/ext/standard/tests/strings/strrchr_variation9.phpt +++ /dev/null @@ -1,198 +0,0 @@ ---TEST-- -Test strrchr() function : usage variations - unexpected inputs for haystack ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // null values - NULL, - null, - - // objects - new sample(), - - // empty string - "", - '', - - // resource - $file_handle, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -$needles = array ( - //integer numeric strings - "0", - "1", - "2", - "-2", - - //float numeric strings - "10.5", - "-10.5", - "10.5e10", - "10.6E-10", - ".5", - - //regular strings - "array", - "a", - "r", - "y", - "ay", - "true", - "false", - "TRUE", - "FALSE", - "NULL", - "null", - "object", - - //empty string - "", - '', - - //resource variable in string form - "\$file_handle", - - //undefined variable in string form - @"$undefined_var", - @"$unset_var" -); - -// loop through each element of the array and check the working of strrchr() -$count = 1; -for($index = 0; $index < count($haystacks); $index++) { - echo "-- Iteration $count --\n"; - var_dump( strrchr($haystacks[$index], $needles[$index]) ); - $count ++; -} - -fclose($file_handle); //closing the file handle - -echo "*** Done ***"; -?> ---EXPECTF-- -*** Testing strrchr() function: with unexpected inputs for haystack *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(4) "2345" --- Iteration 4 -- -string(5) "-2345" --- Iteration 5 -- -string(4) "10.5" --- Iteration 6 -- -string(5) "-10.5" --- Iteration 7 -- -string(12) "105000000000" --- Iteration 8 -- -string(7) "1.06E-9" --- Iteration 9 -- -string(2) ".5" --- Iteration 10 -- - -Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: strrchr() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -bool(false) --- Iteration 16 -- -bool(false) --- Iteration 17 -- -bool(false) --- Iteration 18 -- -bool(false) --- Iteration 19 -- -bool(false) --- Iteration 20 -- -bool(false) --- Iteration 21 -- -string(6) "object" --- Iteration 22 -- -bool(false) --- Iteration 23 -- -bool(false) --- Iteration 24 -- - -Warning: strrchr() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- -bool(false) --- Iteration 26 -- -bool(false) -*** Done *** diff --git a/ext/standard/tests/strings/strrev_variation4.phpt b/ext/standard/tests/strings/strrev_variation4.phpt deleted file mode 100644 index b585035c11d3b..0000000000000 --- a/ext/standard/tests/strings/strrev_variation4.phpt +++ /dev/null @@ -1,182 +0,0 @@ ---TEST-- -Test strrev() function : usage variations - unexpected inputs ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new sample(), - - // resource - $resource, - - // undefined data - @$undefined_var, - - // unset data - @$unset_var -); - -// loop through each element of the array for str - -$count = 1; -foreach($values as $value) { - echo "\n-- Iterator $count --\n"; - var_dump( strrev($value) ); - $count++; -}; - -fclose($resource); //closing the file handle - -echo "*** Done ***"; -?> ---EXPECTF-- -*** Testing strrev() : unexpected inputs for 'str' *** - --- Iterator 1 -- -string(1) "0" - --- Iterator 2 -- -string(1) "1" - --- Iterator 3 -- -string(5) "54321" - --- Iterator 4 -- -string(5) "5432-" - --- Iterator 5 -- -string(4) "5.01" - --- Iterator 6 -- -string(5) "5.01-" - --- Iterator 7 -- -string(12) "000000000501" - --- Iterator 8 -- -string(7) "9-E60.1" - --- Iterator 9 -- -string(3) "5.0" - --- Iterator 10 -- - -Warning: strrev() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iterator 11 -- - -Warning: strrev() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iterator 12 -- - -Warning: strrev() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iterator 13 -- - -Warning: strrev() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iterator 14 -- - -Warning: strrev() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iterator 15 -- -string(0) "" - --- Iterator 16 -- -string(0) "" - --- Iterator 17 -- -string(1) "1" - --- Iterator 18 -- -string(0) "" - --- Iterator 19 -- -string(1) "1" - --- Iterator 20 -- -string(0) "" - --- Iterator 21 -- -string(0) "" - --- Iterator 22 -- -string(0) "" - --- Iterator 23 -- -string(6) "tcejbo" - --- Iterator 24 -- - -Warning: strrev() expects parameter 1 to be string, resource given in %s on line %d -NULL - --- Iterator 25 -- -string(0) "" - --- Iterator 26 -- -string(0) "" -*** Done *** diff --git a/ext/standard/tests/strings/strrpos_variation14.phpt b/ext/standard/tests/strings/strrpos_variation14.phpt deleted file mode 100644 index db4a0590d094e..0000000000000 --- a/ext/standard/tests/strings/strrpos_variation14.phpt +++ /dev/null @@ -1,155 +0,0 @@ ---TEST-- -Test strrpos() function : usage variations - unexpected inputs for 'offset' argument ---SKIPIF-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new sample(), - - // empty string - "", - '', - - // null values - NULL, - null, - - //resource - $file_handle, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop through each element of the array and check the working of strrpos() -$counter = 1; -for($index = 0; $index < count($offsets); $index ++) { - echo "-- Iteration $counter --\n"; - var_dump( strrpos($haystack, $needle, $offsets[$index]) ); - $counter ++; -} - -echo "*** Done ***"; -?> ---EXPECTF-- -*** Testing strrpos() function: with unexpected values for offset *** --- Iteration 1 -- -int(6) --- Iteration 2 -- -int(6) --- Iteration 3 -- - -Warning: strrpos() expects parameter 3 to be int, float given in %s on line %d -bool(false) --- Iteration 4 -- -int(6) --- Iteration 5 -- -int(6) --- Iteration 6 -- - -Warning: strrpos() expects parameter 3 to be int, array given in %s on line %d -bool(false) --- Iteration 7 -- - -Warning: strrpos() expects parameter 3 to be int, array given in %s on line %d -bool(false) --- Iteration 8 -- - -Warning: strrpos() expects parameter 3 to be int, array given in %s on line %d -bool(false) --- Iteration 9 -- - -Warning: strrpos() expects parameter 3 to be int, array given in %s on line %d -bool(false) --- Iteration 10 -- - -Warning: strrpos() expects parameter 3 to be int, array given in %s on line %d -bool(false) --- Iteration 11 -- -int(6) --- Iteration 12 -- -int(6) --- Iteration 13 -- -int(6) --- Iteration 14 -- -int(6) --- Iteration 15 -- - -Warning: strrpos() expects parameter 3 to be int, object given in %s on line %d -bool(false) --- Iteration 16 -- - -Warning: strrpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- Iteration 17 -- - -Warning: strrpos() expects parameter 3 to be int, string given in %s on line %d -bool(false) --- Iteration 18 -- -int(6) --- Iteration 19 -- -int(6) --- Iteration 20 -- - -Warning: strrpos() expects parameter 3 to be int, resource given in %s on line %d -bool(false) --- Iteration 21 -- -int(6) --- Iteration 22 -- -int(6) -*** Done *** diff --git a/ext/standard/tests/strings/strrpos_variation9.phpt b/ext/standard/tests/strings/strrpos_variation9.phpt deleted file mode 100644 index 576d5b41e45dc..0000000000000 --- a/ext/standard/tests/strings/strrpos_variation9.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test strrpos() function : usage variations - unexpected inputs for 'haystack' argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new sample(), - - // empty string - "", - '', - - // null values - NULL, - null, - - // resource - $file_handle, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -$needle = "heredoc 0 1 2 -2 10.5 -10.5 10.5e10 10.6E-10 .5 array true false object \"\" null Resource"; - -// loop through each element of the array and check the working of strrpos() -$counter = 1; -for($index = 0; $index < count($haystacks); $index ++) { - echo "\n-- Iteration $counter --\n"; - var_dump( strrpos($haystacks[$index], $needle) ); - $counter ++; -} - -fclose($file_handle); //closing the file handle - -echo "*** Done ***"; -?> ---EXPECTF-- -*** Testing strrpos() function with unexpected values for haystack *** - --- Iteration 1 -- -bool(false) - --- Iteration 2 -- -bool(false) - --- Iteration 3 -- -bool(false) - --- Iteration 4 -- -bool(false) - --- Iteration 5 -- -bool(false) - --- Iteration 6 -- -bool(false) - --- Iteration 7 -- -bool(false) - --- Iteration 8 -- -bool(false) - --- Iteration 9 -- -bool(false) - --- Iteration 10 -- - -Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- Iteration 11 -- - -Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- Iteration 12 -- - -Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- Iteration 13 -- - -Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- Iteration 14 -- - -Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d -bool(false) - --- Iteration 15 -- -bool(false) - --- Iteration 16 -- -bool(false) - --- Iteration 17 -- -bool(false) - --- Iteration 18 -- -bool(false) - --- Iteration 19 -- -bool(false) - --- Iteration 20 -- -bool(false) - --- Iteration 21 -- -bool(false) - --- Iteration 22 -- -bool(false) - --- Iteration 23 -- -bool(false) - --- Iteration 24 -- - -Warning: strrpos() expects parameter 1 to be string, resource given in %s on line %d -bool(false) - --- Iteration 25 -- -bool(false) - --- Iteration 26 -- -bool(false) -*** Done *** diff --git a/ext/standard/tests/strings/strspn_variation1.phpt b/ext/standard/tests/strings/strspn_variation1.phpt deleted file mode 100644 index db6e8f9a153ce..0000000000000 --- a/ext/standard/tests/strings/strspn_variation1.phpt +++ /dev/null @@ -1,273 +0,0 @@ ---TEST-- -Test strspn() function : usage variations - unexpected values for str argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new sample, - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for str - -foreach($values as $value) { - echo "\n-- Iteration with str value as \"$value\"\n"; - var_dump( strspn($value,$mask) ); // with default args - var_dump( strspn($value,$mask,$start) ); // with default len value - var_dump( strspn($value,$mask,$start,$len) ); // with all args -}; - -// closing the resource -fclose($file_handle); - -echo "Done" -?> ---EXPECTF-- -*** Testing strspn() : with unexpected values for str argument *** - --- Iteration with str value as "0" -int(1) -int(0) -int(0) - --- Iteration with str value as "1" -int(1) -int(0) -int(0) - --- Iteration with str value as "12345" -int(5) -int(4) -int(4) - --- Iteration with str value as "-2345" -int(0) -int(4) -int(4) - --- Iteration with str value as "10.5" -int(2) -int(1) -int(1) - --- Iteration with str value as "-10.5" -int(0) -int(2) -int(2) - --- Iteration with str value as "101234567000" -int(12) -int(11) -int(10) - --- Iteration with str value as "1.07654321E-9" -int(1) -int(0) -int(0) - --- Iteration with str value as "0.5" -int(1) -int(0) -int(0) - --- Iteration with str value as "Array" - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration with str value as "Array" - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration with str value as "Array" - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration with str value as "Array" - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration with str value as "Array" - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "1" -int(1) -int(0) -int(0) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "1" -int(1) -int(0) -int(0) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "object" -int(2) -int(1) -int(1) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "" -int(0) -bool(false) -bool(false) - --- Iteration with str value as "Resource id #%d" - -Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strspn_variation2.phpt b/ext/standard/tests/strings/strspn_variation2.phpt deleted file mode 100644 index 1d31a1c802754..0000000000000 --- a/ext/standard/tests/strings/strspn_variation2.phpt +++ /dev/null @@ -1,272 +0,0 @@ ---TEST-- -Test strspn() function : usage variations - unexpected values for mask argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new sample(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for mask - -foreach($values as $value) { - echo "\n-- Iteration with mask value as \"$value\" --\n"; - var_dump( strspn($str,$value) ); // with defalut args - var_dump( strspn($str,$value,$start) ); // with default len value - var_dump( strspn($str,$value,$start,$len) ); // with all args -}; - -// close the resource -fclose($file_handle); - -echo "Done" -?> ---EXPECTF-- -*** Testing strspn() : with different unexpected values of mask argument *** - --- Iteration with mask value as "0" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "1" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "12345" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "-2345" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "10.5" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "-10.5" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "101234567000" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "1.07654321E-9" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "0.5" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "Array" -- - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - --- Iteration with mask value as "Array" -- - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - --- Iteration with mask value as "Array" -- - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - --- Iteration with mask value as "Array" -- - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - --- Iteration with mask value as "Array" -- - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, array given in %s on line %d -NULL - --- Iteration with mask value as "" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "1" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "1" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "object" -- -int(0) -int(1) -int(1) - --- Iteration with mask value as "" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "" -- -int(0) -int(0) -int(0) - --- Iteration with mask value as "Resource id #%d" -- - -Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d -NULL - -Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strspn_variation3.phpt b/ext/standard/tests/strings/strspn_variation3.phpt deleted file mode 100644 index 76f11acc26743..0000000000000 --- a/ext/standard/tests/strings/strspn_variation3.phpt +++ /dev/null @@ -1,243 +0,0 @@ ---TEST-- -Test strspn() function : usage variations - unexpected values of start argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new sample(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for start - -foreach($values as $value) { - echo "\n-- Iteration with start value as \"$value\" --\n"; - var_dump( strspn($str,$mask,$value) ); // with default len value - var_dump( strspn($str,$mask,$value,$len) ); // with all args -}; - -// closing the resource -fclose($file_handle); - -echo "Done" -?> ---EXPECTF-- -*** Testing strspn() : with unexpected values of start argument *** - --- Iteration with start value as "10.5" -- -int(0) -int(0) - --- Iteration with start value as "-10.5" -- -int(2) -int(2) - --- Iteration with start value as "1012345670" -- -bool(false) -bool(false) - --- Iteration with start value as "1.07654321E-7" -- -int(2) -int(2) - --- Iteration with start value as "0.5" -- -int(2) -int(2) - --- Iteration with start value as "Array" -- - -Warning: strspn() expects parameter 3 to be int, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration with start value as "Array" -- - -Warning: strspn() expects parameter 3 to be int, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration with start value as "Array" -- - -Warning: strspn() expects parameter 3 to be int, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration with start value as "Array" -- - -Warning: strspn() expects parameter 3 to be int, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration with start value as "Array" -- - -Warning: strspn() expects parameter 3 to be int, array given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, array given in %s on line %d -NULL - --- Iteration with start value as "" -- -int(2) -int(2) - --- Iteration with start value as "" -- -int(2) -int(2) - --- Iteration with start value as "1" -- -int(1) -int(1) - --- Iteration with start value as "" -- -int(2) -int(2) - --- Iteration with start value as "1" -- -int(1) -int(1) - --- Iteration with start value as "" -- -int(2) -int(2) - --- Iteration with start value as "" -- - -Warning: strspn() expects parameter 3 to be int, string given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration with start value as "" -- - -Warning: strspn() expects parameter 3 to be int, string given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration with start value as "string" -- - -Warning: strspn() expects parameter 3 to be int, string given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration with start value as "string" -- - -Warning: strspn() expects parameter 3 to be int, string given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, string given in %s on line %d -NULL - --- Iteration with start value as "object" -- - -Warning: strspn() expects parameter 3 to be int, object given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, object given in %s on line %d -NULL - --- Iteration with start value as "" -- -int(2) -int(2) - --- Iteration with start value as "" -- -int(2) -int(2) - --- Iteration with start value as "Resource id #%d" -- - -Warning: strspn() expects parameter 3 to be int, resource given in %s on line %d -NULL - -Warning: strspn() expects parameter 3 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strspn_variation4.phpt b/ext/standard/tests/strings/strspn_variation4.phpt deleted file mode 100644 index 858a4fb608595..0000000000000 --- a/ext/standard/tests/strings/strspn_variation4.phpt +++ /dev/null @@ -1,196 +0,0 @@ ---TEST-- -Test strspn() function : usage variations - unexpected values of len argument ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new sample(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for start - -foreach($values as $value) { - echo "\n-- Iteration with len value as \"$value\" --\n"; - var_dump( strspn($str,$mask,$start,$value) ); // with all args -}; - -// closing the resource -fclose($file_handle); - -echo "Done" -?> ---EXPECTF-- -*** Testing strspn() : with unexpected values of len argument *** - --- Iteration with len value as "10.5" -- -int(2) - --- Iteration with len value as "-10.5" -- -int(0) - --- Iteration with len value as "1012345670" -- -int(2) - --- Iteration with len value as "1.07654321E-7" -- -int(0) - --- Iteration with len value as "0.5" -- -int(0) - --- Iteration with len value as "Array" -- - -Warning: strspn() expects parameter 4 to be int, array given in %s on line %d -NULL - --- Iteration with len value as "Array" -- - -Warning: strspn() expects parameter 4 to be int, array given in %s on line %d -NULL - --- Iteration with len value as "Array" -- - -Warning: strspn() expects parameter 4 to be int, array given in %s on line %d -NULL - --- Iteration with len value as "Array" -- - -Warning: strspn() expects parameter 4 to be int, array given in %s on line %d -NULL - --- Iteration with len value as "Array" -- - -Warning: strspn() expects parameter 4 to be int, array given in %s on line %d -NULL - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "1" -- -int(1) - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "1" -- -int(1) - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "" -- - -Warning: strspn() expects parameter 4 to be int, string given in %s on line %d -NULL - --- Iteration with len value as "" -- - -Warning: strspn() expects parameter 4 to be int, string given in %s on line %d -NULL - --- Iteration with len value as "string" -- - -Warning: strspn() expects parameter 4 to be int, string given in %s on line %d -NULL - --- Iteration with len value as "string" -- - -Warning: strspn() expects parameter 4 to be int, string given in %s on line %d -NULL - --- Iteration with len value as "object" -- - -Warning: strspn() expects parameter 4 to be int, object given in %s on line %d -NULL - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "" -- -int(0) - --- Iteration with len value as "Resource id #%d" -- - -Warning: strspn() expects parameter 4 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strtok_variation1.phpt b/ext/standard/tests/strings/strtok_variation1.phpt deleted file mode 100644 index 9c46428a65262..0000000000000 --- a/ext/standard/tests/strings/strtok_variation1.phpt +++ /dev/null @@ -1,174 +0,0 @@ ---TEST-- -Test strtok() function : usage variations - first argument as non-string ---FILE-- - 'red-color', 'item' => 'pen-color'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new sample(), - - // empty string - "", - '', - - // null values - NULL, - null, - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // resource - $file_handle -); - - -// loop through each element of the array and check the working of strtok() -// when $str argument is supplied with different values - -echo "\n--- Testing strtok() by supplying different values for 'str' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str = $values [$index]; - - var_dump( strtok($str, $token) ); - - $counter ++; -} - -//closing the resource -fclose($file_handle); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing strtok() : with first argument as non-string *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing strtok() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(5) "12345" --- Iteration 4 -- -string(4) "2345" --- Iteration 5 -- -string(4) "10.5" --- Iteration 6 -- -string(4) "10.5" --- Iteration 7 -- -string(12) "101234567000" --- Iteration 8 -- -string(11) "1.07654321E" --- Iteration 9 -- -string(3) "0.5" --- Iteration 10 -- - -Warning: strtok() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: strtok() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: strtok() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: strtok() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: strtok() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(1) "1" --- Iteration 16 -- -bool(false) --- Iteration 17 -- -string(1) "1" --- Iteration 18 -- -bool(false) --- Iteration 19 -- -string(3) "obj" --- Iteration 20 -- -bool(false) --- Iteration 21 -- -bool(false) --- Iteration 22 -- -bool(false) --- Iteration 23 -- -bool(false) --- Iteration 24 -- -bool(false) --- Iteration 25 -- -bool(false) --- Iteration 26 -- - -Warning: strtok() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strtok_variation2.phpt b/ext/standard/tests/strings/strtok_variation2.phpt deleted file mode 100644 index 26de1ae0b5e68..0000000000000 --- a/ext/standard/tests/strings/strtok_variation2.phpt +++ /dev/null @@ -1,174 +0,0 @@ ---TEST-- -Test strtok() function : usage variations - with different token strings ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new sample(), - - // empty string - "", - '', - - // null values - NULL, - null, - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // resource - $file_handle -); - - -// loop through each element of the array and check the working of strtok() -// when $token argument is supplied with different values - -echo "\n--- Testing strtok() by supplying different values for 'token' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $token = $values [$index]; - - var_dump( strtok($str, $token) ); - - $counter ++; -} - -// closing the resource -fclose($file_handle); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing strtok() : with different token strings *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing strtok() by supplying different values for 'token' argument --- --- Iteration 1 -- -string(37) "this testcase test strtok() function " --- Iteration 2 -- -string(37) "this testcase test strtok() function " --- Iteration 3 -- -string(37) "this testcase test strtok() function " --- Iteration 4 -- -string(37) "this testcase test strtok() function " --- Iteration 5 -- -string(37) "this testcase test strtok() function " --- Iteration 6 -- -string(37) "this testcase test strtok() function " --- Iteration 7 -- -string(37) "this testcase test strtok() function " --- Iteration 8 -- -string(37) "this testcase test strtok() function " --- Iteration 9 -- -string(37) "this testcase test strtok() function " --- Iteration 10 -- - -Warning: strtok() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: strtok() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: strtok() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: strtok() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: strtok() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(37) "this testcase test strtok() function " --- Iteration 16 -- -string(37) "this testcase test strtok() function " --- Iteration 17 -- -string(37) "this testcase test strtok() function " --- Iteration 18 -- -string(37) "this testcase test strtok() function " --- Iteration 19 -- -string(4) "his " --- Iteration 20 -- -string(37) "this testcase test strtok() function " --- Iteration 21 -- -string(37) "this testcase test strtok() function " --- Iteration 22 -- -string(37) "this testcase test strtok() function " --- Iteration 23 -- -string(37) "this testcase test strtok() function " --- Iteration 24 -- -string(37) "this testcase test strtok() function " --- Iteration 25 -- -string(37) "this testcase test strtok() function " --- Iteration 26 -- - -Warning: strtok() expects parameter 2 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/strtr_variation5.phpt b/ext/standard/tests/strings/strtr_variation5.phpt deleted file mode 100644 index cb6ad267ad5cc..0000000000000 --- a/ext/standard/tests/strings/strtr_variation5.phpt +++ /dev/null @@ -1,139 +0,0 @@ ---TEST-- -Test strtr() function : usage variations - unexpected inputs for 'str' argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing strtr() function: with unexpected inputs for 'str' *** --- Iteration 1 -- -string(1) "a" --- Iteration 2 -- -string(1) "t" --- Iteration 3 -- -string(2) "-m" --- Iteration 4 -- -string(4) "ta.5" --- Iteration 5 -- -string(5) "-ma.5" --- Iteration 6 -- -string(12) "tatm34567aaa" --- Iteration 7 -- - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 8 -- - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 9 -- - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 10 -- -string(1) "t" --- Iteration 11 -- -string(0) "" --- Iteration 12 -- -string(1) "t" --- Iteration 13 -- -string(0) "" --- Iteration 14 -- -string(0) "" --- Iteration 15 -- -string(0) "" --- Iteration 16 -- -string(13) "s02ple objec1" --- Iteration 17 -- - -Warning: strtr() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/strtr_variation7.phpt b/ext/standard/tests/strings/strtr_variation7.phpt deleted file mode 100644 index 9f7cb95371850..0000000000000 --- a/ext/standard/tests/strings/strtr_variation7.phpt +++ /dev/null @@ -1,158 +0,0 @@ ---TEST-- -Test strtr() function : usage variations - unexpected inputs for 'to' argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing strtr() function: with unexpected inputs for 'to' *** - --- Iteration 1 -- -string(6) "0120tm" - --- Iteration 2 -- -string(6) "0121tm" - --- Iteration 3 -- -string(6) "012-2m" - --- Iteration 4 -- -string(6) "51210." - --- Iteration 5 -- -string(6) ".52-20" - --- Iteration 6 -- -string(6) "234101" - --- Iteration 7 -- - -Warning: strtr() expects parameter 3 to be string, array given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: strtr() expects parameter 3 to be string, array given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: strtr() expects parameter 3 to be string, array given in %s on line %d -NULL - --- Iteration 10 -- -string(6) "0121tm" - --- Iteration 11 -- -string(6) "012atm" - --- Iteration 12 -- -string(6) "0121tm" - --- Iteration 13 -- -string(6) "012atm" - --- Iteration 14 -- -string(6) "012atm" - --- Iteration 15 -- -string(6) "012atm" - --- Iteration 16 -- -string(6) "plesam" - --- Iteration 17 -- - -Warning: strtr() expects parameter 3 to be string, resource given in %s on line %d -NULL - --- Iteration 18 -- -string(6) "012atm" - --- Iteration 19 -- -string(6) "012atm" -===DONE=== diff --git a/ext/standard/tests/strings/strtr_variation9.phpt b/ext/standard/tests/strings/strtr_variation9.phpt deleted file mode 100644 index 427fde5f75995..0000000000000 --- a/ext/standard/tests/strings/strtr_variation9.phpt +++ /dev/null @@ -1,225 +0,0 @@ ---TEST-- -Test strtr() function : usage variations - unexpected inputs for all arguments ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values -/*12*/ true, - false, - TRUE, - FALSE, - - // null values -/*16*/ NULL, - null, - - // objects -/*18*/ new sample(), - - // resource -/*19*/ $file_handle, - - // undefined variable -/*20*/ @$undefined_var, - - // unset variable -/*21*/ @$unset_var -); - -// loop through with each element of the $values array to test strtr() function -$count = 1; -for($index = 0; $index < count($values); $index++) { - echo "\n-- Iteration $count --\n"; - var_dump( strtr($values[$index], $values[$index], $values[$index]) ); //fn call with three args - var_dump( strtr($values[$index], $values[$index]) ); //fn call with two args - $count ++; -} - -fclose($file_handle); //closing the file handle - -?> -===DONE=== ---EXPECTF-- -*** Testing strtr() function: with unexpected inputs for all arguments *** - --- Iteration 1 -- -string(1) "0" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 2 -- -string(1) "1" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 3 -- -string(2) "-2" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 4 -- -string(4) "10.5" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 5 -- -string(5) "-20.5" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 6 -- -string(12) "101234567000" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 7 -- - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: strtr() expects parameter 1 to be string, array given in %s on line %d -NULL - --- Iteration 12 -- -string(1) "1" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 13 -- -string(0) "" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 14 -- -string(1) "1" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 15 -- -string(0) "" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 16 -- -string(0) "" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 17 -- -string(0) "" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 18 -- -string(13) "sample object" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 19 -- - -Warning: strtr() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: strtr() expects parameter 1 to be string, resource given in %s on line %d -NULL - --- Iteration 20 -- -string(0) "" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) - --- Iteration 21 -- -string(0) "" - -Warning: strtr(): The second argument is not an array in %s on line %d -bool(false) -===DONE=== diff --git a/ext/standard/tests/strings/trim_variation1.phpt b/ext/standard/tests/strings/trim_variation1.phpt deleted file mode 100644 index 56578fb75c891..0000000000000 --- a/ext/standard/tests/strings/trim_variation1.phpt +++ /dev/null @@ -1,138 +0,0 @@ ---TEST-- -Test trim() function : usage variations - test values for $str argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing trim() function: with unexpected inputs for 'str' argument *** --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(3) "255" --- Iteration 4 -- -string(3) "256" --- Iteration 5 -- -string(10) "2147483647" --- Iteration 6 -- -string(10) "2147483648" --- Iteration 7 -- -string(4) "10.5" --- Iteration 8 -- -string(4) "20.5" --- Iteration 9 -- -string(12) "101234567000" --- Iteration 10 -- - -Warning: trim() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: trim() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: trim() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -string(1) "1" --- Iteration 14 -- -string(0) "" --- Iteration 15 -- -string(1) "1" --- Iteration 16 -- -string(0) "" --- Iteration 17 -- -string(0) "" --- Iteration 18 -- -string(0) "" --- Iteration 19 -- -string(13) "sample object" --- Iteration 20 -- - -Warning: trim() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -string(0) "" --- Iteration 22 -- -string(0) "" -===DONE=== diff --git a/ext/standard/tests/strings/trim_variation2.phpt b/ext/standard/tests/strings/trim_variation2.phpt deleted file mode 100644 index d38f898862e42..0000000000000 --- a/ext/standard/tests/strings/trim_variation2.phpt +++ /dev/null @@ -1,138 +0,0 @@ ---TEST-- -Test trim() function : usage variations - test values for $charlist argument ---FILE-- - -===DONE=== ---EXPECTF-- -*** Testing trim() function: with unexpected inputs for 'charlist' argument *** --- Iteration 1 -- -string(19) "!---Hello World---!" --- Iteration 2 -- -string(19) "!---Hello World---!" --- Iteration 3 -- -string(19) "!---Hello World---!" --- Iteration 4 -- -string(19) "!---Hello World---!" --- Iteration 5 -- -string(19) "!---Hello World---!" --- Iteration 6 -- -string(19) "!---Hello World---!" --- Iteration 7 -- -string(19) "!---Hello World---!" --- Iteration 8 -- -string(19) "!---Hello World---!" --- Iteration 9 -- -string(19) "!---Hello World---!" --- Iteration 10 -- - -Warning: trim() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: trim() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: trim() expects parameter 2 to be string, array given in %s on line %d -NULL --- Iteration 13 -- -string(19) "!---Hello World---!" --- Iteration 14 -- -string(19) "!---Hello World---!" --- Iteration 15 -- -string(19) "!---Hello World---!" --- Iteration 16 -- -string(19) "!---Hello World---!" --- Iteration 17 -- -string(19) "!---Hello World---!" --- Iteration 18 -- -string(19) "!---Hello World---!" --- Iteration 19 -- -string(19) "!---Hello World---!" --- Iteration 20 -- - -Warning: trim() expects parameter 2 to be string, resource given in %s on line %d -NULL --- Iteration 21 -- -string(19) "!---Hello World---!" --- Iteration 22 -- -string(19) "!---Hello World---!" -===DONE=== diff --git a/ext/standard/tests/strings/ucwords_variation1.phpt b/ext/standard/tests/strings/ucwords_variation1.phpt deleted file mode 100644 index 1604402353469..0000000000000 --- a/ext/standard/tests/strings/ucwords_variation1.phpt +++ /dev/null @@ -1,201 +0,0 @@ ---TEST-- -Test ucwords() function : usage variations - unexpected input values ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new my(), - - // empty string - "", - '', - - //NULL - NULL, - null, - - // hex in string - "0x123", - '0x123', - "0xFF12", - "-0xFF12", - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var, - - // resource variable - $fp -); - -// loop through each element of the array and check the working of ucwords() -// when $str argument is supplied with different values -echo "\n--- Testing ucwords() by supplying different values for 'str' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str = $values [$index]; - - var_dump( ucwords($str) ); - - $counter ++; -} - -// close the file handle -fclose($fp); -echo "Done\n"; -?> ---EXPECTF-- -*** Testing ucwords() : usage variations *** - ---- Testing ucwords() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" --- Iteration 2 -- -string(1) "1" --- Iteration 3 -- -string(5) "12345" --- Iteration 4 -- -string(5) "-2345" --- Iteration 5 -- -string(2) "16" --- Iteration 6 -- -string(2) "32" --- Iteration 7 -- -string(3) "170" --- Iteration 8 -- -string(4) "-245" --- Iteration 9 -- -string(2) "83" --- Iteration 10 -- -string(4) "-226" --- Iteration 11 -- -string(4) "10.5" --- Iteration 12 -- -string(5) "-10.5" --- Iteration 13 -- -string(12) "101234567000" --- Iteration 14 -- -string(13) "1.07654321E-9" --- Iteration 15 -- -string(3) "0.5" --- Iteration 16 -- - -Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 17 -- - -Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 18 -- - -Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 19 -- - -Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 20 -- - -Warning: ucwords() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 21 -- -string(1) "1" --- Iteration 22 -- -string(0) "" --- Iteration 23 -- -string(1) "1" --- Iteration 24 -- -string(0) "" --- Iteration 25 -- -string(8) "MyString" --- Iteration 26 -- -string(0) "" --- Iteration 27 -- -string(0) "" --- Iteration 28 -- -string(0) "" --- Iteration 29 -- -string(0) "" --- Iteration 30 -- -string(5) "0x123" --- Iteration 31 -- -string(5) "0x123" --- Iteration 32 -- -string(6) "0xFF12" --- Iteration 33 -- -string(7) "-0xFF12" --- Iteration 34 -- -string(0) "" --- Iteration 35 -- -string(0) "" --- Iteration 36 -- - -Warning: ucwords() expects parameter 1 to be string, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/strings/utf8_decode_variation1.phpt b/ext/standard/tests/strings/utf8_decode_variation1.phpt deleted file mode 100644 index 10d4f31ca4fc0..0000000000000 --- a/ext/standard/tests/strings/utf8_decode_variation1.phpt +++ /dev/null @@ -1,169 +0,0 @@ ---TEST-- -Test utf8_decode() function : usage variations - different types for data ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new aClass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for data - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( utf8_decode($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing utf8_decode() : usage variations *** - -Arg value 0 -string(1) "0" - -Arg value 1 -string(1) "1" - -Arg value 12345 -string(5) "12345" - -Arg value -2345 -string(5) "-2345" - -Arg value 10.5 -string(4) "10.5" - -Arg value -10.5 -string(5) "-10.5" - -Arg value 101234567000 -string(12) "101234567000" - -Arg value 1.07654321E-9 -string(13) "1.07654321E-9" - -Arg value 0.5 -string(3) "0.5" - -Arg value Array - -Warning: utf8_decode() expects parameter 1 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: utf8_decode() expects parameter 1 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: utf8_decode() expects parameter 1 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: utf8_decode() expects parameter 1 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: utf8_decode() expects parameter 1 to be string, array given in %s on line %d -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value Some Ascii Data -string(15) "Some Ascii Data" - -Arg value -string(0) "" - -Arg value -string(0) "" -Done diff --git a/ext/standard/tests/strings/utf8_encode_variation1.phpt b/ext/standard/tests/strings/utf8_encode_variation1.phpt deleted file mode 100644 index a0212ea45e5d2..0000000000000 --- a/ext/standard/tests/strings/utf8_encode_variation1.phpt +++ /dev/null @@ -1,169 +0,0 @@ ---TEST-- -Test utf8_encode() function : usage variations - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new aClass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for data - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( utf8_encode($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing utf8_encode() : usage variations *** - -Arg value 0 -string(1) "0" - -Arg value 1 -string(1) "1" - -Arg value 12345 -string(5) "12345" - -Arg value -2345 -string(5) "-2345" - -Arg value 10.5 -string(4) "10.5" - -Arg value -10.5 -string(5) "-10.5" - -Arg value 101234567000 -string(12) "101234567000" - -Arg value 1.07654321E-9 -string(13) "1.07654321E-9" - -Arg value 0.5 -string(3) "0.5" - -Arg value Array - -Warning: utf8_encode() expects parameter 1 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: utf8_encode() expects parameter 1 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: utf8_encode() expects parameter 1 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: utf8_encode() expects parameter 1 to be string, array given in %s on line %d -NULL - -Arg value Array - -Warning: utf8_encode() expects parameter 1 to be string, array given in %s on line %d -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value Some Ascii Data -string(15) "Some Ascii Data" - -Arg value -string(0) "" - -Arg value -string(0) "" -Done diff --git a/ext/standard/tests/strings/wordwrap_variation1.phpt b/ext/standard/tests/strings/wordwrap_variation1.phpt deleted file mode 100644 index 86f6fac482f4d..0000000000000 --- a/ext/standard/tests/strings/wordwrap_variation1.phpt +++ /dev/null @@ -1,335 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexpected values for str argument ---FILE-- -\n'; -$cut = true; - -// resource variable -$fp = fopen(__FILE__, "r"); - -// get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.1234567e10, - 10.7654321E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new stdclass(), - - // Null - NULL, - null, - - // empty string - "", - '', - - // resource variable - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -// loop though each element of the array and check the working of wordwrap() -// when $str argument is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'str' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str = $values [$index]; - - var_dump( wordwrap($str) ); - var_dump( wordwrap($str, $width) ); - var_dump( wordwrap($str, $width, $break) ); - - // $cut as false - $cut = false; - var_dump( wordwrap($str, $width, $break, $cut) ); - - // $cut as true - $cut = true; - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" -string(1) "0" -string(1) "0" -string(1) "0" -string(1) "0" --- Iteration 2 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 3 -- -string(5) "12345" -string(5) "12345" -string(5) "12345" -string(5) "12345" -string(13) "123
\n45" --- Iteration 4 -- -string(5) "-2345" -string(5) "-2345" -string(5) "-2345" -string(5) "-2345" -string(13) "-23
\n45" --- Iteration 5 -- -string(4) "10.5" -string(4) "10.5" -string(4) "10.5" -string(4) "10.5" -string(12) "10.
\n5" --- Iteration 6 -- -string(5) "-10.5" -string(5) "-10.5" -string(5) "-10.5" -string(5) "-10.5" -string(13) "-10
\n.5" --- Iteration 7 -- -string(12) "101234567000" -string(12) "101234567000" -string(12) "101234567000" -string(12) "101234567000" -string(36) "101
\n234
\n567
\n000" --- Iteration 8 -- -string(13) "1.07654321E-9" -string(13) "1.07654321E-9" -string(13) "1.07654321E-9" -string(13) "1.07654321E-9" -string(45) "1.0
\n765
\n432
\n1E-
\n9" --- Iteration 9 -- -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 16 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 17 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 18 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 19 -- - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL --- Iteration 20 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 21 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 22 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 23 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 24 -- - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 26 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -Done diff --git a/ext/standard/tests/strings/wordwrap_variation2.phpt b/ext/standard/tests/strings/wordwrap_variation2.phpt deleted file mode 100644 index 4756e98674528..0000000000000 --- a/ext/standard/tests/strings/wordwrap_variation2.phpt +++ /dev/null @@ -1,340 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexpected values for width argument ---FILE-- -\n'; -$cut = true; - -// resource var -$fp = fopen(__FILE__, "r"); - -// get an unset variable -$unset_var = 10; -unset($unset_var); - - -// array with different values as width -$values = array ( - // zerovalue for width - 0, - - // -ve value for width - -1, - -10, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // string values - "string", - 'string', - - // objects - new stdclass(), - - // Null value - NULL, - null, - - // empty string - "", - '', - - // resource variable - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop though each element of the array and check the working of wordwrap() -// when $width argument is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'width' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $width = $values [$index]; - - var_dump( wordwrap($str, $width) ); - var_dump( wordwrap($str, $width, $break) ); - - // cut as false - $cut = false; - var_dump( wordwrap($str, $width, $break, $cut) ); - - // cut as true - $cut = true; - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'width' argument --- --- Iteration 1 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 2 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(223) "
\nt
\ne
\ns
\nt
\ni
\nn
\ng
\n
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\n
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 3 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(223) "
\nt
\ne
\ns
\nt
\ni
\nn
\ng
\n
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\n
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 4 -- - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 5 -- - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 6 -- - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 7 -- - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 8 -- - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, array given in %s on line %d -NULL --- Iteration 9 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(199) "t
\ne
\ns
\nt
\ni
\nn
\ng
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 10 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 11 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(199) "t
\ne
\ns
\nt
\ni
\nn
\ng
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 12 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 15 -- - -Warning: wordwrap() expects parameter 2 to be int, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, object given in %s on line %d -NULL --- Iteration 16 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 17 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: wordwrap() expects parameter 2 to be int, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be int, resource given in %s on line %d -NULL --- Iteration 21 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 22 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/strings/wordwrap_variation3.phpt b/ext/standard/tests/strings/wordwrap_variation3.phpt deleted file mode 100644 index 5774ce3752f8d..0000000000000 --- a/ext/standard/tests/strings/wordwrap_variation3.phpt +++ /dev/null @@ -1,301 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexptected values for break argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new stdclass(), - - // empty string - "", - '', - - //Null - NULL, - null, - - // resource var - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -// loop though each element of the array and check the working of wordwrap() -// when $break argument is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'break' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $break = $values [$index]; - - var_dump( wordwrap($str, $width, $break) ); - - // $cut as false - $cut = false; - var_dump( wordwrap($str, $width, $break, $cut) ); - - // $cut as true - $cut = true; - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource used -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'break' argument --- --- Iteration 1 -- -string(25) "testing0wordwrap0function" -string(25) "testing0wordwrap0function" -string(25) "testing0wordwrap0function" --- Iteration 2 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 3 -- -string(33) "testing12345wordwrap12345function" -string(33) "testing12345wordwrap12345function" -string(33) "testing12345wordwrap12345function" --- Iteration 4 -- -string(33) "testing-2345wordwrap-2345function" -string(33) "testing-2345wordwrap-2345function" -string(33) "testing-2345wordwrap-2345function" --- Iteration 5 -- -string(31) "testing10.5wordwrap10.5function" -string(31) "testing10.5wordwrap10.5function" -string(31) "testing10.5wordwrap10.5function" --- Iteration 6 -- -string(33) "testing-10.5wordwrap-10.5function" -string(33) "testing-10.5wordwrap-10.5function" -string(33) "testing-10.5wordwrap-10.5function" --- Iteration 7 -- -string(47) "testing101234567000wordwrap101234567000function" -string(47) "testing101234567000wordwrap101234567000function" -string(47) "testing101234567000wordwrap101234567000function" --- Iteration 8 -- -string(49) "testing1.07654321E-9wordwrap1.07654321E-9function" -string(49) "testing1.07654321E-9wordwrap1.07654321E-9function" -string(49) "testing1.07654321E-9wordwrap1.07654321E-9function" --- Iteration 9 -- -string(29) "testing0.5wordwrap0.5function" -string(29) "testing0.5wordwrap0.5function" -string(29) "testing0.5wordwrap0.5function" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 16 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 17 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 18 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 19 -- - -Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d -NULL --- Iteration 20 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 24 -- - -Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 26 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/strings/wordwrap_variation4.phpt b/ext/standard/tests/strings/wordwrap_variation4.phpt deleted file mode 100644 index 656db58b152ea..0000000000000 --- a/ext/standard/tests/strings/wordwrap_variation4.phpt +++ /dev/null @@ -1,144 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexptected value for cut argument ---FILE-- -\n'; - -// get an unset variable -$unset_var = true; -unset($unset_var); - -// resource variable -$fp = fopen(__FILE__, "r"); - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // string values - "string", - 'string', - - // objects - new stdclass(), - - // empty string - "", - '', - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -// loop though each element of the array and check the working of wordwrap() -// when $cut argument is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'cut' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $cut = $values [$index]; - - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'cut' argument --- --- Iteration 1 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 2 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 3 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 4 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 5 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 6 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 7 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 8 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 9 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 4 to be bool, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 4 to be bool, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 4 to be bool, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 4 to be bool, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 4 to be bool, array given in %s on line %d -NULL --- Iteration 15 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 16 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 17 -- - -Warning: wordwrap() expects parameter 4 to be bool, object given in %s on line %d -NULL --- Iteration 18 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 19 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 20 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 21 -- -string(39) "testing
\nwordwrap
\nfunction" -Done diff --git a/ext/standard/tests/url/base64_decode_variation_001.phpt b/ext/standard/tests/url/base64_decode_variation_001.phpt deleted file mode 100644 index 10e8736846ff2..0000000000000 --- a/ext/standard/tests/url/base64_decode_variation_001.phpt +++ /dev/null @@ -1,181 +0,0 @@ ---TEST-- -Test base64_decode() function : usage variations - unexpected types for arg 1 ---FILE-- - 0, - "1" => 1, - "12345" => 12345, - "-2345" => -2345, - - // float data - "10.5" => 10.5, - "-10.5" => -10.5, - "10.1234567e10" => 10.1234567e10, - "10.7654321E-10" => 10.7654321E-10, - ".5" => .5, - - // array data - "array()" => array(), - "array(0)" => array(0), - "array(1)" => array(1), - "array(1, 2)" => array(1, 2), - "array('color' => 'red', 'item' => 'pen'" => array('color' => 'red', 'item' => 'pen'), - - // null data - "NULL" => NULL, - "null" => null, - - // boolean data - "true" => true, - "false" => false, - "TRUE" => TRUE, - "FALSE" => FALSE, - - // empty data - "\"\"" => "", - "''" => '', - - // object data - "stdClass object" => new stdclass(), - - // undefined data - "undefined variable" => $undefined_var, - - // unset data - "unset variable" => $unset_var, - - // resource data - "resource" => $file_handle -); - -// loop through each element of the array for str argument - -foreach($values as $key=>$value) { - echo "\n-- Arg value $key --\n"; - $output = base64_decode($value, $strict); - - if (is_string($output)) { - var_dump(bin2hex($output)); - } else { - var_dump($output); - } -}; - -?> -===Done=== ---EXPECTF-- -*** Testing base64_decode() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(%d) -Error: 8 - Undefined variable: unset_var, %s(%d) - --- Arg value 0 -- -bool(false) - --- Arg value 1 -- -bool(false) - --- Arg value 12345 -- -bool(false) - --- Arg value -2345 -- -bool(false) - --- Arg value 10.5 -- -bool(false) - --- Arg value -10.5 -- -bool(false) - --- Arg value 10.1234567e10 -- -string(18) "d74d76df8e7aef4d34" - --- Arg value 10.7654321E-10 -- -bool(false) - --- Arg value .5 -- -bool(false) - --- Arg value array() -- -Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(%d) -NULL - --- Arg value array(0) -- -Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(%d) -NULL - --- Arg value array(1) -- -Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(%d) -NULL - --- Arg value array(1, 2) -- -Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(%d) -NULL - --- Arg value array('color' => 'red', 'item' => 'pen' -- -Error: 2 - base64_decode() expects parameter 1 to be string, array given, %s(%d) -NULL - --- Arg value NULL -- -string(0) "" - --- Arg value null -- -string(0) "" - --- Arg value true -- -bool(false) - --- Arg value false -- -string(0) "" - --- Arg value TRUE -- -bool(false) - --- Arg value FALSE -- -string(0) "" - --- Arg value "" -- -string(0) "" - --- Arg value '' -- -string(0) "" - --- Arg value stdClass object -- -Error: 2 - base64_decode() expects parameter 1 to be string, object given, %s(%d) -NULL - --- Arg value undefined variable -- -string(0) "" - --- Arg value unset variable -- -string(0) "" - --- Arg value resource -- -Error: 2 - base64_decode() expects parameter 1 to be string, resource given, %s(%d) -NULL -===Done=== diff --git a/ext/standard/tests/url/base64_decode_variation_002.phpt b/ext/standard/tests/url/base64_decode_variation_002.phpt deleted file mode 100644 index 56232f58c4b9c..0000000000000 --- a/ext/standard/tests/url/base64_decode_variation_002.phpt +++ /dev/null @@ -1,175 +0,0 @@ ---TEST-- -Test base64_decode() function : usage variations - unexpected types for arg 2 ---FILE-- - 0, - "1" => 1, - "12345" => 12345, - "-2345" => -2345, - - // float data - "10.5" => 10.5, - "-10.5" => -10.5, - "10.1234567e10" => 10.1234567e10, - "10.7654321E-10" => 10.7654321E-10, - ".5" => .5, - - // array data - "array()" => array(), - "array(0)" => array(0), - "array(1)" => array(1), - "array(1, 2)" => array(1, 2), - "array('color' => 'red', 'item' => 'pen'" => array('color' => 'red', 'item' => 'pen'), - - // null data - "NULL" => NULL, - "null" => null, - - // boolean data - "true" => true, - "false" => false, - "TRUE" => TRUE, - "FALSE" => FALSE, - - // empty data - "\"\"" => "", - "''" => '', - - // object data - "stdClass object" => new stdclass(), - - // undefined data - "undefined variable" => $undefined_var, - - // unset data - "unset variable" => $unset_var, - - // resource data - "resource" => $file_handle -); - -// loop through each element of the array for strict argument - -foreach($values as $key=>$value) { - echo "\n-- Arg value $key --\n"; - var_dump(base64_decode($str, $value)); -}; - -?> -===Done=== ---EXPECTF-- -*** Testing base64_decode() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(%d) -Error: 8 - Undefined variable: unset_var, %s(%d) - --- Arg value 0 -- -string(12) "hello world!" - --- Arg value 1 -- -bool(false) - --- Arg value 12345 -- -bool(false) - --- Arg value -2345 -- -bool(false) - --- Arg value 10.5 -- -bool(false) - --- Arg value -10.5 -- -bool(false) - --- Arg value 10.1234567e10 -- -bool(false) - --- Arg value 10.7654321E-10 -- -bool(false) - --- Arg value .5 -- -bool(false) - --- Arg value array() -- -Error: 2 - base64_decode() expects parameter 2 to be bool, array given, %s(%d) -NULL - --- Arg value array(0) -- -Error: 2 - base64_decode() expects parameter 2 to be bool, array given, %s(%d) -NULL - --- Arg value array(1) -- -Error: 2 - base64_decode() expects parameter 2 to be bool, array given, %s(%d) -NULL - --- Arg value array(1, 2) -- -Error: 2 - base64_decode() expects parameter 2 to be bool, array given, %s(%d) -NULL - --- Arg value array('color' => 'red', 'item' => 'pen' -- -Error: 2 - base64_decode() expects parameter 2 to be bool, array given, %s(%d) -NULL - --- Arg value NULL -- -string(12) "hello world!" - --- Arg value null -- -string(12) "hello world!" - --- Arg value true -- -bool(false) - --- Arg value false -- -string(12) "hello world!" - --- Arg value TRUE -- -bool(false) - --- Arg value FALSE -- -string(12) "hello world!" - --- Arg value "" -- -string(12) "hello world!" - --- Arg value '' -- -string(12) "hello world!" - --- Arg value stdClass object -- -Error: 2 - base64_decode() expects parameter 2 to be bool, object given, %s(%d) -NULL - --- Arg value undefined variable -- -string(12) "hello world!" - --- Arg value unset variable -- -string(12) "hello world!" - --- Arg value resource -- -Error: 2 - base64_decode() expects parameter 2 to be bool, resource given, %s(%d) -NULL -===Done=== diff --git a/ext/standard/tests/url/base64_encode_variation_001.phpt b/ext/standard/tests/url/base64_encode_variation_001.phpt deleted file mode 100644 index bdf2bc0dd4a50..0000000000000 --- a/ext/standard/tests/url/base64_encode_variation_001.phpt +++ /dev/null @@ -1,172 +0,0 @@ ---TEST-- -Test base64_encode() function : usage variations - unexpected types for argument 1 ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for str - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( base64_encode($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing base64_encode() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(63) -Error: 8 - Undefined variable: unset_var, %s(66) - -Arg value 0 -string(4) "MA==" - -Arg value 1 -string(4) "MQ==" - -Arg value 12345 -string(8) "MTIzNDU=" - -Arg value -2345 -string(8) "LTIzNDU=" - -Arg value 10.5 -string(8) "MTAuNQ==" - -Arg value -10.5 -string(8) "LTEwLjU=" - -Arg value 101234567000 -string(16) "MTAxMjM0NTY3MDAw" - -Arg value 1.07654321E-9 -string(20) "MS4wNzY1NDMyMUUtOQ==" - -Arg value 0.5 -string(4) "MC41" -Error: 8 - Array to string conversion, %sbase64_encode_variation_001.php(%d) - -Arg value Array -Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73) -NULL -Error: 8 - Array to string conversion, %sbase64_encode_variation_001.php(%d) - -Arg value Array -Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73) -NULL -Error: 8 - Array to string conversion, %sbase64_encode_variation_001.php(%d) - -Arg value Array -Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73) -NULL -Error: 8 - Array to string conversion, %sbase64_encode_variation_001.php(%d) - -Arg value Array -Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73) -NULL -Error: 8 - Array to string conversion, %sbase64_encode_variation_001.php(%d) - -Arg value Array -Error: 2 - base64_encode() expects parameter 1 to be string, array given, %s(73) -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value 1 -string(4) "MQ==" - -Arg value -string(0) "" - -Arg value 1 -string(4) "MQ==" - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value -string(0) "" -Error: 4096 - Object of class stdClass could not be converted to string, %s(72) - -Arg value -Error: 2 - base64_encode() expects parameter 1 to be string, object given, %s(73) -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" -Done diff --git a/ext/standard/tests/url/parse_url_variation_001.phpt b/ext/standard/tests/url/parse_url_variation_001.phpt deleted file mode 100644 index 6c492e36f17cf..0000000000000 --- a/ext/standard/tests/url/parse_url_variation_001.phpt +++ /dev/null @@ -1,226 +0,0 @@ ---TEST-- -Test parse_url() function : usage variations - unexpected type for arg 1. ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for url - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( parse_url($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing parse_url() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(60) -Error: 8 - Undefined variable: unset_var, %s(63) - -Arg value 0 -array(1) { - ["path"]=> - string(1) "0" -} - -Arg value 1 -array(1) { - ["path"]=> - string(1) "1" -} - -Arg value 12345 -array(1) { - ["path"]=> - string(5) "12345" -} - -Arg value -2345 -array(1) { - ["path"]=> - string(5) "-2345" -} - -Arg value 10.5 -array(1) { - ["path"]=> - string(4) "10.5" -} - -Arg value -10.5 -array(1) { - ["path"]=> - string(5) "-10.5" -} - -Arg value 101234567000 -array(1) { - ["path"]=> - string(12) "101234567000" -} - -Arg value 1.07654321E-9 -array(1) { - ["path"]=> - string(13) "1.07654321E-9" -} - -Arg value 0.5 -array(1) { - ["path"]=> - string(3) "0.5" -} -Error: 8 - Array to string conversion, %sparse_url_variation_001.php(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70) -NULL -Error: 8 - Array to string conversion, %sparse_url_variation_001.php(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70) -NULL -Error: 8 - Array to string conversion, %sparse_url_variation_001.php(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70) -NULL -Error: 8 - Array to string conversion, %sparse_url_variation_001.php(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70) -NULL -Error: 8 - Array to string conversion, %sparse_url_variation_001.php(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 1 to be string, array given, %s(70) -NULL - -Arg value -array(1) { - ["path"]=> - string(0) "" -} - -Arg value -array(1) { - ["path"]=> - string(0) "" -} - -Arg value 1 -array(1) { - ["path"]=> - string(1) "1" -} - -Arg value -array(1) { - ["path"]=> - string(0) "" -} - -Arg value 1 -array(1) { - ["path"]=> - string(1) "1" -} - -Arg value -array(1) { - ["path"]=> - string(0) "" -} - -Arg value -array(1) { - ["path"]=> - string(0) "" -} - -Arg value -array(1) { - ["path"]=> - string(0) "" -} -Error: 4096 - Object of class stdClass could not be converted to string, %s(69) - -Arg value -Error: 2 - parse_url() expects parameter 1 to be string, object given, %s(70) -NULL - -Arg value -array(1) { - ["path"]=> - string(0) "" -} - -Arg value -array(1) { - ["path"]=> - string(0) "" -} -Done diff --git a/ext/standard/tests/url/parse_url_variation_002_32bit.phpt b/ext/standard/tests/url/parse_url_variation_002_32bit.phpt deleted file mode 100644 index 70138ffe7746e..0000000000000 --- a/ext/standard/tests/url/parse_url_variation_002_32bit.phpt +++ /dev/null @@ -1,189 +0,0 @@ ---TEST-- -Test parse_url() function : usage variations - unexpected type for arg 2. ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for url_component - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( parse_url($url, $value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing parse_url() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(%d) -Error: 8 - Undefined variable: unset_var, %s(%d) - -Arg value 10.5 -Error: 2 - parse_url(): Invalid URL component identifier 10, %s(%d) -bool(false) - -Arg value -10.5 -array(8) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["user"]=> - string(6) "secret" - ["pass"]=> - string(7) "hideout" - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(31) "test=1&test2=char&test3=mixesCI" - ["fragment"]=> - string(16) "some_page_ref123" -} - -Arg value 101234567000 -Error: 2 - parse_url() expects parameter 2 to be int, float given, %s(%d) -NULL - -Arg value 1.07654321E-9 -string(4) "http" - -Arg value 0.5 -string(4) "http" -Error: 8 - Array to string conversion, %s(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(%d) -NULL -Error: 8 - Array to string conversion, %s(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(%d) -NULL -Error: 8 - Array to string conversion, %s(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(%d) -NULL -Error: 8 - Array to string conversion, %s(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(%d) -NULL -Error: 8 - Array to string conversion, %s(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(%d) -NULL - -Arg value -string(4) "http" - -Arg value -string(4) "http" - -Arg value 1 -string(%d) "www.php.net" - -Arg value -string(4) "http" - -Arg value 1 -string(%d) "www.php.net" - -Arg value -string(4) "http" - -Arg value -Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(%d) -NULL - -Arg value -Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(%d) -NULL - -Arg value string -Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(%d) -NULL - -Arg value string -Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(%d) -NULL -Error: 4096 - Object of class stdClass could not be converted to string, %s(%d) - -Arg value -Error: 2 - parse_url() expects parameter 2 to be int, object given, %s(%d) -NULL - -Arg value -string(4) "http" - -Arg value -string(4) "http" -Done diff --git a/ext/standard/tests/url/parse_url_variation_002_64bit.phpt b/ext/standard/tests/url/parse_url_variation_002_64bit.phpt deleted file mode 100644 index 69ebe274b5223..0000000000000 --- a/ext/standard/tests/url/parse_url_variation_002_64bit.phpt +++ /dev/null @@ -1,189 +0,0 @@ ---TEST-- -Test parse_url() function : usage variations - unexpected type for arg 2. ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for url_component - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( parse_url($url, $value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing parse_url() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(61) -Error: 8 - Undefined variable: unset_var, %s(64) - -Arg value 10.5 -Error: 2 - parse_url(): Invalid URL component identifier 10, %s(71) -bool(false) - -Arg value -10.5 -array(8) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["user"]=> - string(6) "secret" - ["pass"]=> - string(7) "hideout" - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(31) "test=1&test2=char&test3=mixesCI" - ["fragment"]=> - string(16) "some_page_ref123" -} - -Arg value 101234567000 -Error: 2 - parse_url(): Invalid URL component identifier %d, %s(71) -bool(false) - -Arg value 1.07654321E-9 -string(4) "http" - -Arg value 0.5 -string(4) "http" -Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(71) -NULL -Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(71) -NULL -Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(71) -NULL -Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(71) -NULL -Error: 8 - Array to string conversion, %sparse_url_variation_002_64bit.php(%d) - -Arg value Array -Error: 2 - parse_url() expects parameter 2 to be int, array given, %s(71) -NULL - -Arg value -string(4) "http" - -Arg value -string(4) "http" - -Arg value 1 -string(11) "www.php.net" - -Arg value -string(4) "http" - -Arg value 1 -string(11) "www.php.net" - -Arg value -string(4) "http" - -Arg value -Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(71) -NULL - -Arg value -Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(71) -NULL - -Arg value string -Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(71) -NULL - -Arg value string -Error: 2 - parse_url() expects parameter 2 to be int, string given, %s(71) -NULL -Error: 4096 - Object of class stdClass could not be converted to string, %s(70) - -Arg value -Error: 2 - parse_url() expects parameter 2 to be int, object given, %s(71) -NULL - -Arg value -string(4) "http" - -Arg value -string(4) "http" -Done diff --git a/ext/standard/tests/url/rawurldecode_variation_001.phpt b/ext/standard/tests/url/rawurldecode_variation_001.phpt deleted file mode 100644 index 40b96c775db83..0000000000000 --- a/ext/standard/tests/url/rawurldecode_variation_001.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test rawurldecode() function : usage variations - unexpected type for arg 1. ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for str - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( rawurldecode($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing rawurldecode() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(64) -Error: 8 - Undefined variable: unset_var, %s(67) - -Arg value 0 -string(1) "0" - -Arg value 1 -string(1) "1" - -Arg value 12345 -string(5) "12345" - -Arg value -2345 -string(5) "-2345" - -Arg value 10.5 -string(4) "10.5" - -Arg value -10.5 -string(5) "-10.5" - -Arg value 101234567000 -string(12) "101234567000" - -Arg value 1.07654321E-9 -string(13) "1.07654321E-9" - -Arg value 0.5 -string(3) "0.5" -Error: 8 - Array to string conversion, %srawurldecode_variation_001.php(%d) - -Arg value Array -Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %srawurldecode_variation_001.php(%d) - -Arg value Array -Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %srawurldecode_variation_001.php(%d) - -Arg value Array -Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %srawurldecode_variation_001.php(%d) - -Arg value Array -Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %srawurldecode_variation_001.php(%d) - -Arg value Array -Error: 2 - rawurldecode() expects parameter 1 to be string, array given, %s(74) -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value -string(0) "" -Error: 4096 - Object of class stdClass could not be converted to string, %s(73) - -Arg value -Error: 2 - rawurldecode() expects parameter 1 to be string, object given, %s(74) -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" -Done diff --git a/ext/standard/tests/url/rawurlencode_variation_001.phpt b/ext/standard/tests/url/rawurlencode_variation_001.phpt deleted file mode 100644 index 105eec6887215..0000000000000 --- a/ext/standard/tests/url/rawurlencode_variation_001.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test rawurlencode() function : usage variations - unexpected type for arg 1. ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for str - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( rawurlencode($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing rawurlencode() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(64) -Error: 8 - Undefined variable: unset_var, %s(67) - -Arg value 0 -string(1) "0" - -Arg value 1 -string(1) "1" - -Arg value 12345 -string(5) "12345" - -Arg value -2345 -string(5) "-2345" - -Arg value 10.5 -string(4) "10.5" - -Arg value -10.5 -string(5) "-10.5" - -Arg value 101234567000 -string(12) "101234567000" - -Arg value 1.07654321E-9 -string(13) "1.07654321E-9" - -Arg value 0.5 -string(3) "0.5" -Error: 8 - Array to string conversion, %srawurlencode_variation_001.php(%d) - -Arg value Array -Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %srawurlencode_variation_001.php(%d) - -Arg value Array -Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %srawurlencode_variation_001.php(%d) - -Arg value Array -Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %srawurlencode_variation_001.php(%d) - -Arg value Array -Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %srawurlencode_variation_001.php(%d) - -Arg value Array -Error: 2 - rawurlencode() expects parameter 1 to be string, array given, %s(74) -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value -string(0) "" -Error: 4096 - Object of class stdClass could not be converted to string, %s(73) - -Arg value -Error: 2 - rawurlencode() expects parameter 1 to be string, object given, %s(74) -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" -Done diff --git a/ext/standard/tests/url/urldecode_variation_001.phpt b/ext/standard/tests/url/urldecode_variation_001.phpt deleted file mode 100644 index 617648b9e49fe..0000000000000 --- a/ext/standard/tests/url/urldecode_variation_001.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test urldecode() function : usage variations - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for str - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( urldecode($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing urldecode() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(64) -Error: 8 - Undefined variable: unset_var, %s(67) - -Arg value 0 -string(1) "0" - -Arg value 1 -string(1) "1" - -Arg value 12345 -string(5) "12345" - -Arg value -2345 -string(5) "-2345" - -Arg value 10.5 -string(4) "10.5" - -Arg value -10.5 -string(5) "-10.5" - -Arg value 101234567000 -string(12) "101234567000" - -Arg value 1.07654321E-9 -string(13) "1.07654321E-9" - -Arg value 0.5 -string(3) "0.5" -Error: 8 - Array to string conversion, %surldecode_variation_001.php(%d) - -Arg value Array -Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %surldecode_variation_001.php(%d) - -Arg value Array -Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %surldecode_variation_001.php(%d) - -Arg value Array -Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %surldecode_variation_001.php(%d) - -Arg value Array -Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %surldecode_variation_001.php(%d) - -Arg value Array -Error: 2 - urldecode() expects parameter 1 to be string, array given, %s(74) -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value -string(0) "" -Error: 4096 - Object of class stdClass could not be converted to string, %s(73) - -Arg value -Error: 2 - urldecode() expects parameter 1 to be string, object given, %s(74) -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" -Done diff --git a/ext/standard/tests/url/urlencode_variation_001.phpt b/ext/standard/tests/url/urlencode_variation_001.phpt deleted file mode 100644 index 9c5296f1c5671..0000000000000 --- a/ext/standard/tests/url/urlencode_variation_001.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test urlencode() function : usage variations - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new stdclass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for str - -foreach($values as $value) { - echo "\nArg value $value \n"; - var_dump( urlencode($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing urlencode() : usage variations *** -Error: 8 - Undefined variable: undefined_var, %s(64) -Error: 8 - Undefined variable: unset_var, %s(67) - -Arg value 0 -string(1) "0" - -Arg value 1 -string(1) "1" - -Arg value 12345 -string(5) "12345" - -Arg value -2345 -string(5) "-2345" - -Arg value 10.5 -string(4) "10.5" - -Arg value -10.5 -string(5) "-10.5" - -Arg value 101234567000 -string(12) "101234567000" - -Arg value 1.07654321E-9 -string(13) "1.07654321E-9" - -Arg value 0.5 -string(3) "0.5" -Error: 8 - Array to string conversion, %surlencode_variation_001.php(%d) - -Arg value Array -Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %surlencode_variation_001.php(%d) - -Arg value Array -Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %surlencode_variation_001.php(%d) - -Arg value Array -Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %surlencode_variation_001.php(%d) - -Arg value Array -Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74) -NULL -Error: 8 - Array to string conversion, %surlencode_variation_001.php(%d) - -Arg value Array -Error: 2 - urlencode() expects parameter 1 to be string, array given, %s(74) -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value 1 -string(1) "1" - -Arg value -string(0) "" - -Arg value -string(0) "" - -Arg value -string(0) "" -Error: 4096 - Object of class stdClass could not be converted to string, %s(73) - -Arg value -Error: 2 - urlencode() expects parameter 1 to be string, object given, %s(74) -NULL - -Arg value -string(0) "" - -Arg value -string(0) "" -Done diff --git a/ext/standard/type.c b/ext/standard/type.c index 59247eeedb572..c3d20a340ca9a 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -411,12 +411,3 @@ PHP_FUNCTION(is_countable) RETURN_BOOL(zend_is_countable(var)); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index 1d0c346419cdc..97a886c59281d 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -84,12 +84,3 @@ PHP_FUNCTION(uniqid) } #endif /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/url.c b/ext/standard/url.c index bc4a24511d447..ff70ea4e04585 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -726,12 +726,3 @@ PHP_FUNCTION(get_headers) php_stream_close(stream); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/url.h b/ext/standard/url.h index f3e3707bfeb7e..782fe65e6a959 100644 --- a/ext/standard/url.h +++ b/ext/standard/url.h @@ -59,10 +59,3 @@ PHP_FUNCTION(get_headers); #define PHP_QUERY_RFC3986 2 #endif /* URL_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index 44ce16b3372ab..bc1010243eb95 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -164,7 +164,7 @@ php_stream_filter_status_t userfilter_filter( zval func_name; zval retval; zval args[4]; - zval zpropname; + zend_string *propname; int call_result; /* the userfilter object probably doesn't exist anymore */ @@ -239,9 +239,9 @@ php_stream_filter_status_t userfilter_filter( /* filter resources are cleaned up by the stream destructor, * keeping a reference to the stream resource here would prevent it * from being destroyed properly */ - ZVAL_STRINGL(&zpropname, "stream", sizeof("stream")-1); - Z_OBJ_HANDLER_P(obj, unset_property)(obj, &zpropname, NULL); - zval_ptr_dtor(&zpropname); + propname = zend_string_init("stream", sizeof("stream")-1, 0); + Z_OBJ_HANDLER_P(obj, unset_property)(Z_OBJ_P(obj), propname, NULL); + zend_string_release_ex(propname, 0); zval_ptr_dtor(&args[3]); zval_ptr_dtor(&args[2]); @@ -591,13 +591,3 @@ PHP_FUNCTION(stream_filter_register) } } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c index d21ed0034c8dc..bfe605a49b283 100644 --- a/ext/standard/uuencode.c +++ b/ext/standard/uuencode.c @@ -231,12 +231,3 @@ PHP_FUNCTION(convert_uudecode) RETURN_STR(dest); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/standard/var.c b/ext/standard/var.c index 9a61fa82ee3b7..5bf2923561d44 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -1211,12 +1211,3 @@ PHP_FUNCTION(memory_get_peak_usage) { RETURN_LONG(zend_memory_peak_usage(real_usage)); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/versioning.c b/ext/standard/versioning.c index 3273215091546..e4353130d633e 100644 --- a/ext/standard/versioning.c +++ b/ext/standard/versioning.c @@ -243,11 +243,3 @@ PHP_FUNCTION(version_compare) } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/sysvmsg/php_sysvmsg.h b/ext/sysvmsg/php_sysvmsg.h index 4cb9d12da4870..af5e1da9ab64b 100644 --- a/ext/sysvmsg/php_sysvmsg.h +++ b/ext/sysvmsg/php_sysvmsg.h @@ -30,12 +30,3 @@ extern zend_module_entry sysvmsg_module_entry; #endif /* HAVE_SYSVMSG */ #endif /* PHP_SYSVMSG_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index 1cf77fd6fe43e..12bc41aadd07c 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -491,12 +491,3 @@ PHP_FUNCTION(msg_send) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 tw=78 fdm=marker - * vim<600: noet sw=4 ts=4 tw=78 - */ diff --git a/ext/sysvmsg/tests/001.phpt b/ext/sysvmsg/tests/001.phpt index 666ad274e2b9e..5096033bb1618 100644 --- a/ext/sysvmsg/tests/001.phpt +++ b/ext/sysvmsg/tests/001.phpt @@ -1,7 +1,7 @@ --TEST-- send/receive serialized message. --SKIPIF-- - --FILE-- ptdoc->doc, &output); ZVAL_STRINGL(out, (char *) output.bp, output.size ? output.size-1 : 0); @@ -786,7 +786,7 @@ static int tidy_doc_cast_handler(zval *in, zval *out, int type) return SUCCESS; } -static int tidy_node_cast_handler(zval *in, zval *out, int type) +static int tidy_node_cast_handler(zend_object *in, zval *out, int type) { TidyBuffer buf; PHPTidyObj *obj; @@ -806,7 +806,7 @@ static int tidy_node_cast_handler(zval *in, zval *out, int type) break; case IS_STRING: - obj = Z_TIDY_P(in); + obj = php_tidy_fetch_object(in); tidyBufInit(&buf); if (obj->ptdoc) { tidyNodeGetText(obj->ptdoc->doc, obj->node, &buf); @@ -2054,12 +2054,3 @@ static void _php_tidy_register_tags(INIT_FUNC_ARGS) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/tokenizer/php_tokenizer.h b/ext/tokenizer/php_tokenizer.h index 265ef31e8f1a9..8e3bf05dd5825 100644 --- a/ext/tokenizer/php_tokenizer.h +++ b/ext/tokenizer/php_tokenizer.h @@ -46,12 +46,3 @@ PHP_FUNCTION(token_name); #endif #endif /* PHP_TOKENIZER_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/tokenizer/tests/token_get_all_variation1.phpt b/ext/tokenizer/tests/token_get_all_variation1.phpt deleted file mode 100644 index 14ece715eb552..0000000000000 --- a/ext/tokenizer/tests/token_get_all_variation1.phpt +++ /dev/null @@ -1,287 +0,0 @@ ---TEST-- -Test token_get_all() function : usage variations - unexpected values for 'source' argument ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data -/*15*/ NULL, - null, - - // boolean data -/*17*/ true, - false, - TRUE, - FALSE, - - // empty string -/*21*/ "", - '', - - // object data -/*23*/ new MyClass(), - - // resource data - $fp, - - // undefined data - @$undefined_var, - - // unset data -/*26*/ @$unset_var, -); - -for($count = 0; $count < count($source_values); $count++) { - echo "--Iteration ".($count + 1)." --\n"; - var_dump( token_get_all($source_values[$count])); -}; - -fclose($fp); -echo "Done" -?> ---EXPECTF-- -*** Testing token_get_all() : unexpected values for 'source' argument *** ---Iteration 1 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "0" - [2]=> - int(1) - } -} ---Iteration 2 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "1" - [2]=> - int(1) - } -} ---Iteration 3 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(5) "12345" - [2]=> - int(1) - } -} ---Iteration 4 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(5) "-2345" - [2]=> - int(1) - } -} ---Iteration 5 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(4) "10.5" - [2]=> - int(1) - } -} ---Iteration 6 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(5) "-10.5" - [2]=> - int(1) - } -} ---Iteration 7 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(10) "1012345670" - [2]=> - int(1) - } -} ---Iteration 8 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(13) "1.07654321E-7" - [2]=> - int(1) - } -} ---Iteration 9 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(3) "0.5" - [2]=> - int(1) - } -} ---Iteration 10 -- - -Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d -NULL ---Iteration 11 -- - -Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d -NULL ---Iteration 12 -- - -Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d -NULL ---Iteration 13 -- - -Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d -NULL ---Iteration 14 -- - -Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d -NULL ---Iteration 15 -- -array(0) { -} ---Iteration 16 -- -array(0) { -} ---Iteration 17 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "1" - [2]=> - int(1) - } -} ---Iteration 18 -- -array(0) { -} ---Iteration 19 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(1) "1" - [2]=> - int(1) - } -} ---Iteration 20 -- -array(0) { -} ---Iteration 21 -- -array(0) { -} ---Iteration 22 -- -array(0) { -} ---Iteration 23 -- -array(1) { - [0]=> - array(3) { - [0]=> - int(%d) - [1]=> - string(6) "object" - [2]=> - int(1) - } -} ---Iteration 24 -- - -Warning: token_get_all() expects parameter 1 to be string, resource given in %s on line %d -NULL ---Iteration 25 -- -array(0) { -} ---Iteration 26 -- -array(0) { -} -Done diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index e0669dbbabf85..91ace6f701770 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -299,12 +299,3 @@ PHP_FUNCTION(token_name) RETVAL_STRING(get_token_type_name(type)); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 77e6d1647c983..658ec1b6479a2 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -1328,12 +1328,3 @@ PHP_FUNCTION(wddx_deserialize) /* }}} */ #endif /* HAVE_LIBEXPAT */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/xml/compat.c b/ext/xml/compat.c index 2d2115df300f4..be988a822f179 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -749,13 +749,3 @@ XML_ParserFree(XML_Parser parser) #endif /* LIBXML_EXPAT_COMPAT */ #endif - -/** - * Local Variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: fdm=marker - * vim: ts=4 noet sw=4 - */ diff --git a/ext/xml/expat_compat.h b/ext/xml/expat_compat.h index fa6dddd841444..350d42f0c638c 100644 --- a/ext/xml/expat_compat.h +++ b/ext/xml/expat_compat.h @@ -157,10 +157,3 @@ PHP_XML_API void XML_ParserFree(XML_Parser); #endif /* HAVE_LIBEXPAT */ #endif /* PHP_EXPAT_COMPAT_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/xml/php_xml.h b/ext/xml/php_xml.h index 25338eb303b41..f8bb415f32d6b 100644 --- a/ext/xml/php_xml.h +++ b/ext/xml/php_xml.h @@ -42,10 +42,3 @@ extern zend_module_entry xml_module_entry; #define phpext_xml_ptr xml_module_ptr #endif /* PHP_XML_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/xml/tests/bug32001.phpt b/ext/xml/tests/bug32001.phpt index ff27038a8d38c..2e2f4643d5506 100644 --- a/ext/xml/tests/bug32001.phpt +++ b/ext/xml/tests/bug32001.phpt @@ -162,7 +162,6 @@ foreach ($suite as $testcase) { $testcase->run(); } -// vim600: sts=4 sw=4 ts=4 encoding=UTF-8 ?> --EXPECTF-- libxml2 Version => %s diff --git a/ext/xml/tests/bug32001b.phpt b/ext/xml/tests/bug32001b.phpt index 21c20e40de661..3a3c11a3ba86f 100644 --- a/ext/xml/tests/bug32001b.phpt +++ b/ext/xml/tests/bug32001b.phpt @@ -104,7 +104,6 @@ foreach ($suite as $testcase) { $testcase->run(); } -// vim600: sts=4 sw=4 ts=4 encoding=UTF-8 ?> --EXPECTF-- libxml2 Version => %s diff --git a/ext/xml/tests/xml007.phpt b/ext/xml/tests/xml007.phpt index 1b2510591cb24..f19f0389b685f 100644 --- a/ext/xml/tests/xml007.phpt +++ b/ext/xml/tests/xml007.phpt @@ -1,7 +1,7 @@ --TEST-- xml_parse_into_struct/umlauts in tags --SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for code - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_error_string($value) ); -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_error_string() : usage variations *** - -Arg value 10.5 -string(22) "XML_ERR_CHARREF_AT_EOF" - -Arg value -10.5 -string(7) "Unknown" - -Arg value 101234567000 -string(7) "Unknown" - -Arg value 1.07654321E-9 -string(8) "No error" - -Arg value 0.5 -string(8) "No error" - -Arg value Array - -Warning: xml_error_string() expects parameter 1 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_error_string() expects parameter 1 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_error_string() expects parameter 1 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_error_string() expects parameter 1 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_error_string() expects parameter 1 to be int, array given in %s on line %d -NULL - -Arg value -string(8) "No error" - -Arg value -string(8) "No error" - -Arg value 1 -string(9) "No memory" - -Arg value -string(8) "No error" - -Arg value 1 -string(9) "No memory" - -Arg value -string(8) "No error" - -Arg value - -Warning: xml_error_string() expects parameter 1 to be int, string given in %s on line %d -NULL - -Arg value - -Warning: xml_error_string() expects parameter 1 to be int, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_error_string() expects parameter 1 to be int, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_error_string() expects parameter 1 to be int, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_error_string() expects parameter 1 to be int, object given in %s on line %d -NULL - -Arg value -string(8) "No error" - -Arg value -string(8) "No error" -Done diff --git a/ext/xml/tests/xml_get_current_byte_index_variation1.phpt b/ext/xml/tests/xml_get_current_byte_index_variation1.phpt deleted file mode 100644 index 87740185d944c..0000000000000 --- a/ext/xml/tests/xml_get_current_byte_index_variation1.phpt +++ /dev/null @@ -1,239 +0,0 @@ ---TEST-- -Test xml_get_current_byte_index() function : usage variations - ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_get_current_byte_index($value) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_get_current_byte_index() : usage variations *** - -Arg value 0 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_get_current_byte_index(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_byte_index() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_get_current_column_number_variation1.phpt b/ext/xml/tests/xml_get_current_column_number_variation1.phpt deleted file mode 100644 index 2fde617f603cb..0000000000000 --- a/ext/xml/tests/xml_get_current_column_number_variation1.phpt +++ /dev/null @@ -1,240 +0,0 @@ ---TEST-- -Test xml_get_current_column_number() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_get_current_column_number($value) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_get_current_column_number() : usage variations *** - -Arg value 0 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_get_current_column_number(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_column_number() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_get_current_line_number_variation1.phpt b/ext/xml/tests/xml_get_current_line_number_variation1.phpt deleted file mode 100644 index 6155c0696c8ef..0000000000000 --- a/ext/xml/tests/xml_get_current_line_number_variation1.phpt +++ /dev/null @@ -1,239 +0,0 @@ ---TEST-- -Test xml_get_current_line_number() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_get_current_line_number($value) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_get_current_line_number() : usage variations *** - -Arg value 0 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_get_current_line_number(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_get_current_line_number() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_get_error_code_variation1.phpt b/ext/xml/tests/xml_get_error_code_variation1.phpt deleted file mode 100644 index 73feae24c2159..0000000000000 --- a/ext/xml/tests/xml_get_error_code_variation1.phpt +++ /dev/null @@ -1,239 +0,0 @@ ---TEST-- -Test xml_get_error_code() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_get_error_code($value) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_get_error_code() : usage variations *** - -Arg value 0 - -Warning: xml_get_error_code() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_error_code() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_get_error_code() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_get_error_code() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_get_error_code() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_get_error_code() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_get_error_code() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_get_error_code() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_get_error_code() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_error_code() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_error_code() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_error_code() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_error_code() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_get_error_code() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_get_error_code() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_get_error_code() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_error_code() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_error_code() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_get_error_code() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_error_code() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_get_error_code() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_get_error_code() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_get_error_code() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_get_error_code() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_get_error_code() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_get_error_code(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_get_error_code() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_get_error_code() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_parse_into_struct_variation1.phpt b/ext/xml/tests/xml_parse_into_struct_variation1.phpt deleted file mode 100644 index 811f4c8a3cf94..0000000000000 --- a/ext/xml/tests/xml_parse_into_struct_variation1.phpt +++ /dev/null @@ -1,240 +0,0 @@ ---TEST-- -Test xml_parse_into_struct() function : usage variations - different types for parser ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_parse_into_struct($value, $data, $struct, $index) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_parse_into_struct() : usage variations *** - -Arg value 0 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_parse_into_struct(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_parse_into_struct() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_parse_variation1.phpt b/ext/xml/tests/xml_parse_variation1.phpt deleted file mode 100644 index d902fab34faf3..0000000000000 --- a/ext/xml/tests/xml_parse_variation1.phpt +++ /dev/null @@ -1,241 +0,0 @@ ---TEST-- -Test xml_parse() function : usage variations - different types of parser ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_parse($value, $data, $isFinal) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_parse() : usage variations *** - -Arg value 0 - -Warning: xml_parse() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parse() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_parse() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_parse() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_parse() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_parse() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_parse() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_parse() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_parse() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parse() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parse() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parse() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parse() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parse() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_parse() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_parse() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parse() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parse() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parse() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parse() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parse() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_parse() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parse() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parse() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_parse() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_parse(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_parse() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_parse() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_parser_create_ns_variation1.phpt b/ext/xml/tests/xml_parser_create_ns_variation1.phpt deleted file mode 100644 index 430bebe67652d..0000000000000 --- a/ext/xml/tests/xml_parser_create_ns_variation1.phpt +++ /dev/null @@ -1,245 +0,0 @@ ---TEST-- -Test xml_parser_create_ns() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - "ISO-8859-1", - "UTF-8", - "US-ASCII", - "UTF-32", - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for encoding - -foreach($values as $value) { - echo @"\nArg value $value \n"; - $res = xml_parser_create_ns($value); - var_dump($res); - if ($res !== false) { - xml_parser_free($res); - } -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_parser_create_ns() : usage variations *** - -Arg value 0 - -Warning: xml_parser_create_ns(): unsupported source encoding "0" in %s on line %d -bool(false) - -Arg value 1 - -Warning: xml_parser_create_ns(): unsupported source encoding "1" in %s on line %d -bool(false) - -Arg value 12345 - -Warning: xml_parser_create_ns(): unsupported source encoding "12345" in %s on line %d -bool(false) - -Arg value -2345 - -Warning: xml_parser_create_ns(): unsupported source encoding "-2345" in %s on line %d -bool(false) - -Arg value 10.5 - -Warning: xml_parser_create_ns(): unsupported source encoding "10.5" in %s on line %d -bool(false) - -Arg value -10.5 - -Warning: xml_parser_create_ns(): unsupported source encoding "-10.5" in %s on line %d -bool(false) - -Arg value 101234567000 - -Warning: xml_parser_create_ns(): unsupported source encoding "101234567000" in %s on line %d -bool(false) - -Arg value 1.07654321E-9 - -Warning: xml_parser_create_ns(): unsupported source encoding "1.07654321E-9" in %s on line %d -bool(false) - -Arg value 0.5 - -Warning: xml_parser_create_ns(): unsupported source encoding "0.5" in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_create_ns() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_create_ns() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_create_ns() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_create_ns() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_create_ns() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Arg value -resource(%d) of type (xml) - -Arg value -resource(%d) of type (xml) - -Arg value 1 - -Warning: xml_parser_create_ns(): unsupported source encoding "1" in %s on line %d -bool(false) - -Arg value -resource(%d) of type (xml) - -Arg value 1 - -Warning: xml_parser_create_ns(): unsupported source encoding "1" in %s on line %d -bool(false) - -Arg value -resource(%d) of type (xml) - -Arg value -resource(%d) of type (xml) - -Arg value -resource(%d) of type (xml) - -Arg value string - -Warning: xml_parser_create_ns(): unsupported source encoding "string" in %s on line %d -bool(false) - -Arg value string - -Warning: xml_parser_create_ns(): unsupported source encoding "string" in %s on line %d -bool(false) - -Arg value ISO-8859-1 -resource(%d) of type (xml) - -Arg value UTF-8 -resource(%d) of type (xml) - -Arg value US-ASCII -resource(%d) of type (xml) - -Arg value UTF-32 - -Warning: xml_parser_create_ns(): unsupported source encoding "UTF-32" in %s on line %d -bool(false) - -Arg value Some Ascii Data - -Warning: xml_parser_create_ns(): unsupported source encoding "Some Ascii Data" in %s on line %d -bool(false) - -Arg value Resource id %s - -Warning: xml_parser_create_ns() expects parameter 1 to be string, resource given in %s on line %d -bool(false) - -Arg value -resource(%d) of type (xml) - -Arg value -resource(%d) of type (xml) -Done diff --git a/ext/xml/tests/xml_parser_create_variation1.phpt b/ext/xml/tests/xml_parser_create_variation1.phpt deleted file mode 100644 index 347ff26514bf8..0000000000000 --- a/ext/xml/tests/xml_parser_create_variation1.phpt +++ /dev/null @@ -1,245 +0,0 @@ ---TEST-- -Test xml_parser_create() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - "ISO-8859-1", - "UTF-8", - "US-ASCII", - "UTF-32", - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for encoding - -foreach($values as $value) { - echo @"\nArg value $value \n"; - $res = xml_parser_create($value); - var_dump($res); - if ($res !== false) { - xml_parser_free($res); - } -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_parser_create() : usage variations *** - -Arg value 0 - -Warning: xml_parser_create(): unsupported source encoding "0" in %s on line %d -bool(false) - -Arg value 1 - -Warning: xml_parser_create(): unsupported source encoding "1" in %s on line %d -bool(false) - -Arg value 12345 - -Warning: xml_parser_create(): unsupported source encoding "12345" in %s on line %d -bool(false) - -Arg value -2345 - -Warning: xml_parser_create(): unsupported source encoding "-2345" in %s on line %d -bool(false) - -Arg value 10.5 - -Warning: xml_parser_create(): unsupported source encoding "10.5" in %s on line %d -bool(false) - -Arg value -10.5 - -Warning: xml_parser_create(): unsupported source encoding "-10.5" in %s on line %d -bool(false) - -Arg value 101234567000 - -Warning: xml_parser_create(): unsupported source encoding "101234567000" in %s on line %d -bool(false) - -Arg value 1.07654321E-9 - -Warning: xml_parser_create(): unsupported source encoding "1.07654321E-9" in %s on line %d -bool(false) - -Arg value 0.5 - -Warning: xml_parser_create(): unsupported source encoding "0.5" in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_create() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Arg value -resource(%d) of type (xml) - -Arg value -resource(%d) of type (xml) - -Arg value 1 - -Warning: xml_parser_create(): unsupported source encoding "1" in %s on line %d -bool(false) - -Arg value -resource(%d) of type (xml) - -Arg value 1 - -Warning: xml_parser_create(): unsupported source encoding "1" in %s on line %d -bool(false) - -Arg value -resource(%d) of type (xml) - -Arg value -resource(%d) of type (xml) - -Arg value -resource(%d) of type (xml) - -Arg value string - -Warning: xml_parser_create(): unsupported source encoding "string" in %s on line %d -bool(false) - -Arg value string - -Warning: xml_parser_create(): unsupported source encoding "string" in %s on line %d -bool(false) - -Arg value ISO-8859-1 -resource(%d) of type (xml) - -Arg value UTF-8 -resource(%d) of type (xml) - -Arg value US-ASCII -resource(%d) of type (xml) - -Arg value UTF-32 - -Warning: xml_parser_create(): unsupported source encoding "UTF-32" in %s on line %d -bool(false) - -Arg value Some Ascii Data - -Warning: xml_parser_create(): unsupported source encoding "Some Ascii Data" in %s on line %d -bool(false) - -Arg value Resource id %s - -Warning: xml_parser_create() expects parameter 1 to be string, resource given in %s on line %d -bool(false) - -Arg value -resource(%d) of type (xml) - -Arg value -resource(%d) of type (xml) -Done diff --git a/ext/xml/tests/xml_parser_free_variation1.phpt b/ext/xml/tests/xml_parser_free_variation1.phpt deleted file mode 100644 index 1e91e452eb100..0000000000000 --- a/ext/xml/tests/xml_parser_free_variation1.phpt +++ /dev/null @@ -1,239 +0,0 @@ ---TEST-- -Test xml_parser_free() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_parser_free($value) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_parser_free() : usage variations *** - -Arg value 0 - -Warning: xml_parser_free() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parser_free() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_parser_free() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_parser_free() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_parser_free() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_parser_free() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_parser_free() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_parser_free() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_parser_free() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_free() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_free() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_free() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_free() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_free() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_free() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_free() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parser_free() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_free() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parser_free() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_free() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_free() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_free() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parser_free() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parser_free() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_parser_free() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_parser_free(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_parser_free() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_free() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_parser_get_option_variation1.phpt b/ext/xml/tests/xml_parser_get_option_variation1.phpt deleted file mode 100644 index c45644b561f84..0000000000000 --- a/ext/xml/tests/xml_parser_get_option_variation1.phpt +++ /dev/null @@ -1,240 +0,0 @@ ---TEST-- -Test xml_parser_get_option() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_parser_get_option($value, $option) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_parser_get_option() : usage variations *** - -Arg value 0 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_get_option() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_get_option() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_get_option() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_get_option() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_get_option() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_get_option() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_get_option() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_get_option() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parser_get_option() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_get_option() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_get_option() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_get_option() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parser_get_option() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parser_get_option() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_parser_get_option() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_parser_get_option(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_parser_get_option() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_get_option() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_parser_get_option_variation2.phpt b/ext/xml/tests/xml_parser_get_option_variation2.phpt deleted file mode 100644 index eb965b7a8dea4..0000000000000 --- a/ext/xml/tests/xml_parser_get_option_variation2.phpt +++ /dev/null @@ -1,225 +0,0 @@ ---TEST-- -Test xml_parser_get_option() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for option - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_parser_get_option($parser, $value) ); -}; - -fclose($fp); -xml_parser_free($parser); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_parser_get_option() : usage variations *** - -Arg value 12345 - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value -2345 - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value 10.5 - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value -10.5 - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value 101234567000 - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value 1.07654321E-9 - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value 0.5 - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_get_option() expects parameter 2 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_get_option() expects parameter 2 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_get_option() expects parameter 2 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_get_option() expects parameter 2 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_get_option() expects parameter 2 to be int, array given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value 1 -int(1) - -Arg value - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value 1 -int(1) - -Arg value - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value - -Warning: xml_parser_get_option() expects parameter 2 to be int, string given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_get_option() expects parameter 2 to be int, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parser_get_option() expects parameter 2 to be int, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parser_get_option() expects parameter 2 to be int, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_parser_get_option() expects parameter 2 to be int, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_parser_get_option() expects parameter 2 to be int, resource given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) - -Arg value - -Warning: xml_parser_get_option(): Unknown option in %s on line %d -bool(false) -Done diff --git a/ext/xml/tests/xml_parser_set_option_variation1.phpt b/ext/xml/tests/xml_parser_set_option_variation1.phpt deleted file mode 100644 index 23a24d58b9ddc..0000000000000 --- a/ext/xml/tests/xml_parser_set_option_variation1.phpt +++ /dev/null @@ -1,240 +0,0 @@ ---TEST-- -Test xml_parser_set_option() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_parser_set_option($value, $option, 1) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_parser_set_option() : usage variations *** - -Arg value 0 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_set_option() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_set_option() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_set_option() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_set_option() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_set_option() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_set_option() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_set_option() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_set_option() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_parser_set_option() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_set_option() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_set_option() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_set_option() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parser_set_option() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parser_set_option() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_parser_set_option() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_parser_set_option(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_parser_set_option() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_set_option() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_parser_set_option_variation2.phpt b/ext/xml/tests/xml_parser_set_option_variation2.phpt deleted file mode 100644 index b2c49806d1a3b..0000000000000 --- a/ext/xml/tests/xml_parser_set_option_variation2.phpt +++ /dev/null @@ -1,215 +0,0 @@ ---TEST-- -Test xml_parser_set_option() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for option - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_parser_set_option($parser, $value, 1) ); -}; - -xml_parser_free($parser); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_parser_set_option() : usage variations *** - -Arg value 12345 - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value -2345 - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value 10.5 - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value -10.5 - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value 101234567000 - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value 1.07654321E-9 - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value 0.5 - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value Array - -Warning: xml_parser_set_option() expects parameter 2 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_set_option() expects parameter 2 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_set_option() expects parameter 2 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_set_option() expects parameter 2 to be int, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_parser_set_option() expects parameter 2 to be int, array given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value 1 -bool(true) - -Arg value - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value 1 -bool(true) - -Arg value - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value - -Warning: xml_parser_set_option() expects parameter 2 to be int, string given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_set_option() expects parameter 2 to be int, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parser_set_option() expects parameter 2 to be int, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_parser_set_option() expects parameter 2 to be int, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_parser_set_option() expects parameter 2 to be int, object given in %s on line %d -NULL - -Arg value - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) - -Arg value - -Warning: xml_parser_set_option(): Unknown option in %s on line %d -bool(false) -Done diff --git a/ext/xml/tests/xml_set_character_data_handler_variation1.phpt b/ext/xml/tests/xml_set_character_data_handler_variation1.phpt deleted file mode 100644 index 3291853f0c717..0000000000000 --- a/ext/xml/tests/xml_set_character_data_handler_variation1.phpt +++ /dev/null @@ -1,244 +0,0 @@ ---TEST-- -Test xml_set_character_data_handler() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_character_data_handler($value, $hdl) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_character_data_handler() : usage variations *** - -Arg value 0 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_character_data_handler(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_character_data_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_set_default_handler_variation1.phpt b/ext/xml/tests/xml_set_default_handler_variation1.phpt deleted file mode 100644 index 8ce13842a2a59..0000000000000 --- a/ext/xml/tests/xml_set_default_handler_variation1.phpt +++ /dev/null @@ -1,244 +0,0 @@ ---TEST-- -Test xml_set_default_handler() function : usage variations - test different types for parser ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_default_handler($value, $hdl) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_default_handler() : usage variations *** - -Arg value 0 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_default_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_default_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_default_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_default_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_default_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_default_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_default_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_default_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_default_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_default_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_default_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_default_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_default_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_default_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_set_default_handler() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_default_handler(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_set_default_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_default_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_set_element_handler_variation1.phpt b/ext/xml/tests/xml_set_element_handler_variation1.phpt deleted file mode 100644 index 258b676d99dec..0000000000000 --- a/ext/xml/tests/xml_set_element_handler_variation1.phpt +++ /dev/null @@ -1,244 +0,0 @@ ---TEST-- -Test xml_set_element_handler() function : usage variations - test different types for parser ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_element_handler($value, $hdl, $hdl) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_element_handler() : usage variations *** - -Arg value 0 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_element_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_element_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_element_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_element_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_element_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_element_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_element_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_element_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_element_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_element_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_element_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_element_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_element_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_element_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_set_element_handler() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_element_handler(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_set_element_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_element_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_set_end_namespace_decl_handler_variation1.phpt b/ext/xml/tests/xml_set_end_namespace_decl_handler_variation1.phpt deleted file mode 100644 index 67b25356f6b43..0000000000000 --- a/ext/xml/tests/xml_set_end_namespace_decl_handler_variation1.phpt +++ /dev/null @@ -1,244 +0,0 @@ ---TEST-- -Test xml_set_end_namespace_decl_handler() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_end_namespace_decl_handler($value, $hdl) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_end_namespace_decl_handler() : usage variations *** - -Arg value 0 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_end_namespace_decl_handler(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_end_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_set_external_entity_ref_handler_variation1.phpt b/ext/xml/tests/xml_set_external_entity_ref_handler_variation1.phpt deleted file mode 100644 index 1d628b9a0c12d..0000000000000 --- a/ext/xml/tests/xml_set_external_entity_ref_handler_variation1.phpt +++ /dev/null @@ -1,244 +0,0 @@ ---TEST-- -Test xml_set_external_entity_ref_handler() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_external_entity_ref_handler($value, $hdl) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_external_entity_ref_handler() : usage variations *** - -Arg value 0 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_external_entity_ref_handler(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_external_entity_ref_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_set_notation_decl_handler_variation1.phpt b/ext/xml/tests/xml_set_notation_decl_handler_variation1.phpt deleted file mode 100644 index 1c4bdf1ffb2c4..0000000000000 --- a/ext/xml/tests/xml_set_notation_decl_handler_variation1.phpt +++ /dev/null @@ -1,244 +0,0 @@ ---TEST-- -Test xml_set_notation_decl_handler() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_notation_decl_handler($value, $hdl) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_notation_decl_handler() : usage variations *** - -Arg value 0 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_notation_decl_handler(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_notation_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_set_object_variation1.phpt b/ext/xml/tests/xml_set_object_variation1.phpt deleted file mode 100644 index 5d34d03b09bbc..0000000000000 --- a/ext/xml/tests/xml_set_object_variation1.phpt +++ /dev/null @@ -1,240 +0,0 @@ ---TEST-- -Test xml_set_object() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_object($value, $obj) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_object() : usage variations *** - -Arg value 0 - -Warning: xml_set_object() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_object() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_object() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_object() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_object() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_object() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_object() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_object() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_object() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_object() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_object() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_object() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_object() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_object() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_object() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_object() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_object() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_object() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_set_object() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_object(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_set_object() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_set_object_variation2.phpt b/ext/xml/tests/xml_set_object_variation2.phpt deleted file mode 100644 index f2a064d217152..0000000000000 --- a/ext/xml/tests/xml_set_object_variation2.phpt +++ /dev/null @@ -1,229 +0,0 @@ ---TEST-- -Test xml_set_object() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for obj - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_object($parser, $value) ); -}; - -xml_parser_free($parser); -fclose($fp); - -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_object() : usage variations *** - -Arg value 0 - -Warning: xml_set_object() expects parameter 2 to be object, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_object() expects parameter 2 to be object, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_object() expects parameter 2 to be object, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_object() expects parameter 2 to be object, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_object() expects parameter 2 to be object, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_object() expects parameter 2 to be object, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_object() expects parameter 2 to be object, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_object() expects parameter 2 to be object, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_object() expects parameter 2 to be object, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_object() expects parameter 2 to be object, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 2 to be object, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_object() expects parameter 2 to be object, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 2 to be object, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_object() expects parameter 2 to be object, resource given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_set_processing_instruction_handler_variation1.phpt b/ext/xml/tests/xml_set_processing_instruction_handler_variation1.phpt deleted file mode 100644 index 8b2ea91444753..0000000000000 --- a/ext/xml/tests/xml_set_processing_instruction_handler_variation1.phpt +++ /dev/null @@ -1,244 +0,0 @@ ---TEST-- -Test xml_set_processing_instruction_handler() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_processing_instruction_handler($value, $hdl) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_processing_instruction_handler() : usage variations *** - -Arg value 0 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_processing_instruction_handler(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_processing_instruction_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_set_start_namespace_decl_handler_variation1.phpt b/ext/xml/tests/xml_set_start_namespace_decl_handler_variation1.phpt deleted file mode 100644 index 472e8a3eaaddf..0000000000000 --- a/ext/xml/tests/xml_set_start_namespace_decl_handler_variation1.phpt +++ /dev/null @@ -1,244 +0,0 @@ ---TEST-- -Test xml_set_start_namespace_decl_handler() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_start_namespace_decl_handler($value, $hdl) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_start_namespace_decl_handler() : usage variations *** - -Arg value 0 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_start_namespace_decl_handler(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_start_namespace_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/tests/xml_set_unparsed_entity_decl_handler_variation1.phpt b/ext/xml/tests/xml_set_unparsed_entity_decl_handler_variation1.phpt deleted file mode 100644 index 6d94c656ec755..0000000000000 --- a/ext/xml/tests/xml_set_unparsed_entity_decl_handler_variation1.phpt +++ /dev/null @@ -1,244 +0,0 @@ ---TEST-- -Test xml_set_unparsed_entity_decl_handler() function : usage variations ---SKIPIF-- - ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // object data - new aClass(), - - // resource data - $fp, - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for parser - -foreach($values as $value) { - echo @"\nArg value $value \n"; - var_dump( xml_set_unparsed_entity_decl_handler($value, $hdl) ); -}; - -fclose($fp); -echo "Done"; -?> ---EXPECTF-- -*** Testing xml_set_unparsed_entity_decl_handler() : usage variations *** - -Arg value 0 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 12345 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value -2345 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, int given in %s on line %d -NULL - -Arg value 10.5 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value -10.5 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 101234567000 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 1.07654321E-9 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value 0.5 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, float given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value Array - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, array given in %s on line %d -NULL - -Arg value - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value 1 - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, bool given in %s on line %d -NULL - -Arg value - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value string - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, string given in %s on line %d -NULL - -Arg value Some Ascii Data - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, object given in %s on line %d -NULL - -Arg value Resource id %s - -Warning: xml_set_unparsed_entity_decl_handler(): supplied resource is not a valid XML Parser resource in %s on line %d -bool(false) - -Arg value - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL - -Arg value - -Warning: xml_set_unparsed_entity_decl_handler() expects parameter 1 to be resource, null given in %s on line %d -NULL -Done diff --git a/ext/xml/xml.c b/ext/xml/xml.c index ca04a489d004a..437b05175c20b 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1686,12 +1686,3 @@ PHP_FUNCTION(xml_parser_get_option) /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index e917253ced728..6e211adc86f94 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -114,30 +114,20 @@ static int xmlreader_property_reader(xmlreader_object *obj, xmlreader_prop_handl /* }}} */ /* {{{ xmlreader_get_property_ptr_ptr */ -zval *xmlreader_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) +zval *xmlreader_get_property_ptr_ptr(zend_object *object, zend_string *name, int type, void **cache_slot) { xmlreader_object *obj; - zval tmp_member; zval *retval = NULL; xmlreader_prop_handler *hnd = NULL; - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - } - - obj = Z_XMLREADER_P(object); + obj = php_xmlreader_fetch_object(object); if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, Z_STR_P(member)); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } if (hnd == NULL) { - retval = zend_std_get_property_ptr_ptr(object, member, type, cache_slot); - } - - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); + retval = zend_std_get_property_ptr_ptr(object, name, type, cache_slot); } return retval; @@ -145,22 +135,16 @@ zval *xmlreader_get_property_ptr_ptr(zval *object, zval *member, int type, void /* }}} */ /* {{{ xmlreader_read_property */ -zval *xmlreader_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) +zval *xmlreader_read_property(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) { xmlreader_object *obj; - zval tmp_member; zval *retval = NULL; xmlreader_prop_handler *hnd = NULL; - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - } - - obj = Z_XMLREADER_P(object); + obj = php_xmlreader_fetch_object(object); if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, Z_STR_P(member)); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } if (hnd != NULL) { @@ -170,41 +154,28 @@ zval *xmlreader_read_property(zval *object, zval *member, int type, void **cache retval = rv; } } else { - retval = zend_std_read_property(object, member, type, cache_slot, rv); + retval = zend_std_read_property(object, name, type, cache_slot, rv); } - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); - } return retval; } /* }}} */ /* {{{ xmlreader_write_property */ -zval *xmlreader_write_property(zval *object, zval *member, zval *value, void **cache_slot) +zval *xmlreader_write_property(zend_object *object, zend_string *name, zval *value, void **cache_slot) { xmlreader_object *obj; - zval tmp_member; xmlreader_prop_handler *hnd = NULL; - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - } - - obj = Z_XMLREADER_P(object); + obj = php_xmlreader_fetch_object(object); if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, Z_STR_P(member)); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } if (hnd != NULL) { php_error_docref(NULL, E_WARNING, "Cannot write to read-only property"); } else { - value = zend_std_write_property(object, member, value, cache_slot); - } - - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); + value = zend_std_write_property(object, name, value, cache_slot); } return value; @@ -1371,12 +1342,3 @@ PHP_MINFO_FUNCTION(xmlreader) php_info_print_table_end(); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/xmlreader/php_xmlreader.h b/ext/xmlreader/php_xmlreader.h index 01bc1e3a285d0..d43d332cf5778 100644 --- a/ext/xmlreader/php_xmlreader.h +++ b/ext/xmlreader/php_xmlreader.h @@ -69,12 +69,3 @@ PHP_MINFO_FUNCTION(xmlreader); #endif #endif /* PHP_XMLREADER_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/xmlrpc/php_xmlrpc.h b/ext/xmlrpc/php_xmlrpc.h index e6265e4eb4ec1..fbc29485ec676 100644 --- a/ext/xmlrpc/php_xmlrpc.h +++ b/ext/xmlrpc/php_xmlrpc.h @@ -87,11 +87,3 @@ PHP_FUNCTION(xmlrpc_server_register_introspection_callback); #endif #endif /* _PHP_XMLRPC_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c index ff4d00f8e24db..a5c9950a7a4e5 100644 --- a/ext/xmlrpc/xmlrpc-epi-php.c +++ b/ext/xmlrpc/xmlrpc-epi-php.c @@ -1452,10 +1452,3 @@ PHP_FUNCTION(xmlrpc_is_fault) RETURN_FALSE; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index c4c01d812a740..921cd4151a84b 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -1835,12 +1835,3 @@ static PHP_MINFO_FUNCTION(xmlwriter) php_info_print_table_end(); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/xmlwriter/php_xmlwriter.h b/ext/xmlwriter/php_xmlwriter.h index 9347431770052..0413d3031e32e 100644 --- a/ext/xmlwriter/php_xmlwriter.h +++ b/ext/xmlwriter/php_xmlwriter.h @@ -54,12 +54,3 @@ static inline ze_xmlwriter_object *php_xmlwriter_fetch_object(zend_object *obj) #define Z_XMLWRITER_P(zv) php_xmlwriter_fetch_object(Z_OBJ_P((zv))) #endif /* PHP_XMLWRITER_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c index 01f70224521f8..9202c8a03a5cb 100644 --- a/ext/xsl/php_xsl.c +++ b/ext/xsl/php_xsl.c @@ -273,12 +273,3 @@ PHP_MINFO_FUNCTION(xsl) php_info_print_table_end(); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h index a8d21c98011f6..468238c4f7cee 100644 --- a/ext/xsl/php_xsl.h +++ b/ext/xsl/php_xsl.h @@ -120,13 +120,3 @@ ZEND_END_MODULE_GLOBALS(xsl) #endif #endif /* PHP_XSL_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/xsl/xsl_fe.h b/ext/xsl/xsl_fe.h index 951f5b4d766f0..f48a126789931 100644 --- a/ext/xsl/xsl_fe.h +++ b/ext/xsl/xsl_fe.h @@ -36,12 +36,3 @@ PHP_FUNCTION(xsl_xsltprocessor_set_security_prefs); PHP_FUNCTION(xsl_xsltprocessor_get_security_prefs); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 2bd35f2bfd722..2bb8fc08496c5 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -397,7 +397,8 @@ PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet) xsl_object *intern; int prevSubstValue, prevExtDtdValue, clone_docu = 0; xmlNode *nodep = NULL; - zval *cloneDocu, member, rv; + zval *cloneDocu, rv; + zend_string *member; id = ZEND_THIS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &docp) == FAILURE) { @@ -433,13 +434,13 @@ PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet) intern = Z_XSL_P(id); - ZVAL_STRING(&member, "cloneDocument"); - cloneDocu = zend_std_read_property(id, &member, BP_VAR_IS, NULL, &rv); + member = zend_string_init("cloneDocument", sizeof("cloneDocument")-1, 0); + cloneDocu = zend_std_read_property(Z_OBJ_P(id), member, BP_VAR_IS, NULL, &rv); if (Z_TYPE_P(cloneDocu) != IS_NULL) { convert_to_long(cloneDocu); clone_docu = Z_LVAL_P(cloneDocu); } - zval_ptr_dtor(&member); + zend_string_release_ex(member, 0); if (clone_docu == 0) { /* check if the stylesheet is using xsl:key, if yes, we have to clone the document _always_ before a transformation */ nodep = xmlDocGetRootElement(sheetp->doc); @@ -479,7 +480,8 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl php_libxml_node_object *object; char **params = NULL; int clone; - zval *doXInclude, member, rv; + zval *doXInclude, rv; + zend_string *member; FILE *f; int secPrefsError = 0; int secPrefsValue; @@ -529,13 +531,13 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl ctxt = xsltNewTransformContext(style, doc); ctxt->_private = (void *) intern; - ZVAL_STRING(&member, "doXInclude"); - doXInclude = zend_std_read_property(id, &member, BP_VAR_IS, NULL, &rv); + member = zend_string_init("doXInclude", sizeof("doXInclude")-1, 0); + doXInclude = zend_std_read_property(Z_OBJ_P(id), member, BP_VAR_IS, NULL, &rv); if (Z_TYPE_P(doXInclude) != IS_NULL) { convert_to_long(doXInclude); ctxt->xinclude = Z_LVAL_P(doXInclude); } - zval_ptr_dtor(&member); + zend_string_release_ex(member, 0); secPrefsValue = intern->securityPrefs; @@ -935,12 +937,3 @@ PHP_FUNCTION(xsl_xsltprocessor_has_exslt_support) #endif } /* }}} end xsl_xsltprocessor_has_exslt_support(); */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/zend_test/php_test.h b/ext/zend_test/php_test.h index d0758b2d49638..b76155e866b5b 100644 --- a/ext/zend_test/php_test.h +++ b/ext/zend_test/php_test.h @@ -33,13 +33,3 @@ ZEND_TSRMLS_CACHE_EXTERN() #endif #endif - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 54eae8ed5b5f4..6c4ada63bde54 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -872,54 +872,36 @@ static zval *php_zip_property_reader(ze_zip_object *obj, zip_prop_handler *hnd, } /* }}} */ -static zval *php_zip_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ +static zval *php_zip_get_property_ptr_ptr(zend_object *object, zend_string *name, int type, void **cache_slot) /* {{{ */ { ze_zip_object *obj; - zval tmp_member; zval *retval = NULL; zip_prop_handler *hnd = NULL; - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - cache_slot = NULL; - } - - obj = Z_ZIP_P(object); + obj = php_zip_fetch_object(object); if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, Z_STR_P(member)); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } if (hnd == NULL) { - retval = zend_std_get_property_ptr_ptr(object, member, type, cache_slot); - } - - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); + retval = zend_std_get_property_ptr_ptr(object, name, type, cache_slot); } return retval; } /* }}} */ -static zval *php_zip_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv) /* {{{ */ +static zval *php_zip_read_property(zend_object *object, zend_string *name, int type, void **cache_slot, zval *rv) /* {{{ */ { ze_zip_object *obj; - zval tmp_member; zval *retval = NULL; zip_prop_handler *hnd = NULL; - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - cache_slot = NULL; - } - - obj = Z_ZIP_P(object); + obj = php_zip_fetch_object(object); if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, Z_STR_P(member)); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } if (hnd != NULL) { @@ -928,34 +910,23 @@ static zval *php_zip_read_property(zval *object, zval *member, int type, void ** retval = &EG(uninitialized_zval); } } else { - retval = zend_std_read_property(object, member, type, cache_slot, rv); - } - - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); + retval = zend_std_read_property(object, name, type, cache_slot, rv); } return retval; } /* }}} */ -static int php_zip_has_property(zval *object, zval *member, int type, void **cache_slot) /* {{{ */ +static int php_zip_has_property(zend_object *object, zend_string *name, int type, void **cache_slot) /* {{{ */ { ze_zip_object *obj; - zval tmp_member; zip_prop_handler *hnd = NULL; int retval = 0; - if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_STR(&tmp_member, zval_get_string_func(member)); - member = &tmp_member; - cache_slot = NULL; - } - - obj = Z_ZIP_P(object); + obj = php_zip_fetch_object(object); if (obj->prop_handler != NULL) { - hnd = zend_hash_find_ptr(obj->prop_handler, Z_STR_P(member)); + hnd = zend_hash_find_ptr(obj->prop_handler, name); } if (hnd != NULL) { @@ -973,18 +944,14 @@ static int php_zip_has_property(zval *object, zval *member, int type, void **cac zval_ptr_dtor(&tmp); } else { - retval = zend_std_has_property(object, member, type, cache_slot); - } - - if (member == &tmp_member) { - zval_ptr_dtor_str(&tmp_member); + retval = zend_std_has_property(object, name, type, cache_slot); } return retval; } /* }}} */ -static HashTable *php_zip_get_gc(zval *object, zval **gc_data, int *gc_data_count) /* {{{ */ +static HashTable *php_zip_get_gc(zend_object *object, zval **gc_data, int *gc_data_count) /* {{{ */ { *gc_data = NULL; *gc_data_count = 0; @@ -992,14 +959,14 @@ static HashTable *php_zip_get_gc(zval *object, zval **gc_data, int *gc_data_coun } /* }}} */ -static HashTable *php_zip_get_properties(zval *object)/* {{{ */ +static HashTable *php_zip_get_properties(zend_object *object)/* {{{ */ { ze_zip_object *obj; HashTable *props; zip_prop_handler *hnd; zend_string *key; - obj = Z_ZIP_P(object); + obj = php_zip_fetch_object(object); props = zend_std_get_properties(object); if (obj->prop_handler == NULL) { @@ -3167,12 +3134,3 @@ static PHP_MINFO_FUNCTION(zip) php_info_print_table_end(); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index e3ffa3338a0ec..191be54101eff 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -80,12 +80,3 @@ php_stream *php_stream_zip_open(const char *filename, const char *path, const ch extern const php_stream_wrapper php_stream_zip_wrapper; #endif /* PHP_ZIP_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h index 8d2175beca5f1..8e77ee62b2ea4 100644 --- a/ext/zlib/php_zlib.h +++ b/ext/zlib/php_zlib.h @@ -73,11 +73,3 @@ extern zend_module_entry php_zlib_module_entry; #define phpext_zlib_ptr zlib_module_ptr #endif /* PHP_ZLIB_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - */ diff --git a/ext/zlib/tests/gzfile_variation13.phpt b/ext/zlib/tests/gzfile_variation13.phpt deleted file mode 100644 index 2920fc108cf0a..0000000000000 --- a/ext/zlib/tests/gzfile_variation13.phpt +++ /dev/null @@ -1,51 +0,0 @@ ---TEST-- -Test function gzfile() by substituting argument 2 with object values. ---SKIPIF-- - ---FILE-- - new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation as $var ) { - var_dump(gzfile( $filename, $var ) ); -} -?> -===DONE=== ---EXPECTF-- -Error: 2 - gzfile() expects parameter 2 to be int, object given, %s(%d) -NULL -Error: 2 - gzfile() expects parameter 2 to be int, object given, %s(%d) -NULL -===DONE=== diff --git a/ext/zlib/tests/gzfile_variation6.phpt b/ext/zlib/tests/gzfile_variation6.phpt deleted file mode 100644 index 64168180fcc87..0000000000000 --- a/ext/zlib/tests/gzfile_variation6.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -Test function gzfile() by substituting argument 1 with object values. ---SKIPIF-- - ---FILE-- - new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation as $var ) { - var_dump(gzfile( $var , $use_include_path ) ); -} -?> ---EXPECTF-- -Error: 2 - gzfile(Class A object): failed to open stream: No such file or directory, %s(%d) -bool(false) -Error: 2 - gzfile() expects parameter 1 to be a valid path, object given, %s(%d) -NULL diff --git a/ext/zlib/tests/gzopen_variation1.phpt b/ext/zlib/tests/gzopen_variation1.phpt deleted file mode 100644 index 270758911f38d..0000000000000 --- a/ext/zlib/tests/gzopen_variation1.phpt +++ /dev/null @@ -1,227 +0,0 @@ ---TEST-- -Test gzopen() function : usage variation ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for filename - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gzopen($value, $mode, $use_include_path) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing gzopen() : usage variation *** - ---int 0-- -Error: 2 - gzopen(0): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---int 1-- -Error: 2 - gzopen(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - gzopen(12345): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - gzopen(-2345): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - gzopen(10.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - gzopen(-10.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - gzopen(123456789000): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - gzopen(-123456789000): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---float .5-- -Error: 2 - gzopen(0.5): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---empty array-- -Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - gzopen() expects parameter 1 to be a valid path, array given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - gzopen(): Filename cannot be empty, %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - gzopen(): Filename cannot be empty, %s(%d) -bool(false) - ---lowercase true-- -Error: 2 - gzopen(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - gzopen(): Filename cannot be empty, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - gzopen(1): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - gzopen(): Filename cannot be empty, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - gzopen(): Filename cannot be empty, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - gzopen(): Filename cannot be empty, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - gzopen(Class A object): failed to open stream: No such file or directory, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - gzopen() expects parameter 1 to be a valid path, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - gzopen(): Filename cannot be empty, %s(%d) -bool(false) - ---unset var-- -Error: 2 - gzopen(): Filename cannot be empty, %s(%d) -bool(false) - ---resource-- -Error: 2 - gzopen() expects parameter 1 to be a valid path, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/zlib/tests/gzopen_variation2.phpt b/ext/zlib/tests/gzopen_variation2.phpt deleted file mode 100644 index 1fd08455ebfbc..0000000000000 --- a/ext/zlib/tests/gzopen_variation2.phpt +++ /dev/null @@ -1,227 +0,0 @@ ---TEST-- -Test gzopen() function : usage variation ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for mode - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( gzopen($filename, $value, $use_include_path) ); -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing gzopen() : usage variation *** - ---int 0-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---int 1-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---int 12345-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---int -12345-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---float 10.5-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---float -10.5-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---float 12.3456789000e10-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---float -12.3456789000e10-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---float .5-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---empty array-- -Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - gzopen() expects parameter 2 to be string, array given, %s(%d) -NULL - ---uppercase NULL-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---lowercase null-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---lowercase true-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---lowercase false-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---uppercase TRUE-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---uppercase FALSE-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---empty string DQ-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---empty string SQ-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---instance of classWithToString-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---instance of classWithoutToString-- -Error: 2 - gzopen() expects parameter 2 to be string, object given, %s(%d) -NULL - ---undefined var-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---unset var-- -Error: 2 - gzopen(%s/004.txt.gz): failed to open stream: %s, %s(%d) -bool(false) - ---resource-- -Error: 2 - gzopen() expects parameter 2 to be string, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/zlib/tests/gzopen_variation3.phpt b/ext/zlib/tests/gzopen_variation3.phpt deleted file mode 100644 index 824d4e333e6be..0000000000000 --- a/ext/zlib/tests/gzopen_variation3.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test gzopen() function : usage variation ---SKIPIF-- - ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource variable - 'resource' => $fp -); - -// loop through each element of the array for use_include_path - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - $res = gzopen($filename, $mode, $value); - var_dump($res); - if ($res === true) { - gzclose($res); - } -}; - -fclose($fp); - -?> -===DONE=== ---EXPECTF-- -*** Testing gzopen() : usage variation *** - ---float 10.5-- -resource(%d) of type (stream) - ---float -10.5-- -resource(%d) of type (stream) - ---float 12.3456789000e10-- -resource(%d) of type (stream) - ---float -12.3456789000e10-- -resource(%d) of type (stream) - ---float .5-- -resource(%d) of type (stream) - ---empty array-- -Error: 2 - gzopen() expects parameter 3 to be int, array given, %s(%d) -NULL - ---int indexed array-- -Error: 2 - gzopen() expects parameter 3 to be int, array given, %s(%d) -NULL - ---associative array-- -Error: 2 - gzopen() expects parameter 3 to be int, array given, %s(%d) -NULL - ---nested arrays-- -Error: 2 - gzopen() expects parameter 3 to be int, array given, %s(%d) -NULL - ---uppercase NULL-- -resource(%d) of type (stream) - ---lowercase null-- -resource(%d) of type (stream) - ---lowercase true-- -resource(%d) of type (stream) - ---lowercase false-- -resource(%d) of type (stream) - ---uppercase TRUE-- -resource(%d) of type (stream) - ---uppercase FALSE-- -resource(%d) of type (stream) - ---empty string DQ-- -Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d) -NULL - ---empty string SQ-- -Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d) -NULL - ---string DQ-- -Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d) -NULL - ---string SQ-- -Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d) -NULL - ---mixed case string-- -Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d) -NULL - ---heredoc-- -Error: 2 - gzopen() expects parameter 3 to be int, string given, %s(%d) -NULL - ---instance of classWithToString-- -Error: 2 - gzopen() expects parameter 3 to be int, object given, %s(%d) -NULL - ---instance of classWithoutToString-- -Error: 2 - gzopen() expects parameter 3 to be int, object given, %s(%d) -NULL - ---undefined var-- -resource(%d) of type (stream) - ---unset var-- -resource(%d) of type (stream) - ---resource-- -Error: 2 - gzopen() expects parameter 3 to be int, resource given, %s(%d) -NULL -===DONE=== diff --git a/ext/zlib/tests/gzreadgzwrite.phpt b/ext/zlib/tests/gzreadgzwrite.phpt index 817002807f159..87b55e673ffbd 100644 --- a/ext/zlib/tests/gzreadgzwrite.phpt +++ b/ext/zlib/tests/gzreadgzwrite.phpt @@ -1,7 +1,7 @@ --TEST-- gzopen(), gzread(), gzwrite() --SKIPIF-- - --FILE-- --FILE-- ---FILE-- - new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation as $var ) { - var_dump(readgzfile( $filename, $var ) ); -} -?> -===DONE=== ---EXPECTF-- -Error: 2 - readgzfile() expects parameter 2 to be int, object given, %s(%d) -NULL -Error: 2 - readgzfile() expects parameter 2 to be int, object given, %s(%d) -NULL -===DONE=== diff --git a/ext/zlib/tests/readgzfile_variation6.phpt b/ext/zlib/tests/readgzfile_variation6.phpt deleted file mode 100644 index 9fcea02939c91..0000000000000 --- a/ext/zlib/tests/readgzfile_variation6.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -Test function readgzfile() by substituting argument 1 with object values. ---SKIPIF-- - ---FILE-- - new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - ); - - -foreach ( $variation as $var ) { - var_dump(readgzfile( $var , $use_include_path ) ); -} -?> ---EXPECTF-- -Error: 2 - readgzfile(Class A object): failed to open stream: No such file or directory, %s(%d) -bool(false) -Error: 2 - readgzfile() expects parameter 1 to be a valid path, object given, %s(%d) -NULL diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 827b677a03d63..7eb38c3c04dc0 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1617,12 +1617,3 @@ zend_module_entry php_zlib_module_entry = { STANDARD_MODULE_PROPERTIES_EX }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c index 27afc36ac048a..3654a140fd5a6 100644 --- a/ext/zlib/zlib_filter.c +++ b/ext/zlib/zlib_filter.c @@ -415,12 +415,3 @@ const php_stream_filter_factory php_zlib_filter_factory = { php_zlib_filter_create }; /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c index d11120f03d060..d600f09a65428 100644 --- a/ext/zlib/zlib_fopen_wrapper.c +++ b/ext/zlib/zlib_fopen_wrapper.c @@ -184,12 +184,3 @@ const php_stream_wrapper php_stream_gzip_wrapper = { NULL, 0, /* is_url */ }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/footer b/footer deleted file mode 100644 index 42a6cd7005eff..0000000000000 --- a/footer +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/SAPI.c b/main/SAPI.c index bb0b5f884e977..0d81731f5c7e8 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -1156,12 +1156,3 @@ SAPI_API void sapi_add_request_header(char *var, unsigned int var_len, char *val } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/SAPI.h b/main/SAPI.h index bf2e32b764b58..f3479a22e63e2 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -320,12 +320,3 @@ END_EXTERN_C() NULL /* input_filter_init */ #endif /* SAPI_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/alloca.c b/main/alloca.c index 07d1f01af96b6..480b9b0ab52f0 100644 --- a/main/alloca.c +++ b/main/alloca.c @@ -484,12 +484,3 @@ i00afunc (long address) #endif /* no alloca */ #endif /* not GCC version 2 */ #endif /* HAVE_ALLOCA */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/explicit_bzero.c b/main/explicit_bzero.c index f1f7ae0955d93..57d12080c69b1 100644 --- a/main/explicit_bzero.c +++ b/main/explicit_bzero.c @@ -46,11 +46,3 @@ PHPAPI void php_explicit_bzero(void *dst, size_t siz) #endif } #endif -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/fastcgi.c b/main/fastcgi.c index 26f1decbc6617..cc66de7344a03 100644 --- a/main/fastcgi.c +++ b/main/fastcgi.c @@ -1769,12 +1769,3 @@ const char *fcgi_get_last_client_ip() /* Unix socket */ return NULL; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/fastcgi.h b/main/fastcgi.h index 757b3fb791cd9..95aae11e416d1 100644 --- a/main/fastcgi.h +++ b/main/fastcgi.h @@ -126,12 +126,3 @@ void fcgi_impersonate(void); void fcgi_set_mgmt_var(const char * name, size_t name_len, const char * value, size_t value_len); void fcgi_free_mgmt_var_cb(zval *zv); - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 9efe52124c2c4..b0bfa4feda8f9 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -828,12 +828,3 @@ PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, co return real_path; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/fopen_wrappers.h b/main/fopen_wrappers.h index c2b4984e58a59..17e15b7df0c4d 100644 --- a/main/fopen_wrappers.h +++ b/main/fopen_wrappers.h @@ -47,11 +47,3 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir); END_EXTERN_C() #endif -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/getopt.c b/main/getopt.c index 38a0b9df25d2b..c01a726e997e4 100644 --- a/main/getopt.c +++ b/main/getopt.c @@ -194,12 +194,3 @@ PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char return(0); /* never reached */ } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/http_status_codes.h b/main/http_status_codes.h index 861253de996d6..5d5cfb08c3b52 100644 --- a/main/http_status_codes.h +++ b/main/http_status_codes.h @@ -80,11 +80,3 @@ static const http_response_status_code_pair http_status_map[] = { static const size_t http_status_map_len = (sizeof(http_status_map) / sizeof(http_response_status_code_pair)) - 1; #endif /* HTTP_STATUS_CODES_H */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/internal_functions.c.in b/main/internal_functions.c.in index 235e44fa59a38..7e73e6874ffca 100644 --- a/main/internal_functions.c.in +++ b/main/internal_functions.c.in @@ -37,10 +37,3 @@ PHPAPI int php_register_internal_extensions(void) { return php_register_extensions(php_builtin_extensions, EXTCOUNT); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/main/internal_functions_win32.c b/main/internal_functions_win32.c index fc638ebeff11c..45093ec7396fa 100644 --- a/main/internal_functions_win32.c +++ b/main/internal_functions_win32.c @@ -185,12 +185,3 @@ PHPAPI int php_register_internal_extensions(void) { return php_register_extensions(php_builtin_extensions, EXTCOUNT); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/main.c b/main/main.c index 1b7ee5582967e..66427685756fc 100644 --- a/main/main.c +++ b/main/main.c @@ -2746,12 +2746,3 @@ PHPAPI int php_lint_script(zend_file_handle *file) return retval; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/mergesort.c b/main/mergesort.c index d187635367f79..da6d8560bf4a5 100644 --- a/main/mergesort.c +++ b/main/mergesort.c @@ -345,12 +345,3 @@ static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const voi } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: fdm=marker - * vim: noet sw=4 ts=4 - */ diff --git a/main/network.c b/main/network.c index 5f7c909d1f0f0..60ce19f9df57d 100644 --- a/main/network.c +++ b/main/network.c @@ -1319,12 +1319,3 @@ PHPAPI struct hostent* php_network_gethostbyname(char *name) { return gethostname_re(name, &FG(tmp_host_info), &FG(tmp_host_buf), &FG(tmp_host_buf_len)); #endif } - -/* - * Local variables: - * tab-width: 8 - * c-basic-offset: 8 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/output.c b/main/output.c index 622a8352281ea..49e2535333558 100644 --- a/main/output.c +++ b/main/output.c @@ -1565,12 +1565,3 @@ PHP_FUNCTION(output_add_rewrite_var) } } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php.h b/main/php.h index ecc903b9c26b4..4904e966510c2 100644 --- a/main/php.h +++ b/main/php.h @@ -501,12 +501,3 @@ END_EXTERN_C() #endif /* !XtOffsetOf */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_compat.h b/main/php_compat.h index 82cca93495d58..01d3e326c5409 100644 --- a/main/php_compat.h +++ b/main/php_compat.h @@ -400,11 +400,3 @@ #endif #endif -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_content_types.c b/main/php_content_types.c index 8f5867bf0ee88..b53ee1ab841e8 100644 --- a/main/php_content_types.c +++ b/main/php_content_types.c @@ -64,12 +64,3 @@ int php_setup_sapi_content_types(void) return SUCCESS; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_content_types.h b/main/php_content_types.h index d97500ded5481..145e8d4c5ea2d 100644 --- a/main/php_content_types.h +++ b/main/php_content_types.h @@ -27,11 +27,3 @@ int php_startup_sapi_content_types(void); int php_setup_sapi_content_types(void); #endif /* PHP_CONTENT_TYPES_H */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_getopt.h b/main/php_getopt.h index 89130a146cf3a..20746517d4e3a 100644 --- a/main/php_getopt.h +++ b/main/php_getopt.h @@ -36,12 +36,3 @@ PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/php_globals.h b/main/php_globals.h index e383a4097383d..004696cc04584 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -172,12 +172,3 @@ struct _php_core_globals { #endif /* PHP_GLOBALS_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_ini.c b/main/php_ini.c index d74a59b311e33..7d4e916432a5a 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -946,13 +946,3 @@ PHPAPI HashTable* php_ini_get_configuration_hash(void) /* {{{ */ { return &configuration_hash; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * indent-tabs-mode: t - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_ini.h b/main/php_ini.h index c96ae725526ef..a4fad6c68984a 100644 --- a/main/php_ini.h +++ b/main/php_ini.h @@ -87,11 +87,3 @@ END_EXTERN_C() #define php_ini_string zend_ini_string #endif /* PHP_INI_H */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_main.h b/main/php_main.h index 674cac44e30a2..8f440de82090c 100644 --- a/main/php_main.h +++ b/main/php_main.h @@ -52,11 +52,3 @@ extern int php_shutdown_environ(void); END_EXTERN_C() #endif -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_memory_streams.h b/main/php_memory_streams.h index 3905869b94046..7db25dd1dda9b 100644 --- a/main/php_memory_streams.h +++ b/main/php_memory_streams.h @@ -63,12 +63,3 @@ extern PHPAPI const php_stream_wrapper php_stream_rfc2397_wrapper; #define PHP_STREAM_IS_TEMP &php_stream_temp_ops #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_network.h b/main/php_network.h index 6c0e9cebe71c6..241ca94e27439 100644 --- a/main/php_network.h +++ b/main/php_network.h @@ -337,12 +337,3 @@ END_EXTERN_C() #endif #endif /* _PHP_NETWORK_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index 61abffe1a886b..6fca7e4cab7e2 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -342,12 +342,3 @@ PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, zend_stri return fp; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_open_temporary_file.h b/main/php_open_temporary_file.h index 18c19488b6c1b..0195056e31447 100644 --- a/main/php_open_temporary_file.h +++ b/main/php_open_temporary_file.h @@ -30,11 +30,3 @@ PHPAPI const char *php_get_temporary_directory(void); END_EXTERN_C() #endif /* PHP_OPEN_TEMPORARY_FILE_H */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_output.h b/main/php_output.h index a24b7696b28db..f76d61d8416fa 100644 --- a/main/php_output.h +++ b/main/php_output.h @@ -262,12 +262,3 @@ PHP_FUNCTION(output_add_rewrite_var); PHP_FUNCTION(output_reset_rewrite_vars); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_reentrancy.h b/main/php_reentrancy.h index c06206fa53235..7ff35418bc65a 100644 --- a/main/php_reentrancy.h +++ b/main/php_reentrancy.h @@ -129,11 +129,3 @@ void reentrancy_shutdown(void); #endif #endif -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_scandir.c b/main/php_scandir.c index dfa0a19d9db74..94f5ef899d0e1 100644 --- a/main/php_scandir.c +++ b/main/php_scandir.c @@ -119,12 +119,3 @@ PHPAPI int php_scandir(const char *dirname, struct dirent **namelist[], int (*se return -1; } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_scandir.h b/main/php_scandir.h index 556b6151e9424..04bf29f2c940d 100644 --- a/main/php_scandir.h +++ b/main/php_scandir.h @@ -46,11 +46,3 @@ PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b); #endif #endif /* PHP_SCANDIR_H */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_sprintf.c b/main/php_sprintf.c index fd870410c9dcc..41e632102d284 100644 --- a/main/php_sprintf.c +++ b/main/php_sprintf.c @@ -37,12 +37,3 @@ php_sprintf (char*s, const char* format, ...) va_end (args); return (ret < 0) ? -1 : ret; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_stdint.h b/main/php_stdint.h index 6fa65a786a858..3e5fd0016c2e8 100644 --- a/main/php_stdint.h +++ b/main/php_stdint.h @@ -218,12 +218,3 @@ typedef unsigned long long uint64_t; #endif /* !PHP_WIN32 */ #endif /* PHP_STDINT_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_streams.h b/main/php_streams.h index 8bbe9a64ef09b..7c49099bb06fc 100644 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -606,11 +606,3 @@ END_EXTERN_C() #define PHP_STREAM_META_GROUP_NAME 4 #define PHP_STREAM_META_GROUP 5 #define PHP_STREAM_META_ACCESS 6 -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_syslog.c b/main/php_syslog.c index 2170ac70be088..8b3aaceff7e27 100644 --- a/main/php_syslog.c +++ b/main/php_syslog.c @@ -108,12 +108,3 @@ PHPAPI void php_syslog(int priority, const char *format, ...) /* {{{ */ } /* }}} */ #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_syslog.h b/main/php_syslog.h index 076e00cbe313d..b5df765dddfe5 100644 --- a/main/php_syslog.h +++ b/main/php_syslog.h @@ -41,12 +41,3 @@ PHPAPI void php_openlog(const char *, int, int); END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_ticks.c b/main/php_ticks.c index 76e3bce4a6023..f5b0dd0c58eb5 100644 --- a/main/php_ticks.c +++ b/main/php_ticks.c @@ -70,12 +70,3 @@ void php_run_ticks(int count) { zend_llist_apply_with_argument(&PG(tick_functions), (llist_apply_with_arg_func_t) php_tick_iterator, &count); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_ticks.h b/main/php_ticks.h index 668dee0e1887c..5b2bb057e6452 100644 --- a/main/php_ticks.h +++ b/main/php_ticks.h @@ -30,12 +30,3 @@ PHPAPI void php_remove_tick_function(void (*func)(int, void *), void * arg); END_EXTERN_C() #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_variables.c b/main/php_variables.c index 0102f8c29cf43..decf73a80f659 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -915,12 +915,3 @@ void php_startup_auto_globals(void) zend_register_auto_global(zend_string_init_interned("_REQUEST", sizeof("_REQUEST")-1, 1), PG(auto_globals_jit), php_auto_globals_create_request); zend_register_auto_global(zend_string_init_interned("_FILES", sizeof("_FILES")-1, 1), 0, php_auto_globals_create_files); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/php_variables.h b/main/php_variables.h index a994347c0454d..7dc33d328a5f6 100644 --- a/main/php_variables.h +++ b/main/php_variables.h @@ -46,11 +46,3 @@ END_EXTERN_C() #define NUM_TRACK_VARS 6 #endif /* PHP_VARIABLES_H */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/reentrancy.c b/main/reentrancy.c index 4db65a276ee90..12e25486664fe 100644 --- a/main/reentrancy.c +++ b/main/reentrancy.c @@ -425,12 +425,3 @@ php_strtok_r(char *s, const char *delim, char **last) } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/rfc1867.c b/main/rfc1867.c index c1ed1d704e1c4..1ee7b925a1b9c 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -1331,12 +1331,3 @@ SAPI_API void php_rfc1867_set_multibyte_callbacks( php_rfc1867_basename = basename; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/rfc1867.h b/main/rfc1867.h index 2b4049c8c6ddd..bfb9bb51c63ea 100644 --- a/main/rfc1867.h +++ b/main/rfc1867.h @@ -87,11 +87,3 @@ SAPI_API void php_rfc1867_set_multibyte_callbacks( php_rfc1867_basename_t basename); #endif /* RFC1867_H */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/snprintf.c b/main/snprintf.c index 8975cb0290541..15ed08175e740 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -1341,12 +1341,3 @@ PHPAPI int ap_php_asprintf(char **buf, const char *format, ...) /* {{{ */ return cc; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/snprintf.h b/main/snprintf.h index 012665d91fdac..39284aeaa4521 100644 --- a/main/snprintf.h +++ b/main/snprintf.h @@ -170,12 +170,3 @@ PHPAPI char * ap_php_conv_p2(u_wide_int num, int nbits, #define FORMAT_CONV_MAX_PRECISION 500 #endif /* SNPRINTF_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/spprintf.c b/main/spprintf.c index d5231da0f196d..193da18c0afa8 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -836,12 +836,3 @@ PHPAPI void php_printf_to_smart_str(smart_str *buf, const char *format, va_list xbuf_format_converter(buf, 0, format, ap); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/spprintf.h b/main/spprintf.h index 6cd41d7bdf72e..0bfc5a28cdf43 100644 --- a/main/spprintf.h +++ b/main/spprintf.h @@ -34,12 +34,3 @@ END_EXTERN_C() #define vstrpprintf zend_vstrpprintf #endif /* SNPRINTF_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/streams/cast.c b/main/streams/cast.c index e41d663272853..59832c54a8632 100644 --- a/main/streams/cast.c +++ b/main/streams/cast.c @@ -404,12 +404,3 @@ PHPAPI int _php_stream_make_seekable(php_stream *origstream, php_stream **newstr return PHP_STREAM_RELEASED; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/streams/filter.c b/main/streams/filter.c index a4d0d49da2119..afc1f3b8e54ed 100644 --- a/main/streams/filter.c +++ b/main/streams/filter.c @@ -503,12 +503,3 @@ PHPAPI php_stream_filter *php_stream_filter_remove(php_stream_filter *filter, in } return filter; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/streams/glob_wrapper.c b/main/streams/glob_wrapper.c index 6ee9eeec92b7d..b0ff40a7c5513 100644 --- a/main/streams/glob_wrapper.c +++ b/main/streams/glob_wrapper.c @@ -279,12 +279,3 @@ const php_stream_wrapper php_glob_stream_wrapper = { 0 }; #endif /* HAVE_GLOB */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/streams/memory.c b/main/streams/memory.c index 506c97fd31113..b63ed77255bf9 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -789,12 +789,3 @@ PHPAPI const php_stream_wrapper php_stream_rfc2397_wrapper = { NULL, 1, /* is_url */ }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/streams/mmap.c b/main/streams/mmap.c index 9c4a53ae2f7b9..8f3fcf97a693b 100644 --- a/main/streams/mmap.c +++ b/main/streams/mmap.c @@ -62,12 +62,3 @@ PHPAPI int _php_stream_mmap_unmap_ex(php_stream *stream, zend_off_t readden) return ret; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/streams/php_stream_context.h b/main/streams/php_stream_context.h index ef5c0e1635f9c..c477dda4acfd8 100644 --- a/main/streams/php_stream_context.h +++ b/main/streams/php_stream_context.h @@ -114,13 +114,3 @@ END_EXTERN_C() #define php_stream_notify_error(context, code, xmsg, xcode) do { if ((context) && (context)->notifier) {\ php_stream_notification_notify((context), (code), PHP_STREAM_NOTIFY_SEVERITY_ERR, \ (xmsg), (xcode), 0, 0, NULL); } } while(0) - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/streams/php_stream_filter_api.h b/main/streams/php_stream_filter_api.h index f76301c2b62d2..4d5760e2cfa59 100644 --- a/main/streams/php_stream_filter_api.h +++ b/main/streams/php_stream_filter_api.h @@ -149,12 +149,3 @@ PHPAPI int php_stream_filter_unregister_factory(const char *filterpattern); PHPAPI int php_stream_filter_register_factory_volatile(zend_string *filterpattern, const php_stream_filter_factory *factory); PHPAPI php_stream_filter *php_stream_filter_create(const char *filtername, zval *filterparams, uint8_t persistent); END_EXTERN_C() - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/streams/php_stream_glob_wrapper.h b/main/streams/php_stream_glob_wrapper.h index a255719b3f4ba..31ba5b2ca05fb 100644 --- a/main/streams/php_stream_glob_wrapper.h +++ b/main/streams/php_stream_glob_wrapper.h @@ -31,12 +31,3 @@ PHPAPI int _php_glob_stream_get_count(php_stream *stream, int *pflags STREAMS_ #define php_glob_stream_get_count(stream, pflags) _php_glob_stream_get_count((stream), (pflags) STREAMS_CC) END_EXTERN_C() - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/streams/php_stream_mmap.h b/main/streams/php_stream_mmap.h index 0357e2403b079..132f3214c117d 100644 --- a/main/streams/php_stream_mmap.h +++ b/main/streams/php_stream_mmap.h @@ -75,12 +75,3 @@ PHPAPI int _php_stream_mmap_unmap(php_stream *stream); PHPAPI int _php_stream_mmap_unmap_ex(php_stream *stream, zend_off_t readden); #define php_stream_mmap_unmap_ex(stream, readden) _php_stream_mmap_unmap_ex((stream), (readden)) END_EXTERN_C() - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/streams/php_stream_plain_wrapper.h b/main/streams/php_stream_plain_wrapper.h index ac2dabf7f7620..4af8b86cdd59d 100644 --- a/main/streams/php_stream_plain_wrapper.h +++ b/main/streams/php_stream_plain_wrapper.h @@ -56,12 +56,3 @@ PHPAPI FILE * _php_stream_open_wrapper_as_file(char * path, char * mode, int opt PHPAPI int php_stream_parse_fopen_modes(const char *mode, int *open_flags); END_EXTERN_C() - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/streams/php_stream_transport.h b/main/streams/php_stream_transport.h index cbbaf091bddfc..a73966ec332c1 100644 --- a/main/streams/php_stream_transport.h +++ b/main/streams/php_stream_transport.h @@ -214,12 +214,3 @@ BEGIN_EXTERN_C() PHPAPI HashTable *php_stream_xport_get_hash(void); PHPAPI php_stream_transport_factory_func php_stream_generic_socket_factory; END_EXTERN_C() - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/streams/php_stream_userspace.h b/main/streams/php_stream_userspace.h index c09ff9033a304..389d591921d4f 100644 --- a/main/streams/php_stream_userspace.h +++ b/main/streams/php_stream_userspace.h @@ -21,12 +21,3 @@ PHPAPI extern const php_stream_ops php_stream_userspace_ops; PHPAPI extern const php_stream_ops php_stream_userspace_dir_ops; #define PHP_STREAM_IS_USERSPACE &php_stream_userspace_ops #define PHP_STREAM_IS_USERSPACE_DIR &php_stream_userspace_dir_ops - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index bb777b8e652a5..6ac47b25fd065 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -1600,12 +1600,3 @@ PHPAPI php_stream *_php_stream_fopen_with_path(const char *filename, const char } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/streams/streams.c b/main/streams/streams.c index 7c8d0ac906beb..f418991badd8c 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -2290,12 +2290,3 @@ PHPAPI int _php_stream_scandir(const char *dirname, zend_string **namelist[], in return nfiles; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/streams/transports.c b/main/streams/transports.c index 05dbdcad60c35..74fbef58d8479 100644 --- a/main/streams/transports.c +++ b/main/streams/transports.c @@ -512,12 +512,3 @@ PHPAPI int php_stream_xport_shutdown(php_stream *stream, stream_shutdown_t how) } return -1; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index b7770c842da7a..f79fa16d5ffdd 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -925,13 +925,3 @@ PHPAPI php_stream *php_stream_generic_socket_factory(const char *proto, size_t p return stream; } - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/main/strlcat.c b/main/strlcat.c index 4d0e0e6142da2..6ef5644568b02 100644 --- a/main/strlcat.c +++ b/main/strlcat.c @@ -94,12 +94,3 @@ PHPAPI size_t php_strlcat(dst, src, siz) } #endif /* !HAVE_STRLCAT */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/main/strlcpy.c b/main/strlcpy.c index 82436e1d1f8f2..31e13489d848a 100644 --- a/main/strlcpy.c +++ b/main/strlcpy.c @@ -94,12 +94,3 @@ PHPAPI size_t php_strlcpy(dst, src, siz) } #endif /* !HAVE_STRLCPY */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/php.ini-development b/php.ini-development index 81148ffb30951..ff7af002556ac 100644 --- a/php.ini-development +++ b/php.ini-development @@ -1907,7 +1907,3 @@ ldap.max_links = -1 ; "false" - always disabled ; "true" - always enabled ;ffi.enable=preload - -; Local Variables: -; tab-width: 4 -; End: diff --git a/php.ini-production b/php.ini-production index 449361f88f6db..c7914d07e5443 100644 --- a/php.ini-production +++ b/php.ini-production @@ -1907,7 +1907,3 @@ ldap.max_links = -1 ; "false" - always disabled ; "true" - always enabled ;ffi.enable=preload - -; Local Variables: -; tab-width: 4 -; End: diff --git a/php7.spec.in b/php.spec.in similarity index 100% rename from php7.spec.in rename to php.spec.in diff --git a/run-tests.php b/run-tests.php index f64084c4389db..7c135b2dd493c 100755 --- a/run-tests.php +++ b/run-tests.php @@ -3054,11 +3054,3 @@ public function wrapCommand($cmd, $memcheck_filename, $check_all) } } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim: noet sw=4 ts=4 - */ diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c index a6831d2ca0194..d0913c250e5bb 100644 --- a/sapi/apache2handler/apache_config.c +++ b/sapi/apache2handler/apache_config.c @@ -233,12 +233,3 @@ void *create_php_config(apr_pool_t *p, char *dummy) apr_pool_cleanup_register(p, newx, destroy_php_config, apr_pool_cleanup_null); return (void *) newx; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 index 44dee3fad579e..aa7f7c820ba76 100644 --- a/sapi/apache2handler/config.m4 +++ b/sapi/apache2handler/config.m4 @@ -68,20 +68,20 @@ if test "$PHP_APXS2" != "no"; then if test -z `$APXS -q SYSCONFDIR`; then INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ - -i -n php7" + -i -n php" else APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ -S SYSCONFDIR='$APXS_SYSCONFDIR' \ - -i -a -n php7" + -i -a -n php" fi case $host_alias in *aix*) EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp" - PHP_SELECT_SAPI(apache2handler, shared, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) + PHP_SELECT_SAPI(apache2handler, shared, mod_php.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL" ;; *darwin*) @@ -97,12 +97,12 @@ if test "$PHP_APXS2" != "no"; then fi MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS" PHP_SUBST(MH_BUNDLE_FLAGS) - PHP_SELECT_SAPI(apache2handler, bundle, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) - SAPI_SHARED=libs/libphp7.so + PHP_SELECT_SAPI(apache2handler, bundle, mod_php.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) + SAPI_SHARED=libs/libphp.so INSTALL_IT="$INSTALL_IT $SAPI_SHARED" ;; *) - PHP_SELECT_SAPI(apache2handler, shared, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) + PHP_SELECT_SAPI(apache2handler, shared, mod_php.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS) INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL" ;; esac @@ -123,7 +123,3 @@ if test "$PHP_APXS2" != "no"; then else AC_MSG_RESULT(no) fi - -dnl ## Local Variables: -dnl ## tab-width: 4 -dnl ## End: diff --git a/sapi/apache2handler/config.w32 b/sapi/apache2handler/config.w32 index 45d6353d28f61..12dd50332a35b 100644 --- a/sapi/apache2handler/config.w32 +++ b/sapi/apache2handler/config.w32 @@ -10,7 +10,7 @@ if (PHP_APACHE2HANDLER != "no") { CHECK_LIB("libapr.lib", "apache2handler", PHP_PHP_BUILD + "\\lib\\apache2") && CHECK_LIB("libaprutil.lib", "apache2handler", PHP_PHP_BUILD + "\\lib\\apache2") ) { - SAPI('apache2handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c', + SAPI('apache2handler', 'mod_php.c sapi_apache2.c apache_config.c php_functions.c', 'php' + PHP_VERSION + 'apache2.dll', '/D PHP_APACHE2_EXPORTS /I win32 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1'); } else { @@ -28,7 +28,7 @@ if (PHP_APACHE2_2HANDLER != "no") { CHECK_LIB("libapr-1.lib", "apache2_2handler", PHP_PHP_BUILD + "\\lib\\apache2_2") && CHECK_LIB("libaprutil-1.lib", "apache2_2handler", PHP_PHP_BUILD + "\\lib\\apache2_2") ) { - SAPI('apache2_2handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c', + SAPI('apache2_2handler', 'mod_php.c sapi_apache2.c apache_config.c php_functions.c', 'php' + PHP_VERSION + 'apache2_2.dll', '/D PHP_APACHE2_EXPORTS /I win32 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1', 'sapi\\apache2_2handler'); @@ -46,7 +46,7 @@ if (PHP_APACHE2_4HANDLER != "no") { CHECK_LIB("libapr-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") && CHECK_LIB("libaprutil-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") ) { - SAPI('apache2_4handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c', + SAPI('apache2_4handler', 'mod_php.c sapi_apache2.c apache_config.c php_functions.c', 'php' + PHP_VERSION + 'apache2_4.dll', '/D PHP_APACHE2_EXPORTS /I win32 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1', 'sapi\\apache2handler'); diff --git a/sapi/apache2handler/mod_php7.c b/sapi/apache2handler/mod_php.c similarity index 90% rename from sapi/apache2handler/mod_php7.c rename to sapi/apache2handler/mod_php.c index 1ad5934c3425c..a740271e94e42 100644 --- a/sapi/apache2handler/mod_php7.c +++ b/sapi/apache2handler/mod_php.c @@ -23,7 +23,7 @@ #include "php.h" #include "php_apache.h" -AP_MODULE_DECLARE_DATA module php7_module = { +AP_MODULE_DECLARE_DATA module php_module = { STANDARD20_MODULE_STUFF, create_php_config, /* create per-directory config structure */ merge_php_config, /* merge per-directory config structures */ @@ -32,12 +32,3 @@ AP_MODULE_DECLARE_DATA module php7_module = { php_dir_cmds, /* command apr_table_t */ php_ap2_register_hook /* register hooks */ }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/sapi/apache2handler/php.sym b/sapi/apache2handler/php.sym index 1469b0314d5a4..571f27e01c17d 100644 --- a/sapi/apache2handler/php.sym +++ b/sapi/apache2handler/php.sym @@ -1 +1 @@ -php7_module +php_module diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h index 423ada1f9b6fe..c80e124ea023f 100644 --- a/sapi/apache2handler/php_apache.h +++ b/sapi/apache2handler/php_apache.h @@ -29,11 +29,11 @@ /* Enable per-module logging in Apache 2.4+ */ #ifdef APLOG_USE_MODULE -APLOG_USE_MODULE(php7); +APLOG_USE_MODULE(php); #endif /* Declare this so we can get to it from outside the sapi_apache2.c file */ -extern module AP_MODULE_DECLARE_DATA php7_module; +extern module AP_MODULE_DECLARE_DATA php_module; /* A way to specify the location of the php.ini dir in an apache directive */ extern char *apache2_php_ini_path_override; diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index 7ac9c4a2a2bc0..84e49abf24fc4 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -562,12 +562,3 @@ zend_module_entry php_apache_module = { NULL, STANDARD_MODULE_PROPERTIES }; - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 3f62ef9c32796..346019b985095 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -55,7 +55,7 @@ #define PHP_MAGIC_TYPE "application/x-httpd-php" #define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php-source" -#define PHP_SCRIPT "php7-script" +#define PHP_SCRIPT "php-script" /* A way to specify the location of the php.ini dir in an apache directive */ char *apache2_php_ini_path_override = NULL; @@ -550,7 +550,7 @@ typedef struct { HashTable config; } php_conf_rec; zend_string *str; - php_conf_rec *c = ap_get_module_config(r->per_dir_config, &php7_module); + php_conf_rec *c = ap_get_module_config(r->per_dir_config, &php_module); ZEND_HASH_FOREACH_STR_KEY(&c->config, str) { zend_restore_ini_entry(str, ZEND_INI_STAGE_SHUTDOWN); @@ -579,7 +579,7 @@ static int php_handler(request_rec *r) #define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req); - conf = ap_get_module_config(r->per_dir_config, &php7_module); + conf = ap_get_module_config(r->per_dir_config, &php_module); /* apply_config() needs r in some cases, so allocate server_context early */ ctx = SG(server_context); @@ -753,12 +753,3 @@ void php_ap2_register_hook(apr_pool_t *p) #endif ap_hook_child_init(php_apache_child_init, NULL, NULL, APR_HOOK_MIDDLE); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/sapi/cgi/README.FastCGI b/sapi/cgi/README.FastCGI index 4d34ff3dacf5f..74770eab6bace 100644 --- a/sapi/cgi/README.FastCGI +++ b/sapi/cgi/README.FastCGI @@ -69,7 +69,7 @@ a line in your config like: Don't load mod_php, by the way. Make sure it is commented out! - #LoadModule php7_module /usr/lib/apache/2.0/libphp7.so + #LoadModule php_module /usr/lib/apache/2.0/libphp.so Now, we'll create a fcgi-bin directory, just like you would do with normal CGI scripts. You'll need to create a directory somewhere to store your diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 1b0ff87b9c7f9..20c14c102b05b 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -2781,12 +2781,3 @@ consult the installation file that came with this distribution, or visit \n\ return exit_status; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/sapi/cli/cli.h b/sapi/cli/cli.h index 2126a775825c6..b4c2851791d0a 100644 --- a/sapi/cli/cli.h +++ b/sapi/cli/cli.h @@ -39,12 +39,3 @@ typedef struct { extern PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks(); #endif /* CLI_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/sapi/cli/generate_mime_type_map.php b/sapi/cli/generate_mime_type_map.php index a0318c364b3a3..b0176bb52497b 100755 --- a/sapi/cli/generate_mime_type_map.php +++ b/sapi/cli/generate_mime_type_map.php @@ -78,12 +78,3 @@ }; #endif /* PHP_CLI_SERVER_MIME_TYPE_MAP_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/sapi/cli/mime_type_map.h b/sapi/cli/mime_type_map.h index 356c148ca871a..0c559d635f714 100644 --- a/sapi/cli/mime_type_map.h +++ b/sapi/cli/mime_type_map.h @@ -1017,12 +1017,3 @@ static const php_cli_server_ext_mime_type_pair mime_type_map[] = { }; #endif /* PHP_CLI_SERVER_MIME_TYPE_MAP_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 5b4023ea7046e..22025fa59a4b3 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1104,7 +1104,7 @@ static int do_cli(int argc, char **argv) /* {{{ */ memset(&execute_data, 0, sizeof(zend_execute_data)); EG(current_execute_data) = &execute_data; - zend_call_method_with_1_params(&ref, pce, &pce->constructor, "__construct", NULL, &arg); + zend_call_method_with_1_params(Z_OBJ(ref), pce, &pce->constructor, "__construct", NULL, &arg); if (EG(exception)) { zval tmp, *msg, rv; @@ -1422,12 +1422,3 @@ int main(int argc, char *argv[]) exit(exit_status); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/sapi/cli/php_cli_process_title.c b/sapi/cli/php_cli_process_title.c index e7f3598cb96fd..1b82104ca6749 100644 --- a/sapi/cli/php_cli_process_title.c +++ b/sapi/cli/php_cli_process_title.c @@ -67,12 +67,3 @@ PHP_FUNCTION(cli_get_process_title) RETURN_STRINGL(title, length); } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/sapi/cli/php_cli_process_title.h b/sapi/cli/php_cli_process_title.h index 46601574674a2..c2fed7b817881 100644 --- a/sapi/cli/php_cli_process_title.h +++ b/sapi/cli/php_cli_process_title.h @@ -30,12 +30,3 @@ PHP_FUNCTION(cli_set_process_title); PHP_FUNCTION(cli_get_process_title); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 54f4f0101a4ca..e09aca4ed8ff4 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -2609,12 +2609,3 @@ int do_cli_server(int argc, char **argv) /* {{{ */ php_cli_server_dtor(&server); return 0; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/sapi/cli/php_cli_server.h b/sapi/cli/php_cli_server.h index 350053a5fda52..4d57f1b922a46 100644 --- a/sapi/cli/php_cli_server.h +++ b/sapi/cli/php_cli_server.h @@ -37,12 +37,3 @@ ZEND_TSRMLS_CACHE_EXTERN() #endif #endif /* PHP_CLI_SERVER_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c index 9107a6068dc6f..826e9bd05eee4 100644 --- a/sapi/embed/php_embed.c +++ b/sapi/embed/php_embed.c @@ -233,12 +233,3 @@ EMBED_SAPI_API void php_embed_shutdown(void) php_embed_module.ini_entries = NULL; } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 608c2cfb7ea2c..b492af715ce90 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -2009,12 +2009,3 @@ consult the installation file that came with this distribution, or visit \n\ return exit_status; } /* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index b4564a69f85cd..b7805f5f27552 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -1511,13 +1511,3 @@ PHP_FUNCTION(apache_get_modules) } } /* }}} */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/sapi/phpdbg/config.m4 b/sapi/phpdbg/config.m4 index 56d4b21e0d4e9..76162a129da9a 100644 --- a/sapi/phpdbg/config.m4 +++ b/sapi/phpdbg/config.m4 @@ -70,7 +70,3 @@ fi if test "$PHP_PHPDBG_WEBHELPER" != "no"; then PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared) fi - -dnl ## Local Variables: -dnl ## tab-width: 4 -dnl ## End: diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index f0d0e13e3bfde..64fece82fd958 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -775,7 +775,7 @@ static inline void phpdbg_handle_exception(void) /* {{{ */ EG(exception) = NULL; ZVAL_OBJ(&zv, ex); - zend_call_method_with_0_params(&zv, ex->ce, &ex->ce->__tostring, "__tostring", &tmp); + zend_call_method_with_0_params(ex, ex->ce, &ex->ce->__tostring, "__tostring", &tmp); file = zval_get_string(zend_read_property(zend_get_exception_base(&zv), &zv, ZEND_STRL("file"), 1, &rv)); line = zval_get_long(zend_read_property(zend_get_exception_base(&zv), &zv, ZEND_STRL("line"), 1, &rv)); diff --git a/tests/classes/tostring_004.phpt b/tests/classes/tostring_004.phpt index 907f7bc306c52..6029938f3288d 100644 --- a/tests/classes/tostring_004.phpt +++ b/tests/classes/tostring_004.phpt @@ -2,7 +2,7 @@ Object to string conversion: error cases and behaviour variations. --FILE-- 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // array data - 'empty array' => array(), - 'int indexed array' => $index_array, - 'associative array' => $assoc_array, - 'nested arrays' => array('foo', $index_array, $assoc_array), - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for flag - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - var_dump( ob_implicit_flush($value) ); -}; - -?> ---EXPECTF-- -*** Testing ob_implicit_flush() : usage variation *** - ---float 10.5-- -NULL - ---float -10.5-- -NULL - ---float 12.3456789000e10-- -NULL - ---float -12.3456789000e10-- -NULL - ---float .5-- -NULL - ---empty array-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, array given, %s(97) -NULL - ---int indexed array-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, array given, %s(97) -NULL - ---associative array-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, array given, %s(97) -NULL - ---nested arrays-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, array given, %s(97) -NULL - ---uppercase NULL-- -NULL - ---lowercase null-- -NULL - ---lowercase true-- -NULL - ---lowercase false-- -NULL - ---uppercase TRUE-- -NULL - ---uppercase FALSE-- -NULL - ---empty string DQ-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, string given, %s(97) -NULL - ---empty string SQ-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, string given, %s(97) -NULL - ---string DQ-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, string given, %s(97) -NULL - ---string SQ-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, string given, %s(97) -NULL - ---mixed case string-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, string given, %s(97) -NULL - ---heredoc-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, string given, %s(97) -NULL - ---instance of classWithToString-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, object given, %s(97) -NULL - ---instance of classWithoutToString-- -Error: 2 - ob_implicit_flush() expects parameter 1 to be int, object given, %s(97) -NULL - ---undefined var-- -NULL - ---unset var-- -NULL diff --git a/win32/build/deplister.c b/win32/build/deplister.c index 007844226d054..b5dd059c98fad 100644 --- a/win32/build/deplister.c +++ b/win32/build/deplister.c @@ -48,12 +48,3 @@ int main(int argc, char *argv[]) return BindImageEx(BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE | BIND_ALL_IMAGES, argv[1], NULL, argv[2], StatusRoutine); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/win32/codepage.c b/win32/codepage.c index b5cc59205d135..839ba6d447e12 100644 --- a/win32/codepage.c +++ b/win32/codepage.c @@ -705,11 +705,3 @@ PHP_FUNCTION(sapi_windows_cp_conv) /* }}} */ /* }}} */ -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/codepage.h b/win32/codepage.h index 02f6c582e26de..0dd72562b69e2 100644 --- a/win32/codepage.h +++ b/win32/codepage.h @@ -151,12 +151,3 @@ __forceinline static char *php_win32_cp_conv_w_to_any(const wchar_t* in, size_t #endif #endif /* PHP_WIN32_CODEPAGE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/console.c b/win32/console.c index 6e8d730ad0806..27dbd4548d6e5 100644 --- a/win32/console.c +++ b/win32/console.c @@ -108,12 +108,3 @@ PHP_WINUTIL_API BOOL php_win32_console_is_own(void) return FALSE; }/*}}}*/ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/console.h b/win32/console.h index 66007d0b989f9..5e50eef8b1cd0 100644 --- a/win32/console.h +++ b/win32/console.h @@ -60,12 +60,3 @@ PHP_WINUTIL_API BOOL php_win32_console_fileno_set_vt100(zend_long fileno, BOOL e PHP_WINUTIL_API BOOL php_win32_console_is_own(void); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/cp_enc_map_gen.c b/win32/cp_enc_map_gen.c index 34861d148b377..bd2f108287a5b 100644 --- a/win32/cp_enc_map_gen.c +++ b/win32/cp_enc_map_gen.c @@ -246,12 +246,3 @@ main(int argc, char **argv) return 0; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/dllmain.c b/win32/dllmain.c index 6714bff25a1fc..4743f732e9c34 100644 --- a/win32/dllmain.c +++ b/win32/dllmain.c @@ -86,12 +86,3 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID dummy) return ret; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/fnmatch.c b/win32/fnmatch.c index 9017b3e19ca99..296a1a5ca1843 100644 --- a/win32/fnmatch.c +++ b/win32/fnmatch.c @@ -195,12 +195,3 @@ rangematch(const char *pattern, char test, int flags) } return (ok == negate ? NULL : pattern); } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/fnmatch.h b/win32/fnmatch.h index c149e89402895..03a828d0541f2 100644 --- a/win32/fnmatch.h +++ b/win32/fnmatch.h @@ -51,12 +51,3 @@ PHPAPI int fnmatch(const char *pattern, const char *string, int flags); #endif /* !_FNMATCH_H_ */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/ftok.c b/win32/ftok.c index f8c05b2e7ad7d..db789f8b705d4 100644 --- a/win32/ftok.c +++ b/win32/ftok.c @@ -60,12 +60,3 @@ ftok(const char *pathname, int proj_id) return ret; }/*}}}*/ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/getrusage.c b/win32/getrusage.c index bab9c82925096..de67f7f8d2a06 100644 --- a/win32/getrusage.c +++ b/win32/getrusage.c @@ -73,12 +73,3 @@ PHPAPI int getrusage(int who, struct rusage *usage) return -1; } } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/getrusage.h b/win32/getrusage.h index 8f4928d4505ed..c41c026aa2e4d 100644 --- a/win32/getrusage.h +++ b/win32/getrusage.h @@ -114,12 +114,3 @@ struct rusage PHPAPI int getrusage(int who, struct rusage *usage); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/glob.c b/win32/glob.c index a0845e803d1eb..578284cb3de0e 100644 --- a/win32/glob.c +++ b/win32/glob.c @@ -923,12 +923,3 @@ qprintf(str, s) (void)printf("\n"); } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/glob.h b/win32/glob.h index 946c2ecae8dc7..42cf2f9d71dda 100644 --- a/win32/glob.h +++ b/win32/glob.h @@ -100,12 +100,3 @@ PHPAPI int glob(const char *, int, int (*)(const char *, int), glob_t *); PHPAPI void globfree(glob_t *); END_EXTERN_C() #endif /* !_GLOB_H_ */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/globals.c b/win32/globals.c index 20464c6c81219..9bb392f42ab4e 100644 --- a/win32/globals.c +++ b/win32/globals.c @@ -67,12 +67,3 @@ PHP_RSHUTDOWN_FUNCTION(win32_core_globals) return SUCCESS; }/*}}}*/ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/grp.h b/win32/grp.h index b25e61e3ba22d..301babed4e0e3 100644 --- a/win32/grp.h +++ b/win32/grp.h @@ -27,12 +27,3 @@ struct group { }; #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/inet.c b/win32/inet.c index 47af376436700..7361b89bc2895 100644 --- a/win32/inet.c +++ b/win32/inet.c @@ -27,12 +27,3 @@ int inet_aton(const char *cp, struct in_addr *inp) { return 1; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/inet.h b/win32/inet.h index 460543c7cf694..b57d78903d63d 100644 --- a/win32/inet.h +++ b/win32/inet.h @@ -25,12 +25,3 @@ PHPAPI int inet_aton(const char *cp, struct in_addr *inp); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/ioutil.c b/win32/ioutil.c index 69df638133977..7288ea353a67c 100644 --- a/win32/ioutil.c +++ b/win32/ioutil.c @@ -1142,12 +1142,3 @@ PW32IO ssize_t php_win32_ioutil_readlink_w(const wchar_t *path, wchar_t *buf, si return ret; }/*}}}*/ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/ioutil.h b/win32/ioutil.h index 4e3f44d6ce7e4..e2906c65e09d4 100644 --- a/win32/ioutil.h +++ b/win32/ioutil.h @@ -792,12 +792,3 @@ __forceinline static ssize_t php_win32_ioutil_readlink(const char *path, char *b #endif #endif /* PHP_WIN32_IOUTIL_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/ipc.h b/win32/ipc.h index 02568b6a79b73..c7cb476353f55 100644 --- a/win32/ipc.h +++ b/win32/ipc.h @@ -31,12 +31,3 @@ PHP_WIN32_IPC_API key_t ftok(const char *path, int id); #endif /* PHP_WIN32_IPC_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/nice.c b/win32/nice.c index 96f393f19a1c5..05aae465edcbb 100644 --- a/win32/nice.c +++ b/win32/nice.c @@ -81,12 +81,3 @@ PHPAPI int nice(zend_long p) return 0; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/nice.h b/win32/nice.h index daadcb3157b0c..385855c2ead2a 100644 --- a/win32/nice.h +++ b/win32/nice.h @@ -22,12 +22,3 @@ PHPAPI int nice(zend_long); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/param.h b/win32/param.h index 552323c5b1873..b40d966d7f700 100644 --- a/win32/param.h +++ b/win32/param.h @@ -19,12 +19,3 @@ #define roundup(x,y) ((((x)+((y)-1))/(y))*(y)) #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/php_inttypes.h b/win32/php_inttypes.h index 878d13fffbcad..20e9c9b7753db 100644 --- a/win32/php_inttypes.h +++ b/win32/php_inttypes.h @@ -311,12 +311,3 @@ imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) #else #include #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/php_registry.h b/win32/php_registry.h index df57bb8dfc77a..f46c482085ca7 100644 --- a/win32/php_registry.h +++ b/win32/php_registry.h @@ -24,12 +24,3 @@ void UpdateIniFromRegistry(char *path); char *GetIniPathFromRegistry(); #endif /* PHP_REGISTRY_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/php_stdbool.h b/win32/php_stdbool.h index 5b73d985ae6b8..cc853c59c1fc7 100644 --- a/win32/php_stdbool.h +++ b/win32/php_stdbool.h @@ -9,12 +9,3 @@ # define __bool_true_false_are_defined 1 # endif #endif /* _STDBOOL_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/php_stdint.h b/win32/php_stdint.h index bc936bf111e1e..e7615f1479481 100644 --- a/win32/php_stdint.h +++ b/win32/php_stdint.h @@ -263,12 +263,3 @@ static __inline int64_t llabs(int64_t i) #ifndef u_char typedef unsigned __int8 u_char; #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/php_win32_globals.h b/win32/php_win32_globals.h index 113d78e43148d..bb91f08c50299 100644 --- a/win32/php_win32_globals.h +++ b/win32/php_win32_globals.h @@ -53,12 +53,3 @@ void php_win32_core_globals_dtor(void *vg); PHP_RSHUTDOWN_FUNCTION(win32_core_globals); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/readdir.c b/win32/readdir.c index 0d46f14a77a98..5b63d20212555 100644 --- a/win32/readdir.c +++ b/win32/readdir.c @@ -238,12 +238,3 @@ int rewinddir(DIR *dp) #ifdef __cplusplus } #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/readdir.h b/win32/readdir.h index 8e26cbadb6dcf..a39b6d4865ddc 100644 --- a/win32/readdir.h +++ b/win32/readdir.h @@ -48,12 +48,3 @@ int rewinddir(DIR *); #endif #endif /* READDIR_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/registry.c b/win32/registry.c index a6ded4898f759..99c3ce365fd81 100644 --- a/win32/registry.c +++ b/win32/registry.c @@ -299,12 +299,3 @@ char *GetIniPathFromRegistry() } return reg_location; }/*}}}*/ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/resource.h b/win32/resource.h index 05e311151228a..671434a2254b0 100644 --- a/win32/resource.h +++ b/win32/resource.h @@ -18,12 +18,3 @@ #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/select.c b/win32/select.c index 0396a656cf7cc..810130c97038c 100644 --- a/win32/select.c +++ b/win32/select.c @@ -164,12 +164,3 @@ PHPAPI int php_select(php_socket_t max_fd, fd_set *rfds, fd_set *wfds, fd_set *e return retcode; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/win32/select.h b/win32/select.h index eb9c1f8de048d..c23eb87ddbc36 100644 --- a/win32/select.h +++ b/win32/select.h @@ -24,12 +24,3 @@ PHPAPI int php_select(php_socket_t max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *tv); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/win32/sendmail.c b/win32/sendmail.c index 166e44a935a5d..fc901308ba4b5 100644 --- a/win32/sendmail.c +++ b/win32/sendmail.c @@ -982,12 +982,3 @@ static int FormatEmailAddress(char* Buf, char* EmailAddress, char* FormatString) } return snprintf(Buf, MAIL_BUFFER_SIZE , FormatString , EmailAddress ); } /* end FormatEmailAddress() */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/sendmail.h b/win32/sendmail.h index 47c89231cba59..bb502cb7ddcbe 100644 --- a/win32/sendmail.h +++ b/win32/sendmail.h @@ -47,12 +47,3 @@ static int Ack(char **server_response); static unsigned long GetAddr(LPSTR szHost); static int FormatEmailAddress(char* Buf, char* EmailAddress, char* FormatString); #endif /* sendmail_h */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/signal.h b/win32/signal.h index dd8c1091ccc74..ec739527ac146 100644 --- a/win32/signal.h +++ b/win32/signal.h @@ -8,12 +8,3 @@ #define SIGPROF 27 /* profiling time alarm */ #endif /* PHP_WIN32_SIGNAL_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/sockets.c b/win32/sockets.c index 85f2ee5b13d6d..461ce698885f0 100644 --- a/win32/sockets.c +++ b/win32/sockets.c @@ -88,12 +88,3 @@ PHPAPI int socketpair(int domain, int type, int protocol, SOCKET sock[2]) WSASetLastError(WSAECONNABORTED); return -1; } - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/sockets.h b/win32/sockets.h index e3d4d57c50506..2e693f884055c 100644 --- a/win32/sockets.h +++ b/win32/sockets.h @@ -27,12 +27,3 @@ PHPAPI int socketpair(int domain, int type, int protocol, SOCKET sock[2]); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/syslog.h b/win32/syslog.h index 7d088efd93192..5ea75d84867d2 100644 --- a/win32/syslog.h +++ b/win32/syslog.h @@ -75,12 +75,3 @@ extern void vsyslog(int, const char *, va_list ap); #endif /* SYSLOG_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/time.c b/win32/time.c index cd5a7affdf3f2..d1fe51458ec57 100644 --- a/win32/time.c +++ b/win32/time.c @@ -117,12 +117,3 @@ PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp ) } return usleep( rqtp->tv_sec * 1000000 + rqtp->tv_nsec / 1000 ); }/*}}}*/ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/time.h b/win32/time.h index 07afae487abae..51090ccfd8a8c 100644 --- a/win32/time.h +++ b/win32/time.h @@ -61,12 +61,3 @@ void php_win32_init_gettimeofday(void); #endif #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/unistd.h b/win32/unistd.h index 3d95ea06c7441..0b9446149c59a 100644 --- a/win32/unistd.h +++ b/win32/unistd.h @@ -2,12 +2,3 @@ #define _PHP_WIN32_UNISTD_H PHPAPI int usleep(unsigned int useconds); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/winutil.c b/win32/winutil.c index e658a21d13464..cb962fb537e16 100644 --- a/win32/winutil.c +++ b/win32/winutil.c @@ -433,12 +433,3 @@ PHP_WINUTIL_API char *php_win32_get_username(void) return uname; }/*}}}*/ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/winutil.h b/win32/winutil.h index f7f23a85997d1..2899a712927eb 100644 --- a/win32/winutil.h +++ b/win32/winutil.h @@ -56,12 +56,3 @@ PHP_WINUTIL_API int php_win32_code_to_errno(unsigned long w32Err); PHP_WINUTIL_API char *php_win32_get_username(void); #endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/win32/wsyslog.c b/win32/wsyslog.c index 695c7db8cd11e..50a34fabf0f52 100644 --- a/win32/wsyslog.c +++ b/win32/wsyslog.c @@ -150,11 +150,3 @@ void openlog(const char *ident, int logopt, int facility) PW32G(log_header) = malloc(header_len*sizeof(char)); sprintf_s(PW32G(log_header), header_len, (logopt & LOG_PID) ? "%s[%d]" : "%s", ident, getpid()); } -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */