]> granicus.if.org Git - php/commitdiff
Deprecate passing null to non-nullable arg of internal function
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 30 Nov 2020 15:45:48 +0000 (16:45 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 11 Feb 2021 20:46:13 +0000 (21:46 +0100)
This deprecates passing null to non-nullable scale arguments of
internal functions, with the eventual goal of making the behavior
consistent with userland functions, where null is never accepted
for non-nullable arguments.

This change is expected to cause quite a lot of fallout. In most
cases, calling code should be adjusted to avoid passing null. In
some cases, PHP should be adjusted to make some function arguments
nullable. I have already fixed a number of functions before landing
this, but feel free to file a bug if you encounter a function that
doesn't accept null, but probably should. (The rule of thumb for
this to be applicable is that the function must have special behavior
for 0 or "", which is distinct from the natural behavior of the
parameter.)

RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg

Closes GH-6475.

314 files changed:
UPGRADING
Zend/tests/bug43201.phpt
Zend/tests/bug64677.phpt
Zend/tests/class_exists_002.phpt
Zend/tests/exception_001.phpt
Zend/tests/interface_exists_001.phpt
Zend/tests/null_to_non_nullable_special_func.phpt [new file with mode: 0644]
Zend/tests/nullsafe_operator/013.phpt
Zend/tests/str_or_obj_of_class_zpp.phpt
Zend/tests/str_or_obj_zpp.phpt
Zend/tests/trait_exists_001.phpt
Zend/zend_API.c
Zend/zend_API.h
Zend/zend_execute.c
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/date/tests/bug54283.phpt
ext/date/tests/bug73858.phpt
ext/date/tests/date_interval_create_from_date_string_nullparam.phpt
ext/date/tests/date_timestamp_set_nullparam2.phpt
ext/date/tests/microtime_error.phpt [deleted file]
ext/dba/tests/dba_handlers.phpt
ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt
ext/fileinfo/tests/finfo_file_001.phpt
ext/filter/tests/055.phpt
ext/filter/tests/057.phpt
ext/gd/tests/imagetruecolortopalette_error3.phpt
ext/gmp/gmp.c
ext/hash/tests/hash_init_error.phpt
ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt
ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt
ext/imap/tests/bug45705_1.phpt
ext/intl/tests/bug48227.phpt
ext/intl/tests/bug72241.phpt
ext/intl/tests/collator_compare_variant2.phpt
ext/intl/tests/collator_get_sort_key_variant7.phpt
ext/intl/tests/formatter_fail.phpt
ext/intl/tests/gregoriancalendar___construct_error.phpt
ext/intl/tests/gregoriancalendar___construct_variant1.phpt
ext/intl/tests/msgfmt_fail2.phpt
ext/intl/tests/ut_common.inc
ext/json/tests/001.phpt
ext/json/tests/bug69187.phpt
ext/json/tests/bug72069.phpt
ext/ldap/tests/bug72021.phpt
ext/ldap/tests/bug73933.phpt
ext/ldap/tests/ldap_escape_both.phpt
ext/ldap/tests/ldap_escape_dn.phpt
ext/ldap/tests/ldap_escape_filter.phpt
ext/ldap/tests/ldap_read_variation1.phpt
ext/ldap/tests/ldap_search_overrides.phpt
ext/mbstring/tests/bug43994.phpt
ext/mbstring/tests/bug72164.phpt
ext/mbstring/tests/bug73646.phpt
ext/mbstring/tests/mb_ereg_replace_variation1.phpt
ext/mbstring/tests/mb_str_functions_opt-parameter.phpt
ext/mysqli/tests/bug34810.phpt
ext/mysqli/tests/bug62885.phpt
ext/mysqli/tests/mysqli_kill.phpt
ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt
ext/odbc/tests/odbc_columnprivileges_001.phpt
ext/openssl/tests/openssl_decrypt_ccm.phpt
ext/openssl/tests/openssl_decrypt_gcm.phpt
ext/openssl/tests/openssl_decrypt_ocb.phpt
ext/openssl/tests/openssl_encrypt_ccm.phpt
ext/openssl/tests/openssl_encrypt_gcm.phpt
ext/openssl/tests/openssl_encrypt_ocb.phpt
ext/openssl/tests/openssl_x509_export_basic.phpt
ext/pdo_dblib/tests/pdo_dblib_quote.phpt
ext/phar/tests/bug60164.phpt
ext/phar/tests/bug77022.phpt
ext/phar/tests/bug79082.phpt
ext/phar/tests/files/phar_test.inc
ext/posix/tests/posix_initgroups.phpt
ext/posix/tests/posix_mknod.phpt
ext/posix/tests/posix_mknod_basic.phpt [deleted file]
ext/pspell/tests/004.phpt
ext/readline/tests/libedit_write_history_001-win32.phpt
ext/readline/tests/libedit_write_history_001.phpt
ext/readline/tests/readline_add_history_001.phpt
ext/readline/tests/readline_write_history_001.phpt
ext/reflection/tests/ReflectionClass_constructor_002.phpt
ext/reflection/tests/ReflectionClass_getConstant_error.phpt
ext/reflection/tests/ReflectionClass_getMethod_002.phpt
ext/reflection/tests/ReflectionClass_getProperty_002.phpt
ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt
ext/reflection/tests/ReflectionClass_hasConstant_002.phpt
ext/reflection/tests/ReflectionClass_hasMethod_002.phpt
ext/reflection/tests/ReflectionClass_hasProperty_002.phpt
ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt
ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt
ext/reflection/tests/ReflectionClass_setStaticPropertyValue_002.phpt
ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt
ext/session/tests/bug69111.phpt
ext/shmop/tests/002.phpt
ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
ext/sockets/tests/socket_create_pair-wrongparams.phpt
ext/sodium/tests/utils.phpt
ext/spl/tests/SplFixedArray__construct_param_null.phpt
ext/spl/tests/SplFixedArray_setSize_param_null.phpt
ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt
ext/spl/tests/bug46051.phpt
ext/spl/tests/bug61527.phpt
ext/spl/tests/bug65387.phpt
ext/spl/tests/bug75717.phpt
ext/spl/tests/fixedarray_011.phpt [deleted file]
ext/spl/tests/fixedarray_014.phpt
ext/spl/tests/iterator_044.phpt
ext/spl/tests/regexIterator_flags_basic.phpt
ext/sqlite3/tests/sqlite3_busyTimeout.phpt
ext/standard/tests/array/array_filter_variation9.phpt
ext/standard/tests/array/count_invalid_mode.phpt
ext/standard/tests/array/range_errors.phpt
ext/standard/tests/file/005_variation2-win32.phpt
ext/standard/tests/file/005_variation2.phpt
ext/standard/tests/file/basename-win32.phpt
ext/standard/tests/file/basename.phpt
ext/standard/tests/file/basename_basic-win32.phpt
ext/standard/tests/file/basename_basic.phpt
ext/standard/tests/file/bug51094.phpt
ext/standard/tests/file/bug61961.phpt
ext/standard/tests/file/chgrp.phpt
ext/standard/tests/file/chown.phpt
ext/standard/tests/file/fgetcsv_error_conditions.phpt
ext/standard/tests/file/file_exists_variation1.phpt
ext/standard/tests/file/file_get_contents_variation8-win32.phpt
ext/standard/tests/file/file_get_contents_variation8.phpt
ext/standard/tests/file/file_put_contents_variation5.phpt
ext/standard/tests/file/file_put_contents_variation8-win32.phpt
ext/standard/tests/file/file_put_contents_variation8.phpt
ext/standard/tests/file/filegroup_variation2.phpt
ext/standard/tests/file/fileinode_variation2.phpt
ext/standard/tests/file/fileowner_variation2.phpt
ext/standard/tests/file/fileperms_variation2.phpt
ext/standard/tests/file/filesize_variation5.phpt
ext/standard/tests/file/flock_basic.phpt
ext/standard/tests/file/flock_error.phpt
ext/standard/tests/file/flock_variation.phpt
ext/standard/tests/file/fnmatch_basic.phpt
ext/standard/tests/file/fnmatch_variation.phpt
ext/standard/tests/file/fputcsv_variation2.phpt [deleted file]
ext/standard/tests/file/fputcsv_variation3.phpt [deleted file]
ext/standard/tests/file/fputcsv_variation4.phpt [deleted file]
ext/standard/tests/file/fscanf_error.phpt
ext/standard/tests/file/glob_variation3.phpt
ext/standard/tests/file/is_dir_variation3.phpt
ext/standard/tests/file/is_executable_variation3.phpt
ext/standard/tests/file/is_readable_variation3.phpt
ext/standard/tests/file/is_writable_variation3.phpt
ext/standard/tests/file/lstat_stat_variation22.phpt
ext/standard/tests/file/pathinfo_variaton.phpt
ext/standard/tests/file/readfile_error.phpt
ext/standard/tests/file/readfile_variation10-win32.phpt
ext/standard/tests/file/readfile_variation10.phpt
ext/standard/tests/file/readlink_realpath_variation3.phpt
ext/standard/tests/file/readlink_variation1.phpt
ext/standard/tests/file/realpath_variation-win32-mb.phpt
ext/standard/tests/file/realpath_variation-win32.phpt
ext/standard/tests/file/rename_variation13-win32.phpt
ext/standard/tests/file/rename_variation13.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
ext/standard/tests/file/tempnam_variation3-win32.phpt
ext/standard/tests/file/tempnam_variation3.phpt
ext/standard/tests/file/tempnam_variation7-win32.phpt
ext/standard/tests/file/tempnam_variation7.phpt
ext/standard/tests/file/unlink_error-win32-mb.phpt
ext/standard/tests/file/unlink_error-win32.phpt
ext/standard/tests/file/unlink_error.phpt
ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt
ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt
ext/standard/tests/general_functions/escapeshellarg_variation1.phpt
ext/standard/tests/general_functions/get_cfg_var_variation3.phpt [deleted file]
ext/standard/tests/general_functions/getservbyname_variation10.phpt [deleted file]
ext/standard/tests/general_functions/getservbyname_variation3.phpt [deleted file]
ext/standard/tests/general_functions/getservbyport_variation1.phpt
ext/standard/tests/general_functions/uniqid_basic.phpt
ext/standard/tests/image/image_type_to_extension.phpt
ext/standard/tests/math/abs_basic.phpt
ext/standard/tests/math/abs_variation.phpt
ext/standard/tests/math/acos_variation.phpt
ext/standard/tests/math/acosh_variation.phpt
ext/standard/tests/math/asin_variation.phpt
ext/standard/tests/math/asinh_variation.phpt
ext/standard/tests/math/atan2_basic.phpt
ext/standard/tests/math/atan_variation.phpt
ext/standard/tests/math/atanh_variation.phpt
ext/standard/tests/math/base_convert_variation1.phpt
ext/standard/tests/math/bindec_basic.phpt
ext/standard/tests/math/bindec_basic_64bit.phpt
ext/standard/tests/math/bindec_variation1.phpt
ext/standard/tests/math/bindec_variation1_64bit.phpt
ext/standard/tests/math/ceil_basic.phpt
ext/standard/tests/math/ceil_variation1.phpt
ext/standard/tests/math/cos_variation.phpt
ext/standard/tests/math/cosh_variation.phpt
ext/standard/tests/math/decbin_basic.phpt
ext/standard/tests/math/decbin_variation1.phpt
ext/standard/tests/math/decbin_variation1_64bit.phpt
ext/standard/tests/math/dechex_basic.phpt
ext/standard/tests/math/dechex_variation1.phpt
ext/standard/tests/math/dechex_variation1_64bit.phpt
ext/standard/tests/math/decoct_basic.phpt
ext/standard/tests/math/decoct_variation1.phpt
ext/standard/tests/math/decoct_variation1_64bit.phpt
ext/standard/tests/math/deg2rad_variation.phpt
ext/standard/tests/math/exp_basic.phpt
ext/standard/tests/math/expm1_basic.phpt
ext/standard/tests/math/floor_basic.phpt
ext/standard/tests/math/floor_variation1.phpt
ext/standard/tests/math/fmod_basic.phpt
ext/standard/tests/math/hexdec_basic.phpt
ext/standard/tests/math/hexdec_basic_64bit.phpt
ext/standard/tests/math/hexdec_variation1.phpt
ext/standard/tests/math/hexdec_variation1_64bit.phpt
ext/standard/tests/math/hypot_basic.phpt
ext/standard/tests/math/is_finite_basic.phpt
ext/standard/tests/math/is_infinite_basic.phpt
ext/standard/tests/math/is_nan_basic.phpt
ext/standard/tests/math/log10_variation.phpt
ext/standard/tests/math/log1p_basic.phpt
ext/standard/tests/math/log_basic.phpt
ext/standard/tests/math/mt_rand_basic.phpt
ext/standard/tests/math/mt_srand_basic.phpt
ext/standard/tests/math/number_format_basic.phpt
ext/standard/tests/math/number_format_multichar.phpt
ext/standard/tests/math/octdec_basic.phpt
ext/standard/tests/math/octdec_basic_64bit.phpt
ext/standard/tests/math/octdec_variation1.phpt
ext/standard/tests/math/rad2deg_variation.phpt
ext/standard/tests/math/rand_basic.phpt
ext/standard/tests/math/round_basic.phpt
ext/standard/tests/math/round_variation1.phpt
ext/standard/tests/math/sin_variation.phpt
ext/standard/tests/math/sinh_variation.phpt
ext/standard/tests/math/sqrt_variation.phpt
ext/standard/tests/math/srand_basic.phpt
ext/standard/tests/math/tan_variation.phpt
ext/standard/tests/math/tanh_variation.phpt
ext/standard/tests/password/password_verify.phpt
ext/standard/tests/strings/addcslashes_001.phpt
ext/standard/tests/strings/addcslashes_003.phpt
ext/standard/tests/strings/basename_variation.phpt
ext/standard/tests/strings/bug21338.phpt
ext/standard/tests/strings/bug51899.phpt
ext/standard/tests/strings/chop_variation5.phpt
ext/standard/tests/strings/chr_variation1.phpt
ext/standard/tests/strings/dirname_variation.phpt
ext/standard/tests/strings/htmlentities24.phpt
ext/standard/tests/strings/htmlspecialchars.phpt
ext/standard/tests/strings/implode1.phpt
ext/standard/tests/strings/join_variation1.phpt
ext/standard/tests/strings/join_variation4.phpt
ext/standard/tests/strings/lcfirst.phpt
ext/standard/tests/strings/ltrim.phpt
ext/standard/tests/strings/md5_file.phpt
ext/standard/tests/strings/nl2br.phpt
ext/standard/tests/strings/number_format_basic.phpt
ext/standard/tests/strings/printf.phpt
ext/standard/tests/strings/printf_64bit.phpt
ext/standard/tests/strings/printf_variation1.phpt [deleted file]
ext/standard/tests/strings/quoted_printable_encode_001.phpt
ext/standard/tests/strings/rtrim.phpt
ext/standard/tests/strings/sha1_file.phpt
ext/standard/tests/strings/sprintf_variation1.phpt
ext/standard/tests/strings/str_getcsv_001.phpt
ext/standard/tests/strings/str_pad.phpt
ext/standard/tests/strings/str_repeat.phpt
ext/standard/tests/strings/str_replace_variation1.phpt
ext/standard/tests/strings/str_replace_variation2.phpt
ext/standard/tests/strings/str_word_count.phpt
ext/standard/tests/strings/strcasecmp.phpt
ext/standard/tests/strings/strcmp.phpt
ext/standard/tests/strings/stripos_variation1.phpt
ext/standard/tests/strings/stripos_variation10.phpt [deleted file]
ext/standard/tests/strings/stripos_variation11.phpt [deleted file]
ext/standard/tests/strings/stripos_variation2.phpt
ext/standard/tests/strings/stripos_variation7.phpt [deleted file]
ext/standard/tests/strings/stristr_variation2.phpt
ext/standard/tests/strings/strlen.phpt
ext/standard/tests/strings/strpos.phpt
ext/standard/tests/strings/strrchr_variation1.phpt
ext/standard/tests/strings/strrchr_variation10.phpt [deleted file]
ext/standard/tests/strings/strrchr_variation11.phpt [deleted file]
ext/standard/tests/strings/strrchr_variation12.phpt
ext/standard/tests/strings/strrchr_variation2.phpt
ext/standard/tests/strings/strrchr_variation8.phpt [deleted file]
ext/standard/tests/strings/strrev.phpt
ext/standard/tests/strings/strripos_variation1.phpt
ext/standard/tests/strings/strripos_variation2.phpt
ext/standard/tests/strings/strrpos_variation1.phpt [deleted file]
ext/standard/tests/strings/strrpos_variation10.phpt [deleted file]
ext/standard/tests/strings/strrpos_variation11.phpt [deleted file]
ext/standard/tests/strings/strrpos_variation2.phpt
ext/standard/tests/strings/strrpos_variation7.phpt
ext/standard/tests/strings/strstr.phpt
ext/standard/tests/strings/strtolower-win32.phpt
ext/standard/tests/strings/strtolower.phpt
ext/standard/tests/strings/strtoupper1-win32.phpt
ext/standard/tests/strings/strtoupper1.phpt
ext/standard/tests/strings/strtr_variation4.phpt
ext/standard/tests/strings/strtr_variation6.phpt
ext/standard/tests/strings/strtr_variation8.phpt
ext/standard/tests/strings/substr.phpt
ext/standard/tests/strings/substr_count_variation_001.phpt
ext/standard/tests/strings/trim1.phpt
ext/standard/tests/strings/ucfirst.phpt
ext/standard/tests/strings/vprintf_variation1.phpt [deleted file]
ext/xmlreader/tests/015-get-errors.phpt
ext/xmlreader/tests/015-move-errors.phpt
ext/xmlwriter/tests/bug39504.phpt
ext/zlib/tests/gzfile_variation3.phpt [deleted file]
ext/zlib/tests/readgzfile_variation3.phpt [deleted file]
run-tests.php

index 301459786840928b360dcb9fbce3d9d469d70f99..2e4700c1c9592f8d3728ec749da36797b9bf0e59 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -27,6 +27,16 @@ PHP 8.1 UPGRADE NOTES
     array is no longer supported. For example, array_pop($GLOBALS) will result
     in an error.
     RFC: https://wiki.php.net/rfc/restrict_globals_usage
+  . Passing null to a non-nullable argument of a built-in function is
+    deprecated. This matches the behavior of user-defined functions, where null
+    is never accepted by non-nullable arguments.
+    user-defined functions.
+
+        var_dump(str_contains("foobar", null));
+        // Deprecated: Passing null to parameter #2 ($needle) of type string
+        //             is deprecated
+
+    RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
 
 - Fileinfo:
   . The fileinfo functions now accept and return, respectively, finfo objects
index 49816ea1c158dd92ca625b4655233d156ac4b4b0..c93b118e1696d19d998d4649a4bdd53269733ce5 100644 (file)
@@ -30,25 +30,37 @@ Warning: Undefined variable $ref in %s on line %d
 
 Warning: Undefined variable $undef in %s on line %d
 
+Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
+
 Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
 
 Warning: Undefined variable $undef in %s on line %d
 
+Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
+
 Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
 
 Warning: Undefined variable $undef in %s on line %d
 
+Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
+
 Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
 
 Warning: Undefined variable $undef in %s on line %d
 
+Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
+
 Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
 
 Warning: Undefined variable $undef in %s on line %d
 
+Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
+
 Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
 
 Warning: Undefined variable $undef in %s on line %d
 
+Deprecated: chop(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
+
 Notice: Indirect modification of overloaded property Foo::$arr has no effect in %sbug43201.php on line 17
 ok
index 2dcd00ce0a8f45f8ee7bac6a5b32f24101f96abf..c3b168bd83b510b26eca0789ed7d35ccd0b9ceb9 100644 (file)
@@ -7,7 +7,7 @@ class cat {
     }
 }
 $cat = new cat();
-$cat->show_output('Files: ', trim(`cd .`)); // this gives invalid args to shell_exec
+$cat->show_output('Files: ', trim((string) `cd .`)); // this gives invalid args to shell_exec
 $cat->show_output('Files: ', `cd .`); // this causes a segmentation fault
 $cat->show_output(`cd .`); // this causes a segmentation fault
 
index 5e5df1d37188fd93cf6c1d4486362cfe7be3e60f..e020c1d623e625984ab3d0d36679b2eb6856845a 100644 (file)
@@ -8,7 +8,6 @@ class foo {
 }
 
 var_dump(class_exists(''));
-var_dump(class_exists(NULL));
 var_dump(class_exists('FOO'));
 var_dump(class_exists('bar'));
 var_dump(class_exists(1));
@@ -16,7 +15,6 @@ var_dump(class_exists(1));
 ?>
 --EXPECT--
 bool(false)
-bool(false)
 bool(true)
 bool(false)
 bool(false)
index 232ef012eddba6e9ffcd3e59ed10c4a88a100853..aba29d4aa3ee1692e40874f49bfa928d52eeafdb 100644 (file)
@@ -7,7 +7,7 @@ try {
     try {
         try {
             try {
-                throw new Exception(NULL);
+                throw new Exception();
             } catch (Exception $e) {
                 var_dump($e->getMessage());
                 throw $e;
index 84e9c6df1e42ec652d52fdc16ce5994c4ca30c69..4bc01221a8356748e129812fae2fd385c56d1d15 100644 (file)
@@ -8,10 +8,8 @@ interface foo {
 
 var_dump(interface_exists('foo'));
 var_dump(interface_exists(1));
-var_dump(interface_exists(NULL));
 
 ?>
 --EXPECT--
 bool(true)
 bool(false)
-bool(false)
diff --git a/Zend/tests/null_to_non_nullable_special_func.phpt b/Zend/tests/null_to_non_nullable_special_func.phpt
new file mode 100644 (file)
index 0000000..9dc1c96
--- /dev/null
@@ -0,0 +1,12 @@
+--TEST--
+Test null arg behavior for special functions
+--FILE--
+<?php
+
+$null = null;
+var_dump(strlen($null));
+
+?>
+--EXPECTF--
+Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
+int(0)
index fd1fbc9006f6814d07809121f2e514434bd3d1f6..595f292f6f456be7924d4e9c29e7214edc73178a 100644 (file)
@@ -38,14 +38,21 @@ dump_error(fn() => array_key_exists('foo', $foo?->foo()));
 
 ?>
 --EXPECTF--
+Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
 int(0)
 bool(true)
 bool(false)
 bool(false)
 bool(false)
 bool(false)
+
+Deprecated: defined(): Passing null to parameter #1 ($constant_name) of type string is deprecated in %s on line %d
 bool(false)
+
+Deprecated: chr(): Passing null to parameter #1 ($codepoint) of type int is deprecated in %s on line %d
 string(1) "%s"
+
+Deprecated: ord(): Passing null to parameter #1 ($character) of type string is deprecated in %s on line %d
 int(0)
 string(98) "call_user_func_array(): Argument #1 ($function) must be a valid callback, no array or string given"
 string(77) "call_user_func_array(): Argument #2 ($args) must be of type array, null given"
@@ -55,6 +62,8 @@ string(4) "NULL"
 string(52) "func_num_args() expects exactly 0 arguments, 1 given"
 string(52) "func_get_args() expects exactly 0 arguments, 1 given"
 string(69) "array_slice(): Argument #1 ($array) must be of type array, null given"
+
+Deprecated: array_slice(): Passing null to parameter #2 ($offset) of type int is deprecated in %s on line %d
 array(1) {
   [0]=>
   string(3) "foo"
index 6f6a155895b8fbadeebe15d22012767db1aef051..04a321a69265b8852b26bf31ad257830ed0d654f 100644 (file)
@@ -51,9 +51,11 @@ try {
 }
 
 ?>
---EXPECT--
+--EXPECTF--
 string(6) "string"
 string(1) "1"
+
+Deprecated: zend_string_or_stdclass(): Passing null to parameter #1 ($param) of type string is deprecated in %s on line %d
 string(0) ""
 object(stdClass)#1 (0) {
 }
index 6328c61b2dbf0e1129afd6e16f85317f5acb03d8..00eec7a68829525a4d40f7cd9cd9c3049c140943 100644 (file)
@@ -34,9 +34,11 @@ try {
 }
 
 ?>
---EXPECT--
+--EXPECTF--
 string(6) "string"
 string(1) "1"
+
+Deprecated: zend_string_or_object(): Passing null to parameter #1 ($param) of type object|string is deprecated in %s on line %d
 string(0) ""
 object(stdClass)#1 (0) {
 }
index 8a7c55d58608dd9756f44e3e67aba07e153ffded..8699b07cefd16571ddc213a2b80e4fa462cc4885 100644 (file)
@@ -8,10 +8,8 @@ trait foo {
 
 var_dump(trait_exists('foo'));
 var_dump(trait_exists(1));
-var_dump(trait_exists(NULL));
 
 ?>
 --EXPECT--
 bool(true)
 bool(false)
-bool(false)
index abfbb411a53dbb6c678874e20e302419714224a2..6aa9a043ff99d04819c7d227ff65690c51a06493 100644 (file)
@@ -426,9 +426,41 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **p
 }
 /* }}} */
 
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest) /* {{{ */
+static ZEND_COLD bool zend_null_arg_deprecated(const char *fallback_type, uint32_t arg_num) {
+       zend_function *func = EG(current_execute_data)->func;
+       ZEND_ASSERT(arg_num > 0);
+       uint32_t arg_offset = arg_num - 1;
+       if (arg_offset >= func->common.num_args) {
+               ZEND_ASSERT(func->common.fn_flags & ZEND_ACC_VARIADIC);
+               arg_offset = func->common.num_args;
+       }
+
+       zend_arg_info *arg_info = &func->common.arg_info[arg_offset];
+       zend_string *func_name = get_active_function_or_method_name();
+       const char *arg_name = get_active_function_arg_name(arg_num);
+
+       /* If no type is specified in arginfo, use the specified fallback_type determined through
+        * zend_parse_parameters instead. */
+       zend_string *type_str = zend_type_to_string(arg_info->type);
+       const char *type = type_str ? ZSTR_VAL(type_str) : fallback_type;
+       zend_error(E_DEPRECATED,
+               "%s(): Passing null to parameter #%" PRIu32 "%s%s%s of type %s is deprecated",
+               ZSTR_VAL(func_name), arg_num,
+               arg_name ? " ($" : "", arg_name ? arg_name : "", arg_name ? ")" : "",
+               type);
+       zend_string_release(func_name);
+       if (type_str) {
+               zend_string_release(type_str);
+       }
+       return !EG(exception);
+}
+
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest, uint32_t arg_num) /* {{{ */
 {
        if (EXPECTED(Z_TYPE_P(arg) <= IS_STRING)) {
+               if (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) && !zend_null_arg_deprecated("bool", arg_num)) {
+                       return 0;
+               }
                *dest = zend_is_true(arg);
        } else {
                return 0;
@@ -437,16 +469,16 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest) /* {
 }
 /* }}} */
 
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest) /* {{{ */
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest, uint32_t arg_num) /* {{{ */
 {
        if (UNEXPECTED(ZEND_ARG_USES_STRICT_TYPES())) {
                return 0;
        }
-       return zend_parse_arg_bool_weak(arg, dest);
+       return zend_parse_arg_bool_weak(arg, dest, arg_num);
 }
 /* }}} */
 
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest) /* {{{ */
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest, uint32_t arg_num) /* {{{ */
 {
        if (EXPECTED(Z_TYPE_P(arg) == IS_DOUBLE)) {
                if (UNEXPECTED(zend_isnan(Z_DVAL_P(arg)))) {
@@ -479,6 +511,9 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest)
                        return 0;
                }
        } else if (EXPECTED(Z_TYPE_P(arg) < IS_TRUE)) {
+               if (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) && !zend_null_arg_deprecated("int", arg_num)) {
+                       return 0;
+               }
                *dest = 0;
        } else if (EXPECTED(Z_TYPE_P(arg) == IS_TRUE)) {
                *dest = 1;
@@ -489,16 +524,16 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest)
 }
 /* }}} */
 
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest) /* {{{ */
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest, uint32_t arg_num) /* {{{ */
 {
        if (UNEXPECTED(ZEND_ARG_USES_STRICT_TYPES())) {
                return 0;
        }
-       return zend_parse_arg_long_weak(arg, dest);
+       return zend_parse_arg_long_weak(arg, dest, arg_num);
 }
 /* }}} */
 
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest) /* {{{ */
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest, uint32_t arg_num) /* {{{ */
 {
        if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) {
                *dest = (double)Z_LVAL_P(arg);
@@ -517,6 +552,9 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest)
                        return 0;
                }
        } else if (EXPECTED(Z_TYPE_P(arg) < IS_TRUE)) {
+               if (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) && !zend_null_arg_deprecated("float", arg_num)) {
+                       return 0;
+               }
                *dest = 0.0;
        } else if (EXPECTED(Z_TYPE_P(arg) == IS_TRUE)) {
                *dest = 1.0;
@@ -527,7 +565,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest)
 }
 /* }}} */
 
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest) /* {{{ */
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest, uint32_t arg_num) /* {{{ */
 {
        if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) {
                /* SSTH Exception: IS_LONG may be accepted instead as IS_DOUBLE */
@@ -535,11 +573,11 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest)
        } else if (UNEXPECTED(ZEND_ARG_USES_STRICT_TYPES())) {
                return 0;
        }
-       return zend_parse_arg_double_weak(arg, dest);
+       return zend_parse_arg_double_weak(arg, dest, arg_num);
 }
 /* }}} */
 
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest) /* {{{ */
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest, uint32_t arg_num) /* {{{ */
 {
        if (UNEXPECTED(ZEND_ARG_USES_STRICT_TYPES())) {
                return 0;
@@ -558,6 +596,9 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest) /
                }
                zend_string_release(str);
        } else if (Z_TYPE_P(arg) < IS_TRUE) {
+               if (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) && !zend_null_arg_deprecated("int|float", arg_num)) {
+                       return 0;
+               }
                ZVAL_LONG(arg, 0);
        } else if (Z_TYPE_P(arg) == IS_TRUE) {
                ZVAL_LONG(arg, 1);
@@ -569,9 +610,12 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest) /
 }
 /* }}} */
 
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest) /* {{{ */
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest, uint32_t arg_num) /* {{{ */
 {
        if (EXPECTED(Z_TYPE_P(arg) < IS_STRING)) {
+               if (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) && !zend_null_arg_deprecated("string", arg_num)) {
+                       return 0;
+               }
                convert_to_string(arg);
                *dest = Z_STR_P(arg);
        } else if (UNEXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) {
@@ -591,24 +635,24 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **des
 }
 /* }}} */
 
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_slow(zval *arg, zend_string **dest) /* {{{ */
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_slow(zval *arg, zend_string **dest, uint32_t arg_num) /* {{{ */
 {
        if (UNEXPECTED(ZEND_ARG_USES_STRICT_TYPES())) {
                return 0;
        }
-       return zend_parse_arg_str_weak(arg, dest);
+       return zend_parse_arg_str_weak(arg, dest, arg_num);
 }
 /* }}} */
 
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_string **dest_str, zend_long *dest_long) /* {{{ */
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_string **dest_str, zend_long *dest_long, uint32_t arg_num) /* {{{ */
 {
        if (UNEXPECTED(ZEND_ARG_USES_STRICT_TYPES())) {
                return 0;
        }
-       if (zend_parse_arg_long_weak(arg, dest_long)) {
+       if (zend_parse_arg_long_weak(arg, dest_long, arg_num)) {
                *dest_str = NULL;
                return 1;
-       } else if (zend_parse_arg_str_weak(arg, dest_str)) {
+       } else if (zend_parse_arg_str_weak(arg, dest_str, arg_num)) {
                *dest_long = 0;
                return 1;
        } else {
@@ -617,7 +661,7 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_stri
 }
 /* }}} */
 
-static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec, char **error) /* {{{ */
+static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec, char **error, uint32_t arg_num) /* {{{ */
 {
        const char *spec_walk = *spec;
        char c = *spec_walk++;
@@ -650,7 +694,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
                                        is_null = va_arg(*va, bool *);
                                }
 
-                               if (!zend_parse_arg_long(arg, p, is_null, check_null)) {
+                               if (!zend_parse_arg_long(arg, p, is_null, check_null, arg_num)) {
                                        return check_null ? "?int" : "int";
                                }
                        }
@@ -665,7 +709,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
                                        is_null = va_arg(*va, bool *);
                                }
 
-                               if (!zend_parse_arg_double(arg, p, is_null, check_null)) {
+                               if (!zend_parse_arg_double(arg, p, is_null, check_null, arg_num)) {
                                        return check_null ? "?float" : "float";
                                }
                        }
@@ -675,7 +719,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
                        {
                                zval **p = va_arg(*va, zval **);
 
-                               if (!zend_parse_arg_number(arg, p, check_null)) {
+                               if (!zend_parse_arg_number(arg, p, check_null, arg_num)) {
                                        return check_null ? "int|float|null" : "int|float";
                                }
                        }
@@ -685,7 +729,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
                        {
                                char **p = va_arg(*va, char **);
                                size_t *pl = va_arg(*va, size_t *);
-                               if (!zend_parse_arg_string(arg, p, pl, check_null)) {
+                               if (!zend_parse_arg_string(arg, p, pl, check_null, arg_num)) {
                                        return check_null ? "?string" : "string";
                                }
                        }
@@ -695,7 +739,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
                        {
                                char **p = va_arg(*va, char **);
                                size_t *pl = va_arg(*va, size_t *);
-                               if (!zend_parse_arg_path(arg, p, pl, check_null)) {
+                               if (!zend_parse_arg_path(arg, p, pl, check_null, arg_num)) {
                                        if (Z_TYPE_P(arg) == IS_STRING) {
                                                zend_spprintf(error, 0, "must not contain any null bytes");
                                                return "";
@@ -709,7 +753,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
                case 'P':
                        {
                                zend_string **str = va_arg(*va, zend_string **);
-                               if (!zend_parse_arg_path_str(arg, str, check_null)) {
+                               if (!zend_parse_arg_path_str(arg, str, check_null, arg_num)) {
                                        if (Z_TYPE_P(arg) == IS_STRING) {
                                                zend_spprintf(error, 0, "must not contain any null bytes");
                                                return "";
@@ -723,7 +767,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
                case 'S':
                        {
                                zend_string **str = va_arg(*va, zend_string **);
-                               if (!zend_parse_arg_str(arg, str, check_null)) {
+                               if (!zend_parse_arg_str(arg, str, check_null, arg_num)) {
                                        return check_null ? "?string" : "string";
                                }
                        }
@@ -738,7 +782,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec
                                        is_null = va_arg(*va, bool *);
                                }
 
-                               if (!zend_parse_arg_bool(arg, p, is_null, check_null)) {
+                               if (!zend_parse_arg_bool(arg, p, is_null, check_null, arg_num)) {
                                        return check_null ? "?bool" : "bool";
                                }
                        }
@@ -899,7 +943,7 @@ static zend_result zend_parse_arg(uint32_t arg_num, zval *arg, va_list *va, cons
        const char *expected_type = NULL;
        char *error = NULL;
 
-       expected_type = zend_parse_arg_impl(arg, va, spec, &error);
+       expected_type = zend_parse_arg_impl(arg, va, spec, &error, arg_num);
        if (expected_type) {
                if (EG(exception)) {
                        return FAILURE;
index 6c867b2869f578a844ff84626fde276fd651de79..a811d9c5334f68eab3ff60349c3c8a1f9f3e72d3 100644 (file)
@@ -1450,7 +1450,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 /* old "b" */
 #define Z_PARAM_BOOL_EX(dest, is_null, check_null, deref) \
                Z_PARAM_PROLOGUE(deref, 0); \
-               if (UNEXPECTED(!zend_parse_arg_bool(_arg, &dest, &is_null, check_null))) { \
+               if (UNEXPECTED(!zend_parse_arg_bool(_arg, &dest, &is_null, check_null, _i))) { \
                        _expected_type = check_null ? Z_EXPECTED_BOOL_OR_NULL : Z_EXPECTED_BOOL; \
                        _error_code = ZPP_ERROR_WRONG_ARG; \
                        break; \
@@ -1492,7 +1492,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 
 #define Z_PARAM_OBJ_OR_STR_EX(destination_object, destination_string, allow_null) \
        Z_PARAM_PROLOGUE(0, 0); \
-       if (UNEXPECTED(!zend_parse_arg_obj_or_str(_arg, &destination_object, NULL, &destination_string, allow_null))) { \
+       if (UNEXPECTED(!zend_parse_arg_obj_or_str(_arg, &destination_object, NULL, &destination_string, allow_null, _i))) { \
                _expected_type = allow_null ? Z_EXPECTED_OBJECT_OR_STRING_OR_NULL : Z_EXPECTED_OBJECT_OR_STRING; \
                _error_code = ZPP_ERROR_WRONG_ARG; \
                break; \
@@ -1506,7 +1506,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 
 #define Z_PARAM_OBJ_OF_CLASS_OR_STR_EX(destination_object, base_ce, destination_string, allow_null) \
        Z_PARAM_PROLOGUE(0, 0); \
-       if (UNEXPECTED(!zend_parse_arg_obj_or_str(_arg, &destination_object, base_ce, &destination_string, allow_null))) { \
+       if (UNEXPECTED(!zend_parse_arg_obj_or_str(_arg, &destination_object, base_ce, &destination_string, allow_null, _i))) { \
                if (base_ce) { \
                        _error = ZSTR_VAL((base_ce)->name); \
                        _error_code = allow_null ? ZPP_ERROR_WRONG_CLASS_OR_STRING_OR_NULL : ZPP_ERROR_WRONG_CLASS_OR_STRING; \
@@ -1527,7 +1527,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 /* old "d" */
 #define Z_PARAM_DOUBLE_EX(dest, is_null, check_null, deref) \
                Z_PARAM_PROLOGUE(deref, 0); \
-               if (UNEXPECTED(!zend_parse_arg_double(_arg, &dest, &is_null, check_null))) { \
+               if (UNEXPECTED(!zend_parse_arg_double(_arg, &dest, &is_null, check_null, _i))) { \
                        _expected_type = check_null ? Z_EXPECTED_DOUBLE_OR_NULL : Z_EXPECTED_DOUBLE; \
                        _error_code = ZPP_ERROR_WRONG_ARG; \
                        break; \
@@ -1578,7 +1578,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 
 #define Z_PARAM_ARRAY_HT_OR_LONG_EX(dest_ht, dest_long, is_null, allow_null) \
        Z_PARAM_PROLOGUE(0, 0); \
-       if (UNEXPECTED(!zend_parse_arg_array_ht_or_long(_arg, &dest_ht, &dest_long, &is_null, allow_null))) { \
+       if (UNEXPECTED(!zend_parse_arg_array_ht_or_long(_arg, &dest_ht, &dest_long, &is_null, allow_null, _i))) { \
                _expected_type = allow_null ? Z_EXPECTED_ARRAY_OR_LONG_OR_NULL : Z_EXPECTED_ARRAY_OR_LONG; \
                _error_code = ZPP_ERROR_WRONG_ARG; \
                break; \
@@ -1608,7 +1608,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 /* old "l" */
 #define Z_PARAM_LONG_EX(dest, is_null, check_null, deref) \
                Z_PARAM_PROLOGUE(deref, 0); \
-               if (UNEXPECTED(!zend_parse_arg_long(_arg, &dest, &is_null, check_null))) { \
+               if (UNEXPECTED(!zend_parse_arg_long(_arg, &dest, &is_null, check_null, _i))) { \
                        _expected_type = check_null ? Z_EXPECTED_LONG_OR_NULL : Z_EXPECTED_LONG; \
                        _error_code = ZPP_ERROR_WRONG_ARG; \
                        break; \
@@ -1623,7 +1623,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 /* old "n" */
 #define Z_PARAM_NUMBER_EX(dest, check_null) \
        Z_PARAM_PROLOGUE(0, 0); \
-       if (UNEXPECTED(!zend_parse_arg_number(_arg, &dest, check_null))) { \
+       if (UNEXPECTED(!zend_parse_arg_number(_arg, &dest, check_null, _i))) { \
                _expected_type = check_null ? Z_EXPECTED_NUMBER_OR_NULL : Z_EXPECTED_NUMBER; \
                _error_code = ZPP_ERROR_WRONG_ARG; \
                break; \
@@ -1709,7 +1709,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 
 #define Z_PARAM_OBJ_OF_CLASS_OR_LONG_EX(dest_obj, _ce, dest_long, is_null, allow_null) \
                Z_PARAM_PROLOGUE(0, 0); \
-               if (UNEXPECTED(!zend_parse_arg_obj_or_long(_arg, &dest_obj, _ce, &dest_long, &is_null, allow_null))) { \
+               if (UNEXPECTED(!zend_parse_arg_obj_or_long(_arg, &dest_obj, _ce, &dest_long, &is_null, allow_null, _i))) { \
                        _error = ZSTR_VAL((_ce)->name); \
                        _error_code = allow_null ? ZPP_ERROR_WRONG_CLASS_OR_LONG_OR_NULL : ZPP_ERROR_WRONG_CLASS_OR_LONG; \
                        break; \
@@ -1724,7 +1724,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 /* old "p" */
 #define Z_PARAM_PATH_EX(dest, dest_len, check_null, deref) \
                Z_PARAM_PROLOGUE(deref, 0); \
-               if (UNEXPECTED(!zend_parse_arg_path(_arg, &dest, &dest_len, check_null))) { \
+               if (UNEXPECTED(!zend_parse_arg_path(_arg, &dest, &dest_len, check_null, _i))) { \
                        _expected_type = check_null ? Z_EXPECTED_PATH_OR_NULL : Z_EXPECTED_PATH; \
                        _error_code = ZPP_ERROR_WRONG_ARG; \
                        break; \
@@ -1739,7 +1739,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 /* old "P" */
 #define Z_PARAM_PATH_STR_EX(dest, check_null, deref) \
                Z_PARAM_PROLOGUE(deref, 0); \
-               if (UNEXPECTED(!zend_parse_arg_path_str(_arg, &dest, check_null))) { \
+               if (UNEXPECTED(!zend_parse_arg_path_str(_arg, &dest, check_null, _i))) { \
                        _expected_type = check_null ? Z_EXPECTED_PATH_OR_NULL : Z_EXPECTED_PATH; \
                        _error_code = ZPP_ERROR_WRONG_ARG; \
                        break; \
@@ -1769,7 +1769,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 /* old "s" */
 #define Z_PARAM_STRING_EX(dest, dest_len, check_null, deref) \
                Z_PARAM_PROLOGUE(deref, 0); \
-               if (UNEXPECTED(!zend_parse_arg_string(_arg, &dest, &dest_len, check_null))) { \
+               if (UNEXPECTED(!zend_parse_arg_string(_arg, &dest, &dest_len, check_null, _i))) { \
                        _expected_type = check_null ? Z_EXPECTED_STRING_OR_NULL : Z_EXPECTED_STRING; \
                        _error_code = ZPP_ERROR_WRONG_ARG; \
                        break; \
@@ -1784,7 +1784,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 /* old "S" */
 #define Z_PARAM_STR_EX(dest, check_null, deref) \
                Z_PARAM_PROLOGUE(deref, 0); \
-               if (UNEXPECTED(!zend_parse_arg_str(_arg, &dest, check_null))) { \
+               if (UNEXPECTED(!zend_parse_arg_str(_arg, &dest, check_null, _i))) { \
                        _expected_type = check_null ? Z_EXPECTED_STRING_OR_NULL : Z_EXPECTED_STRING; \
                        _error_code = ZPP_ERROR_WRONG_ARG; \
                        break; \
@@ -1849,7 +1849,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 
 #define Z_PARAM_ARRAY_HT_OR_STR_EX(dest_ht, dest_str, allow_null) \
        Z_PARAM_PROLOGUE(0, 0); \
-       if (UNEXPECTED(!zend_parse_arg_array_ht_or_str(_arg, &dest_ht, &dest_str, allow_null))) { \
+       if (UNEXPECTED(!zend_parse_arg_array_ht_or_str(_arg, &dest_ht, &dest_str, allow_null, _i))) { \
                _expected_type = allow_null ? Z_EXPECTED_ARRAY_OR_STRING_OR_NULL : Z_EXPECTED_ARRAY_OR_STRING; \
                _error_code = ZPP_ERROR_WRONG_ARG; \
                break; \
@@ -1863,7 +1863,7 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 
 #define Z_PARAM_STR_OR_LONG_EX(dest_str, dest_long, is_null, allow_null) \
        Z_PARAM_PROLOGUE(0, 0); \
-       if (UNEXPECTED(!zend_parse_arg_str_or_long(_arg, &dest_str, &dest_long, &is_null, allow_null))) { \
+       if (UNEXPECTED(!zend_parse_arg_str_or_long(_arg, &dest_str, &dest_long, &is_null, allow_null, _i))) { \
                _expected_type = allow_null ? Z_EXPECTED_STRING_OR_LONG_OR_NULL : Z_EXPECTED_STRING_OR_LONG; \
                _error_code = ZPP_ERROR_WRONG_ARG; \
                break; \
@@ -1880,18 +1880,18 @@ ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *
 /* Inlined implementations shared by new and old parameter parsing APIs */
 
 ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, uint32_t num, bool check_null);
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest);
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest);
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest);
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest);
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest);
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest);
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_slow(zval *arg, zend_string **dest);
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest);
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest);
-ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_string **dest_str, zend_long *dest_long);
-
-static zend_always_inline bool zend_parse_arg_bool(zval *arg, bool *dest, bool *is_null, bool check_null)
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, bool *dest, uint32_t arg_num);
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, bool *dest, uint32_t arg_num);
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest, uint32_t arg_num);
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(zval *arg, zend_long *dest, uint32_t arg_num);
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(zval *arg, double *dest, uint32_t arg_num);
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(zval *arg, double *dest, uint32_t arg_num);
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_slow(zval *arg, zend_string **dest, uint32_t arg_num);
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest, uint32_t arg_num);
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest, uint32_t arg_num);
+ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_string **dest_str, zend_long *dest_long, uint32_t arg_num);
+
+static zend_always_inline bool zend_parse_arg_bool(zval *arg, bool *dest, bool *is_null, bool check_null, uint32_t arg_num)
 {
        if (check_null) {
                *is_null = 0;
@@ -1904,12 +1904,12 @@ static zend_always_inline bool zend_parse_arg_bool(zval *arg, bool *dest, bool *
                *is_null = 1;
                *dest = 0;
        } else {
-               return zend_parse_arg_bool_slow(arg, dest);
+               return zend_parse_arg_bool_slow(arg, dest, arg_num);
        }
        return 1;
 }
 
-static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, bool *is_null, bool check_null)
+static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, bool *is_null, bool check_null, uint32_t arg_num)
 {
        if (check_null) {
                *is_null = 0;
@@ -1920,12 +1920,12 @@ static zend_always_inline bool zend_parse_arg_long(zval *arg, zend_long *dest, b
                *is_null = 1;
                *dest = 0;
        } else {
-               return zend_parse_arg_long_slow(arg, dest);
+               return zend_parse_arg_long_slow(arg, dest, arg_num);
        }
        return 1;
 }
 
-static zend_always_inline bool zend_parse_arg_double(zval *arg, double *dest, bool *is_null, bool check_null)
+static zend_always_inline bool zend_parse_arg_double(zval *arg, double *dest, bool *is_null, bool check_null, uint32_t arg_num)
 {
        if (check_null) {
                *is_null = 0;
@@ -1936,40 +1936,40 @@ static zend_always_inline bool zend_parse_arg_double(zval *arg, double *dest, bo
                *is_null = 1;
                *dest = 0.0;
        } else {
-               return zend_parse_arg_double_slow(arg, dest);
+               return zend_parse_arg_double_slow(arg, dest, arg_num);
        }
        return 1;
 }
 
-static zend_always_inline bool zend_parse_arg_number(zval *arg, zval **dest, bool check_null)
+static zend_always_inline bool zend_parse_arg_number(zval *arg, zval **dest, bool check_null, uint32_t arg_num)
 {
        if (EXPECTED(Z_TYPE_P(arg) == IS_LONG || Z_TYPE_P(arg) == IS_DOUBLE)) {
                *dest = arg;
        } else if (check_null && EXPECTED(Z_TYPE_P(arg) == IS_NULL)) {
                *dest = NULL;
        } else {
-               return zend_parse_arg_number_slow(arg, dest);
+               return zend_parse_arg_number_slow(arg, dest, arg_num);
        }
        return 1;
 }
 
-static zend_always_inline bool zend_parse_arg_str(zval *arg, zend_string **dest, bool check_null)
+static zend_always_inline bool zend_parse_arg_str(zval *arg, zend_string **dest, bool check_null, uint32_t arg_num)
 {
        if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) {
                *dest = Z_STR_P(arg);
        } else if (check_null && Z_TYPE_P(arg) == IS_NULL) {
                *dest = NULL;
        } else {
-               return zend_parse_arg_str_slow(arg, dest);
+               return zend_parse_arg_str_slow(arg, dest, arg_num);
        }
        return 1;
 }
 
-static zend_always_inline bool zend_parse_arg_string(zval *arg, char **dest, size_t *dest_len, bool check_null)
+static zend_always_inline bool zend_parse_arg_string(zval *arg, char **dest, size_t *dest_len, bool check_null, uint32_t arg_num)
 {
        zend_string *str;
 
-       if (!zend_parse_arg_str(arg, &str, check_null)) {
+       if (!zend_parse_arg_str(arg, &str, check_null, arg_num)) {
                return 0;
        }
        if (check_null && UNEXPECTED(!str)) {
@@ -1982,20 +1982,20 @@ static zend_always_inline bool zend_parse_arg_string(zval *arg, char **dest, siz
        return 1;
 }
 
-static zend_always_inline bool zend_parse_arg_path_str(zval *arg, zend_string **dest, bool check_null)
+static zend_always_inline bool zend_parse_arg_path_str(zval *arg, zend_string **dest, bool check_null, uint32_t arg_num)
 {
-       if (!zend_parse_arg_str(arg, dest, check_null) ||
+       if (!zend_parse_arg_str(arg, dest, check_null, arg_num) ||
            (*dest && UNEXPECTED(CHECK_NULL_PATH(ZSTR_VAL(*dest), ZSTR_LEN(*dest))))) {
                return 0;
        }
        return 1;
 }
 
-static zend_always_inline bool zend_parse_arg_path(zval *arg, char **dest, size_t *dest_len, bool check_null)
+static zend_always_inline bool zend_parse_arg_path(zval *arg, char **dest, size_t *dest_len, bool check_null, uint32_t arg_num)
 {
        zend_string *str;
 
-       if (!zend_parse_arg_path_str(arg, &str, check_null)) {
+       if (!zend_parse_arg_path_str(arg, &str, check_null, arg_num)) {
                return 0;
        }
        if (check_null && UNEXPECTED(!str)) {
@@ -2060,7 +2060,7 @@ static zend_always_inline bool zend_parse_arg_array_ht(zval *arg, HashTable **de
 }
 
 static zend_always_inline bool zend_parse_arg_array_ht_or_long(
-       zval *arg, HashTable **dest_ht, zend_long *dest_long, bool *is_null, bool allow_null
+       zval *arg, HashTable **dest_ht, zend_long *dest_long, bool *is_null, bool allow_null, uint32_t arg_num
 ) {
        if (allow_null) {
                *is_null = 0;
@@ -2076,7 +2076,7 @@ static zend_always_inline bool zend_parse_arg_array_ht_or_long(
                *is_null = 1;
        } else {
                *dest_ht = NULL;
-               return zend_parse_arg_long_slow(arg, dest_long);
+               return zend_parse_arg_long_slow(arg, dest_long, arg_num);
        }
 
        return 1;
@@ -2109,7 +2109,7 @@ static zend_always_inline bool zend_parse_arg_obj(zval *arg, zend_object **dest,
 }
 
 static zend_always_inline bool zend_parse_arg_obj_or_long(
-       zval *arg, zend_object **dest_obj, zend_class_entry *ce, zend_long *dest_long, bool *is_null, bool allow_null
+       zval *arg, zend_object **dest_obj, zend_class_entry *ce, zend_long *dest_long, bool *is_null, bool allow_null, uint32_t arg_num
 ) {
        if (allow_null) {
                *is_null = 0;
@@ -2125,7 +2125,7 @@ static zend_always_inline bool zend_parse_arg_obj_or_long(
                *is_null = 1;
        } else {
                *dest_obj = NULL;
-               return zend_parse_arg_long_slow(arg, dest_long);
+               return zend_parse_arg_long_slow(arg, dest_long, arg_num);
        }
 
        return 1;
@@ -2173,7 +2173,7 @@ static zend_always_inline void zend_parse_arg_zval_deref(zval *arg, zval **dest,
 }
 
 static zend_always_inline bool zend_parse_arg_array_ht_or_str(
-               zval *arg, HashTable **dest_ht, zend_string **dest_str, bool allow_null)
+               zval *arg, HashTable **dest_ht, zend_string **dest_str, bool allow_null, uint32_t arg_num)
 {
        if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) {
                *dest_ht = NULL;
@@ -2186,13 +2186,13 @@ static zend_always_inline bool zend_parse_arg_array_ht_or_str(
                *dest_str = NULL;
        } else {
                *dest_ht = NULL;
-               return zend_parse_arg_str_slow(arg, dest_str);
+               return zend_parse_arg_str_slow(arg, dest_str, arg_num);
        }
        return 1;
 }
 
 static zend_always_inline bool zend_parse_arg_str_or_long(zval *arg, zend_string **dest_str, zend_long *dest_long,
-       bool *is_null, bool allow_null)
+       bool *is_null, bool allow_null, uint32_t arg_num)
 {
        if (allow_null) {
                *is_null = 0;
@@ -2206,7 +2206,7 @@ static zend_always_inline bool zend_parse_arg_str_or_long(zval *arg, zend_string
                *dest_str = NULL;
                *is_null = 1;
        } else {
-               return zend_parse_arg_str_or_long_slow(arg, dest_str, dest_long);
+               return zend_parse_arg_str_or_long_slow(arg, dest_str, dest_long, arg_num);
        }
        return 1;
 }
@@ -2230,7 +2230,7 @@ static zend_always_inline bool zend_parse_arg_obj_or_class_name(
 }
 
 static zend_always_inline bool zend_parse_arg_obj_or_str(
-       zval *arg, zend_object **destination_object, zend_class_entry *base_ce, zend_string **destination_string, bool allow_null
+       zval *arg, zend_object **destination_object, zend_class_entry *base_ce, zend_string **destination_string, bool allow_null, uint32_t arg_num
 ) {
        if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) {
                if (!base_ce || EXPECTED(instanceof_function(Z_OBJCE_P(arg), base_ce))) {
@@ -2241,7 +2241,7 @@ static zend_always_inline bool zend_parse_arg_obj_or_str(
        }
 
        *destination_object = NULL;
-       return zend_parse_arg_str(arg, destination_string, allow_null);
+       return zend_parse_arg_str(arg, destination_string, allow_null, arg_num);
 }
 
 END_EXTERN_C()
index 753eef426735df617368bbb7b5f6a07a566ccdf8..2a93cece8a6d478e92358efa1dcd15e2474450d0 100644 (file)
@@ -739,22 +739,22 @@ static bool zend_verify_weak_scalar_type_hint(uint32_t type_mask, zval *arg)
                                ZVAL_DOUBLE(arg, dval);
                                return 1;
                        }
-               } else if (zend_parse_arg_long_weak(arg, &lval)) {
+               } else if (zend_parse_arg_long_weak(arg, &lval, 0)) {
                        zval_ptr_dtor(arg);
                        ZVAL_LONG(arg, lval);
                        return 1;
                }
        }
-       if ((type_mask & MAY_BE_DOUBLE) && zend_parse_arg_double_weak(arg, &dval)) {
+       if ((type_mask & MAY_BE_DOUBLE) && zend_parse_arg_double_weak(arg, &dval, 0)) {
                zval_ptr_dtor(arg);
                ZVAL_DOUBLE(arg, dval);
                return 1;
        }
-       if ((type_mask & MAY_BE_STRING) && zend_parse_arg_str_weak(arg, &str)) {
+       if ((type_mask & MAY_BE_STRING) && zend_parse_arg_str_weak(arg, &str, 0)) {
                /* on success "arg" is converted to IS_STRING */
                return 1;
        }
-       if ((type_mask & MAY_BE_BOOL) == MAY_BE_BOOL && zend_parse_arg_bool_weak(arg, &bval)) {
+       if ((type_mask & MAY_BE_BOOL) == MAY_BE_BOOL && zend_parse_arg_bool_weak(arg, &bval, 0)) {
                zval_ptr_dtor(arg);
                ZVAL_BOOL(arg, bval);
                return 1;
@@ -781,16 +781,16 @@ static bool zend_verify_weak_scalar_type_hint_no_sideeffect(uint32_t type_mask,
        double dval;
        bool bval;
 
-       if ((type_mask & MAY_BE_LONG) && zend_parse_arg_long_weak(arg, &lval)) {
+       if ((type_mask & MAY_BE_LONG) && zend_parse_arg_long_weak(arg, &lval, 0)) {
                return 1;
        }
-       if ((type_mask & MAY_BE_DOUBLE) && zend_parse_arg_double_weak(arg, &dval)) {
+       if ((type_mask & MAY_BE_DOUBLE) && zend_parse_arg_double_weak(arg, &dval, 0)) {
                return 1;
        }
        if ((type_mask & MAY_BE_STRING) && can_convert_to_string(arg)) {
                return 1;
        }
-       if ((type_mask & MAY_BE_BOOL) == MAY_BE_BOOL && zend_parse_arg_bool_weak(arg, &bval)) {
+       if ((type_mask & MAY_BE_BOOL) == MAY_BE_BOOL && zend_parse_arg_bool_weak(arg, &bval, 0)) {
                return 1;
        }
        return 0;
index 98b8b51d7fa8f93a22bb18978a25f4b861617c82..7d0b30ff2bdc257c76ab3a93e42ceb390126e88c 100644 (file)
@@ -8310,8 +8310,18 @@ ZEND_VM_COLD_CONST_HANDLER(121, ZEND_STRLEN, CONST|TMPVAR|CV, ANY)
                                zend_string *str;
                                zval tmp;
 
+                               if (UNEXPECTED(Z_TYPE_P(value) == IS_NULL)) {
+                                       zend_error(E_DEPRECATED,
+                                               "strlen(): Passing null to parameter #1 ($string) of type string is deprecated");
+                                       if (UNEXPECTED(EG(exception))) {
+                                               HANDLE_EXCEPTION();
+                                       }
+                                       ZVAL_LONG(EX_VAR(opline->result.var), 0);
+                                       break;
+                               }
+
                                ZVAL_COPY(&tmp, value);
-                               if (zend_parse_arg_str_weak(&tmp, &str)) {
+                               if (zend_parse_arg_str_weak(&tmp, &str, 1)) {
                                        ZVAL_LONG(EX_VAR(opline->result.var), ZSTR_LEN(str));
                                        zval_ptr_dtor(&tmp);
                                        break;
index d680541f03851ce127e0f240fa97ee825302661d..0fe4fb5bb5d0ca8cbdb5c469ef91314ed3e4f82a 100644 (file)
@@ -5286,8 +5286,18 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CONST
                                zend_string *str;
                                zval tmp;
 
+                               if (UNEXPECTED(Z_TYPE_P(value) == IS_NULL)) {
+                                       zend_error(E_DEPRECATED,
+                                               "strlen(): Passing null to parameter #1 ($string) of type string is deprecated");
+                                       if (UNEXPECTED(EG(exception))) {
+                                               HANDLE_EXCEPTION();
+                                       }
+                                       ZVAL_LONG(EX_VAR(opline->result.var), 0);
+                                       break;
+                               }
+
                                ZVAL_COPY(&tmp, value);
-                               if (zend_parse_arg_str_weak(&tmp, &str)) {
+                               if (zend_parse_arg_str_weak(&tmp, &str, 1)) {
                                        ZVAL_LONG(EX_VAR(opline->result.var), ZSTR_LEN(str));
                                        zval_ptr_dtor(&tmp);
                                        break;
@@ -14459,8 +14469,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_TMPVAR_HANDLER(ZEN
                                zend_string *str;
                                zval tmp;
 
+                               if (UNEXPECTED(Z_TYPE_P(value) == IS_NULL)) {
+                                       zend_error(E_DEPRECATED,
+                                               "strlen(): Passing null to parameter #1 ($string) of type string is deprecated");
+                                       if (UNEXPECTED(EG(exception))) {
+                                               HANDLE_EXCEPTION();
+                                       }
+                                       ZVAL_LONG(EX_VAR(opline->result.var), 0);
+                                       break;
+                               }
+
                                ZVAL_COPY(&tmp, value);
-                               if (zend_parse_arg_str_weak(&tmp, &str)) {
+                               if (zend_parse_arg_str_weak(&tmp, &str, 1)) {
                                        ZVAL_LONG(EX_VAR(opline->result.var), ZSTR_LEN(str));
                                        zval_ptr_dtor(&tmp);
                                        break;
@@ -38546,8 +38566,18 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CV_HANDLER(ZEND_OP
                                zend_string *str;
                                zval tmp;
 
+                               if (UNEXPECTED(Z_TYPE_P(value) == IS_NULL)) {
+                                       zend_error(E_DEPRECATED,
+                                               "strlen(): Passing null to parameter #1 ($string) of type string is deprecated");
+                                       if (UNEXPECTED(EG(exception))) {
+                                               HANDLE_EXCEPTION();
+                                       }
+                                       ZVAL_LONG(EX_VAR(opline->result.var), 0);
+                                       break;
+                               }
+
                                ZVAL_COPY(&tmp, value);
-                               if (zend_parse_arg_str_weak(&tmp, &str)) {
+                               if (zend_parse_arg_str_weak(&tmp, &str, 1)) {
                                        ZVAL_LONG(EX_VAR(opline->result.var), ZSTR_LEN(str));
                                        zval_ptr_dtor(&tmp);
                                        break;
index 65669b6b39b74dbdf9274912baa6adf71a9904aa..cadedd8691c2cd676c6ea72c76289f545ac646ce 100644 (file)
@@ -10,5 +10,6 @@ try {
 }
 
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: DatePeriod::__construct(): Passing null to parameter #1 ($start) of type string is deprecated in %s on line %d
 string(51) "DatePeriod::__construct(): Unknown or bad format ()"
index fb41390b0fd93ebb5949b9173d914fc3dba850f8..b6074ff01a336613710e789ccb9ff5d56c5c5cb4 100644 (file)
@@ -15,8 +15,8 @@ $e = new DateTime($es);
 $d= $e->diff($s);
 var_dump($d->days); // 0 ... but should be 30
 
-$s = (new DateTime(null))->setTimestamp(strtotime($ss)); // verbose setup method
-$e = (new DateTime(null))->setTimestamp(strtotime($es)); // verbose setup method
+$s = (new DateTime("now"))->setTimestamp(strtotime($ss)); // verbose setup method
+$e = (new DateTime("now"))->setTimestamp(strtotime($es)); // verbose setup method
 $d = $e->diff($s);
 var_dump($d->days); // 30 ... and should be 30
 
@@ -24,13 +24,13 @@ var_dump($d->days); // 30 ... and should be 30
 Next we will try mix/match the code to see what happens, surprisingly it seems that the end date ($e)
 is the important one, if it uses the verbose method it returns the correct values.
 */
-$s = (new DateTime(null))->setTimestamp(strtotime($ss)); // verbose setup method
+$s = (new DateTime("now"))->setTimestamp(strtotime($ss)); // verbose setup method
 $e = new DateTime($es);
 $d= $e->diff($s);
 var_dump($d->days); // 0 ... but should be 30
 
 $s = new DateTime($ss);
-$e = (new DateTime(null))->setTimestamp(strtotime($es)); // verbose setup method
+$e = (new DateTime("now"))->setTimestamp(strtotime($es)); // verbose setup method
 $d= $e->diff($s);
 var_dump($d->days); // 30 ... and should be 30
 
@@ -39,7 +39,7 @@ This test just proves that the $e date is important BUT NOT because it's the one
 on, that's just coincidental that seems to imply that the "- 1 second" in the date string is the problem.
 */
 $s = new DateTime($ss);
-$e = (new DateTime(null))->setTimestamp(strtotime($es)); // verbose setup method
+$e = (new DateTime("now"))->setTimestamp(strtotime($es)); // verbose setup method
 $d= $s->diff($e);
 var_dump($d->days); // 30 ... and should be 30
 
index e03386ad3c4f44c4585521e632ba59a51b975ec9..afac12b7a33a47d93c798a1b048ad0eff172a77c 100644 (file)
@@ -8,5 +8,7 @@ $i = date_interval_create_from_date_string(null);
 var_dump($i);
 ?>
 --EXPECTF--
+Deprecated: date_interval_create_from_date_string(): Passing null to parameter #1 ($datetime) of type string is deprecated in %s on line %d
+
 Warning: date_interval_create_from_date_string(): Unknown or bad format () at position 0 ( ): Empty string in %sdate_interval_create_from_date_string_nullparam.php on line 2
 bool(false)
index c22dc3011aa513f5a8ad3e688017a2e84e271019..2e5894bc240892e82820cb647b83d645ba7b1742 100644 (file)
@@ -13,7 +13,8 @@ $dtms021 = date_create();
 
 var_dump(date_timestamp_set($dtms021, null));
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: date_timestamp_set(): Passing null to parameter #2 ($timestamp) of type int is deprecated in %s on line %d
 object(DateTime)#1 (3) {
   ["date"]=>
   string(26) "1970-01-01 00:00:00.000000"
diff --git a/ext/date/tests/microtime_error.phpt b/ext/date/tests/microtime_error.phpt
deleted file mode 100644 (file)
index ce13875..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
---TEST--
-Test wrong number of arguments for microtime()
---FILE--
-<?php
-/*
- * Function is implemented in ext/standard/microtime.c
-*/
-
-echo "\n-- Bad Arg types --\n";
-
-$bad_args = array(null,
-                  1.5,
-                  "hello",
-                  array('k'=>'v', array(0)),
-                  new stdClass,
-                  1);
-foreach ($bad_args as $bad_arg) {
-    echo "\n--> bad arg: ";
-    var_dump($bad_arg);
-    try {
-        var_dump(microtime($bad_arg));
-    } catch (TypeError $e) {
-        echo $e->getMessage(), "\n";
-    }
-}
-
-?>
---EXPECTF--
--- Bad Arg types --
-
---> bad arg: NULL
-string(%d) "%s %s"
-
---> bad arg: float(1.5)
-float(%s)
-
---> bad arg: string(5) "hello"
-float(%s)
-
---> bad arg: array(2) {
-  ["k"]=>
-  string(1) "v"
-  [0]=>
-  array(1) {
-    [0]=>
-    int(0)
-  }
-}
-microtime(): Argument #1 ($as_float) must be of type bool, array given
-
---> bad arg: object(stdClass)#%d (0) {
-}
-microtime(): Argument #1 ($as_float) must be of type bool, stdClass given
-
---> bad arg: int(1)
-float(%s)
index e896116818a51d19b5cd4384bed085567064f3d4..966b44a629d82ce381faaafc28ce53793e58e4fa 100644 (file)
@@ -31,7 +31,7 @@ check(dba_handlers());
 
 echo "Test 2\n";
 
-check(dba_handlers(null));
+check(dba_handlers(false));
 
 echo "Test 3\n";
 
index 12b45a491bd045cfe5adc28dda510a7caa441bd4..4e724585f1db99bac5cdc0920638cdf2d3bd2a0d 100644 (file)
@@ -9,7 +9,7 @@ require_once __DIR__ .'/skipif.inc';
 ?>
 --FILE--
 <?php
-$filename = null;
+$filename = '';
 $doc = new DOMDocument('1.0');
 $root = $doc->createElement('html');
 $root = $doc->appendChild($root);
index 71d88bbd43f03627c2f53673330c9018010b52e8..fb11aa89210ff1306b6e47e86642bd2ccf2b320f 100644 (file)
@@ -16,11 +16,6 @@ try {
 } catch (\ValueError $e) {
     echo $e->getMessage() . \PHP_EOL;
 }
-try {
-    var_dump(finfo_file($fp, NULL));
-} catch (\ValueError $e) {
-    echo $e->getMessage() . \PHP_EOL;
-}
 var_dump(finfo_file($fp, '.'));
 var_dump(finfo_file($fp, '&'));
 
@@ -28,7 +23,6 @@ var_dump(finfo_file($fp, '&'));
 --EXPECTF--
 finfo_file(): Argument #1 ($finfo) must not contain any null bytes
 finfo_file(): Argument #1 ($finfo) cannot be empty
-finfo_file(): Argument #1 ($finfo) cannot be empty
 string(9) "directory"
 
 Warning: finfo_file(&): Failed to open stream: No such file or directory in %s on line %d
index 0edc241efdc6a145dd4c7bdeddd27974c102a7d9..32ede68034e20a18c6c2151b7dc5ea477ac2325a 100644 (file)
@@ -5,18 +5,18 @@ filter_var() and FILTER_VALIDATE_MAC
 --FILE--
 <?php
 $values = Array(
-    array("01-23-45-67-89-ab", null),
+    array("01-23-45-67-89-ab", 0),
     array("01-23-45-67-89-ab", array("options" => array("separator" => "-"))),
     array("01-23-45-67-89-ab", array("options" => array("separator" => "."))),
     array("01-23-45-67-89-ab", array("options" => array("separator" => ":"))),
-    array("01-23-45-67-89-AB", null),
-    array("01-23-45-67-89-aB", null),
-    array("01:23:45:67:89:ab", null),
-    array("01:23:45:67:89:AB", null),
-    array("01:23:45:67:89:aB", null),
-    array("01:23:45-67:89:aB", null),
-    array("xx:23:45:67:89:aB", null),
-    array("0123.4567.89ab", null),
+    array("01-23-45-67-89-AB", 0),
+    array("01-23-45-67-89-aB", 0),
+    array("01:23:45:67:89:ab", 0),
+    array("01:23:45:67:89:AB", 0),
+    array("01:23:45:67:89:aB", 0),
+    array("01:23:45-67:89:aB", 0),
+    array("xx:23:45:67:89:aB", 0),
+    array("0123.4567.89ab", 0),
     array("01-23-45-67-89-ab", array("options" => array("separator" => "--"))),
     array("01-23-45-67-89-ab", array("options" => array("separator" => ""))),
 );
index 7c57a2670b9ff138b0ac06007dc7708b8b2f18a0..7ad83e81b0876f7ad5d247f5b344adb60349b44b 100644 (file)
@@ -19,9 +19,13 @@ foreach (array(null, true, false, 1, "", new stdClass) as $invalid) {
 }
 ?>
 --EXPECTF--
+Deprecated: filter_input_array(): Passing null to parameter #2 ($options) of type array|int is deprecated in %s on line %d
+
 Warning: filter_input_array(): Unknown filter with ID 0 in %s on line %d
 bool(false)
 
+Deprecated: filter_var_array(): Passing null to parameter #2 ($options) of type array|int is deprecated in %s on line %d
+
 Warning: filter_var_array(): Unknown filter with ID 0 in %s on line %d
 bool(false)
 
index 0af49bf38c55a6e7a7acb66bb7b71cc763f07edf..58bd1cf1e884ed2ceb0c0a03d3f6029b6b4ac491 100644 (file)
@@ -14,7 +14,7 @@ require __DIR__  . '/func.inc';
 $image = imagecreatetruecolor(50, 50);
 
 trycatch_dump(
-    fn() => imagetruecolortopalette($image, true, null)
+    fn() => imagetruecolortopalette($image, true, 0)
 );
 
 ?>
index 78c286cc8385be76176f920dfcb303cf2e3632e3..800878e27861abb7c09666badae450c019c0727f 100644 (file)
@@ -628,7 +628,7 @@ static zend_result convert_to_gmp(mpz_t gmpnumber, zval *val, zend_long base, ui
        }
        default: {
                zend_long lval;
-               if (!zend_parse_arg_long_slow(val, &lval)) {
+               if (!zend_parse_arg_long_slow(val, &lval, arg_pos)) {
                        zend_argument_type_error(arg_pos, "must be of type GMP|string|int, %s given", zend_zval_type_name(val));
                        return FAILURE;
                }
index fdea4174d6fc9168a73221604c76ae9a9d06e134..4256b570e45b60867b6cfad76d0a57b4ef8b82a6 100644 (file)
@@ -37,7 +37,7 @@ catch (\Error $e) {
 
 
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing hash_init(): error conditions ***
 
 -- Testing hash_init() function with unknown algorithms --
@@ -48,4 +48,6 @@ hash_init(): Argument #1 ($algo) must be a cryptographic hashing algorithm if HM
 
 -- Testing hash_init() function with HASH_HMAC and no key --
 hash_init(): Argument #3 ($key) cannot be empty when HMAC is requested
+
+Deprecated: hash_init(): Passing null to parameter #3 ($key) of type string is deprecated in %s on line %d
 hash_init(): Argument #3 ($key) cannot be empty when HMAC is requested
index 59a8668957d65d683ec39b092b05e2964cde7d0a..b6af4749e8bab215e71abcfc430d2964d95ac36c 100644 (file)
@@ -5,7 +5,7 @@ iconv_mime_decode() charset parameter length checks (CVE-2007-4840)
 --FILE--
 <?php
 $a = str_repeat("/", 9000000);
-var_dump(iconv_mime_decode("a", null, $a));
+var_dump(iconv_mime_decode("a", 0, $a));
 ?>
 --EXPECTF--
 Warning: iconv_mime_decode(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
index 818b599500adeb0cc2a1546d2d9d1ff85d8be53b..1ef41213051ed1f9b4d826cda8d5eb421651aa36 100644 (file)
@@ -5,7 +5,7 @@ iconv_mime_decode_headers() charset parameter length checks (CVE-2007-4840)
 --FILE--
 <?php
 $a = str_repeat("/", 9000000);
-var_dump(iconv_mime_decode_headers("a", null, $a));
+var_dump(iconv_mime_decode_headers("a", 0, $a));
 ?>
 --EXPECTF--
 Warning: iconv_mime_decode_headers(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
index b8d33e675839e2ced214dbc5a6ab55b0a45b8bbd..c2c8f155172b597951f56ce7309125b551e10367 100644 (file)
@@ -9,7 +9,7 @@ extension_loaded('imap') or die('skip imap extension not available in this build
 
 $address = 'John Doe <john@example.com>';
 var_dump($address);
-imap_rfc822_parse_adrlist($address, null);
+imap_rfc822_parse_adrlist($address, '');
 var_dump($address);
 
 ?>
index 11f89df535a4625516856c2965853d3bd7cf1414..b143a7eda2a53569f178e1f36ce23902ff7d50c2 100644 (file)
@@ -15,8 +15,10 @@ foreach (['', 1, NULL, $x] as $value) {
 }
 
 ?>
---EXPECT--
+--EXPECTF--
 NumberFormatter::format(): Argument #1 ($num) must be of type int|float, string given
 string(1) "1"
+
+Deprecated: NumberFormatter::format(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 string(1) "0"
 NumberFormatter::format(): Argument #1 ($num) must be of type int|float, NumberFormatter given
index 05336969e222d0469ae6014715f6c597693223da..c2017d74705a023a71752dd0576015e43be54c9c 100644 (file)
@@ -6,8 +6,7 @@ Bug #72241: get_icu_value_internal out-of-bounds read
 <?php
 $var1=str_repeat("A", 1000);
 $out = locale_get_primary_language($var1);
-echo strlen($out) . PHP_EOL;
-echo unpack('H*', $out)[1] . PHP_EOL;
+var_dump($out);
 ?>
 --EXPECT--
-0
+NULL
index 15c725bc4fb5f2ab044e1371dca4a8189fec0680..9be10e293583ed111c9c84b8ce3262b24033d161 100644 (file)
@@ -71,12 +71,11 @@ function ut_main()
         array( 'ab'  , 'b'  ),
         array( 'ab'  , 'a'  ),
         array( 123  , 'abc' ),
-        array( 'ac' , null  ),
+        array( 'ac' , ''    ),
         array( '.'  , '.'   ),
         // Try to compare long strings.
         array( 'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcde',
                'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdea'),
-        array( null , null  )
     );
 
     $res_str .= compare_pairs( 'en_US', $test_params );
@@ -91,7 +90,7 @@ function ut_main()
         array( 'а',   'b' ),
         array( 'а',   'bb' ),
         array( 'а',   'ab' ),
-        array( 'а',   null )
+        array( 'а',   '' )
     );
 
     $res_str .= compare_pairs( 'ru_RU', $test_params );
@@ -120,10 +119,9 @@ ut_run();
 'ab' < 'b'
 'ab' > 'a'
 123 < 'abc'
-'ac' > NULL
+'ac' > ''
 '.' = '.'
 'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcde' < 'abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdea'
-NULL = NULL
 'а' < 'б'
 'а' < 'аа'
 'аб' < 'ба'
@@ -131,5 +129,5 @@ NULL = NULL
 'а' < 'b'
 'а' < 'bb'
 'а' < 'ab'
-'а' > NULL
+'а' > ''
 'y' < 'k'
index 8ac0154d4fcf2e8d934c7a223fcd22d37e4a4bff..12dd66aece606a0206b34f3a3f615fc5de4e6d96 100644 (file)
@@ -33,7 +33,7 @@ function ut_main()
     $test_params = array(
         'abc', 'abd', 'aaa',
         'аа', 'а', 'z',
-        '', null , '3',
+        '', '3',
         'y'  , 'i'  , 'k'
     );
 
@@ -70,8 +70,6 @@ source: z
 key: 5c01050105
 source: 
 key: 0101
-source: 
-key: 0101
 source: 3
 key: 1901050105
 source: y
index 937a52f0989cb15a42f9a9a485d6901129f3edba..1d9ca341287f7d53cc6ae8e67fbb1697661f295b 100644 (file)
@@ -107,6 +107,18 @@ ArgumentCountError: NumberFormatter::create() expects at least 2 arguments, 0 gi
 Error: NumberFormatter object is already constructed in %s on line %d
 'U_ZERO_ERROR'
 
+Deprecated: NumberFormatter::__construct(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
+
+Deprecated: NumberFormatter::__construct(): Passing null to parameter #2 ($style) of type int is deprecated in %s on line %d
+
+Deprecated: NumberFormatter::create(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
+
+Deprecated: NumberFormatter::create(): Passing null to parameter #2 ($style) of type int is deprecated in %s on line %d
+
+Deprecated: numfmt_create(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
+
+Deprecated: numfmt_create(): Passing null to parameter #2 ($style) of type int is deprecated in %s on line %d
+
 IntlException: Constructor failed in %s on line %d
 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
 'numfmt_create: number formatter creation failed: U_UNSUPPORTED_ERROR'
index 2bc87c723d89b158af18ae8ce2df59a9cf8f1966..4ddcca32289e4120cdc5154ff2812ba0f7dd7f3e 100644 (file)
@@ -29,7 +29,7 @@ try {
     echo $e->getMessage(), "\n";
 }
 try {
-    var_dump(new IntlGregorianCalendar(1,2,3,4,NULL,array()));
+    var_dump(new IntlGregorianCalendar(1,2,3,4,5,array()));
 } catch (TypeError $e) {
     echo $e->getMessage(), "\n";
 }
index 22dae52d77d28e9f6b49d7f4e577fb37db6ec7e6..1a225fe62031ffcd9897197dd4dc9964ba94aa27 100644 (file)
@@ -10,7 +10,7 @@ ini_set("intl.error_level", E_WARNING);
 
 date_default_timezone_set('Europe/Amsterdam');
 
-$intlcal = intlgregcal_create_instance(2012, 1, 29, 16, 0, NULL);
+$intlcal = intlgregcal_create_instance(2012, 1, 29, 16, 0, 0);
 var_dump($intlcal->getTimeZone()->getId());
 var_dump($intlcal->getTime(), (float)strtotime('2012-02-29 16:00:00') * 1000);
 
index f604de07276948101065bc0b4dd18fc931046e7b..8823e36a6f61d6115d21b64eadc9d58a104cb087 100644 (file)
@@ -126,9 +126,21 @@ ArgumentCountError: msgfmt_create() expects exactly 2 arguments, 1 given in %s o
 ArgumentCountError: MessageFormatter::create() expects exactly 2 arguments, 1 given in %s on line %d
 'U_ZERO_ERROR'
 
+Deprecated: MessageFormatter::__construct(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
+
+Deprecated: MessageFormatter::__construct(): Passing null to parameter #2 ($pattern) of type string is deprecated in %s on line %d
+
 IntlException: msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR in %s on line %d
 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
+
+Deprecated: MessageFormatter::create(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
+
+Deprecated: MessageFormatter::create(): Passing null to parameter #2 ($pattern) of type string is deprecated in %s on line %d
 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
+
+Deprecated: msgfmt_create(): Passing null to parameter #1 ($locale) of type string is deprecated in %s on line %d
+
+Deprecated: msgfmt_create(): Passing null to parameter #2 ($pattern) of type string is deprecated in %s on line %d
 'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
 
 IntlException: msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR in %s on line %d
index 4a2675b01f16f12bc00bf9d9bcc3cfbe64c488e7..fdc013dea41c96d0dcbfa80d67697a3b7234b0ec 100644 (file)
@@ -142,7 +142,7 @@ function ut_nfmt_create( $locale, $style, $pattern = null )
         return numfmt_create( $locale, $style, $pattern );
     }
 }
-function ut_nfmt_format( $fmt, $number, $type = null )
+function ut_nfmt_format( $fmt, $number, $type = NumberFormatter::TYPE_DEFAULT )
 {
     return $GLOBALS['oo-mode'] ? $fmt->format( $number, $type ) : numfmt_format( $fmt, $number, $type );
 }
index b7e6003ac5eb561785e5780c8fc558073ecc491b..12ff6c15ef58aa28ac2765f846af5951d7ec0998 100644 (file)
@@ -31,6 +31,8 @@ NULL
 NULL
 NULL
 NULL
+
+Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in %s on line %d
 NULL
 object(stdClass)#%d (1) {
   ["test"]=>
index b7d7deafc689b8dd9fbb47b8cfe5a7d5f6bf6fdb..4d076c4b50b17c7a1b7b378b3c5d4f01be5dc5fb 100644 (file)
@@ -2,8 +2,6 @@
 Bug #69187 json_last_error return BC in PHP7
 --FILE--
 <?php
-var_dump(json_decode(NULL));
-var_dump(json_last_error());
 var_dump(json_decode(FALSE));
 var_dump(json_last_error());
 var_dump(json_decode(""));
@@ -33,8 +31,6 @@ NULL
 int(4)
 NULL
 int(4)
-NULL
-int(4)
 int(0)
 int(0)
 int(1)
index 500df25af79bd3955fa5e1acd26880dce2aae068..a37aa38ea17646d4cbc57cd8564208c644c96522 100644 (file)
@@ -3,14 +3,14 @@ Bug #72069 (Behavior \JsonSerializable different from json_encode)
 --FILE--
 <?php
 
-$result = json_encode(['end' => json_decode(null, true)]);
+$result = json_encode(['end' => json_decode('', true)]);
 var_dump($result);
 
 class A implements \JsonSerializable
 {
     function jsonSerialize()
     {
-        return ['end' => json_decode(null, true)];
+        return ['end' => json_decode('', true)];
     }
 }
 $a = new A();
index 6dfcf4468070f3e2aaebaa2b9b112203b97d05c1..f5e46eb615ac7cd6e9353fffae0479cc1c8435c0 100644 (file)
@@ -8,7 +8,7 @@ Chad Sikorra <Chad.Sikorra@gmail.com>
 <?php
 $subject = " Joe,= \rSmith ";
 
-var_dump(ldap_escape($subject, null, LDAP_ESCAPE_DN));
+var_dump(ldap_escape($subject, '', LDAP_ESCAPE_DN));
 ?>
 --EXPECT--
 string(24) "\20Joe\2c\3d \0dSmith\20"
index 8e50a750e284ed8ef2113952344df6b80cec9e7d..0a02aca2edc0b976906cc75c2e24c5755842a7d9 100644 (file)
@@ -9,11 +9,11 @@ require_once('skipif.inc');
 /* We are assuming 3333 is not connectable */
 $ldap = ldap_connect('127.0.0.1', 3333);
 
-ldap_mod_replace($ldap, null, array(
+ldap_mod_replace($ldap, '', array(
     'lockoutTime' => array(0),
 ));
 
-ldap_modify_batch($ldap, null, array(    [
+ldap_modify_batch($ldap, '', array(    [
     "attrib"  => "mail",
     "modtype" => LDAP_MODIFY_BATCH_ADD,
     "values"  => [
index 424a4575affaeccdd86643d3582a2e2451d6291e..6c8c970b98ca3e21a5b50f95cd53a097af35556a 100644 (file)
@@ -7,7 +7,7 @@ ldap_escape() test filter and DN
 
 $subject = 'foo=bar(baz)*';
 
-var_dump(ldap_escape($subject, null, LDAP_ESCAPE_DN | LDAP_ESCAPE_FILTER));
+var_dump(ldap_escape($subject, '', LDAP_ESCAPE_DN | LDAP_ESCAPE_FILTER));
 
 ?>
 --EXPECT--
index d80e02dee73dae22ad9c45a9fbf1c554618105eb..fd2ffb2567567fea3b0547fc7a571e3073af91ec 100644 (file)
@@ -7,7 +7,7 @@ ldap_escape() test DN
 
 $subject = 'foo=bar(baz)*';
 
-var_dump(ldap_escape($subject, null, LDAP_ESCAPE_DN));
+var_dump(ldap_escape($subject, '', LDAP_ESCAPE_DN));
 
 ?>
 --EXPECT--
index d156f56c87a7a1fb6c8174084c3587dca096c136..5f0be7f40a0de264cf5fc8101d3d882c9670a093 100644 (file)
@@ -7,7 +7,7 @@ ldap_escape() test filter
 
 $subject = 'foo=bar(baz)*';
 
-var_dump(ldap_escape($subject, null, LDAP_ESCAPE_FILTER));
+var_dump(ldap_escape($subject, '', LDAP_ESCAPE_FILTER));
 
 ?>
 --EXPECT--
index d5c731870cf12e5d7743d2148d5aac4d151ebb10..f0865dee62150ca09df8e492ceb5055cdc602765 100644 (file)
@@ -8,7 +8,7 @@ if (!extension_loaded('ldap')) die('skip ldap extension not available');
 <?php
 $array = [123, 456, 789];
 try {
-  ldap_read(null, null, null, $array);
+  ldap_read(null, '', '', $array);
 } catch (TypeError $err) {}
 var_dump($array);
 ?>
index 5bd351a741d208c1ead986307d0d8518f661930f..01a96fd86a383f57b467b64d9ae5b65fb5672643 100644 (file)
@@ -20,7 +20,7 @@ ldap_set_option($link, LDAP_OPT_NETWORK_TIMEOUT, 44);
 
 insert_dummy_data($link, $base);
 var_dump(
-    $result = ldap_search($link, "$base", "(objectClass=person)", array(), null, 111, 22, LDAP_DEREF_NEVER),
+    $result = ldap_search($link, "$base", "(objectClass=person)", array(), 0, 111, 22, LDAP_DEREF_NEVER),
     ldap_get_entries($link, $result)
 );
 var_dump(
index d41bf90a9fc83631559f3443e0d248aaa485474f..9c84a7464ac7cda9e6f327b09191614e6efbf9d8 100644 (file)
@@ -13,10 +13,7 @@ function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build
  * pattern is supplied to mb_ereg. Similar error message to ereg().
  */
 
-$unset_var = 10;
-unset ($unset_var);
-$inputs = array(NULL, null, false, FALSE, "", '', @$undefined_var,
-@$unset_var);
+$inputs = array(false, FALSE, "", '');
 
 $iterator = 1;
 foreach($inputs as $input) {
@@ -70,31 +67,3 @@ mb_ereg(): Argument #1 ($pattern) must not be empty
 With $regs arg:
 mb_ereg(): Argument #1 ($pattern) must not be empty
 NULL
-
--- Iteration 5 --
-Without $regs arg:
-mb_ereg(): Argument #1 ($pattern) must not be empty
-With $regs arg:
-mb_ereg(): Argument #1 ($pattern) must not be empty
-NULL
-
--- Iteration 6 --
-Without $regs arg:
-mb_ereg(): Argument #1 ($pattern) must not be empty
-With $regs arg:
-mb_ereg(): Argument #1 ($pattern) must not be empty
-NULL
-
--- Iteration 7 --
-Without $regs arg:
-mb_ereg(): Argument #1 ($pattern) must not be empty
-With $regs arg:
-mb_ereg(): Argument #1 ($pattern) must not be empty
-NULL
-
--- Iteration 8 --
-Without $regs arg:
-mb_ereg(): Argument #1 ($pattern) must not be empty
-With $regs arg:
-mb_ereg(): Argument #1 ($pattern) must not be empty
-NULL
index eff18982d5ea5b744e39701ea1cea55b0528ad25..3e04f0f0f792466905e4e717e7294b17ee03c10d 100644 (file)
@@ -9,7 +9,7 @@ if (!function_exists('mb_ereg')) die('skip mbregex support not available');
 <?php
 $var0 = "e";
 $var2 = "";
-$var3 = NULL;
+$var3 = "";
 try {
     $var8 = mb_ereg_replace($var2,$var3,$var3,$var0);
     var_dump($var8);
index ea57017f1167c4511b843f766e7192d03ab918b7..83befc1071cedaeb8157230f597151186306f4b8 100644 (file)
@@ -9,5 +9,6 @@ if (!function_exists('mb_ereg')) die('skip mbregex support not available');
 <?php
 var_dump(mb_ereg_search_init(NULL));
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: mb_ereg_search_init(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
 bool(true)
index 90af39cf581466724e2caa0fb5416fe97acaf16c..dfa2e18eb0823887d162b379b40e87c07d047c22 100644 (file)
@@ -16,10 +16,6 @@ $replacement = 'string_val';
 $string = 'string_val';
 $option = '';
 
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
 // get a class
 class classA
 {
@@ -49,10 +45,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*10*/ NULL,
-       null,
-
        // boolean data
 /*12*/ true,
        false,
@@ -71,12 +63,6 @@ $inputs = array(
        // object data
 /*21*/ new classA(),
 
-       // undefined data
-/*22*/ @$undefined_var,
-
-       // unset data
-/*23*/ @$unset_var,
-
 );
 
 // loop through each element of the array for pattern
@@ -121,7 +107,7 @@ string(10) "string_val"
 string(10) "string_val"
 
 -- Iteration 10 --
-string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val"
+string(10) "string_val"
 
 -- Iteration 11 --
 string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val"
@@ -133,32 +119,20 @@ 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"
+string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val"
 
 -- Iteration 15 --
 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"
+string(10) "string_val"
 
 -- Iteration 17 --
-string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val"
+string(10) "string_val"
 
 -- Iteration 18 --
 string(10) "string_val"
 
 -- Iteration 19 --
 string(10) "string_val"
-
--- Iteration 20 --
-string(10) "string_val"
-
--- Iteration 21 --
-string(10) "string_val"
-
--- Iteration 22 --
-string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val"
-
--- Iteration 23 --
-string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val"
 Done
index fc99a487472a205ad82f4ae7a92b21170849c095..07376dc911a29d194bd49ccd2014f9d6c1830e31 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Optional long parameter might be null
+Optional long parameter might be null (deprecated)
 --SKIPIF--
 <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
 --FILE--
@@ -16,15 +16,32 @@ echo mb_substr('foobarbaz', 6, null, 'UTF-8') . "\n";
 echo mb_strcut('foobarbaz', 6, null, 'UTF-8') . "\n";
 echo mb_strimwidth('foobar', 0, 3, null, 'UTF-8') . "\n";
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: mb_strpos(): Passing null to parameter #3 ($offset) of type int is deprecated in %s on line %d
 1
+
+Deprecated: mb_strrpos(): Passing null to parameter #3 ($offset) of type int is deprecated in %s on line %d
 2
+
+Deprecated: mb_stripos(): Passing null to parameter #3 ($offset) of type int is deprecated in %s on line %d
 1
+
+Deprecated: mb_strripos(): Passing null to parameter #3 ($offset) of type int is deprecated in %s on line %d
 2
+
+Deprecated: mb_strstr(): Passing null to parameter #3 ($before_needle) of type bool is deprecated in %s on line %d
 barbaz
+
+Deprecated: mb_strrchr(): Passing null to parameter #3 ($before_needle) of type bool is deprecated in %s on line %d
 baz
+
+Deprecated: mb_stristr(): Passing null to parameter #3 ($before_needle) of type bool is deprecated in %s on line %d
 barbaz
+
+Deprecated: mb_strrichr(): Passing null to parameter #3 ($before_needle) of type bool is deprecated in %s on line %d
 baz
 baz
 baz
+
+Deprecated: mb_strimwidth(): Passing null to parameter #4 ($trim_marker) of type string is deprecated in %s on line %d
 foo
index 9157a13b9ab32a89ad3fc223a12e338b30700583..e1568d30385f450785c865ca7c6e573f65012bdc 100644 (file)
@@ -12,13 +12,14 @@ class DbConnection {
     public function connect() {
         require_once("connect.inc");
 
-        $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
+        /* Pass false as $connect_flags cannot be accessed via globals. */
+        $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket, false);
         var_dump($link);
 
         $link = mysqli_init();
         var_dump($link);
 
-        $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
+        $mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket, false);
         $mysql->query("DROP TABLE IF EXISTS test_warnings");
         $mysql->query("CREATE TABLE test_warnings (a int not null)");
         $mysql->query("SET sql_mode=''");
index 4d024755708349ca93339b357ddc9a9049b22448..c0815c7f0471367525b10d33d0a824129d4417b8 100644 (file)
@@ -12,11 +12,11 @@ if (!$IS_MYSQLND) {
 <?php
 error_reporting(E_ALL);
 $tablica = array();
-$test1 = mysqli_poll($test2, $test3, $tablica, null);
+$test1 = mysqli_poll($test2, $test3, $tablica, 0);
 
 $test2 = array();
 $test2 = array();
-$test1 = mysqli_poll($test2, $test3, $tablica, null);
+$test1 = mysqli_poll($test2, $test3, $tablica, 0);
 echo "okey";
 ?>
 --EXPECTF--
index bec08cc1e1d3baccf974c26f7cfcec2beaa5aa69..d2c0fc6df6435d776f1a26d766eda53112a540e0 100644 (file)
@@ -11,9 +11,8 @@ require_once('skipifconnectfailure.inc');
 
     require('table.inc');
 
-    // Zend will cast the NULL to 0
     try {
-        mysqli_kill($link, null);
+        mysqli_kill($link, 0);
     } catch (\ValueError $e) {
         echo $e->getMessage() . \PHP_EOL;
     }
index f2428aeb92785fe3d332c04e5c2c17c6ac7957ef..9a0e52d5cb7befa9e55a6d07099f0bb7bdb3c9da 100644 (file)
@@ -35,12 +35,12 @@ if (!function_exists('mysqli_stmt_get_result'))
             printf("[004] It is very unlikely that SHOW ENGINES returns no data, check manually\n");
         } else {
             $found = false;
-            foreach ($engines as $k => $engine)
-                foreach ($engine as $k => $v)
-                    if (stristr($v, 'MyISAM')) {
-                        $found = true;
-                        break;
-                    }
+            foreach ($engines as $engine) {
+                if (stristr($engine[0], 'MyISAM')) {
+                    $found = true;
+                    break;
+                }
+            }
             if (!$found)
                 printf("[005] It is very unlikely that SHOW ENGINES does not show MyISAM, check manually\n");
         }
index 062985d55f5407a4d481031cc53336eafb95c21b..353ae1e81a2f22010d7b8f50355da2cceb003f2b 100644 (file)
@@ -22,6 +22,12 @@ var_dump(odbc_fetch_row($result));
 --EXPECTF--
 resource(%d) of type (odbc result)
 bool(false)
+
+Deprecated: odbc_columnprivileges(): Passing null to parameter #3 ($schema) of type string is deprecated in %s on line %d
+
+Deprecated: odbc_columnprivileges(): Passing null to parameter #4 ($table) of type string is deprecated in %s on line %d
+
+Deprecated: odbc_columnprivileges(): Passing null to parameter #5 ($column) of type string is deprecated in %s on line %d
 resource(%d) of type (odbc result)
 bool(false)
 resource(%d) of type (odbc result)
index 13ee520b79aa0d0bc8bc39c7a66c6d2b4ab107a1..74c67872d35e2534c19927eee4bda0fa70f6882a 100644 (file)
@@ -24,7 +24,7 @@ foreach ($methods as $method) {
 
 // no IV
 var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
-    NULL, $test['tag'], $test['aad']));
+    '', $test['tag'], $test['aad']));
 // failed because no AAD
 var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
     $test['iv'], $test['tag']));
index 223c9e72c4df9d5d93f217576061bbed8f962f26..bfec7240dffe99e71692dd8cd3cae39969d4e793 100644 (file)
@@ -22,7 +22,7 @@ foreach ($tests as $idx => $test) {
 
 // no IV
 var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
-    NULL, $test['tag'], $test['aad']));
+    '', $test['tag'], $test['aad']));
 // failed because no AAD
 var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
     $test['iv'], $test['tag']));
index cea35501dd352331805852eaf3e63d7774ae5596..52b5d03c7de8bf38ce56d5e67e4ec5f61aa09d2c 100644 (file)
@@ -22,7 +22,7 @@ foreach ($tests as $idx => $test) {
 
 // no IV
 var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
-       NULL, $test['tag'], $test['aad']));
+       '', $test['tag'], $test['aad']));
 
 // IV too long
 var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
index 8c4c41f81870c52810754e0bf700c01ebaa0b45b..f4b773749a2b4dfe8377c7b91e9b731c192a29c4 100644 (file)
@@ -24,7 +24,7 @@ foreach ($methods as $method) {
 }
 
 // Empty IV error
-var_dump(openssl_encrypt('data', $method, 'password', 0, NULL, $tag, ''));
+var_dump(openssl_encrypt('data', $method, 'password', 0, '', $tag, ''));
 
 // Test setting different IV length and tag length
 var_dump(openssl_encrypt('data', $method, 'password', 0, str_repeat('x', 10), $tag, '', 14));
index 2b4a31b0f4cffbbd6b8873ed45effc058532addf..d976f4a5f32c788ee99b8bd4a97a70209a728668 100644 (file)
@@ -22,7 +22,7 @@ foreach ($tests as $idx => $test) {
 }
 
 // Empty IV error
-var_dump(openssl_encrypt('data', $method, 'password', 0, NULL, $tag, ''));
+var_dump(openssl_encrypt('data', $method, 'password', 0, '', $tag, ''));
 
 // Failing to retrieve tag (max is 16 bytes)
 var_dump(openssl_encrypt('data', $method, 'password', 0, str_repeat('x', 32), $tag, '', 20));
index ee35a37ce43b7e02b94b721c717de4095dda20b0..57106f7855fec4effaff55b93af525b658343ad2 100644 (file)
@@ -22,7 +22,7 @@ foreach ($tests as $idx => $test) {
 }
 
 // Empty IV error
-var_dump(openssl_encrypt('data', $method, 'password', 0, NULL, $tag, ''));
+var_dump(openssl_encrypt('data', $method, 'password', 0, '', $tag, ''));
 
 // Failing to retrieve tag (must be at most 16 bytes)
 var_dump(openssl_encrypt('data', $method, 'password', 0, str_repeat('x', 12), $tag, '', 20));
index 2f872960199ca7b80c3e49513d68abee5cf3a6d8..c1c886356b56746c4d385d1808d6c2c1e9ea7799 100644 (file)
@@ -29,9 +29,9 @@ if (PHP_EOL !== "\n") {
 
 var_dump(strcmp($output, $a));
 var_dump(strcmp($output, $output2));
-var_dump(strcmp($output, $output3));
-var_dump(strcmp($output, $output4)); // different
-var_dump(strcmp($output, $output5)); // different
+var_dump(strcmp($output, $output4));
+var_dump($output3);
+var_dump($output5);
 ?>
 --EXPECTF--
 bool(true)
@@ -44,5 +44,5 @@ openssl_x509_export(): Argument #1 ($certificate) must be of type OpenSSLCertifi
 int(0)
 int(0)
 int(%d)
-int(0)
-int(%d)
+NULL
+NULL
index c5f2a4b62050d931b7c6e77e4afae7fc2fd35bf2..582c54c5d22e6fce872eb778e5e01e389edc18c8 100644 (file)
@@ -29,10 +29,12 @@ $db = new PDO($dsn, $user, $pass, [PDO::ATTR_DEFAULT_STR_PARAM => PDO::PARAM_STR
 var_dump($db->getAttribute(PDO::ATTR_DEFAULT_STR_PARAM) === PDO::PARAM_STR_NATL);
 
 ?>
---EXPECT--
+--EXPECTF--
 string(3) "'1'"
 string(2) "''"
 string(4) "'42'"
+
+Deprecated: PDO::quote(): Passing null to parameter #1 ($string) of type string is deprecated in %s on line %d
 string(2) "''"
 string(4) "''''"
 string(5) "'foo'"
index 8cc2eceaa0c597b0eca95879bf3521e8a8870b46..0a7b9227e73239de61349db1688342e0630d9833 100644 (file)
@@ -10,7 +10,7 @@ phar.readonly=0
 --FILE--
 <?php
 $phar = __DIR__ . '/files/stuboflength1041.phar';
-foreach (new RecursiveIteratorIterator(new Phar($phar, null, 'stuboflength1041.phar')) as $item) {
+foreach (new RecursiveIteratorIterator(new Phar($phar, alias: 'stuboflength1041.phar')) as $item) {
     var_dump($item->getFileName());
 }
 ?>
index 40d908f1eeb01ac5302f8a9f7a5519a6f359eea6..4f5795842d03054c79c31c50cb0b2e988fa422aa 100644 (file)
@@ -13,9 +13,9 @@ var_dump(decoct(umask()));
 $sFile = tempnam(__DIR__, 'test77022');
 var_dump(decoct(stat($sFile)['mode']));
 
-foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) {
+foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $format => $ext) {
     clearstatcache();
-    $phar = new PharData(__DIR__ . '/test77022.' . $ext, null, null, $mode);
+    $phar = new PharData(__DIR__ . '/test77022.' . $ext, format: $format);
     $phar->addFile($sFile, 'test-file-phar');
     $phar->addFromString("test-from-string", 'test-file-phar');
     $phar->extractTo(__DIR__);
@@ -33,4 +33,4 @@ string(6) "100600"
 string(6) "100600"
 string(6) "100644"
 string(6) "100600"
-string(6) "100644"
\ No newline at end of file
+string(6) "100644"
index 512c4fb95c48c2621faaf83a20ca79ff76b8dc20..1c36db2b1a4473eef5f4e308d1b3efbe787d023f 100644 (file)
@@ -12,9 +12,9 @@ var_dump(decoct(umask()));
 chmod(__DIR__ . '/test79082/test79082-testfile', 0644);
 chmod(__DIR__ . '/test79082/test79082-testfile2', 0400);
 
-foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) {
+foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $format => $ext) {
     clearstatcache();
-    $phar = new PharData(__DIR__ . '/test79082.' . $ext, null, null, $mode);
+    $phar = new PharData(__DIR__ . '/test79082.' . $ext, format: $format);
     $phar->buildFromIterator(new \RecursiveDirectoryIterator(__DIR__ . '/test79082', \FilesystemIterator::SKIP_DOTS), __DIR__ . '/test79082');
     $phar->extractTo(__DIR__);
     var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode']));
@@ -22,9 +22,9 @@ foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) {
     unlink(__DIR__ . '/test79082-testfile');
     unlink(__DIR__ . '/test79082-testfile2');
 }
-foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) {
+foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $format => $ext) {
     clearstatcache();
-    $phar = new PharData(__DIR__ . '/test79082-d.' . $ext, null, null, $mode);
+    $phar = new PharData(__DIR__ . '/test79082-d.' . $ext, format: $format);
     $phar->buildFromDirectory(__DIR__ . '/test79082');
     $phar->extractTo(__DIR__);
     var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode']));
index f5279a93d20b1d80931e8d08ac5702a1202d9475..277271ef4c63b6f77d70683a1ffbbe6752e9932e 100644 (file)
@@ -35,7 +35,7 @@ foreach($files as $name => $cont)
     if (empty($ulen)) $ulen = strlen($cont);
     if (empty($clen)) $clen = strlen($comp);
     if (empty($crc32))$crc32= crc32((binary)$cont);
-    if (isset($meta)) $meta = serialize($meta);
+    $meta = isset($meta) ? serialize($meta) : "";
 
     // write manifest entry
     $manifest .= pack('V', strlen($name)) . (binary)$name;
index c77acfe3a488f4472fe78a3d008199b69d28bbcf..5800c594d7aa270270337993a32aaf17526c244c 100644 (file)
@@ -8,7 +8,7 @@ if (!function_exists('posix_initgroups')) die('skip posix_initgroups() not found
 --FILE--
 <?php
 
-var_dump(posix_initgroups(NULL, NULL));
+var_dump(posix_initgroups('', 0));
 
 ?>
 --EXPECT--
index a238f18186b0d98038b7873c7bfa7a6c20d06499..fc3258f069b85e766840ce43e9e243948238a39f 100644 (file)
@@ -8,7 +8,7 @@ if (!function_exists('posix_mknod')) die('skip posix_mknod() not found');
 --FILE--
 <?php
 
-var_dump(posix_mknod(NULL, NULL, NULL, NULL));
+var_dump(posix_mknod('', 0, 0, 0));
 
 ?>
 --EXPECT--
diff --git a/ext/posix/tests/posix_mknod_basic.phpt b/ext/posix/tests/posix_mknod_basic.phpt
deleted file mode 100644 (file)
index 568d8d3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---TEST--
-posix_mknod(): Basic tests
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
-if (!function_exists('posix_mknod')) die('skip posix_mknod() not found');
-?>
---FILE--
-<?php
-echo "Basic test of POSIX posix_mknod function\n";
-var_dump(posix_mknod(NULL, NULL, NULL, NULL));
-
-?>
-===DONE====
---EXPECT--
-Basic test of POSIX posix_mknod function
-bool(false)
-===DONE====
index 80602bce390fd9e0b1678a057bdc6b77d6bef484..24c4bffffa68092d8c71a387bc25289925c1ea25 100644 (file)
@@ -22,8 +22,6 @@ var_dump(pspell_config_runtogether($cfg, true));
 $p = pspell_new_config($cfg);
 var_dump(pspell_check($p, 'theoasis'));
 
-var_dump(pspell_config_runtogether($cfg, NULL))
-
 ?>
 --EXPECT--
 bool(true)
@@ -32,4 +30,3 @@ bool(false)
 ---
 bool(true)
 bool(true)
-bool(true)
index 6cc94bd1294f5de8a817431c7481fdf6545a6479..e6ff60af5c068963d074d15abf545ea5f709ab95 100644 (file)
@@ -15,7 +15,6 @@ $name = tempnam(sys_get_temp_dir(), 'readline.tmp');
 readline_add_history('foo');
 readline_add_history('');
 readline_add_history(1);
-readline_add_history(NULL);
 readline_write_history($name);
 
 var_dump(file_get_contents($name));
index 69739c488e7bab3679965812c06f5db3bbe2780c..e7013111e7154b0dbb577cbe352b01201a6f30fc 100644 (file)
@@ -16,7 +16,6 @@ $name = tempnam('/tmp', 'readline.tmp');
 readline_add_history('foo');
 readline_add_history('');
 readline_add_history(1);
-readline_add_history(NULL);
 readline_write_history($name);
 
 var_dump(file_get_contents($name));
@@ -25,9 +24,8 @@ unlink($name);
 
 ?>
 --EXPECT--
-string(21) "_HiStOrY_V2_
+string(20) "_HiStOrY_V2_
 foo
 
 1
-
 "
index 7b6b4112db9467559b2bf4914c7a6157558375c9..bd505d45f6651d5a79232d2ee49ffa8984d8aa48 100644 (file)
@@ -7,7 +7,7 @@ readline_add_history(): Basic test
 
 var_dump(readline_add_history('foo'));
 var_dump(readline_list_history());
-var_dump(readline_add_history(NULL));
+var_dump(readline_add_history(''));
 var_dump(readline_list_history());
 var_dump(readline_clear_history());
 
index bcbeb5efa45a3879c30d88057f48d4562492a0d0..b1e934c3b01a2a0444f8d06fd64ebd19cecbb046 100644 (file)
@@ -13,7 +13,6 @@ $name = tempnam('/tmp', 'readline.tmp');
 readline_add_history('foo');
 readline_add_history('');
 readline_add_history(1);
-readline_add_history(NULL);
 readline_write_history($name);
 
 var_dump(file_get_contents($name));
@@ -22,8 +21,7 @@ unlink($name);
 
 ?>
 --EXPECT--
-string(8) "foo
+string(7) "foo
 
 1
-
 "
index 7df620eaaa50ed0acfa8c312b68e901e2d9e1d83..adb3784347374896a22a762fd51703b7dbef1d52 100644 (file)
@@ -45,8 +45,10 @@ try {
 }
 
 ?>
---EXPECT--
+--EXPECTF--
 ReflectionClass::__construct() expects exactly 1 argument, 0 given
+
+Deprecated: ReflectionClass::__construct(): Passing null to parameter #1 ($objectOrClass) of type object|string is deprecated in %s on line %d
 Class "" does not exist
 Class "1" does not exist
 Class "1" does not exist
index ca9bc0ce2d1e05df4f4d60d3f24a7ac13965b969..d143006af9992a3ac62f284232ba127366ad7614 100644 (file)
@@ -8,7 +8,6 @@ class C {
 
 $rc = new ReflectionClass("C");
 echo "Check invalid params:\n";
-var_dump($rc->getConstant(null));
 var_dump($rc->getConstant(1));
 var_dump($rc->getConstant(1.5));
 var_dump($rc->getConstant(true));
@@ -18,4 +17,3 @@ Check invalid params:
 bool(false)
 bool(false)
 bool(false)
-bool(false)
index 827182288454fffb408b0224fb0daa373be23acc..9278b478754486e7b9c95ed77f03531e3d85289c 100644 (file)
@@ -54,10 +54,12 @@ try {
 
 
 ?>
---EXPECT--
+--EXPECTF--
 Check invalid params:
 ReflectionClass::getMethod() expects exactly 1 argument, 0 given
 ReflectionClass::getMethod() expects exactly 1 argument, 2 given
+
+Deprecated: ReflectionClass::getMethod(): Passing null to parameter #1 ($name) of type string is deprecated in %s on line %d
 Method C::() does not exist
 Method C::1() does not exist
 Method C::1.5() does not exist
index 80ef77c8a3b62c78331381dbbfedd88b106d8060..c2f8419a1ea7f234c36135432e2c6b72d2387810 100644 (file)
@@ -52,10 +52,12 @@ try {
     echo $e->getMessage() . "\n";
 }
 ?>
---EXPECT--
+--EXPECTF--
 Check invalid params:
 ReflectionClass::getProperty() expects exactly 1 argument, 0 given
 ReflectionClass::getProperty() expects exactly 1 argument, 2 given
+
+Deprecated: ReflectionClass::getProperty(): Passing null to parameter #1 ($name) of type string is deprecated in %s on line %d
 Property C::$ does not exist
 Property C::$1 does not exist
 Property C::$1.5 does not exist
index 4a5a5929d55ed9c5700286b1b8fe9f0080d69076..2b6fda05908409c2a20a3bdf2c6ac05c43d7af03 100644 (file)
@@ -38,9 +38,11 @@ try {
 
 
 ?>
---EXPECT--
+--EXPECTF--
 ReflectionClass::getStaticPropertyValue() expects at most 2 arguments, 3 given
 ReflectionClass::getStaticPropertyValue() expects at least 1 argument, 0 given
+
+Deprecated: ReflectionClass::getStaticPropertyValue(): Passing null to parameter #1 ($name) of type string is deprecated in %s on line %d
 Property C::$ does not exist
 string(3) "def"
 ReflectionClass::getStaticPropertyValue(): Argument #1 ($name) must be of type string, array given
index 5dcc7df173da300ca398f743697ad4823359634c..4e4c206ac23ee5be98fc306cabac889ce71393d0 100644 (file)
@@ -11,7 +11,6 @@ class C {
 
 $rc = new ReflectionClass("C");
 echo "Check invalid params:\n";
-var_dump($rc->hasConstant(null));
 var_dump($rc->hasConstant(1));
 var_dump($rc->hasConstant(1.5));
 var_dump($rc->hasConstant(true));
@@ -21,4 +20,3 @@ Check invalid params:
 bool(false)
 bool(false)
 bool(false)
-bool(false)
index 2bbc84551ef7598b7848490982d3ead88d552aca..5e175fbb7e5dac97e2eafaa3f5887c43aaeaed7d 100644 (file)
@@ -11,7 +11,6 @@ class C {
 
 $rc = new ReflectionClass("C");
 echo "Check invalid params:\n";
-var_dump($rc->hasMethod(null));
 var_dump($rc->hasMethod(1));
 var_dump($rc->hasMethod(1.5));
 var_dump($rc->hasMethod(true));
@@ -21,4 +20,3 @@ Check invalid params:
 bool(false)
 bool(false)
 bool(false)
-bool(false)
index 607fead65ca71028b75aab48e591278d7a7521c2..14b4520e07ef0350980bf9aa6eb1f6bfd279f491 100644 (file)
@@ -11,7 +11,6 @@ class C {
 
 $rc = new ReflectionClass("C");
 echo "Check invalid params:\n";
-var_dump($rc->hasProperty(null));
 var_dump($rc->hasProperty(1));
 var_dump($rc->hasProperty(1.5));
 var_dump($rc->hasProperty(true));
@@ -21,4 +20,3 @@ Check invalid params:
 bool(false)
 bool(false)
 bool(false)
-bool(false)
index 5fb158cb8d9a93659a6484887d29a849259d822c..7af12f07b7013eaae77a1ef6aed03898d1ce653e 100644 (file)
@@ -65,7 +65,7 @@ try {
     echo $e->getMessage() . "\n";
 }
 ?>
---EXPECT--
+--EXPECTF--
 Does A implement A?
    - Using object argument: A is not an interface
    - Using string argument: A is not an interface
@@ -146,6 +146,8 @@ Does I2 implement I2?
 Test bad arguments:
 ReflectionClass::implementsInterface() expects exactly 1 argument, 0 given
 ReflectionClass::implementsInterface() expects exactly 1 argument, 2 given
+
+Deprecated: ReflectionClass::implementsInterface(): Passing null to parameter #1 ($interface) of type ReflectionClass|string is deprecated in %s on line %d
 Interface "" does not exist
 Interface "ThisClassDoesNotExist" does not exist
 Interface "2" does not exist
index 51fc52b8ee6bd76c3fca28885543cb5a93d0a0bf..db3961b3e649489829bf892488f07006242e6dc2 100644 (file)
@@ -35,10 +35,12 @@ try {
     echo $e->getMessage() . "\n";
 }
 ?>
---EXPECT--
+--EXPECTF--
 Test bad arguments:
 ReflectionClass::isSubclassOf() expects exactly 1 argument, 0 given
 ReflectionClass::isSubclassOf() expects exactly 1 argument, 2 given
+
+Deprecated: ReflectionClass::isSubclassOf(): Passing null to parameter #1 ($class) of type ReflectionClass|string is deprecated in %s on line %d
 Class "" does not exist
 Class "ThisClassDoesNotExist" does not exist
 Class "2" does not exist
index 7bd2b1eecd9add71f7a46561a102f76a14110a31..82de2ce0c2a80df8d2c1d88deec3cb975327b037 100644 (file)
@@ -43,10 +43,12 @@ try {
 
 
 ?>
---EXPECT--
+--EXPECTF--
 ReflectionClass::setStaticPropertyValue() expects exactly 2 arguments, 3 given
 ReflectionClass::setStaticPropertyValue() expects exactly 2 arguments, 0 given
 ReflectionClass::setStaticPropertyValue() expects exactly 2 arguments, 1 given
+
+Deprecated: ReflectionClass::setStaticPropertyValue(): Passing null to parameter #1 ($name) of type string is deprecated in %s on line %d
 Class C does not have a property named 
 Class C does not have a property named 1.5
 ReflectionClass::setStaticPropertyValue(): Argument #1 ($name) must be of type string, array given
index ceedc7d4f04309655c6641afd99dad479c950959..03a4cfcc22505043188c34cc7f6042f929cbacbc 100644 (file)
@@ -35,10 +35,12 @@ try {
     echo $e->getMessage() . "\n";
 }
 ?>
---EXPECT--
+--EXPECTF--
 Test bad arguments:
 ReflectionClass::isSubclassOf() expects exactly 1 argument, 0 given
 ReflectionClass::isSubclassOf() expects exactly 1 argument, 2 given
+
+Deprecated: ReflectionClass::isSubclassOf(): Passing null to parameter #1 ($class) of type ReflectionClass|string is deprecated in %s on line %d
 Class "" does not exist
 Class "ThisClassDoesNotExist" does not exist
 Class "2" does not exist
index c7a6cada65199d00c68036c29673fec4844c9cd6..7dff0590dd2ea0d7fbb8aa499bd67d8719294124 100644 (file)
@@ -14,7 +14,7 @@ $sessionName = ini_get('session.name');
 
 $sh->open($savePath, $sessionName);
 $sh->write("foo", "bar");
-var_dump($sh->read(@$id));
+var_dump($sh->read(""));
 ?>
 --EXPECTF--
 Warning: SessionHandler::open(): Session is not active in %s on line 10
index 2cd9db61871107ddb2d686c55bcb1ed48089858f..41f2ce5783157d610ebdd2449eb5bab24f44bf69 100644 (file)
@@ -27,11 +27,11 @@ try {
 }
 
 // Warning outputs: Unable to attach or create shared memory segment
-var_dump(shmop_open(null, 'a', 0644, 1024));
+var_dump(shmop_open(0, 'a', 0644, 1024));
 
 // Shared memory segment size must be greater than zero
 try {
-    shmop_open(null, 'a', 0644, 1024);
+    shmop_open(0, 'a', 0644, 1024);
 } catch (ValueError $exception) {
     echo $exception->getMessage() . "\n";
 }
index ff4dd5de064eabdcd15cdd81133c5dc94eaf8d9b..399563fde1747e98aef6e7566b7ae937b8d66ac5 100644 (file)
@@ -11,10 +11,10 @@ if (!extension_loaded('sockets')) {
 --FILE--
 <?php
 
-var_dump(socket_create_pair(AF_INET, null, null, $sockets));
+var_dump(socket_create_pair(AF_INET, 0, 0, $sockets));
 
 try {
-    var_dump(socket_create_pair(31337, null, null, $sockets));
+    var_dump(socket_create_pair(31337, 0, 0, $sockets));
 } catch (\ValueError $e) {
     echo $e->getMessage() . \PHP_EOL;
 }
index 57111c83f19014373653b1045cb67b2eedfd2617..d6a4d4562d713f46044d767aa8b7f039c9a877d7 100644 (file)
@@ -11,10 +11,10 @@ if (!extension_loaded('sockets')) {
 --FILE--
 <?php
 
-var_dump(socket_create_pair(AF_INET, null, null, $sockets));
+var_dump(socket_create_pair(AF_INET, 0, 0, $sockets));
 
 try {
-    var_dump(socket_create_pair(31337, null, null, $sockets));
+    var_dump(socket_create_pair(31337, 0, 0, $sockets));
 } catch (\ValueError $e) {
     echo $e->getMessage() . \PHP_EOL;
 }
index eeca5363e1b67bcb2989ce82b34fe938c0ed983c..944a25ca2238a3eb895959cbb58f3e87f666991c 100644 (file)
@@ -7,7 +7,7 @@ Check for libsodium utils
 $a = 'test';
 sodium_memzero($a);
 if ($a !== 'test') {
-  echo strlen($a);
+  var_dump($a);
 } else {
   echo $a;
 }
@@ -107,7 +107,8 @@ try {
 
 ?>
 --EXPECT--
-0
+NULL
+
 bool(true)
 bool(false)
 string(22) "0000810102030405060708"
index 919c72021aae92d8e3e1baa0cda9473d2d576565..acd9d44af50da0a86d0ffce52b4da4118620ed5a 100644 (file)
@@ -10,7 +10,8 @@ $array = new SplFixedArray( NULL );
 print_r( $array );
 
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: SplFixedArray::__construct(): Passing null to parameter #1 ($size) of type int is deprecated in %s on line %d
 SplFixedArray Object
 (
 )
index ddb37be9f035236169dc41d98159b0ca564038ad..dd98935f2f209d3305ded1aa1db778884ffd7408 100644 (file)
@@ -8,6 +8,7 @@ $fixed_array = new SplFixedArray(2);
 $fixed_array->setSize(null);
 var_dump($fixed_array);
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: SplFixedArray::setSize(): Passing null to parameter #1 ($size) of type int is deprecated in %s on line %d
 object(SplFixedArray)#1 (0) {
 }
index bc9f78a1ca32b409738ceb29cf77648ecac7caaf..6934c3af1bf885813da88acde04a2444d7b5ccb2 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Check that SplObjectStorage::unserialize doesn't throws exception when NULL passed
+Check that SplObjectStorage::unserialize doesn't throws exception when empty string passed
 --CREDITS--
 PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
 --FILE--
@@ -8,7 +8,7 @@ PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
 $s = new SplObjectStorage();
 
 try {
-    $s->unserialize(NULL);
+    $s->unserialize('');
 } catch(UnexpectedValueException $e) {
     echo $e->getMessage();
 }
index cebe8a52d7efa1e6e1c1a0964c1b700671a7d2f9..535dd2ddaecc80ef5908e7f1c766c72a558b4255 100644 (file)
@@ -6,7 +6,7 @@ Bug #46051 (SplFileInfo::openFile - memory overlap)
 $x = new splfileinfo(__FILE__);
 
 try {
-    $x->openFile(NULL, NULL, []);
+    $x->openFile("", false, []);
 } catch (TypeError $e) { }
 
 var_dump($x->getPathName());
index fa8291228c0c918fd62e112b755d64ea476791a4..f068897246311c721c6a5e55f11b5fc2414e0e6d 100644 (file)
@@ -42,12 +42,12 @@ var_dump($ai2->next());
 var_dump($ai2->key());
 
 /* testing RecursiveArrayIterator */
-$ao3 = new ArrayObject(array(), NULL, 'RecursiveArrayIterator');
+$ao3 = new ArrayObject(array(), 0, 'RecursiveArrayIterator');
 $ai3 = $ao3->getIterator();
 
 var_dump($ai3->getChildren());
 
-$ao4 = new ArrayObject(array(1, 2), NULL, 'RecursiveArrayIterator');
+$ao4 = new ArrayObject(array(1, 2), 0, 'RecursiveArrayIterator');
 $ai4 = $ao4->getIterator();
 
 $ai4->next();
index a5b028954ccea4f747c9ea767627817bb55af766..e5d501ccf1596c587f91e39fc59e57ae0c334cb3 100644 (file)
@@ -31,13 +31,13 @@ $it2 = new RecursiveCallbackFilterIterator($it, function($elem) use(&$it2) {
 // Cache
 $it = new ArrayIterator();
 $it2 = new CachingIterator($it, CachingIterator::FULL_CACHE);
-$it2[] = $it2;
+$it2['x'] = $it2;
 $it2->next();
 
 // Recursive cache
 $it = new RecursiveArrayIterator();
 $it2 = new RecursiveCachingIterator($it, CachingIterator::FULL_CACHE);
-$it2[] = $it2;
+$it2['x'] = $it2;
 $it2->next();
 
 // Append
index 77226e10993d8e8b72b9d38233757c633912d47c..920dda9c5301e2b9b9a7de742b8641b924032f76 100644 (file)
@@ -8,7 +8,7 @@ function flatten(array $nestedArraysAndStrings){
     $iter = new RecursiveIteratorIterator(
         new RecursiveArrayIterator($nestedArraysAndStrings));
     foreach($iter as $leaf){ $flat[] = $leaf; }
-    return join(null, $flat);
+    return join('', $flat);
 }
 
 $noRefs = [[[['some']]],[' nested '],"items"];
diff --git a/ext/spl/tests/fixedarray_011.phpt b/ext/spl/tests/fixedarray_011.phpt
deleted file mode 100644 (file)
index eddf320..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---TEST--
-SPL: FixedArray: Testing setSize() with NULL
---FILE--
-<?php
-
-$a = new SplFixedArray(100);
-
-$a->setSize(NULL);
-
-print "ok\n";
-
-?>
---EXPECT--
-ok
index a6f2fc188c6dc980c9c7f2864fc75717dfdee98a..75108b5868476460f93979511746e782b1251b68 100644 (file)
@@ -4,7 +4,7 @@ SPL: FixedArray: Trying to access inexistent item
 <?php
 
 try {
-    $a = new SplFixedArray(NULL);
+    $a = new SplFixedArray(0);
     echo $a[0]++;
 } catch (Exception $e) {
     echo $e->getMessage();
index 66f722af9a1bd6644be67d6346dd2a925a909083..74321194e0986012b7416ce97c384c08e40f4105 100644 (file)
@@ -94,8 +94,12 @@ Warning: Undefined array key "foo" in %s on line %d
 NULL
 ===3===
 NULL
+
+Deprecated: CachingIterator::offsetExists(): Passing null to parameter #1 ($key) of type string is deprecated in %s on line %d
 bool(false)
 
+Deprecated: CachingIterator::offsetGet(): Passing null to parameter #1 ($key) of type string is deprecated in %s on line %d
+
 Warning: Undefined array key "" in %s on line %d
 NULL
 ===4===
@@ -133,8 +137,12 @@ bool(true)
 int(1)
 ===3===
 NULL
+
+Deprecated: CachingIterator::offsetExists(): Passing null to parameter #1 ($key) of type string is deprecated in %s on line %d
 bool(false)
 
+Deprecated: CachingIterator::offsetGet(): Passing null to parameter #1 ($key) of type string is deprecated in %s on line %d
+
 Warning: Undefined array key "" in %s on line %d
 NULL
 ===4===
index 535be000358982f71b0cf567776b48d856edb2b2..d5b778f86bb623536966d30159187ba6c0a85797 100644 (file)
@@ -7,7 +7,7 @@ Felix De Vliegher <felix.devliegher@gmail.com>
 
 $array = array('foo', 'bar', 'baz');
 $iterator = new ArrayIterator($array);
-$regexIterator = new RegexIterator($iterator, "/f/", null, RegexIterator::USE_KEY);
+$regexIterator = new RegexIterator($iterator, "/f/", RegexIterator::MATCH, RegexIterator::USE_KEY);
 
 var_dump($regexIterator->getFlags() === RegexIterator::USE_KEY);
 
index ea97d8ee009848c3b67c521ba47f47a4dbfc30f6..e27235a6af0cb98122444541005158fd5934161f 100644 (file)
@@ -8,7 +8,6 @@ marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
 <?php
 require_once(__DIR__ . '/new_db.inc');
 var_dump($db->busyTimeout(0));
-var_dump($db->busyTimeout(null));
 var_dump($db->busyTimeout(-1000));
 var_dump($db->busyTimeout(1000));
 $db->close();
@@ -17,4 +16,3 @@ $db->close();
 bool(true)
 bool(true)
 bool(true)
-bool(true)
index f5158e337ccc95986e6cbc00ff02ab491fe482f3..d9abf7dac1994b392e5a5dde6ec9589c24ccb809 100644 (file)
@@ -8,7 +8,7 @@ Test array_filter() function : usage variations - built-in functions as 'callbac
 
 echo "*** Testing array_filter() : usage variations - built-in functions as 'callback' argument ***\n";
 
-$input = array(0, 1, -1, 10, 100, 1000, null);
+$input = array(0, 1, -1, 10, 100, 1000);
 
 // using built-in function 'is_int' as 'callback'
 var_dump( array_filter($input, 'is_int') );
@@ -48,7 +48,7 @@ array(6) {
   [5]=>
   int(1000)
 }
-array(7) {
+array(6) {
   [0]=>
   int(0)
   [1]=>
@@ -61,8 +61,6 @@ array(7) {
   int(100)
   [5]=>
   int(1000)
-  [6]=>
-  NULL
 }
 array_filter(): Argument #2 ($callback) must be a valid callback, function "echo" not found or invalid function name
 array_filter(): Argument #2 ($callback) must be a valid callback, function "exit" not found or invalid function name
index 710741d122eacbe69727fcaea1f21963b37599f1..be39690e856b2bbe839fd22a7313265718a104f9 100644 (file)
@@ -12,7 +12,6 @@ $modes = [
     2,
     TRUE,
     FALSE,
-    NULL,
 ];
 
 foreach ($modes as $mode) {
@@ -32,4 +31,3 @@ count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE
 count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE
 int(0)
 int(0)
-int(0)
index 7bc552ee978f9a9306a9eec3610132b9bc866d78..e8bdf376e3c36dfe42d4911ab10e6d8796fd47c1 100644 (file)
@@ -91,7 +91,7 @@ foreach( $step_arr as $step ) {
     }
 }
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing error conditions ***
 
 -- Testing ( (low < high) && (step = 0) ) --
@@ -126,6 +126,8 @@ range(): Argument #3 ($step) must not exceed the specified range
 
 -- Testing Invalid steps --
 range(): Argument #3 ($step) must be of type int|float, string given
+
+Deprecated: range(): Passing null to parameter #3 ($step) of type int|float is deprecated in %s on line %d
 range(): Argument #3 ($step) must not exceed the specified range
 range(): Argument #3 ($step) must not exceed the specified range
 range(): Argument #3 ($step) must be of type int|float, string given
index 407f51a4d160dce57bda9cb9a78c94cadc1b89ef..9f5b7ba6795d6674a2f1e5a82cf5a155dbcf0dd1 100644 (file)
@@ -28,13 +28,11 @@ function stat_fn( $filename ) {
 
 echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n";
 echo "\n*** testing file info ***";
-stat_fn(NULL);
 stat_fn(false);
 stat_fn('');
 stat_fn(' ');
 stat_fn('|');
-echo "\n*** testing touch ***";
-var_dump(touch(NULL));
+echo "\n*** testing touch ***\n";
 var_dump(touch(false));
 var_dump(touch(''));
 
@@ -59,11 +57,6 @@ echo "Done";
 -- File modification time is => 
 -- inode change time is => 
 
--- File '' --
--- File access time is => 
--- File modification time is => 
--- inode change time is => 
-
 -- File ' ' --
 -- File access time is => 
 Warning: fileatime(): stat failed for   in %s on line %d
@@ -86,7 +79,7 @@ Warning: filemtime(): stat failed for | in %s on line %d
 Warning: filectime(): stat failed for | in %s on line %d
 
 
-*** testing touch ***bool(false)
+*** testing touch ***
 bool(false)
 bool(false)
 
index 5a878a687b9c6e191d65d516728fe6dca7ca8d1d..55d1d6666098c4100ebc5690d1279c3f2b4761eb 100644 (file)
@@ -28,7 +28,6 @@ function stat_fn( $filename ) {
 
 echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n";
 echo "\n*** testing touch ***\n";
-$a = touch(NULL);
 $b = touch(false);
 $c = touch('');
 $d = touch(' ');
@@ -41,7 +40,6 @@ var_dump($d);
 var_dump($e);
 
 echo "\n*** testing file info ***";
-stat_fn(NULL);
 stat_fn(false);
 stat_fn('');
 stat_fn(' ');
@@ -56,7 +54,9 @@ echo "Done";
 *** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***
 
 *** testing touch ***
-bool(false)
+
+Warning: Undefined variable $a in %s on line %d
+NULL
 bool(false)
 bool(false)
 bool(true)
@@ -73,11 +73,6 @@ bool(true)
 -- File modification time is => 
 -- inode change time is => 
 
--- File '' --
--- File access time is => 
--- File modification time is => 
--- inode change time is => 
-
 -- File ' ' --
 -- File access time is => %d
 -- File modification time is => %d
index 4d6cf7e089bc5033b0238b0e4dd7612a9046b4f5..53f243a634d62c0edfb29f2f560c62ff01cd995c 100644 (file)
@@ -56,13 +56,11 @@ $file_path_variations = array (
   /* paths with shortcut home dir char, with suffix variation */
   array("C:\\temp\\bar"),
   array("C:\\temp\\bar", ""),
-  array("C:\\temp\\bar", NULL),
   array("C:\\temp\\bar", ' '),
   array("C:\\temp\\bar.tar", ".tar"),
   array("C:\\temp\\bar.tar", "~"),
   array("C:\\temp\\bar.tar\\", "~"),
   array("C:\\temp\\bar.tar\\", ""),
-  array("C:\\temp\\bar.tar", NULL),
   array("C:\\temp\\bar.tar", ''),
   array("C:\\temp\\bar.tar", " "),
 
@@ -84,7 +82,6 @@ $file_path_variations = array (
   array("\\bar.zip\\", "\\bar.zip\\"),
   array(" ", " "),
   array(' ', ' '),
-  array(NULL, NULL),
 
   /* path with spaces */
   array(" "),
@@ -93,7 +90,6 @@ $file_path_variations = array (
   /* empty paths */
   array(""),
   array(''),
-  array(NULL)
 );
 
 function check_basename( $path_arrays ) {
@@ -209,7 +205,7 @@ string(3) "bar"
 string(3) "bar"
 
 --Iteration 5--
-string(3) "bar"
+string(7) "bar.tar"
 
 --Iteration 6--
 string(7) "bar.tar"
@@ -224,10 +220,10 @@ string(7) "bar.tar"
 string(7) "bar.tar"
 
 --Iteration 10--
-string(7) "bar.tar"
+string(4) "10.5"
 
 --Iteration 11--
-string(7) "bar.tar"
+string(2) "10"
 
 --Iteration 12--
 string(4) "10.5"
@@ -236,37 +232,37 @@ string(4) "10.5"
 string(2) "10"
 
 --Iteration 14--
-string(4) "10.5"
+string(2) "10"
 
 --Iteration 15--
-string(2) "10"
+string(4) "10.5"
 
 --Iteration 16--
-string(2) "10"
+string(4) "10.5"
 
 --Iteration 17--
-string(4) "10.5"
+string(6) "10.zip"
 
 --Iteration 18--
-string(4) "10.5"
+string(1) "0"
 
 --Iteration 19--
-string(6) "10.zip"
+string(1) "0"
 
 --Iteration 20--
-string(1) "0"
+string(7) "bar.zip"
 
 --Iteration 21--
-string(1) "0"
+string(7) "bar.zip"
 
 --Iteration 22--
 string(7) "bar.zip"
 
 --Iteration 23--
-string(7) "bar.zip"
+string(1) " "
 
 --Iteration 24--
-string(7) "bar.zip"
+string(1) " "
 
 --Iteration 25--
 string(1) " "
@@ -278,17 +274,5 @@ string(1) " "
 string(0) ""
 
 --Iteration 28--
-string(1) " "
-
---Iteration 29--
-string(1) " "
-
---Iteration 30--
-string(0) ""
-
---Iteration 31--
-string(0) ""
-
---Iteration 32--
 string(0) ""
 Done
index 2b8507fa2d834cec7b4b80e26523e0327d0b387d..c2dbf34f51f5c7a31f4a777bf3d0f1123eb872fd 100644 (file)
Binary files a/ext/standard/tests/file/basename.phpt and b/ext/standard/tests/file/basename.phpt differ
index 79de350eaeeb741fded06ff7482fa3709fa8f262..0678a7fd95dd4c7522d9f2dec9ab1f731beb89d9 100644 (file)
@@ -56,7 +56,6 @@ $file_paths = array (
   /* empty paths */
   "",
   '',
-  NULL,
 );
 
 foreach ($file_paths as $file_path) {
@@ -98,4 +97,3 @@ string(1) " "
 string(1) " "
 string(0) ""
 string(0) ""
-string(0) ""
index 55bd868c55c4410cb786dc394242aa286a504213..bd86695b92cd16f594771d62e1bbb6f8e6201387 100644 (file)
@@ -56,7 +56,6 @@ $file_paths = array (
   /* empty paths */
   "",
   '',
-  NULL,
 );
 
 foreach ($file_paths as $file_path) {
@@ -98,4 +97,3 @@ string(1) " "
 string(1) " "
 string(0) ""
 string(0) ""
-string(0) ""
index cf2bb254c9241e72548ab48339b6cfd83accb568..77d7470cb5cef2a47ff606728929a7f131c5bc20 100644 (file)
@@ -3,15 +3,15 @@ Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includ
 --FILE--
 <?php
 
-$ini = parse_ini_string('ini="ini;raw"', null, INI_SCANNER_RAW);
+$ini = parse_ini_string('ini="ini;raw"', false, INI_SCANNER_RAW);
 var_dump($ini['ini']);
-$ini = parse_ini_string('ini="ini;raw', null, INI_SCANNER_RAW);
+$ini = parse_ini_string('ini="ini;raw', false, INI_SCANNER_RAW);
 var_dump($ini['ini']);
-$ini = parse_ini_string('ini=ini;raw', null, INI_SCANNER_RAW);
+$ini = parse_ini_string('ini=ini;raw', false, INI_SCANNER_RAW);
 var_dump($ini['ini']);
-$ini = parse_ini_string('ini=ini"raw', null, INI_SCANNER_RAW);
+$ini = parse_ini_string('ini=ini"raw', false, INI_SCANNER_RAW);
 var_dump($ini['ini']);
-$ini = parse_ini_string("ini=\r\niniraw", null, INI_SCANNER_RAW);
+$ini = parse_ini_string("ini=\r\niniraw", false, INI_SCANNER_RAW);
 var_dump($ini['ini']);
 ?>
 --EXPECT--
index c9ae4c88808b5dd1933d25db3cc8b08ff9eb998b..fbef22ba4c0137b26a1a6bd5a9a570760fce9048 100644 (file)
@@ -5,7 +5,7 @@ Bug #61961 (file_get_content leaks when access empty file with max length)
 $tmp_empty_file = __FILE__ . ".tmp";
 file_put_contents($tmp_empty_file, "");
 
-var_dump(file_get_contents($tmp_empty_file, NULL, NULL, NULL, 10));
+var_dump(file_get_contents($tmp_empty_file, false, NULL, 0, 10));
 unlink($tmp_empty_file);
 ?>
 --EXPECT--
index b94def684a8c6bbc8d8b72a23a97239b422561d6..1e4899e4657426ae0e5163f346faded2c6e9e574 100644 (file)
@@ -8,7 +8,7 @@ if(substr(PHP_OS, 0, 3) == "WIN")
 --FILE--
 <?php
 try {
-    chgrp("sjhgfskhagkfdgskjfhgskfsdgfkdsajf", null);
+    chgrp("sjhgfskhagkfdgskjfhgskfsdgfkdsajf", 0);
 } catch (TypeError $exception) {
     echo $exception->getMessage() . "\n";
 }
index 05cd4e4d7d4142a2d80705427b64676f51547569..5791c04c9b297de2d17fa6ce681d86d3666040cd 100644 (file)
@@ -7,7 +7,7 @@ if(substr(PHP_OS, 0, 3) == "WIN")
 ?>
 --FILE--
 <?php
-chown("sjhgfskhagkfdgskjfhgskfsdgfkdsajf", NULL);
+chown("sjhgfskhagkfdgskjfhgskfsdgfkdsajf", 0);
 echo "ALIVE\n";
 ?>
 --EXPECTF--
index dd2b4d61d9fde2de236096e9811d2c2ef79491b7..9bb090246a53997138b7b464c85ac74cbeffc150 100644 (file)
@@ -27,23 +27,23 @@ try {
     echo $e->getMessage() . \PHP_EOL;
 }
 
-echo 'fgetcsv() with delimiter as NULL' . \PHP_EOL;
+echo 'fgetcsv() with delimiter as empty string' . \PHP_EOL;
 try {
-    var_dump( fgetcsv($file_handle, $length, NULL, $enclosure) );
+    var_dump( fgetcsv($file_handle, $length, '', $enclosure) );
 } catch (\ValueError $e) {
     echo $e->getMessage() . \PHP_EOL;
 }
 
-echo 'fgetcsv() with enclosure as NULL' . \PHP_EOL;
+echo 'fgetcsv() with enclosure as empty string' . \PHP_EOL;
 try {
-    var_dump( fgetcsv($file_handle, $length, $delimiter, NULL) );
+    var_dump( fgetcsv($file_handle, $length, $delimiter, '') );
 } catch (\ValueError $e) {
     echo $e->getMessage() . \PHP_EOL;
 }
 
-echo 'fgetcsv() with delimiter & enclosure as NULL' . \PHP_EOL;
+echo 'fgetcsv() with delimiter & enclosure as empty string' . \PHP_EOL;
 try {
-    var_dump( fgetcsv($file_handle, $length, NULL, NULL) );
+    var_dump( fgetcsv($file_handle, $length, '', '') );
 } catch (\ValueError $e) {
     echo $e->getMessage() . \PHP_EOL;
 }
@@ -53,9 +53,9 @@ fgetcsv() with negative length
 fgetcsv(): Argument #2 ($length) must be a greater than or equal to 0
 fgetcsv(): Argument #2 ($length) must be a greater than or equal to 0
 fgetcsv(): Argument #2 ($length) must be a greater than or equal to 0
-fgetcsv() with delimiter as NULL
+fgetcsv() with delimiter as empty string
 fgetcsv(): Argument #3 ($separator) must be a single character
-fgetcsv() with enclosure as NULL
+fgetcsv() with enclosure as empty string
 fgetcsv(): Argument #4 ($enclosure) must be a single character
-fgetcsv() with delimiter & enclosure as NULL
+fgetcsv() with delimiter & enclosure as empty string
 fgetcsv(): Argument #3 ($separator) must be a single character
index 55c6c9498141fb54a0907c8c0fb009b6639f6d5a..446e7fac16a06a2959edec68b614efe952a430b1 100644 (file)
@@ -6,7 +6,6 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
 <?php
 echo "*** Testing file_exists() : usage variations ***\n";
 
-var_dump(file_exists(NULL));
 var_dump(file_exists(false));
 var_dump(file_exists(''));
 var_dump(file_exists(' '));
@@ -19,5 +18,4 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-bool(false)
 Done
index 2c7033be6d3a94b87bfc9403b9f232d5cd9ef2ef..b6d801e9e701b4a3eb3e8328173780f7be55081d 100644 (file)
@@ -20,7 +20,6 @@ $names_arr = array(
   "-1" => -1,
   "TRUE" => TRUE,
   "FALSE" => FALSE,
-  "NULL" => NULL,
   "\"\"" => "",
   "\" \"" => " ",
   "\\0" => "\0",
@@ -58,9 +57,6 @@ bool(false)
 -- Filename: FALSE --
 ValueError: Path cannot be empty
 
--- Filename: NULL --
-ValueError: Path cannot be empty
-
 -- Filename: "" --
 ValueError: Path cannot be empty
 
index 126f7b9fd751027ae85a856981b920d5a661d5a0..ad23a13bb6b79436da05a012618e7dc5e132cde0 100644 (file)
@@ -19,7 +19,6 @@ $names_arr = array(
   -1,
   TRUE,
   FALSE,
-  NULL,
   "",
   " ",
   "\0",
@@ -57,20 +56,18 @@ ValueError: Path cannot be empty
 -- Iteration 3 --
 ValueError: Path cannot be empty
 -- Iteration 4 --
-ValueError: Path cannot be empty
--- Iteration 5 --
 
 Warning: file_get_contents( ): Failed to open stream: No such file or directory in %s on line %d
 bool(false)
--- Iteration 6 --
+-- Iteration 5 --
 ValueError: file_get_contents(): Argument #1 ($filename) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
 TypeError: file_get_contents(): Argument #1 ($filename) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
 
 Warning: file_get_contents(/no/such/file/dir): Failed to open stream: No such file or directory in %s on line %d
 bool(false)
--- Iteration 9 --
+-- Iteration 8 --
 
 Warning: file_get_contents(php/php): Failed to open stream: No such file or directory in %s on line %d
 bool(false)
index d16db38b14c67bfd43fa6b2e86f0a27ba78ff698..97eb2604e02a5f3922d91e3353c21f4103c5a063 100644 (file)
@@ -19,7 +19,7 @@ runtest();
 $newpath = "";
 set_include_path($newpath);
 runtest();
-set_include_path(null);
+set_include_path("");
 runtest();
 set_include_path(";;  ; ;c:\\rubbish");
 runtest();
index e3cd4609d42df8cefeff3ac64b407c1e1c012053..dac2ba6d37ad3166c04fb0e7f9fd5481c1f45030 100644 (file)
@@ -18,7 +18,6 @@ $names_arr = array(
   "-1" => -1,
   "TRUE" => TRUE,
   "FALSE" => FALSE,
-  "NULL" => NULL,
   "\"\"" => "",
   "\" \"" => " ",
   "\\0" => "\0",
@@ -58,9 +57,6 @@ foreach($names_arr as $key =>$value) {
 -- Filename: FALSE --
 ValueError: Path cannot be empty
 
--- Filename: NULL --
-ValueError: Path cannot be empty
-
 -- Filename: "" --
 ValueError: Path cannot be empty
 
index f5b956faee3ff1279f7124e6ac56c0be7c5135a6..70456fad9ff7d60416de64f81b1b236862c8664a 100644 (file)
@@ -22,7 +22,6 @@ $names_arr = array(
   -1,
   TRUE,
   FALSE,
-  NULL,
   "",
   " ",
   //this one also generates a java message rather than our own so we don't replicate php message
@@ -64,18 +63,16 @@ ValueError: Path cannot be empty
 -- Iteration 3 --
 ValueError: Path cannot be empty
 -- Iteration 4 --
-ValueError: Path cannot be empty
--- Iteration 5 --
 9 bytes written to: ' '
--- Iteration 6 --
+-- Iteration 5 --
 ValueError: file_put_contents(): Argument #1 ($filename) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
 TypeError: file_put_contents(): Argument #1 ($filename) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
 
 Warning: file_put_contents(%sdir): Failed to open stream: %s in %s on line %d
 Failed to write data to: '%sir'
--- Iteration 9 --
+-- Iteration 8 --
 
 Warning: file_put_contents(%sphp): Failed to open stream: %s in %s on line %d
 Failed to write data to: '%sphp'
index 85ee170660b198979c9a390afcc79d28ebe0cf7d..7d0a87d247244b773f899ca82d08ef3003115c8e 100644 (file)
@@ -18,7 +18,6 @@ $filenames = array(
   "",
   TRUE,
   FALSE,
-  NULL,
 
   /* scalars */
   1234,
@@ -49,7 +48,6 @@ bool(false)
 Warning: filegroup(): stat failed for 1 in %s on line %d
 bool(false)
 bool(false)
-bool(false)
 
 Warning: filegroup(): stat failed for 1234 in %s on line %d
 bool(false)
index d8593733a8b9e9171d4362dc7a7532c1d3eee921..2dace6413c3e68e70baf4ffd459b9da466425716 100644 (file)
@@ -18,7 +18,6 @@ $filenames = array(
   "",
   TRUE,
   FALSE,
-  NULL,
 
   /* scalars */
   1234,
@@ -49,7 +48,6 @@ bool(false)
 Warning: fileinode(): stat failed for 1 in %s on line %d
 bool(false)
 bool(false)
-bool(false)
 
 Warning: fileinode(): stat failed for 1234 in %s on line %d
 bool(false)
index 752fa1d6ef77e1813a9ac6a6e709d7a52a46cad6..05cc8495b13450d5b6e021fd36851c63c48c0e4b 100644 (file)
@@ -19,7 +19,6 @@ $filenames = array(
   "",
   TRUE,
   FALSE,
-  NULL,
 
   /* scalars */
   1234,
@@ -50,7 +49,6 @@ bool(false)
 Warning: fileowner(): stat failed for 1 in %s on line %d
 bool(false)
 bool(false)
-bool(false)
 
 Warning: fileowner(): stat failed for 1234 in %s on line %d
 bool(false)
index 9c9d263ebe24c2a500eeac44009f3ee385848fbe..c46ce617ae72d0378c07bd31395f1315cdb22b0a 100644 (file)
@@ -18,7 +18,6 @@ $filenames = array(
   "",
   TRUE,
   FALSE,
-  NULL,
 
   /* scalars */
   1234,
@@ -49,7 +48,6 @@ bool(false)
 Warning: fileperms(): stat failed for 1 in %s on line %d
 bool(false)
 bool(false)
-bool(false)
 
 Warning: fileperms(): stat failed for 1234 in %s on line %d
 bool(false)
index ab1fc6c9ffc8f690fb7bd8f22b3af4ebbbbd604d..7da6e73e06139c2de2902923ff0632a4b3fdf907 100644 (file)
@@ -7,7 +7,6 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
 echo "*** Testing filesize(): usage variations ***\n";
 
 /* null, false, "", " " */
-var_dump( filesize(NULL) );
 var_dump( filesize(false) );
 var_dump( filesize('') );
 var_dump( filesize(' ') );
@@ -18,7 +17,6 @@ echo "*** Done ***\n";
 *** Testing filesize(): usage variations ***
 bool(false)
 bool(false)
-bool(false)
 
 Warning: filesize(): stat failed for   in %s on line %d
 bool(false)
index df1199d468c51219c3379305dab64ac994326f25..8b4ae30e0fd45179f875937c354659002cc0fa45 100644 (file)
@@ -9,7 +9,7 @@ Description: PHP supports a portable way of locking complete files
 
 echo "*** Testing flock() fun with file and dir ***\n";
 
-$lock_file = preg_replace("~\.phpt?$~", null, __FILE__);
+$lock_file = preg_replace("~\.phpt?$~", '', __FILE__);
 
 $file_handle = fopen($lock_file, "w");
 var_dump(flock($file_handle, LOCK_SH|LOCK_NB));
@@ -19,7 +19,7 @@ var_dump(flock($file_handle, LOCK_UN));
 fclose($file_handle);
 unlink($lock_file);
 
-$lock_dir = sprintf("%s.dir", preg_replace("~\.phpt?$~", null, __FILE__));
+$lock_dir = sprintf("%s.dir", preg_replace("~\.phpt?$~", '', __FILE__));
 
 mkdir($lock_dir);
 $dir_handle = opendir($lock_dir);
index add22959816dc7a935c9150662e14b896903a8f2..753aaa6fb34e8235444548b55dabd94083f0fbaf 100644 (file)
@@ -19,7 +19,6 @@ $operations = array(
   0,
   LOCK_NB,
   FALSE,
-  NULL,
   array(1,2,3),
   array(),
   "string",
@@ -62,15 +61,13 @@ flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
 --- Iteration 2 ---
 flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
 --- Iteration 3 ---
-flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
+flock(): Argument #2 ($operation) must be of type int, array given
 --- Iteration 4 ---
 flock(): Argument #2 ($operation) must be of type int, array given
 --- Iteration 5 ---
-flock(): Argument #2 ($operation) must be of type int, array given
+flock(): Argument #2 ($operation) must be of type int, string given
 --- Iteration 6 ---
 flock(): Argument #2 ($operation) must be of type int, string given
 --- Iteration 7 ---
 flock(): Argument #2 ($operation) must be of type int, string given
---- Iteration 8 ---
-flock(): Argument #2 ($operation) must be of type int, string given
 flock(): supplied resource is not a valid stream resource
index 40945be58eb26a0bd3d83f1182841a738ad6a40b..f4a51999592b4eacc9d47440a37e69056fdeeff9 100644 (file)
@@ -5,7 +5,7 @@ Test flock() function: Variations
 echo "*** Testing flock() fun with the various operation and
     wouldblock values                                ***\n";
 
-$file = preg_replace("~\.phpt?$~", null, __FILE__);
+$file = preg_replace("~\.phpt?$~", '', __FILE__);
 $fp = fopen($file, "w");
 
 /* array of operations */
index 18a8161966330929bb6583629ce490934b8e10aa..8b74bb430b371b9803abd233d735bcfb00790484 100644 (file)
@@ -23,7 +23,6 @@ var_dump( fnmatch(100, 100) );
 var_dump( fnmatch("string", "string") );
 var_dump( fnmatch(TRUE, TRUE) );
 var_dump( fnmatch(FALSE, FALSE) );
-var_dump( fnmatch(NULL, NULL) );
 
 echo "\n*** Done ***\n";
 ?>
@@ -40,6 +39,5 @@ bool(true)
 bool(true)
 bool(true)
 bool(true)
-bool(true)
 
 *** Done ***
index 2d6a08e72fc89eb181658533510da417219bbc41..3413c3e6f76c6527b374cddeed65983417ad9cd6 100644 (file)
@@ -127,8 +127,6 @@ match_($bool_arr, $bool_arr);
 
 echo "\n--- With NULL ---\n";
 $null_arr = array(
-  NULL,
-  null,
   "",
   "\0",
   "string",
@@ -399,42 +397,20 @@ bool(true)
 --- With NULL ---
 -- Iteration 0 --
 bool(true)
-bool(true)
-bool(true)
 fnmatch(): Argument #2 ($filename) must not contain any null bytes
 bool(false)
 bool(false)
 -- Iteration 1 --
-bool(true)
-bool(true)
-bool(true)
-fnmatch(): Argument #2 ($filename) must not contain any null bytes
-bool(false)
-bool(false)
--- Iteration 2 --
-bool(true)
-bool(true)
-bool(true)
-fnmatch(): Argument #2 ($filename) must not contain any null bytes
-bool(false)
-bool(false)
--- Iteration 3 --
-fnmatch(): Argument #1 ($pattern) must not contain any null bytes
 fnmatch(): Argument #1 ($pattern) must not contain any null bytes
 fnmatch(): Argument #1 ($pattern) must not contain any null bytes
 fnmatch(): Argument #1 ($pattern) must not contain any null bytes
 fnmatch(): Argument #1 ($pattern) must not contain any null bytes
-fnmatch(): Argument #1 ($pattern) must not contain any null bytes
--- Iteration 4 --
-bool(false)
-bool(false)
+-- Iteration 2 --
 bool(false)
 fnmatch(): Argument #2 ($filename) must not contain any null bytes
 bool(true)
 bool(false)
--- Iteration 5 --
-bool(false)
-bool(false)
+-- Iteration 3 --
 bool(false)
 fnmatch(): Argument #2 ($filename) must not contain any null bytes
 bool(false)
diff --git a/ext/standard/tests/file/fputcsv_variation2.phpt b/ext/standard/tests/file/fputcsv_variation2.phpt
deleted file mode 100644 (file)
index 77b075a..0000000
+++ /dev/null
@@ -1,724 +0,0 @@
---TEST--
-Test fputcsv() : usage variations - with delimiter as NULL
---FILE--
-<?php
-/* Testing fputcsv() to write to a file when delimiter is NULL */
-
-echo "*** Testing fputcsv() : with delimiter as NULL ***\n";
-
-/* the array is with three elements in it. Each element should be read as
-   1st element is delimiter, 2nd element is enclosure
-   and 3rd element is csv fields
-*/
-$csv_lists = array (
-  array(',', '"', array('water','fruit') ),
-  array(',', '"', array('"water","fruit') ),
-  array(',', '"', array('"water","fruit"') ),
-  array(' ', '^', array('^water^ ^fruit^')),
-  array(':', '&', array('&water&:&fruit&')),
-  array('=', '=', array('=water===fruit=')),
-  array('-', '-', array('-water--fruit-air')),
-  array('-', '-', array('-water---fruit---air-')),
-  array(':', '&', array('&""""&:&"&:,:":&,&:,,,,'))
-
-);
-$file_path = __DIR__;
-$filename = "$file_path/fputcsv_variation2.tmp";
-
-$file_modes = array ("r+", "r+b", "r+t",
-                     "a+", "a+b", "a+t",
-                     "w+", "w+b", "w+t",
-                     "x+", "x+b", "x+t");
-
-$loop_counter = 1;
-foreach ($csv_lists as $csv_list) {
-  for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
-
-    echo "\n-- file opened in $file_modes[$mode_counter] --\n";
-    // create the file and add the content with has csv fields
-    if ( strstr($file_modes[$mode_counter], "r") ) {
-      $file_handle = fopen($filename, "w");
-    } else {
-      $file_handle = fopen($filename, $file_modes[$mode_counter] );
-    }
-    if ( !$file_handle ) {
-      echo "Error: failed to create file $filename!\n";
-      exit();
-    }
-    $delimiter = $csv_list[0];
-    $enclosure = $csv_list[1];
-    $csv_field = $csv_list[2];
-
-    // write to a file in csv format
-    try {
-        var_dump( fputcsv($file_handle, $csv_field, NULL, $enclosure) );
-    } catch (\ValueError $e) {
-        echo $e->getMessage() . \PHP_EOL;
-    }
-    // check the file pointer position and eof
-    var_dump( ftell($file_handle) );
-    var_dump( feof($file_handle) );
-    //close the file
-    fclose($file_handle);
-
-    // print the file contents
-    var_dump( file_get_contents($filename) );
-
-    //delete file
-    unlink($filename);
-  } //end of mode loop
-} // end of foreach
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fputcsv() : with delimiter as NULL ***
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-Done
diff --git a/ext/standard/tests/file/fputcsv_variation3.phpt b/ext/standard/tests/file/fputcsv_variation3.phpt
deleted file mode 100644 (file)
index eb8771a..0000000
+++ /dev/null
@@ -1,724 +0,0 @@
---TEST--
-Test fputcsv() : usage variations - with enclosure as NULL
---FILE--
-<?php
-/* Testing fputcsv() to write to a file when enclosure is NULL */
-
-echo "*** Testing fputcsv() : with enclosure as NULL ***\n";
-
-/* the array is with three elements in it. Each element should be read as
-   1st element is delimiter, 2nd element is enclosure
-   and 3rd element is csv fields
-*/
-$csv_lists = array (
-  array(',', '"', array('water','fruit') ),
-  array(',', '"', array('"water","fruit') ),
-  array(',', '"', array('"water","fruit"') ),
-  array(' ', '^', array('^water^ ^fruit^')),
-  array(':', '&', array('&water&:&fruit&')),
-  array('=', '=', array('=water===fruit=')),
-  array('-', '-', array('-water--fruit-air')),
-  array('-', '-', array('-water---fruit---air-')),
-  array(':', '&', array('&""""&:&"&:,:":&,&:,,,,'))
-
-);
-$file_path = __DIR__;
-$filename = "$file_path/fputcsv_variation3.tmp";
-
-$file_modes = array ("r+", "r+b", "r+t",
-                     "a+", "a+b", "a+t",
-                     "w+", "w+b", "w+t",
-                     "x+", "x+b", "x+t");
-
-$loop_counter = 1;
-foreach ($csv_lists as $csv_list) {
-  for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
-
-    echo "\n-- file opened in $file_modes[$mode_counter] --\n";
-    // create the file and add the content with has csv fields
-    if ( strstr($file_modes[$mode_counter], "r") ) {
-      $file_handle = fopen($filename, "w");
-    } else {
-      $file_handle = fopen($filename, $file_modes[$mode_counter] );
-    }
-    if ( !$file_handle ) {
-      echo "Error: failed to create file $filename!\n";
-      exit();
-    }
-    $delimiter = $csv_list[0];
-    $enclosure = $csv_list[1];
-    $csv_field = $csv_list[2];
-
-    // write to a file in csv format
-    try {
-        var_dump( fputcsv($file_handle, $csv_field, $delimiter, NULL) );
-    } catch (\ValueError $e) {
-        echo $e->getMessage() . \PHP_EOL;
-    }
-    // check the file pointer position and eof
-    var_dump( ftell($file_handle) );
-    var_dump( feof($file_handle) );
-    //close the file
-    fclose($file_handle);
-
-    // print the file contents
-    var_dump( file_get_contents($filename) );
-
-    //delete file
-    unlink($filename);
-  } //end of mode loop
-} // end of foreach
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fputcsv() : with enclosure as NULL ***
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #4 ($enclosure) must be a single character
-int(0)
-bool(false)
-string(0) ""
-Done
diff --git a/ext/standard/tests/file/fputcsv_variation4.phpt b/ext/standard/tests/file/fputcsv_variation4.phpt
deleted file mode 100644 (file)
index dc78796..0000000
+++ /dev/null
@@ -1,724 +0,0 @@
---TEST--
-Test fputcsv() : usage variations - with delimiter and enclosure as NULL
---FILE--
-<?php
-/* Testing fputcsv() to write to a file when delimiter and enclosure is NULL */
-
-echo "*** Testing fputcsv() : with delimiter and enclosure as NULL ***\n";
-
-/* the array is with three elements in it. Each element should be read as
-   1st element is delimiter, 2nd element is enclosure
-   and 3rd element is csv fields
-*/
-$csv_lists = array (
-  array(',', '"', array('water','fruit') ),
-  array(',', '"', array('"water","fruit') ),
-  array(',', '"', array('"water","fruit"') ),
-  array(' ', '^', array('^water^ ^fruit^')),
-  array(':', '&', array('&water&:&fruit&')),
-  array('=', '=', array('=water===fruit=')),
-  array('-', '-', array('-water--fruit-air')),
-  array('-', '-', array('-water---fruit---air-')),
-  array(':', '&', array('&""""&:&"&:,:":&,&:,,,,'))
-
-);
-$file_path = __DIR__;
-$filename = "$file_path/fputcsv_variation4.tmp";
-
-$file_modes = array ("r+", "r+b", "r+t",
-                     "a+", "a+b", "a+t",
-                     "w+", "w+b", "w+t",
-                     "x+", "x+b", "x+t");
-
-$loop_counter = 1;
-foreach ($csv_lists as $csv_list) {
-  for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
-
-    echo "\n-- file opened in $file_modes[$mode_counter] --\n";
-    // create the file and add the content with has csv fields
-    if ( strstr($file_modes[$mode_counter], "r") ) {
-      $file_handle = fopen($filename, "w");
-    } else {
-      $file_handle = fopen($filename, $file_modes[$mode_counter] );
-    }
-    if ( !$file_handle ) {
-      echo "Error: failed to create file $filename!\n";
-      exit();
-    }
-    $delimiter = $csv_list[0];
-    $enclosure = $csv_list[1];
-    $csv_field = $csv_list[2];
-
-    // write to a file in csv format
-    try {
-        var_dump( fputcsv($file_handle, $csv_field, NULL, NULL) );
-    } catch (\ValueError $e) {
-        echo $e->getMessage() . \PHP_EOL;
-    }
-    // check the file pointer position and eof
-    var_dump( ftell($file_handle) );
-    var_dump( feof($file_handle) );
-    //close the file
-    fclose($file_handle);
-
-    // print the file contents
-    var_dump( file_get_contents($filename) );
-
-    //delete file
-    unlink($filename);
-  } //end of mode loop
-} // end of foreach
-
-echo "Done\n";
-?>
---EXPECT--
-*** Testing fputcsv() : with delimiter and enclosure as NULL ***
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in r+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in a+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in w+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+ --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+b --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-
--- file opened in x+t --
-fputcsv(): Argument #3 ($separator) must be a single character
-int(0)
-bool(false)
-string(0) ""
-Done
index c50af50b6d27245db1cc46b249f85422e4ad6bb9..da586555be06ca78f601b2c013bd932b0189c679 100644 (file)
@@ -31,9 +31,7 @@ try {
 fclose($file_handle);
 
 // different invalid format strings
-$invalid_formats = array( $undefined_var,
-                          "%", "%h", "%.", "%d%m"
-                   );
+$invalid_formats = array("", "%", "%h", "%.", "%d%m");
 
 
 // looping to use various invalid formats with fscanf()
@@ -57,12 +55,10 @@ $file_path = __DIR__;
 $filename = "$file_path/fscanf_error.tmp";
 unlink($filename);
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing fscanf() for error conditions ***
 fscanf(): supplied resource is not a valid File-Handle resource
 Different numbers of variable names and field specifiers
-
-Warning: Undefined variable $undefined_var in %s on line %d
 array(0) {
 }
 Bad scan conversion character "
index 4bf008a9a79a525b00c4e3bae613726316869de8..891bbb6fa101ff87965ff5458ce163de91b24ac3 100644 (file)
@@ -4,7 +4,7 @@ Test glob() function: ensure no platform difference
 <?php
 $path = __DIR__;
 
-ini_set('open_basedir', NULL);
+ini_set('open_basedir', '');
 
 var_dump(glob("$path/*.none"));
 var_dump(glob("$path/?.none"));
index ef875c34f8d6f9ee7e33a6701c6fe274e068b186..730a2bcfea4d3770b495fb8b621182557bb5bbee 100644 (file)
@@ -12,7 +12,6 @@ $dirnames = array(
   -2.34555,
   TRUE,
   FALSE,
-  NULL,
   " ",
 
   /* scalars */
@@ -33,4 +32,3 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-bool(false)
index 42e37f57317c6f6e910ec15ac715f872fbb6a875..b9b3a98e5c626c8f16f38b2d3353e825b307bd96 100644 (file)
@@ -23,9 +23,7 @@ $invalid_files = array(
   -2.34555,
   TRUE,
   FALSE,
-  NULL,
   " ",
-  @$file_handle
 );
 /* loop through to test each element in the above array
    is an executable file */
@@ -46,6 +44,4 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-bool(false)
-bool(false)
 Done
index 320e6d49b9b06cb1b82be6fdbfc356fc032b44c2..e4a5766762824b56cfa2a1fc890876320780e8a1 100644 (file)
@@ -10,9 +10,6 @@ require __DIR__ . '/../skipif_root.inc';
 
 echo "*** Testing is_readable(): usage variations ***\n";
 
-$file_handle = fopen(__FILE__, "r");
-unset($file_handle);
-
 echo "\n*** Testing is_readable() on miscellaneous filenames ***\n";
 $misc_files = array(
   0,
@@ -20,9 +17,7 @@ $misc_files = array(
   -2.34555,
   TRUE,
   FALSE,
-  NULL,
   " ",
-  @$file_handle
 );
 /* loop through to test each element in the above array
    is a readable file */
@@ -43,6 +38,4 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-bool(false)
-bool(false)
 Done
index 286b64c4d37a7c59020edfe1ffed868e0075204f..021d6e5645414950b4efaf7e9e51778d72705784 100644 (file)
@@ -19,9 +19,7 @@ $misc_files = array(
   -2.34555,
   TRUE,
   FALSE,
-  NULL,
   " ",
-  @$file_handle
 );
 /* loop through to test each element in the above array
    is a writable file */
@@ -47,7 +45,3 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
index b89c5c5298513bd82908cb838a60f9c7391bfc2f..9efb23fc4178b8aa43c7ccf7d2cb21c014384de2 100644 (file)
@@ -13,14 +13,12 @@ obscure_filename
 --FILE--
 <?php
 echo "*** testing stat ***\n";
-var_dump(stat(NULL));
 var_dump(stat(false));
 var_dump(stat(''));
 var_dump(stat(' '));
 var_dump(stat('|'));
 
 echo "*** testing lstat ***\n";
-var_dump(lstat(NULL));
 var_dump(lstat(false));
 var_dump(lstat(''));
 var_dump(lstat(' '));
@@ -30,7 +28,6 @@ var_dump(lstat('|'));
 *** testing stat ***
 bool(false)
 bool(false)
-bool(false)
 
 Warning: stat(): stat failed for   in %s on line %d
 bool(false)
@@ -40,7 +37,6 @@ bool(false)
 *** testing lstat ***
 bool(false)
 bool(false)
-bool(false)
 
 Warning: lstat(): Lstat failed for   in %s on line %d
 bool(false)
index 4447d07d6c7b5e32697e68c3933e709e60e25439..04e1f15c6935a92dd6a36737e981f51cf34cfa1f 100644 (file)
@@ -4,9 +4,6 @@ Test pathinfo() function: usage variations
 <?php
 echo "*** Testing pathinfo() with miscellaneous input arguments ***\n";
 
-$fp = fopen(__FILE__, "r");
-unset($fp);
-
 class object_temp {
   public $url_var = "www.foo.com";
   var $html_var = "/var/html/testdir/example.html";
@@ -47,13 +44,6 @@ $paths = array (
   "",
   '',
 
-  /* pathname as NULL */
-  NULL,
-  null,
-
-  /* filename as resource */
-  $fp,
-
   /* pathname as members of object */
   $obj->url_var,
   $obj->html_var,
@@ -83,10 +73,8 @@ foreach($paths as $path) {
 
 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing pathinfo() with miscellaneous input arguments ***
-
-Warning: Undefined variable $fp in %s on line %d
 -- Iteration 1 --
 array(3) {
   ["dirname"]=>
@@ -240,39 +228,6 @@ string(0) ""
 string(0) ""
 string(0) ""
 -- Iteration 13 --
-array(2) {
-  ["basename"]=>
-  string(0) ""
-  ["filename"]=>
-  string(0) ""
-}
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 14 --
-array(2) {
-  ["basename"]=>
-  string(0) ""
-  ["filename"]=>
-  string(0) ""
-}
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 15 --
-array(2) {
-  ["basename"]=>
-  string(0) ""
-  ["filename"]=>
-  string(0) ""
-}
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 16 --
 array(4) {
   ["dirname"]=>
   string(1) "."
@@ -287,7 +242,7 @@ string(1) "."
 string(11) "www.foo.com"
 string(3) "com"
 string(7) "www.foo"
--- Iteration 17 --
+-- Iteration 14 --
 array(4) {
   ["dirname"]=>
   string(17) "/var/html/testdir"
@@ -302,7 +257,7 @@ string(17) "/var/html/testdir"
 string(12) "example.html"
 string(4) "html"
 string(7) "example"
--- Iteration 18 --
+-- Iteration 15 --
 array(3) {
   ["dirname"]=>
   string(12) "/testdir/foo"
@@ -315,7 +270,7 @@ string(12) "/testdir/foo"
 string(4) "test"
 string(0) ""
 string(4) "test"
--- Iteration 19 --
+-- Iteration 16 --
 array(4) {
   ["dirname"]=>
   string(4) "/foo"
@@ -330,7 +285,7 @@ string(4) "/foo"
 string(12) "symlink.link"
 string(4) "link"
 string(7) "symlink"
--- Iteration 20 --
+-- Iteration 17 --
 array(3) {
   ["dirname"]=>
   string(1) "."
@@ -343,7 +298,7 @@ string(1) "."
 string(5) "12345"
 string(0) ""
 string(5) "12345"
--- Iteration 21 --
+-- Iteration 18 --
 array(4) {
   ["dirname"]=>
   string(1) "."
@@ -358,7 +313,7 @@ string(1) "."
 string(15) "www.example.com"
 string(3) "com"
 string(11) "www.example"
--- Iteration 22 --
+-- Iteration 19 --
 array(3) {
   ["dirname"]=>
   string(12) "/testdir/foo"
@@ -371,7 +326,7 @@ string(12) "/testdir/foo"
 string(4) "test"
 string(0) ""
 string(4) "test"
--- Iteration 23 --
+-- Iteration 20 --
 array(4) {
   ["dirname"]=>
   string(6) "../foo"
@@ -386,7 +341,7 @@ string(6) "../foo"
 string(9) "test.link"
 string(4) "link"
 string(4) "test"
--- Iteration 24 --
+-- Iteration 21 --
 array(4) {
   ["dirname"]=>
   string(76) "./test/work/scratch/mydir/yourdir/ourdir/test1/test2/test3/test4/test5/test6"
@@ -401,7 +356,7 @@ string(76) "./test/work/scratch/mydir/yourdir/ourdir/test1/test2/test3/test4/tes
 string(8) "test.tmp"
 string(3) "tmp"
 string(4) "test"
--- Iteration 25 --
+-- Iteration 22 --
 array(4) {
   ["dirname"]=>
   string(1) "."
index bec5b383d715e03dcddc0f164cbe67f5a6af22d6..9e47e68fac3c9b21c462665e76c7b28772246576 100644 (file)
@@ -8,11 +8,6 @@ echo "*** Test readfile(): error conditions ***\n";
 
 echo "\n-- Testing readfile() with invalid arguments --\n";
 // invalid arguments
-try {
-    var_dump( readfile(NULL) );  // NULL as $filename
-} catch (\ValueError $e) {
-    echo $e->getMessage() . \PHP_EOL;
-}
 try {
     var_dump( readfile('') );  // empty string as $filename
 } catch (\ValueError $e) {
@@ -36,7 +31,6 @@ echo "Done\n";
 -- Testing readfile() with invalid arguments --
 Path cannot be empty
 Path cannot be empty
-Path cannot be empty
 
 -- Testing readfile() with non-existent file --
 
index add9afd58ded2771d0c4371434fe946a44b4d220..325e47224dccb9a5fb238a8f44a8538e1864652f 100644 (file)
@@ -19,7 +19,6 @@ $names_arr = array(
   "-1" => -1,
   "TRUE" => TRUE,
   "FALSE" => FALSE,
-  "NULL" => NULL,
   "\"\"" => "",
   "\" \"" => " ",
   "\\0" => "\0",
@@ -54,9 +53,6 @@ Warning: readfile(1): Failed to open stream: No such file or directory in %s on
 -- Filename: FALSE --
 ValueError: Path cannot be empty
 
--- Filename: NULL --
-ValueError: Path cannot be empty
-
 -- Filename: "" --
 ValueError: Path cannot be empty
 
index 99cb0b2d6b9236dd9ec9ff440ce6a98e1867b026..a2fc2d79cb58923e8a17b288f73027a8c675f45f 100644 (file)
Binary files a/ext/standard/tests/file/readfile_variation10.phpt and b/ext/standard/tests/file/readfile_variation10.phpt differ
index f256ffea4287608c6b038d58b17fcac860ac9beb..44a53f0dfb35376e1cc513a677389c1a09af5393 100644 (file)
@@ -13,8 +13,6 @@ $link_string = array (
   /* empty linkname */
   "",
   '',
-  NULL,
-  null
  );
 for($loop_counter = 0; $loop_counter < count($link_string); $loop_counter++) {
   echo "-- Iteration";
@@ -48,16 +46,6 @@ bool(false)
 string(%d) "%s"
 -- Iteration4 --
 
-Warning: readlink(): %s in %s on line %d
-bool(false)
-string(%d) "%s"
--- Iteration5 --
-
-Warning: readlink(): %s in %s on line %d
-bool(false)
-string(%d) "%s"
--- Iteration6 --
-
 Warning: readlink(): %s in %s on line %d
 bool(false)
 string(%d) "%s"
index b129de364f678820944c0748e8256ad8e3f64a44..6697286de2b9b792945d632849dcb1c916cd2d95 100644 (file)
@@ -17,7 +17,6 @@ $filenames = array(
   "",
   TRUE,
   FALSE,
-  NULL,
 
   /* scalars */
   1234,
@@ -55,6 +54,3 @@ bool(false)
 
 Warning: readlink(): %s in %s on line %d
 bool(false)
-
-Warning: readlink(): %s in %s on line %d
-bool(false)
index a3539f6106ad3ec947d6c351d937457170af08ed..ea2f1c6feca151dacf7d4d6611320399edf23c65 100644 (file)
@@ -51,8 +51,6 @@ $file_string = array (
   /* empty filename */
   "",
   '',
-  NULL,
-  null
  );
 for($loop_counter = 0; $loop_counter < count($file_string); $loop_counter++) {
   echo "-- Iteration";
@@ -91,8 +89,4 @@ bool(false)
 string(%d) "%s"
 -- Iteration4 --
 string(%d) "%s"
--- Iteration5 --
-string(%d) "%s"
--- Iteration6 --
-string(%d) "%s"
 Done
index 9f46c62e7cf0d509dd43f3b63fb21d5e872ce9bc..1ea8ced7d0eaa23bc4ef6132bf8bf9bf69213197 100644 (file)
@@ -51,8 +51,6 @@ $file_string = array (
   /* empty filename */
   "",
   '',
-  NULL,
-  null
  );
 for($loop_counter = 0; $loop_counter < count($file_string); $loop_counter++) {
   echo "-- Iteration";
@@ -91,8 +89,4 @@ bool(false)
 string(%d) "%s"
 -- Iteration4 --
 string(%d) "%s"
--- Iteration5 --
-string(%d) "%s"
--- Iteration6 --
-string(%d) "%s"
 Done
index 65dbdfb8d671dc0f9825d30d38bb8d117d26b1c8..a2cf9a528d1b3a32894bd5d0862ad6a61e78b5d2 100644 (file)
@@ -17,7 +17,6 @@ $names_arr = array(
   -1, /* -1 is just a valid filename on windows */
   TRUE, /* 1 as well, (string)TRUE > "1" */
   FALSE,
-  NULL,
   "", // I think both p8 and php are wrong on the messages here
   //p8 generates different messages to php, php is probably wrong
   //php has either "File Exists" or "Permission Denied".
@@ -80,35 +79,28 @@ bool(false)
 
 Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
 bool(false)
--- 3 testing '' NULL --
+-- 3 testing '' string --
 
 Warning: rename(%safile.tmp,): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
 bool(false)
 
 Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
 bool(false)
--- 4 testing '' string --
-
-Warning: rename(%safile.tmp,): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
-bool(false)
-
-Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
-bool(false)
--- 5 testing ' ' string --
+-- 4 testing ' ' string --
 
 Warning: rename(%s): The filename, directory name, or volume label syntax is incorrect (code: 123) in %srename_variation13-win32.php on line %d
 bool(false)
 
 Warning: rename(%s): The filename, directory name, or volume label syntax is incorrect (code: 123) in %srename_variation13-win32.php on line %d
 bool(false)
--- 6 testing '/no/such/file/dir' string --
+-- 5 testing '/no/such/file/dir' string --
 
 Warning: rename(%safile.tmp,/no/such/file/dir): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
 bool(false)
 
 Warning: rename(/no/such/file/dir,%safile.tmp): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
 bool(false)
--- 7 testing 'php/php' string --
+-- 6 testing 'php/php' string --
 
 Warning: rename(%safile.tmp,php/php): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
 bool(false)
index 83de25cd8477586ee6f5022454e95c3957939c89..1fa95f37266c2fcca69a18f91e132aa2e0f7174c 100644 (file)
@@ -23,7 +23,6 @@ $names_arr = array(
   -1,
   TRUE,
   FALSE,
-  NULL,
   "",
   " ",
 
@@ -76,13 +75,6 @@ bool(false)
 Warning: rename(%s/renameVar13/afile.tmp,): %s in %s on line %d
 bool(false)
 
-Warning: rename(,%s/renameVar13/afile.tmp): %s in %s on line %d
-bool(false)
--- testing '' --
-
-Warning: rename(%s/renameVar13/afile.tmp,): %s in %s on line %d
-bool(false)
-
 Warning: rename(,%s/renameVar13/afile.tmp): %s in %s on line %d
 bool(false)
 -- testing ' ' --
index 72737d1a8e6f599ae7af628430dc0f02afe7f2b8..f4035f8f40a2c6200e2f53d0dabd3f6d76daae89 100644 (file)
@@ -19,17 +19,14 @@ $linkname = __DIR__."/symlink_link_linkinfo_is_link_link_error1.tmp";
 echo "*** Testing symlink() for error conditions ***\n";
 
 //invalid arguments
-var_dump( symlink(NULL, $linkname) );  // NULL as filename
 var_dump( symlink('', $linkname) );  // empty string as filename
 var_dump( symlink(false, $linkname) );  // boolean false as filename
-var_dump( symlink($filename, NULL) );  // NULL as linkname
 var_dump( symlink($filename, '') );  // '' as linkname
 var_dump( symlink($filename, false) );  // false as linkname
 
 echo "\n*** Testing linkinfo() for error conditions ***\n";
 
 //invalid arguments
-var_dump( linkinfo(NULL) );  // NULL as linkname
 var_dump( linkinfo('') );  // empty string as linkname
 var_dump( linkinfo(false) );  // boolean false as linkname
 
@@ -55,20 +52,11 @@ bool(false)
 Warning: symlink(): %s in %s on line %d
 bool(false)
 
-Warning: symlink(): %s in %s on line %d
-bool(false)
-
-Warning: symlink(): %s in %s on line %d
-bool(false)
-
 *** Testing linkinfo() for error conditions ***
 
 Warning: linkinfo(): %s in %s on line %d
 int(-1)
 
-Warning: linkinfo(): %s in %s on line %d
-int(-1)
-
 Warning: linkinfo(): %s in %s on line %d
 int(-1)
 Done
index c5b21c0d21029dcfd531a9934b1292ebab8ad228..fcc64d409849de62b77630cff3f16cb9aa6b6dd6 100644 (file)
@@ -19,18 +19,15 @@ $linkname = __DIR__."/symlink_link_linkinfo_is_link_link_error2.tmp";
 echo "*** Testing link() for error conditions ***\n";
 
 //invalid arguments
-var_dump( link(NULL, $linkname) );  // NULL as filename
 var_dump( link('', $linkname) );  // empty string as filename
 var_dump( link(' ', $linkname) );  // space as filename
 var_dump( link(false, $linkname) );  // boolean false as filename
-var_dump( link($filename, NULL) );  // NULL as linkname
 var_dump( link($filename, '') );  // '' as linkname
 var_dump( link($filename, false) );  // false as linkname
 
 echo "\n*** Testing is_link() for error conditions ***\n";
 
 //invalid arguments
-var_dump( is_link(NULL) );  // NULL as linkname
 var_dump( is_link('') );  // empty string as linkname
 var_dump( is_link(' ') );  // space as linkname
 var_dump( is_link(false) );  // boolean false as linkname
@@ -60,16 +57,9 @@ bool(false)
 Warning: link(): No such file or directory in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
 *** Testing is_link() for error conditions ***
 bool(false)
 bool(false)
 bool(false)
 bool(false)
-bool(false)
 Done
index 86990f03416a4fd1aaf767cf71350f668030eeb5..5bc4f5ec884d1ecd9f852284159e3c9dfab1848a 100644 (file)
@@ -26,7 +26,6 @@ $names_arr = array(
     -1,
     TRUE,
     FALSE,
-    NULL,
     "",
     " ",
     "\0",
@@ -47,7 +46,6 @@ $res_arr = array(
     true,
     true,
     true,
-    true,
     false,
 
     /* prefix with path separator of a non existing directory*/
@@ -99,17 +97,15 @@ OK
 -- Iteration 3 --
 OK
 -- Iteration 4 --
-OK
--- Iteration 5 --
 
 Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation3-win32.php on line %d
 Failed, not created in the correct directory %s vs %s
 0
--- Iteration 6 --
+-- Iteration 5 --
 tempnam(): Argument #2 ($prefix) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
 tempnam(): Argument #2 ($prefix) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
 OK
--- Iteration 9 --
+-- Iteration 8 --
 OK
index baf0a5a868555c992a4e69d45b3290e44b2a54cb..6f20ec140ef42407c71700cd6c7683393193ddf1 100644 (file)
@@ -21,7 +21,6 @@ $names_arr = array(
   -1,
   TRUE,
   FALSE,
-  NULL,
   "",
   " ",
   "\0",
@@ -98,18 +97,14 @@ File name is => %s/%s
 File permissions are => 100600
 File created in => directory specified
 -- Iteration 5 --
-File name is => %s/%s
-File permissions are => 100600
-File created in => directory specified
--- Iteration 6 --
 tempnam(): Argument #2 ($prefix) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
 tempnam(): Argument #2 ($prefix) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
 File name is => %s/dir%s
 File permissions are => 100600
 File created in => directory specified
--- Iteration 9 --
+-- Iteration 8 --
 File name is => %s/php%s
 File permissions are => 100600
 File created in => directory specified
index 0c951e2657ff4b143050c2d7274d2282bfb071d6..b731c764491273adfcc90d75315e7c9e404ff87f 100644 (file)
@@ -19,7 +19,6 @@ $names_arr = array(
     -1,
     TRUE,
     FALSE,
-    NULL,
     "",
     " ",
     "\0",
@@ -86,26 +85,22 @@ File name is => %s%et%s
 File permissions are => 100666
 File created in => temp dir
 -- Iteration 4 --
-File name is => %s%et%s
-File permissions are => 100666
-File created in => temp dir
--- Iteration 5 --
 
 Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
 File name is => %s%et%s
 File permissions are => 100666
 File created in => temp dir
--- Iteration 6 --
+-- Iteration 5 --
 tempnam(): Argument #1 ($directory) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
 tempnam(): Argument #1 ($directory) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
 
 Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
 File name is => %s%et%s
 File permissions are => 100666
 File created in => temp dir
--- Iteration 9 --
+-- Iteration 8 --
 
 Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
 File name is => %s%et%s
index 9a0b1151c6b47540ac2f4f237e0d7269bed49fbb..1928da4f89624a1aed53fdab80df56fa20cafcf9 100644 (file)
@@ -19,7 +19,6 @@ $names_arr = array(
   -1,
   TRUE,
   FALSE,
-  NULL,
   "",
   " ",
   "\0",
@@ -91,26 +90,22 @@ File name is => %s%etempnam_variation3.tmp%s
 File permissions are => 100600
 File created in => temp dir
 -- Iteration 4 --
-File name is => %s%etempnam_variation3.tmp%s
-File permissions are => 100600
-File created in => temp dir
--- Iteration 5 --
 
 Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
 File name is => %s%etempnam_variation3.tmp%s
 File permissions are => 100600
 File created in => temp dir
--- Iteration 6 --
+-- Iteration 5 --
 tempnam(): Argument #1 ($directory) must not contain any null bytes
--- Iteration 7 --
+-- Iteration 6 --
 tempnam(): Argument #1 ($directory) must be of type string, array given
--- Iteration 8 --
+-- Iteration 7 --
 
 Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
 File name is => %s/tempnam_variation3.tmp%s
 File permissions are => 100600
 File created in => temp dir
--- Iteration 9 --
+-- Iteration 8 --
 
 Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d
 File name is => %s/tempnam_variation3.tmp%s
index e85db00600ffbcda0124160e6659aae4dd7512ea..df98e2e367356a96b83610a0cc1b1fbfad2c6ea1 100644 (file)
@@ -27,9 +27,6 @@ echo "\n-- Testing unlink() on invalid arguments --\n";
 var_dump( unlink('') );  // $filename as empty string
 var_dump( file_exists('') );  // confirm file doesn't exist
 
-var_dump( unlink(NULL) );  // $filename as NULL
-var_dump( file_exists(NULL) );  // confirm file doesn't exist
-
 var_dump( unlink(false) );  // $filename as boolean false
 var_dump( file_exists(false) );  // confirm file doesn't exist
 
@@ -66,10 +63,6 @@ Warning: unlink(): %s in %s on line %d
 bool(false)
 bool(false)
 
-Warning: unlink(): %s in %s on line %d
-bool(false)
-bool(false)
-
 -- Testing unlink() on non-existent file --
 
 Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
index af579be58daa2ad9a4bbf32fde218ccd69361b57..6bce3d4b8060628c0e6292ad823ff27713275867 100644 (file)
@@ -25,9 +25,6 @@ echo "\n-- Testing unlink() on invalid arguments --\n";
 var_dump( unlink('') );  // $filename as empty string
 var_dump( file_exists('') );  // confirm file doesn't exist
 
-var_dump( unlink(NULL) );  // $filename as NULL
-var_dump( file_exists(NULL) );  // confirm file doesn't exist
-
 var_dump( unlink(false) );  // $filename as boolean false
 var_dump( file_exists(false) );  // confirm file doesn't exist
 
@@ -63,10 +60,6 @@ Warning: unlink(): %s in %s on line %d
 bool(false)
 bool(false)
 
-Warning: unlink(): %s in %s on line %d
-bool(false)
-bool(false)
-
 -- Testing unlink() on non-existent file --
 
 Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
index e5f809df056da5a5cbf2d5089ed13932eca99fd7..1dd8ef1a25c9e753f9c1f6cc1295822ea185adbb 100644 (file)
@@ -25,9 +25,6 @@ echo "\n-- Testing unlink() on invalid arguments --\n";
 var_dump( unlink('') );  // $filename as empty string
 var_dump( file_exists('') );  // confirm file doesn't exist
 
-var_dump( unlink(NULL) );  // $filename as NULL
-var_dump( file_exists(NULL) );  // confirm file doesn't exist
-
 var_dump( unlink(false) );  // $filename as boolean false
 var_dump( file_exists(false) );  // confirm file doesn't exist
 
@@ -62,10 +59,6 @@ Warning: unlink(): %s in %s on line %d
 bool(false)
 bool(false)
 
-Warning: unlink(): %s in %s on line %d
-bool(false)
-bool(false)
-
 -- Testing unlink() on non-existent file --
 
 Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d
index a81ff66dfb5defb3ce65ecb6e1d0c56ae3dd180b..3e024c5e56203d7b813a69625f761267248cf9b2 100644 (file)
@@ -17,7 +17,7 @@ $d = $base . '\\dev\\http\\tproj\\app\\cache\\dev_old\\annotations\\72';
 $foo = $d . '\\5b53796d666f6e795c42756e646c655c5477696742756e646c655c436f6e74726f6c6c65725c457863657074696f6e436f6e74726f6c6c657223676574416e64436c65616e4f7574707574427566666572696e67405b416e6e6f745d5d5b.doctrinecache.data';
 $bar = $d . '\\5b53796d666f6e795c42756e646c655c5477696742756e646c655c436f6e74726f6c6c65725c457863657074696f6e436f6e74726f6c6c657223676574416e64436c65616e4f7574707574427566666572696e67405b416e6e6f745d5d5b315d.doctrinecache.data';
 
-mkdir($d, NULL, true);
+mkdir($d, 0777, true);
 
 foreach (array($foo, $bar) as $f) {
     touch($f);
index c7cab179b481c0f4ebdb06204c7e5e5ee1c20460..752b1dfa7e331dafec7bada82fc825e50ffcdb89 100644 (file)
@@ -10,10 +10,6 @@ if( substr(PHP_OS, 0, 3) != "WIN" )
 
 echo "*** Testing escapeshellarg() : usage variations ***\n";
 
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
 // heredoc string
 $heredoc = <<<EOT
 abc
@@ -39,10 +35,6 @@ $inputs = array(
        1.234567E-2,
        .5,
 
-       // null data
-/*11*/ NULL,
-       null,
-
        // boolean data
 /*13*/ true,
        false,
@@ -53,12 +45,6 @@ $inputs = array(
 /*17*/ "",
        '',
 
-       // undefined data
-/*19*/ @$undefined_var,
-
-       // unset data
-/*20*/ @$unset_var,
-
 );
 
 // loop through each element of $inputs to check the behaviour of escapeshellarg()
@@ -103,7 +89,7 @@ string(12) ""0.01234567""
 string(5) ""0.5""
 
 -- Iteration 11 --
-string(2) """"
+string(3) ""1""
 
 -- Iteration 12 --
 string(2) """"
@@ -115,19 +101,7 @@ string(3) ""1""
 string(2) """"
 
 -- Iteration 15 --
-string(3) ""1""
-
--- Iteration 16 --
-string(2) """"
-
--- Iteration 17 --
-string(2) """"
-
--- Iteration 18 --
-string(2) """"
-
--- Iteration 19 --
 string(2) """"
 
--- Iteration 20 --
+-- Iteration 16 --
 string(2) """"
index 15ebbfcd4e0c75ef7c0a852a40952666e51543ff..028b987eece2a6e8af3a56a57cff0703918c2f68 100644 (file)
@@ -10,10 +10,6 @@ if( substr(PHP_OS, 0, 3) == "WIN" )
 
 echo "*** Testing escapeshellarg() : usage variations ***\n";
 
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
 // heredoc string
 $heredoc = <<<EOT
 abc
@@ -39,10 +35,6 @@ $inputs = array(
        1.234567E-2,
        .5,
 
-       // null data
-/*11*/ NULL,
-       null,
-
        // boolean data
 /*13*/ true,
        false,
@@ -52,13 +44,6 @@ $inputs = array(
        // empty data
 /*17*/ "",
        '',
-
-       // undefined data
-/*19*/ @$undefined_var,
-
-       // unset data
-/*20*/ @$unset_var,
-
 );
 
 // loop through each element of $inputs to check the behaviour of escapeshellarg()
@@ -103,7 +88,7 @@ string(12) "'0.01234567'"
 string(5) "'0.5'"
 
 -- Iteration 11 --
-string(2) "''"
+string(3) "'1'"
 
 -- Iteration 12 --
 string(2) "''"
@@ -115,19 +100,7 @@ string(3) "'1'"
 string(2) "''"
 
 -- Iteration 15 --
-string(3) "'1'"
-
--- Iteration 16 --
-string(2) "''"
-
--- Iteration 17 --
-string(2) "''"
-
--- Iteration 18 --
-string(2) "''"
-
--- Iteration 19 --
 string(2) "''"
 
--- Iteration 20 --
+-- Iteration 16 --
 string(2) "''"
diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation3.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation3.phpt
deleted file mode 100644 (file)
index 1a99242..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---TEST--
-Test function get_cfg_var() by substituting argument 1 with emptyUnsetUndefNull values.
---CREDITS--
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---INI--
-session.use_cookies=0
-session.serialize_handler=php
-session.save_handler=files
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n";
-
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
-  'unset var' => @$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(get_cfg_var( $var  ) );
-}
-?>
---EXPECT--
-*** Test substituting argument 1 with emptyUnsetUndefNull values ***
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
diff --git a/ext/standard/tests/general_functions/getservbyname_variation10.phpt b/ext/standard/tests/general_functions/getservbyname_variation10.phpt
deleted file mode 100644 (file)
index db1d47f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-Test function getservbyname() by substituting argument 2 with emptyUnsetUndefNull values.
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 2 with emptyUnsetUndefNull values ***\n";
-
-$service = "www";
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
-  'unset var' => @$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(getservbyname( $service, $var  ) );
-}
-?>
---EXPECT--
-*** Test substituting argument 2 with emptyUnsetUndefNull values ***
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
diff --git a/ext/standard/tests/general_functions/getservbyname_variation3.phpt b/ext/standard/tests/general_functions/getservbyname_variation3.phpt
deleted file mode 100644 (file)
index 6602ce0..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-Test function getservbyname() by substituting argument 1 with emptyUnsetUndefNull values.
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n";
-
-$protocol = "tcp";
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
-  'unset var' => @$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(getservbyname( $var ,  $protocol ) );
-}
-?>
---EXPECT--
-*** Test substituting argument 1 with emptyUnsetUndefNull values ***
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
index a6358027a5c0b5ffcc29ff34698f608600c0e0cd..03cc5b46e950917ae83d331a81a9c8d961e2a528 100644 (file)
@@ -15,16 +15,13 @@ Simone Gentili (sensorario@gmail.com)
 ?>
 --FILE--
 <?php
-    var_dump(getservbyport( -1, "tcp" ));
-    var_dump(getservbyport( 80, "ppp" ));
-    var_dump(getservbyport( null, null));
-    var_dump(getservbyport( 2, 2));
-    var_dump(getservbyport( "80", "tcp"));
-
+var_dump(getservbyport( -1, "tcp" ));
+var_dump(getservbyport( 80, "ppp" ));
+var_dump(getservbyport( 2, 2));
+var_dump(getservbyport( "80", "tcp"));
 ?>
 --EXPECTF--
 bool(false)
 bool(false)
 bool(false)
-bool(false)
 string(%d) "%s"
index 0e782cdfd11ab27b8d0a1ac0710a934178243edb..408f72bfdbaa3f4ae4f33aae256a4a65dd82225c 100644 (file)
@@ -6,8 +6,8 @@ echo "*** Testing uniqid() : basic functionality ***\n";
 
 echo "\nuniqid() without a prefix\n";
 var_dump(uniqid());
-var_dump(uniqid(null, true));
-var_dump(uniqid(null, false));
+var_dump(uniqid('', true));
+var_dump(uniqid('', false));
 echo "\n\n";
 
 echo "uniqid() with a prefix\n";
@@ -17,7 +17,6 @@ $prefix = array (
                 99999,
                 "99999",
                 10.5e2,
-                null,
                 true,
                 false
                 );
@@ -52,10 +51,6 @@ string(17) "1050%s"
 string(27) "1050%s.%s"
 string(17) "1050%s"
 
-string(13) "%s"
-string(23) "%s.%s"
-string(13) "%s"
-
 string(14) "1%s"
 string(24) "1%s.%s"
 string(14) "1%s"
@@ -63,4 +58,3 @@ string(14) "1%s"
 string(13) "%s"
 string(23) "%s.%s"
 string(13) "%s"
-
index 448aac4e99b33abd1ef5129722290387f5650024..fd60fc454e10bec57e50cac6759e3b1637fbf5fb 100644 (file)
@@ -29,7 +29,7 @@ image_type_to_extension()
         printf("Constant: %s\n\tWith dot: %s\n\tWithout dot: %s\n", $name, image_type_to_extension($constant), image_type_to_extension($constant, false));
     }
 
-    var_dump(image_type_to_extension(1000000, NULL));
+    var_dump(image_type_to_extension(1000000, false));
     var_dump(image_type_to_extension(0));
 ?>
 Done
index 65120efef6cdd2453e36e62f7f372922c64a1711..2b4957b996a81a3b0adc1000e767e5fcd5c4d6ac 100644 (file)
@@ -26,7 +26,7 @@ for ($i = 0; $i < count($values); $i++) {
     var_dump($res);
 }
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing abs() : basic functionality ***
 int(23)
 int(23)
@@ -39,6 +39,8 @@ int(23)
 float(23.45)
 float(23.45)
 float(23.45)
+
+Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 int(0)
 int(1)
 int(0)
index 6b7a184cbd93d471d5f01205dcbf72c027a23e8a..d7f878bc01bbc63ba7d4e7521ef13f96229dc43f 100644 (file)
@@ -78,13 +78,17 @@ foreach($inputs as $input) {
 
 fclose($fp);
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing abs() : usage variations ***
 
 -- Iteration 1 --
+
+Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 int(0)
 
 -- Iteration 2 --
+
+Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 int(0)
 
 -- Iteration 3 --
@@ -121,9 +125,13 @@ abs(): Argument #1 ($num) must be of type int|float, string given
 abs(): Argument #1 ($num) must be of type int|float, classA given
 
 -- Iteration 14 --
+
+Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 int(0)
 
 -- Iteration 15 --
+
+Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 int(0)
 
 -- Iteration 16 --
index 163487d99fd54d07400230780e25e11400a88266..1fac4ccc246d517bcac172984cbdeba61122479c 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(NAN)
 float(NAN)
 float(NAN)
 float(NAN)
-float(1.5707963267948966)
 float(0)
 float(1.5707963267948966)
index 904316a99843d42e44629effbfe56c3ed3171d2a..9335961e637dccb6a5397b8013361a99b498c59d 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(3.8281684713331012)
 float(3.8475627390640357)
 float(3.8475627390640357)
 float(7.600902209541989)
-float(NAN)
 float(0)
 float(NAN)
index 323701c51a5d9e19480eee717f9dba92842fae9b..d0286894396e0fd75c0067dcea752bc321e4ae89 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(NAN)
 float(NAN)
 float(NAN)
 float(NAN)
-float(0)
 float(1.5707963267948966)
 float(0)
index 4958468064bd5fc96886dc45bc8959b39bec3d73..e7b9fd9c543b57d746dea0517a094b075d5e0366 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(3.829113652)
 float(3.848471992)
 float(3.848471992)
 float(7.60090271)
-float(0)
 float(0.881373587)
 float(0)
index 1763795cfa1154f2ee85cf0182e775f70f3062e2..1c89cfa1c2fce4247ca1f9fc738e9bdde77f0d64 100644 (file)
@@ -13,7 +13,6 @@ $valuesy = array(23,
                 "23",
                 "23.45",
                 "2.345e1",
-                null,
                 true,
                 false);
 
@@ -26,7 +25,6 @@ $valuesx = array(23,
                 "23",
                 "23.45",
                 "2.345e1",
-                null,
                 true,
                 false);
 
@@ -48,7 +46,6 @@ Y:23 X:23 float(0.78539816339745)
 Y:23 X:23 float(0.78539816339745)
 Y:23 X:23.45 float(0.77571063007847)
 Y:23 X:2.345e1 float(0.77571063007847)
-Y:23 X: float(1.5707963267949)
 Y:23 X:1 float(1.5273454314034)
 Y:23 X: float(1.5707963267949)
 Y:-23 X:23 float(-0.78539816339745)
@@ -60,7 +57,6 @@ Y:-23 X:23 float(-0.78539816339745)
 Y:-23 X:23 float(-0.78539816339745)
 Y:-23 X:23.45 float(-0.77571063007847)
 Y:-23 X:2.345e1 float(-0.77571063007847)
-Y:-23 X: float(-1.5707963267949)
 Y:-23 X:1 float(-1.5273454314034)
 Y:-23 X: float(-1.5707963267949)
 Y:23.45 X:23 float(0.79508569671643)
@@ -72,7 +68,6 @@ Y:23.45 X:23 float(0.79508569671643)
 Y:23.45 X:23 float(0.79508569671643)
 Y:23.45 X:23.45 float(0.78539816339745)
 Y:23.45 X:2.345e1 float(0.78539816339745)
-Y:23.45 X: float(1.5707963267949)
 Y:23.45 X:1 float(1.5281782247706)
 Y:23.45 X: float(1.5707963267949)
 Y:-23.45 X:23 float(-0.79508569671643)
@@ -84,7 +79,6 @@ Y:-23.45 X:23 float(-0.79508569671643)
 Y:-23.45 X:23 float(-0.79508569671643)
 Y:-23.45 X:23.45 float(-0.78539816339745)
 Y:-23.45 X:2.345e1 float(-0.78539816339745)
-Y:-23.45 X: float(-1.5707963267949)
 Y:-23.45 X:1 float(-1.5281782247706)
 Y:-23.45 X: float(-1.5707963267949)
 Y:23 X:23 float(0.78539816339745)
@@ -96,7 +90,6 @@ Y:23 X:23 float(0.78539816339745)
 Y:23 X:23 float(0.78539816339745)
 Y:23 X:23.45 float(0.77571063007847)
 Y:23 X:2.345e1 float(0.77571063007847)
-Y:23 X: float(1.5707963267949)
 Y:23 X:1 float(1.5273454314034)
 Y:23 X: float(1.5707963267949)
 Y:23 X:23 float(0.78539816339745)
@@ -108,7 +101,6 @@ Y:23 X:23 float(0.78539816339745)
 Y:23 X:23 float(0.78539816339745)
 Y:23 X:23.45 float(0.77571063007847)
 Y:23 X:2.345e1 float(0.77571063007847)
-Y:23 X: float(1.5707963267949)
 Y:23 X:1 float(1.5273454314034)
 Y:23 X: float(1.5707963267949)
 Y:23 X:23 float(0.78539816339745)
@@ -120,7 +112,6 @@ Y:23 X:23 float(0.78539816339745)
 Y:23 X:23 float(0.78539816339745)
 Y:23 X:23.45 float(0.77571063007847)
 Y:23 X:2.345e1 float(0.77571063007847)
-Y:23 X: float(1.5707963267949)
 Y:23 X:1 float(1.5273454314034)
 Y:23 X: float(1.5707963267949)
 Y:23.45 X:23 float(0.79508569671643)
@@ -132,7 +123,6 @@ Y:23.45 X:23 float(0.79508569671643)
 Y:23.45 X:23 float(0.79508569671643)
 Y:23.45 X:23.45 float(0.78539816339745)
 Y:23.45 X:2.345e1 float(0.78539816339745)
-Y:23.45 X: float(1.5707963267949)
 Y:23.45 X:1 float(1.5281782247706)
 Y:23.45 X: float(1.5707963267949)
 Y:2.345e1 X:23 float(0.79508569671643)
@@ -144,21 +134,8 @@ Y:2.345e1 X:23 float(0.79508569671643)
 Y:2.345e1 X:23 float(0.79508569671643)
 Y:2.345e1 X:23.45 float(0.78539816339745)
 Y:2.345e1 X:2.345e1 float(0.78539816339745)
-Y:2.345e1 X: float(1.5707963267949)
 Y:2.345e1 X:1 float(1.5281782247706)
 Y:2.345e1 X: float(1.5707963267949)
-Y: X:23 float(0)
-Y: X:-23 float(3.1415926535898)
-Y: X:23.45 float(0)
-Y: X:-23.45 float(3.1415926535898)
-Y: X:23 float(0)
-Y: X:23 float(0)
-Y: X:23 float(0)
-Y: X:23.45 float(0)
-Y: X:2.345e1 float(0)
-Y: X: float(0)
-Y: X:1 float(0)
-Y: X: float(0)
 Y:1 X:23 float(0.043450895391531)
 Y:1 X:-23 float(3.0981417581983)
 Y:1 X:23.45 float(0.042618102024328)
@@ -168,7 +145,6 @@ Y:1 X:23 float(0.043450895391531)
 Y:1 X:23 float(0.043450895391531)
 Y:1 X:23.45 float(0.042618102024328)
 Y:1 X:2.345e1 float(0.042618102024328)
-Y:1 X: float(1.5707963267949)
 Y:1 X:1 float(0.78539816339745)
 Y:1 X: float(1.5707963267949)
 Y: X:23 float(0)
@@ -180,6 +156,5 @@ Y: X:23 float(0)
 Y: X:23 float(0)
 Y: X:23.45 float(0)
 Y: X:2.345e1 float(0)
-Y: X: float(0)
 Y: X:1 float(0)
 Y: X: float(0)
index 88593c84debfb588e3cf3547d29b8ee3bcec2ee3..abd3831dddc676c7d93c4c17c1c3ce030352c413 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(1.5273454314033659)
 float(1.528178224770569)
 float(1.528178224770569)
 float(1.5697963271282298)
-float(0)
 float(0.7853981633974483)
 float(0)
index fa71e206c8e0e26de93bac8f0bc423c204491110..f740c1ccc00a43a08810380432371dbfa9e8bf52 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(NAN)
 float(NAN)
 float(NAN)
 float(NAN)
-float(0)
 float(INF)
 float(0)
index 8d8e0ff3a295b7d613b25c16eed63edcaaf30a7f..fd06465ab574b3db0b4bda6deb824078e7c22f0b 100644 (file)
@@ -4,10 +4,6 @@ Test base_convert() function : usage variations - different data types as $numbe
 <?php
 echo "*** Testing base_convert() : usage variations ***\n";
 
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
 // heredoc string
 $heredoc = <<<EOT
 abc
@@ -32,10 +28,6 @@ $inputs = array(
        1.234567E-2,
        .5,
 
-       // null data
-/*11*/ NULL,
-       null,
-
        // boolean data
 /*13*/ true,
        false,
@@ -52,12 +44,6 @@ $inputs = array(
        'abcxyz',
        $heredoc,
 
-       // undefined data
-/*23*/ @$undefined_var,
-
-       // unset data
-/*24*/ @$unset_var,
-
        // resource variable
 /*25*/ $fp
 );
@@ -121,7 +107,7 @@ Deprecated: Invalid characters passed for attempted conversion, these have been
 string(1) "5"
 
 -- Iteration 11 --
-string(1) "0"
+string(1) "1"
 
 -- Iteration 12 --
 string(1) "0"
@@ -133,40 +119,28 @@ string(1) "1"
 string(1) "0"
 
 -- Iteration 15 --
-string(1) "1"
+string(1) "0"
 
 -- Iteration 16 --
 string(1) "0"
 
 -- Iteration 17 --
-string(1) "0"
-
--- Iteration 18 --
-string(1) "0"
-
--- Iteration 19 --
 base_convert(): Argument #1 ($num) must be of type string, array given
 
--- Iteration 20 --
+-- Iteration 18 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 string(1) "0"
 
--- Iteration 21 --
+-- Iteration 19 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 string(1) "0"
 
--- Iteration 22 --
+-- Iteration 20 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 string(1) "0"
 
--- Iteration 23 --
-string(1) "0"
-
--- Iteration 24 --
-string(1) "0"
-
--- Iteration 25 --
+-- Iteration 21 --
 base_convert(): Argument #1 ($num) must be of type string, resource given
index 03eec8ee306670765db6432e7b69ad8907e189f2..7640171fe61b6716fed1f6d9c27c882487a520ba 100644 (file)
@@ -26,7 +26,7 @@ $values = array(111000111,
                 011237,
                 true,
                 false,
-                null);
+                );
 
 for ($i = 0; $i < count($values); $i++) {
     $res = bindec($values[$i]);
@@ -74,4 +74,3 @@ Deprecated: Invalid characters passed for attempted conversion, these have been
 int(0)
 int(1)
 int(0)
-int(0)
index b8f46b6748dd8088012208fc5036eb7d1642cdce..8fece221c0edec02de662e15f30478c2aa4fa42c 100644 (file)
@@ -26,7 +26,7 @@ $values = array(111000111,
                 011237,
                 true,
                 false,
-                null);
+                );
 
 for ($i = 0; $i < count($values); $i++) {
     $res = bindec($values[$i]);
@@ -74,4 +74,3 @@ Deprecated: Invalid characters passed for attempted conversion, these have been
 int(0)
 int(1)
 int(0)
-int(0)
index 5c6b2e1b1e000b75a7462322f11a636057cb1cc7..420ceeed7a6a8e393e49bd64d892b37046cc612c 100644 (file)
@@ -7,9 +7,6 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
 --FILE--
 <?php
 echo "*** Testing bindec() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
 
 // heredoc string
 $heredoc = <<<EOT
@@ -34,10 +31,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*10*/ NULL,
-       null,
-
        // boolean data
 /*12*/ true,
        false,
@@ -54,12 +47,6 @@ $inputs = array(
        'abcxyz',
        $heredoc,
 
-       // undefined data
-/*22*/ @$undefined_var,
-
-       // unset data
-/*23*/ @$unset_var,
-
        // resource variable
 /*24*/ $fp
 );
@@ -122,7 +109,7 @@ Deprecated: Invalid characters passed for attempted conversion, these have been
 int(0)
 
 -- Iteration 10 --
-int(0)
+int(1)
 
 -- Iteration 11 --
 int(0)
@@ -134,40 +121,28 @@ int(1)
 int(0)
 
 -- Iteration 14 --
-int(1)
+int(0)
 
 -- Iteration 15 --
 int(0)
 
 -- Iteration 16 --
-int(0)
-
--- Iteration 17 --
-int(0)
-
--- Iteration 18 --
 bindec(): Argument #1 ($binary_string) must be of type string, array given
 
--- Iteration 19 --
+-- Iteration 17 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(0)
 
--- Iteration 20 --
+-- Iteration 18 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(0)
 
--- Iteration 21 --
+-- Iteration 19 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(0)
 
--- Iteration 22 --
-int(0)
-
--- Iteration 23 --
-int(0)
-
--- Iteration 24 --
+-- Iteration 20 --
 bindec(): Argument #1 ($binary_string) must be of type string, resource given
index e83edbe59c6607ee203f1e61f90df6b4c49beb66..56bbbd35649b5e7a6c2d80d0413911793dfe5166 100644 (file)
@@ -7,9 +7,6 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
 --FILE--
 <?php
 echo "*** Testing bindec() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
 
 // heredoc string
 $heredoc = <<<EOT
@@ -34,10 +31,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*10*/ NULL,
-       null,
-
        // boolean data
 /*12*/ true,
        false,
@@ -54,12 +47,6 @@ $inputs = array(
        'abcxyz',
        $heredoc,
 
-       // undefined data
-/*22*/ @$undefined_var,
-
-       // unset data
-/*23*/ @$unset_var,
-
        // resource variable
 /*24*/ $fp
 );
@@ -122,7 +109,7 @@ Deprecated: Invalid characters passed for attempted conversion, these have been
 int(0)
 
 -- Iteration 10 --
-int(0)
+int(1)
 
 -- Iteration 11 --
 int(0)
@@ -134,40 +121,28 @@ int(1)
 int(0)
 
 -- Iteration 14 --
-int(1)
+int(0)
 
 -- Iteration 15 --
 int(0)
 
 -- Iteration 16 --
-int(0)
-
--- Iteration 17 --
-int(0)
-
--- Iteration 18 --
 bindec(): Argument #1 ($binary_string) must be of type string, array given
 
--- Iteration 19 --
+-- Iteration 17 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(0)
 
--- Iteration 20 --
+-- Iteration 18 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(0)
 
--- Iteration 21 --
+-- Iteration 19 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(0)
 
--- Iteration 22 --
-int(0)
-
--- Iteration 23 --
-int(0)
-
--- Iteration 24 --
+-- Iteration 20 --
 bindec(): Argument #1 ($binary_string) must be of type string, resource given
index a8b3ede2a266ad8755029089b48f5d64de16ce9e..7bdc87d16eaf537a678d3c57bdab4df73d1ba4b6 100644 (file)
@@ -33,7 +33,7 @@ for ($i = 0; $i < count($values); $i++) {
 }
 
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing ceil() : basic functionality ***
 float(0)
 float(0)
@@ -54,4 +54,6 @@ float(-3950)
 float(39)
 float(1)
 float(0)
+
+Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
index ce61442f6554ce26dac5fe886172b89f37fea10b..7751946ea9546d8a6b2025493eb6fb0289c636ba 100644 (file)
@@ -71,13 +71,17 @@ foreach($inputs as $input) {
 };
 fclose($fp);
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing ceil() : usage variations ***
 
 -- Iteration 1 --
+
+Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 2 --
+
+Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 3 --
@@ -114,9 +118,13 @@ ceil(): Argument #1 ($num) must be of type int|float, string given
 ceil(): Argument #1 ($num) must be of type int|float, classA given
 
 -- Iteration 14 --
+
+Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 15 --
+
+Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 16 --
index 23af5e873bc8a2d9eea38963ac5651e6858b5f71..19d72f60a795f8ec9d36a2b0b9fbf006919201fc 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(-0.5328330203)
 float(-0.1117112391)
 float(-0.1117112391)
 float(0.5623790763)
-float(1)
 float(0.5403023059)
 float(1)
index 1a0a6b69e769a04c55fcf6bc1310d9b92e3e1037..475c19fd50d6dd3aae057fa210ebd30ca89346e3 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(4872401723)
 float(7641446995)
 float(7641446995)
 float(INF)
-float(1)
 float(1.543080635)
 float(1)
index 54b771ca26c200f44c29ff28f804c2b727af8c65..ff1d5896f6182766240cff75f90d09c05741f07a 100644 (file)
@@ -14,7 +14,6 @@ $values = array(10,
                 "0x5F",
                 true,
                 false,
-                null,
                 );
 
 foreach ($values as $value) {
@@ -39,4 +38,3 @@ string(6) "100111"
 decbin(): Argument #1 ($num) must be of type int, string given
 string(1) "1"
 string(1) "0"
-string(1) "0"
index fd9addc721c7c9ed3bdde9b9ba220c7005da6b34..5ac82d41d6a7755f0cfb87beec81db06fb65f545 100644 (file)
@@ -9,9 +9,6 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
 --FILE--
 <?php
 echo "*** Testing decbin() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
 
 // heredoc string
 $heredoc = <<<EOT
@@ -43,10 +40,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*12*/ NULL,
-       null,
-
        // boolean data
 /*14*/ true,
        false,
@@ -66,12 +59,6 @@ $inputs = array(
        // object data
 /*24*/ new classA(),
 
-       // undefined data
-/*25*/ @$undefined_var,
-
-       // unset data
-/*26*/ @$unset_var,
-
        // resource variable
 /*27*/ $fp
 );
@@ -127,7 +114,7 @@ string(1) "0"
 string(1) "0"
 
 -- Iteration 12 --
-string(1) "0"
+string(1) "1"
 
 -- Iteration 13 --
 string(1) "0"
@@ -139,37 +126,25 @@ string(1) "1"
 string(1) "0"
 
 -- Iteration 16 --
-string(1) "1"
+decbin(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 17 --
-string(1) "0"
+decbin(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 18 --
-decbin(): Argument #1 ($num) must be of type int, string given
+decbin(): Argument #1 ($num) must be of type int, array given
 
 -- Iteration 19 --
 decbin(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 20 --
-decbin(): Argument #1 ($num) must be of type int, array given
+decbin(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 21 --
 decbin(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 22 --
-decbin(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 23 --
-decbin(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 24 --
 decbin(): Argument #1 ($num) must be of type int, classA given
 
--- Iteration 25 --
-string(1) "0"
-
--- Iteration 26 --
-string(1) "0"
-
--- Iteration 27 --
+-- Iteration 23 --
 decbin(): Argument #1 ($num) must be of type int, resource given
index f9e1b19b290304d9f56046e4dd4c6e590cb665bb..15bb86439822472ffe3d3a02f7fe977bd53fe8a3 100644 (file)
@@ -9,9 +9,6 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
 --FILE--
 <?php
 echo "*** Testing decbin() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
 
 // heredoc string
 $heredoc = <<<EOT
@@ -43,10 +40,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*12*/ NULL,
-       null,
-
        // boolean data
 /*14*/ true,
        false,
@@ -66,12 +59,6 @@ $inputs = array(
        // object data
 /*24*/ new classA(),
 
-       // undefined data
-/*25*/ @$undefined_var,
-
-       // unset data
-/*26*/ @$unset_var,
-
        // resource variable
 /*27*/ $fp
 );
@@ -125,7 +112,7 @@ string(1) "0"
 string(1) "0"
 
 -- Iteration 12 --
-string(1) "0"
+string(1) "1"
 
 -- Iteration 13 --
 string(1) "0"
@@ -137,37 +124,25 @@ string(1) "1"
 string(1) "0"
 
 -- Iteration 16 --
-string(1) "1"
+decbin(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 17 --
-string(1) "0"
+decbin(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 18 --
-decbin(): Argument #1 ($num) must be of type int, string given
+decbin(): Argument #1 ($num) must be of type int, array given
 
 -- Iteration 19 --
 decbin(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 20 --
-decbin(): Argument #1 ($num) must be of type int, array given
+decbin(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 21 --
 decbin(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 22 --
-decbin(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 23 --
-decbin(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 24 --
 decbin(): Argument #1 ($num) must be of type int, classA given
 
--- Iteration 25 --
-string(1) "0"
-
--- Iteration 26 --
-string(1) "0"
-
--- Iteration 27 --
+-- Iteration 23 --
 decbin(): Argument #1 ($num) must be of type int, resource given
index 92e9c426b3755a24e158016e90d5780f3fa812a2..4fde95ebe7cdf59fccb8231cb5e3e4a3653a3c57 100644 (file)
@@ -14,7 +14,6 @@ $values = array(10,
                 "0x5F",
                 true,
                 false,
-                null,
                 );
 
 foreach ($values as $value) {
@@ -39,4 +38,3 @@ string(2) "27"
 dechex(): Argument #1 ($num) must be of type int, string given
 string(1) "1"
 string(1) "0"
-string(1) "0"
index 8add97f7a24d1f7e4d11e9c83bef078a9df8653c..8fee0d42ad7f8f9875651e52bbbd0917f8206b71 100644 (file)
@@ -9,9 +9,6 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
 --FILE--
 <?php
 echo "*** Testing dechex() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
 
 // heredoc string
 $heredoc = <<<EOT
@@ -43,10 +40,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*12*/ NULL,
-       null,
-
        // boolean data
 /*14*/ true,
        false,
@@ -66,12 +59,6 @@ $inputs = array(
        // object data
 /*24*/ new classA(),
 
-       // undefined data
-/*25*/ @$undefined_var,
-
-       // unset data
-/*26*/ @$unset_var,
-
        // resource variable
 /*27*/ $fp
 );
@@ -127,7 +114,7 @@ string(1) "0"
 string(1) "0"
 
 -- Iteration 12 --
-string(1) "0"
+string(1) "1"
 
 -- Iteration 13 --
 string(1) "0"
@@ -139,37 +126,25 @@ string(1) "1"
 string(1) "0"
 
 -- Iteration 16 --
-string(1) "1"
+dechex(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 17 --
-string(1) "0"
+dechex(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 18 --
-dechex(): Argument #1 ($num) must be of type int, string given
+dechex(): Argument #1 ($num) must be of type int, array given
 
 -- Iteration 19 --
 dechex(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 20 --
-dechex(): Argument #1 ($num) must be of type int, array given
+dechex(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 21 --
 dechex(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 22 --
-dechex(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 23 --
-dechex(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 24 --
 dechex(): Argument #1 ($num) must be of type int, classA given
 
--- Iteration 25 --
-string(1) "0"
-
--- Iteration 26 --
-string(1) "0"
-
--- Iteration 27 --
+-- Iteration 23 --
 dechex(): Argument #1 ($num) must be of type int, resource given
index 020bbcd22ce73a0d7d74edfdfd5a69c5bbdb6999..8435d2bc30badb01b4404b29645fce215c87006c 100644 (file)
@@ -9,9 +9,6 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
 --FILE--
 <?php
 echo "*** Testing dechex() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
 
 // heredoc string
 $heredoc = <<<EOT
@@ -43,10 +40,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*12*/ NULL,
-       null,
-
        // boolean data
 /*14*/ true,
        false,
@@ -66,12 +59,6 @@ $inputs = array(
        // object data
 /*24*/ new classA(),
 
-       // undefined data
-/*25*/ @$undefined_var,
-
-       // unset data
-/*26*/ @$unset_var,
-
        // resource variable
 /*27*/ $fp
 );
@@ -126,7 +113,7 @@ string(1) "0"
 string(1) "0"
 
 -- Iteration 12 --
-string(1) "0"
+string(1) "1"
 
 -- Iteration 13 --
 string(1) "0"
@@ -138,37 +125,25 @@ string(1) "1"
 string(1) "0"
 
 -- Iteration 16 --
-string(1) "1"
+dechex(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 17 --
-string(1) "0"
+dechex(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 18 --
-dechex(): Argument #1 ($num) must be of type int, string given
+dechex(): Argument #1 ($num) must be of type int, array given
 
 -- Iteration 19 --
 dechex(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 20 --
-dechex(): Argument #1 ($num) must be of type int, array given
+dechex(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 21 --
 dechex(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 22 --
-dechex(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 23 --
-dechex(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 24 --
 dechex(): Argument #1 ($num) must be of type int, classA given
 
--- Iteration 25 --
-string(1) "0"
-
--- Iteration 26 --
-string(1) "0"
-
--- Iteration 27 --
+-- Iteration 23 --
 dechex(): Argument #1 ($num) must be of type int, resource given
index 9252789b2464ba2fe9a87d14fece77505005a96f..2bf63662f410bbe01ff4521a8bf8cbffbfb64240 100644 (file)
@@ -14,7 +14,6 @@ $values = array(10,
                 "0x5F",
                 true,
                 false,
-                null,
                 );
 
 foreach ($values as $value) {
@@ -39,4 +38,3 @@ string(2) "47"
 decoct(): Argument #1 ($num) must be of type int, string given
 string(1) "1"
 string(1) "0"
-string(1) "0"
index a236ea53678bc2680c32c527571792633ab4e232..608bb568735fbacd726ede2a6d6a86dbb2c0ba7a 100644 (file)
@@ -9,10 +9,6 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
 --FILE--
 <?php
 echo "*** Testing decoct() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
 
 // heredoc string
 $heredoc = <<<EOT
@@ -44,10 +40,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*12*/ NULL,
-       null,
-
        // boolean data
 /*14*/ true,
        false,
@@ -67,12 +59,6 @@ $inputs = array(
        // object data
 /*24*/ new classA(),
 
-       // undefined data
-/*25*/ @$undefined_var,
-
-       // unset data
-/*26*/ @$unset_var,
-
        // resource variable
 /*27*/ $fp
 );
@@ -127,7 +113,7 @@ string(1) "0"
 string(1) "0"
 
 -- Iteration 12 --
-string(1) "0"
+string(1) "1"
 
 -- Iteration 13 --
 string(1) "0"
@@ -139,37 +125,25 @@ string(1) "1"
 string(1) "0"
 
 -- Iteration 16 --
-string(1) "1"
+decoct(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 17 --
-string(1) "0"
+decoct(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 18 --
-decoct(): Argument #1 ($num) must be of type int, string given
+decoct(): Argument #1 ($num) must be of type int, array given
 
 -- Iteration 19 --
 decoct(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 20 --
-decoct(): Argument #1 ($num) must be of type int, array given
+decoct(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 21 --
 decoct(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 22 --
-decoct(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 23 --
-decoct(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 24 --
 decoct(): Argument #1 ($num) must be of type int, classA given
 
--- Iteration 25 --
-string(1) "0"
-
--- Iteration 26 --
-string(1) "0"
-
--- Iteration 27 --
+-- Iteration 23 --
 decoct(): Argument #1 ($num) must be of type int, resource given
index 2ecc212844c0be8a085c3bae0fa1c2c1ca92b465..73650f5983557c17189d40130e09a7e1d63d06f9 100644 (file)
@@ -9,10 +9,6 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
 --FILE--
 <?php
 echo "*** Testing decoct() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
 
 // heredoc string
 $heredoc = <<<EOT
@@ -44,10 +40,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*12*/ NULL,
-       null,
-
        // boolean data
 /*14*/ true,
        false,
@@ -67,12 +59,6 @@ $inputs = array(
        // object data
 /*24*/ new classA(),
 
-       // undefined data
-/*25*/ @$undefined_var,
-
-       // unset data
-/*26*/ @$unset_var,
-
        // resource variable
 /*27*/ $fp
 );
@@ -127,7 +113,7 @@ string(1) "0"
 string(1) "0"
 
 -- Iteration 12 --
-string(1) "0"
+string(1) "1"
 
 -- Iteration 13 --
 string(1) "0"
@@ -139,37 +125,25 @@ string(1) "1"
 string(1) "0"
 
 -- Iteration 16 --
-string(1) "1"
+decoct(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 17 --
-string(1) "0"
+decoct(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 18 --
-decoct(): Argument #1 ($num) must be of type int, string given
+decoct(): Argument #1 ($num) must be of type int, array given
 
 -- Iteration 19 --
 decoct(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 20 --
-decoct(): Argument #1 ($num) must be of type int, array given
+decoct(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 21 --
 decoct(): Argument #1 ($num) must be of type int, string given
 
 -- Iteration 22 --
-decoct(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 23 --
-decoct(): Argument #1 ($num) must be of type int, string given
-
--- Iteration 24 --
 decoct(): Argument #1 ($num) must be of type int, classA given
 
--- Iteration 25 --
-string(1) "0"
-
--- Iteration 26 --
-string(1) "0"
-
--- Iteration 27 --
+-- Iteration 23 --
 decoct(): Argument #1 ($num) must be of type int, resource given
index 01cee28b185511d6b7e756cb54ae42ff11bbebe6..47a5a893679a50bcacfce702a6b331887e199522 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(0.40142572795869574)
 float(0.40927970959267024)
 float(0.40927970959267024)
 float(17.453292519943293)
-float(0)
 float(0.017453292519943295)
 float(0)
index cf67db2c7a4271bdab8648bf2e3d6be4d6ececf0..b10ab493a8848377f88bbf2e593fa23e216ee723 100644 (file)
@@ -15,7 +15,6 @@ $values = array(10,
                 "039",
                 true,
                 false,
-                null,
                 );
 
 $iterator = 1;
@@ -59,6 +58,3 @@ float(2.718281828459)
 
 -- Iteration 11 --
 float(1)
-
--- Iteration 12 --
-float(1)
index 99a46e5599b4c7f3cde8d37c2d2726b49534def6..ea4c165da2c461da7d05e297c386e1866163724c 100644 (file)
@@ -16,7 +16,6 @@ $values = array(10,
                 "039",
                 true,
                 false,
-                null,
                 );
 
 // loop through each element of $values to check the behaviour of expm1()
@@ -62,6 +61,3 @@ float(1.718281828459)
 
 -- Iteration 11 --
 float(0)
-
--- Iteration 12 --
-float(0)
index 3e4650aaa6d6575fb6d6d81edbbb470e736bdc80..308a055f808a3ff0d85d48ce99924a17f172430f 100644 (file)
@@ -33,7 +33,7 @@ foreach($values as $value) {
 };
 
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing floor() : basic functionality ***
 
 -- floor 0 --
@@ -94,4 +94,6 @@ float(1)
 float(0)
 
 -- floor  --
+
+Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
index 0b5f09f27dce510c81ad6ba8750b26e1a4b9e7e5..c9ec5e710c512264eb3a7b2a48f6d35078570339 100644 (file)
@@ -71,13 +71,17 @@ foreach($inputs as $input) {
 };
 fclose($fp);
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing floor() : usage variations ***
 
 -- Iteration 1 --
+
+Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 2 --
+
+Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 3 --
@@ -114,9 +118,13 @@ floor(): Argument #1 ($num) must be of type int|float, string given
 floor(): Argument #1 ($num) must be of type int|float, classA given
 
 -- Iteration 14 --
+
+Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 15 --
+
+Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 16 --
index 731b76adab13e6c680c3a4d7580f0d49ed70fe16..84cd27125c412df148e52b761cddbc5e9013d3e6 100644 (file)
@@ -13,7 +13,6 @@ $values1 = array(234,
                 "234",
                 "234.5",
                 "23.45e1",
-                null,
                 true,
                 false);
 
@@ -26,7 +25,6 @@ $values2 = array(2,
                 "2",
                 "2.3",
                 "2.3e1",
-                null,
                 true,
                 false);
 for ($i = 0; $i < count($values1); $i++) {
@@ -49,7 +47,6 @@ float(0)
 float(0)
 float(1.700000000000018)
 float(4)
-float(NAN)
 float(0)
 float(NAN)
 
@@ -63,7 +60,6 @@ float(-0)
 float(-0)
 float(-1.700000000000018)
 float(-4)
-float(NAN)
 float(-0)
 float(NAN)
 
@@ -77,7 +73,6 @@ float(0.5)
 float(0.5)
 float(2.200000000000018)
 float(4.5)
-float(NAN)
 float(0.5)
 float(NAN)
 
@@ -91,7 +86,6 @@ float(-0.5)
 float(-0.5)
 float(-2.200000000000018)
 float(-4.5)
-float(NAN)
 float(-0.5)
 float(NAN)
 
@@ -105,7 +99,6 @@ float(0)
 float(0)
 float(1.700000000000018)
 float(4)
-float(NAN)
 float(0)
 float(NAN)
 
@@ -119,7 +112,6 @@ float(0)
 float(0)
 float(1.700000000000018)
 float(4)
-float(NAN)
 float(0)
 float(NAN)
 
@@ -133,7 +125,6 @@ float(0)
 float(0)
 float(1.700000000000018)
 float(4)
-float(NAN)
 float(0)
 float(NAN)
 
@@ -147,7 +138,6 @@ float(0.5)
 float(0.5)
 float(2.200000000000018)
 float(4.5)
-float(NAN)
 float(0.5)
 float(NAN)
 
@@ -161,25 +151,10 @@ float(0.5)
 float(0.5)
 float(2.200000000000018)
 float(4.5)
-float(NAN)
 float(0.5)
 float(NAN)
 
 iteration 9
-float(0)
-float(0)
-float(0)
-float(0)
-float(0)
-float(0)
-float(0)
-float(0)
-float(0)
-float(NAN)
-float(0)
-float(NAN)
-
-iteration 10
 float(1)
 float(1)
 float(1)
@@ -189,11 +164,10 @@ float(1)
 float(1)
 float(1)
 float(1)
-float(NAN)
 float(0)
 float(NAN)
 
-iteration 11
+iteration 10
 float(0)
 float(0)
 float(0)
@@ -203,6 +177,5 @@ float(0)
 float(0)
 float(0)
 float(0)
-float(NAN)
 float(0)
 float(NAN)
index 748c641a1acf65d35fdf7a05c4e66876749a7da3..2f06b9650aed3710cd13989068cda4ad4c879a6a 100644 (file)
@@ -23,7 +23,7 @@ $values = array(0x123abc,
                 '011237',
                 true,
                 false,
-                null);
+                );
 for ($i = 0; $i < count($values); $i++) {
     $res = hexdec($values[$i]);
     var_dump($res);
@@ -51,4 +51,3 @@ int(18279)
 int(70199)
 int(1)
 int(0)
-int(0)
index c7c59451f554f5b8bc5e564e1feb3a694dfdb56a..fd6d53b60198215b3d1f55dc4afdca73827de65c 100644 (file)
@@ -25,7 +25,7 @@ $values = array(0x123abc,
                 '011237',
                 true,
                 false,
-                null);
+                );
 
 foreach($values as $value) {
     echo "\n-- hexdec $value --\n";
@@ -90,6 +90,3 @@ int(1)
 
 -- hexdec  --
 int(0)
-
--- hexdec  --
-int(0)
index 703d30f0862b053a15e6e965d91449df2c23f33f..65ebbe347b9b6bf7b9d3339fde83f583fb6ca8bc 100644 (file)
@@ -9,9 +9,6 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
 --FILE--
 <?php
 echo "*** Testing hexdec() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
 
 // heredoc string
 $heredoc = <<<EOT
@@ -38,10 +35,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*12*/ NULL,
-       null,
-
        // boolean data
 /*14*/ true,
        false,
@@ -58,12 +51,6 @@ $inputs = array(
        'abcxyz',
        $heredoc,
 
-       // undefined data
-/*24*/ @$undefined_var,
-
-       // unset data
-/*25*/ @$unset_var,
-
        // resource variable
 /*26*/ $fp
 );
@@ -128,7 +115,7 @@ Deprecated: Invalid characters passed for attempted conversion, these have been
 int(5)
 
 -- Iteration 12 --
-int(0)
+int(1)
 
 -- Iteration 13 --
 int(0)
@@ -140,40 +127,28 @@ int(1)
 int(0)
 
 -- Iteration 16 --
-int(1)
+int(0)
 
 -- Iteration 17 --
 int(0)
 
 -- Iteration 18 --
-int(0)
-
--- Iteration 19 --
-int(0)
-
--- Iteration 20 --
 hexdec(): Argument #1 ($hex_string) must be of type string, array given
 
--- Iteration 21 --
+-- Iteration 19 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(2748)
 
--- Iteration 22 --
+-- Iteration 20 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(2748)
 
--- Iteration 23 --
+-- Iteration 21 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(2748)
 
--- Iteration 24 --
-int(0)
-
--- Iteration 25 --
-int(0)
-
--- Iteration 26 --
+-- Iteration 22 --
 hexdec(): Argument #1 ($hex_string) must be of type string, resource given
index 9c76afec0bf2eadba737324c80d6e576cb1251af..c892b8049fc9a17097214f495c2a3910b109d1f2 100644 (file)
@@ -9,9 +9,6 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
 --FILE--
 <?php
 echo "*** Testing hexdec() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
 
 // heredoc string
 $heredoc = <<<EOT
@@ -38,10 +35,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*12*/ NULL,
-       null,
-
        // boolean data
 /*14*/ true,
        false,
@@ -58,12 +51,6 @@ $inputs = array(
        'abcxyz',
        $heredoc,
 
-       // undefined data
-/*24*/ @$undefined_var,
-
-       // unset data
-/*25*/ @$unset_var,
-
        // resource variable
 /*26*/ $fp
 );
@@ -128,7 +115,7 @@ Deprecated: Invalid characters passed for attempted conversion, these have been
 int(5)
 
 -- Iteration 12 --
-int(0)
+int(1)
 
 -- Iteration 13 --
 int(0)
@@ -140,40 +127,28 @@ int(1)
 int(0)
 
 -- Iteration 16 --
-int(1)
+int(0)
 
 -- Iteration 17 --
 int(0)
 
 -- Iteration 18 --
-int(0)
-
--- Iteration 19 --
-int(0)
-
--- Iteration 20 --
 hexdec(): Argument #1 ($hex_string) must be of type string, array given
 
--- Iteration 21 --
+-- Iteration 19 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(2748)
 
--- Iteration 22 --
+-- Iteration 20 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(2748)
 
--- Iteration 23 --
+-- Iteration 21 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(2748)
 
--- Iteration 24 --
-int(0)
-
--- Iteration 25 --
-int(0)
-
--- Iteration 26 --
+-- Iteration 22 --
 hexdec(): Argument #1 ($hex_string) must be of type string, resource given
index 1b4b04f00a9cc736deada4b75a71776a1d990355..750d688a1705aee1a730b5b2c1d016a48286d5b7 100644 (file)
@@ -16,7 +16,6 @@ $valuesy = array(23,
                 "23",
                 "23.45",
                 "2.345e1",
-                null,
                 true,
                 false);
 
@@ -29,7 +28,6 @@ $valuesx = array(33,
                 "33",
                 "43.45",
                 "1.345e1",
-                null,
                 true,
                 false);
 
@@ -62,8 +60,6 @@ Y:23 X:43.45 float(49.1620026036369)
 
 Y:23 X:1.345e1 float(26.6439955712352)
 
-Y:23 X: float(23)
-
 Y:23 X:1 float(23.0217288664427)
 
 Y:23 X: float(23)
@@ -86,8 +82,6 @@ Y:-23 X:43.45 float(49.1620026036369)
 
 Y:-23 X:1.345e1 float(26.6439955712352)
 
-Y:-23 X: float(23)
-
 Y:-23 X:1 float(23.0217288664427)
 
 Y:-23 X: float(23)
@@ -110,8 +104,6 @@ Y:23.45 X:43.45 float(49.3741329037787)
 
 Y:23.45 X:1.345e1 float(27.033405260899)
 
-Y:23.45 X: float(23.45)
-
 Y:23.45 X:1 float(23.4713122769052)
 
 Y:23.45 X: float(23.45)
@@ -134,8 +126,6 @@ Y:-23.45 X:43.45 float(49.3741329037787)
 
 Y:-23.45 X:1.345e1 float(27.033405260899)
 
-Y:-23.45 X: float(23.45)
-
 Y:-23.45 X:1 float(23.4713122769052)
 
 Y:-23.45 X: float(23.45)
@@ -158,8 +148,6 @@ Y:23 X:43.45 float(49.1620026036369)
 
 Y:23 X:1.345e1 float(26.6439955712352)
 
-Y:23 X: float(23)
-
 Y:23 X:1 float(23.0217288664427)
 
 Y:23 X: float(23)
@@ -182,8 +170,6 @@ Y:23 X:43.45 float(49.1620026036369)
 
 Y:23 X:1.345e1 float(26.6439955712352)
 
-Y:23 X: float(23)
-
 Y:23 X:1 float(23.0217288664427)
 
 Y:23 X: float(23)
@@ -206,8 +192,6 @@ Y:23 X:43.45 float(49.1620026036369)
 
 Y:23 X:1.345e1 float(26.6439955712352)
 
-Y:23 X: float(23)
-
 Y:23 X:1 float(23.0217288664427)
 
 Y:23 X: float(23)
@@ -230,8 +214,6 @@ Y:23.45 X:43.45 float(49.3741329037787)
 
 Y:23.45 X:1.345e1 float(27.033405260899)
 
-Y:23.45 X: float(23.45)
-
 Y:23.45 X:1 float(23.4713122769052)
 
 Y:23.45 X: float(23.45)
@@ -254,36 +236,10 @@ Y:2.345e1 X:43.45 float(49.3741329037787)
 
 Y:2.345e1 X:1.345e1 float(27.033405260899)
 
-Y:2.345e1 X: float(23.45)
-
 Y:2.345e1 X:1 float(23.4713122769052)
 
 Y:2.345e1 X: float(23.45)
 
-Y: X:33 float(33)
-
-Y: X:-33 float(33)
-
-Y: X:33.45 float(33.45)
-
-Y: X:-33.45 float(33.45)
-
-Y: X:39 float(39)
-
-Y: X:31 float(31)
-
-Y: X:33 float(33)
-
-Y: X:43.45 float(43.45)
-
-Y: X:1.345e1 float(13.45)
-
-Y: X: float(0)
-
-Y: X:1 float(1)
-
-Y: X: float(0)
-
 Y:1 X:33 float(33.0151480384384)
 
 Y:1 X:-33 float(33.0151480384384)
@@ -302,8 +258,6 @@ Y:1 X:43.45 float(43.4615059564208)
 
 Y:1 X:1.345e1 float(13.4871234887206)
 
-Y:1 X: float(1)
-
 Y:1 X:1 float(1.4142135623731)
 
 Y:1 X: float(1)
@@ -326,8 +280,6 @@ Y: X:43.45 float(43.45)
 
 Y: X:1.345e1 float(13.45)
 
-Y: X: float(0)
-
 Y: X:1 float(1)
 
 Y: X: float(0)
index 9ee9d544e3c7421b1156332d35b214eab5460b86..bc044e69eacdc8b94f15d0fcd3be461b28cc682a 100644 (file)
@@ -11,7 +11,6 @@ $values = array(234,
                 "234",
                 "234.5",
                 "23.45e1",
-                null,
                 true,
                 false,
                 pow(0, -2),
@@ -34,6 +33,5 @@ bool(true)
 bool(true)
 bool(true)
 bool(true)
-bool(true)
 bool(false)
 bool(false)
index 076f202c146eac3edc7e8e8526d7a8440132f385..0c7b07611867be30347a8224ca141d41173f9670 100644 (file)
@@ -11,7 +11,6 @@ $values = array(234,
                 "234",
                 "234.5",
                 "23.45e1",
-                null,
                 true,
                 false,
                 pow(0, -2),
@@ -34,6 +33,5 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-bool(false)
 bool(true)
 bool(false)
index fabc40b97b614198fd7ae8db4b51d04af4771277..65555e25ae95a94985058944050ce301c94b0e4d 100644 (file)
@@ -11,7 +11,6 @@ $values = array(234,
                 "234",
                 "234.5",
                 "23.45e1",
-                null,
                 true,
                 false,
                 pow(0, -2),
@@ -37,5 +36,4 @@ bool(false)
 bool(false)
 bool(false)
 bool(false)
-bool(false)
 bool(true)
index 6e73cd7beafdf1162d5da59a23e0a4bc53d00003..9da765d5ae16990030ce264977d97a665e81b6e3 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(1.3617278360175928)
 float(1.3701428470511021)
 float(1.3701428470511021)
 float(3)
-float(-INF)
 float(0)
 float(-INF)
index c7ffe2ec18e13d989e1092696f4875dc44f60b9a..7b19c3f9f4254b3fb2394c78cbf6d8e2e89f39ce 100644 (file)
@@ -15,7 +15,6 @@ $values = array(23,
                 "23",
                 "23.45",
                 "2.345e1",
-                null,
                 true,
                 false);
 
@@ -60,9 +59,6 @@ float(3.196630215920881)
 -- log1p 2.345e1 --
 float(3.196630215920881)
 
--- log1p  --
-float(0)
-
 -- log1p 1 --
 float(0.6931471805599453)
 
index 84e72bb14d7fc8768331eb0ddbf8d2615caec30c..ae2e790bcceb31d92df144617c6d1ca0019308d7 100644 (file)
@@ -13,7 +13,6 @@ $values = array(23,
                 "23",
                 "23.45",
                 "2.345e1",
-                null,
                 true,
                 false);
 
@@ -40,7 +39,6 @@ float(3.1354942159291497)
 float(3.1354942159291497)
 float(3.1548704948922883)
 float(3.1548704948922883)
-float(-INF)
 float(0)
 float(-INF)
 
@@ -54,6 +52,5 @@ float(2.2617809780285065)
 float(2.2617809780285065)
 float(2.275758008814007)
 float(2.275758008814007)
-float(-INF)
 float(0)
 float(-INF)
index 24050bbc8a9919727a55ba52003c9d663402a7ed..113ca32ee6968ef4ca285dd854ffef51256cece2 100644 (file)
@@ -54,7 +54,6 @@ for ($x = 0; $x < count($min); $x++) {
 echo "\nNon-numeric cases\n";
 $min = array(true,
              false,
-             null,
              "10",
              "10.5");
 
@@ -94,6 +93,5 @@ PASSED: range min = 256 max = 448
 Non-numeric cases
 PASSED range min = 1 max = 100
 PASSED range min = 0 max = 100
-PASSED range min = 0 max = 100
 PASSED range min = 10 max = 100
 PASSED range min = 10 max = 100
index ec0c24254d9fd564a59eb059ab546bb4fa6cd7e5..71abbcb0aae0a19ef9e5983733d8c30fdb401166 100644 (file)
@@ -11,7 +11,6 @@ var_dump(mt_srand("500"));
 var_dump(mt_srand("500E3"));
 var_dump(mt_srand(true));
 var_dump(mt_srand(false));
-var_dump(mt_srand(NULL));
 ?>
 --EXPECT--
 NULL
@@ -21,4 +20,3 @@ NULL
 NULL
 NULL
 NULL
-NULL
index b82ad5c753885e5ff90b70ade4b9c691d4366778..022e573b01b19e8b9af189d21609f53d71fc32bc 100644 (file)
@@ -11,7 +11,6 @@ $values = array(1234.5678,
                 "123456789",
                 "123.456789",
                 "12.3456789e1",
-                null,
                 true,
                 false);
 
@@ -40,7 +39,7 @@ for ($i = 0; $i < count($values); $i++) {
 }
 ?>
 --EXPECT--
- number_format tests.....default
+number_format tests.....default
 string(5) "1,235"
 string(6) "-1,235"
 string(10) "12,346,578"
@@ -50,7 +49,6 @@ string(11) "402,653,183"
 string(11) "123,456,789"
 string(3) "123"
 string(3) "123"
-string(1) "0"
 string(1) "1"
 string(1) "0"
 
@@ -64,7 +62,6 @@ string(14) "402,653,183.00"
 string(14) "123,456,789.00"
 string(6) "123.46"
 string(6) "123.46"
-string(4) "0.00"
 string(4) "1.00"
 string(4) "0.00"
 
@@ -78,7 +75,6 @@ string(14) "402 653 183.00"
 string(14) "123 456 789.00"
 string(6) "123.46"
 string(6) "123.46"
-string(4) "0.00"
 string(4) "1.00"
 string(4) "0.00"
 
@@ -92,6 +88,5 @@ string(14) "402 653 183,00"
 string(14) "123 456 789,00"
 string(6) "123,46"
 string(6) "123,46"
-string(4) "0,00"
 string(4) "1,00"
 string(4) "0,00"
index 5648257e0313a08d8e3d94f00251b0d4c16c1f5c..1ed823042f18e3f4986ec6a480e1a6b16fa22070 100644 (file)
@@ -11,7 +11,6 @@ $values = array(1234.5678,
                 "123456789",
                 "123.456789",
                 "12.3456789e1",
-                null,
                 true,
                 false);
 
@@ -34,7 +33,7 @@ for ($i = 0; $i < count($values); $i++) {
 }
 ?>
 --EXPECT--
- number_format tests.....multiple character decimal point
+number_format tests.....multiple character decimal point
 string(13) "1 234&#183;57"
 string(14) "-1 234&#183;57"
 string(18) "12 346 578&#183;00"
@@ -44,7 +43,6 @@ string(19) "402 653 183&#183;00"
 string(19) "123 456 789&#183;00"
 string(11) "123&#183;46"
 string(11) "123&#183;46"
-string(9) "0&#183;00"
 string(9) "1&#183;00"
 string(9) "0&#183;00"
 
@@ -58,7 +56,6 @@ string(28) "402&thinsp;653&thinsp;183.00"
 string(28) "123&thinsp;456&thinsp;789.00"
 string(6) "123.46"
 string(6) "123.46"
-string(4) "0.00"
 string(4) "1.00"
 string(4) "0.00"
 
@@ -72,6 +69,5 @@ string(33) "402&thinsp;653&thinsp;183&#183;00"
 string(33) "123&thinsp;456&thinsp;789&#183;00"
 string(11) "123&#183;46"
 string(11) "123&#183;46"
-string(9) "0&#183;00"
 string(9) "1&#183;00"
 string(9) "0&#183;00"
index 1daf9a4338b34361bf0bc717f64a37ac8a10422c..4c3ffc8b8a91b05e21edd97383f664262876ba55 100644 (file)
@@ -22,7 +22,7 @@ $values = array(01234567,
                 31.1013e5,
                 true,
                 false,
-                null);
+                );
 
 for ($i = 0; $i < count($values); $i++) {
     $res = octdec($values[$i]);
@@ -57,4 +57,3 @@ int(102923)
 int(823384)
 int(1)
 int(0)
-int(0)
index bb8f70085d8759718853ebf45c99d47a3fcabd11..4051d9be63230540e120b69e3eb081bedb32e7ee 100644 (file)
@@ -25,7 +25,7 @@ $values = array(01234567,
                 31.1013e5,
                 true,
                 false,
-                null);
+                );
 
 for ($i = 0; $i < count($values); $i++) {
     $res = octdec($values[$i]);
@@ -62,4 +62,3 @@ int(102923)
 int(823384)
 int(1)
 int(0)
-int(0)
index 6ee2b6f91cf55ea8c36ee2cfa7dcceeda7fee1bf..c24d2e8e6beaea3ddd52dceeddbbb838854a87ab 100644 (file)
@@ -5,9 +5,6 @@ precision=14
 --FILE--
 <?php
 echo "*** Testing octdec() : usage variations ***\n";
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
 
 // heredoc string
 $heredoc = <<<EOT
@@ -34,10 +31,6 @@ $inputs = array(
        12.3456789000E-10,
        .5,
 
-       // null data
-/*12*/ NULL,
-       null,
-
        // boolean data
 /*14*/ true,
        false,
@@ -54,12 +47,6 @@ $inputs = array(
        'abcxyz',
        $heredoc,
 
-       // undefined data
-/*24*/ @$undefined_var,
-
-       // unset data
-/*25*/ @$unset_var,
-
        // resource variable
 /*26*/ $fp
 );
@@ -131,7 +118,7 @@ Deprecated: Invalid characters passed for attempted conversion, these have been
 int(5)
 
 -- Iteration 12 --
-int(0)
+int(1)
 
 -- Iteration 13 --
 int(0)
@@ -143,41 +130,29 @@ int(1)
 int(0)
 
 -- Iteration 16 --
-int(1)
+int(0)
 
 -- Iteration 17 --
 int(0)
 
 -- Iteration 18 --
-int(0)
-
--- Iteration 19 --
-int(0)
-
--- Iteration 20 --
 octdec(): Argument #1 ($octal_string) must be of type string, array given
 
--- Iteration 21 --
+-- Iteration 19 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(0)
 
--- Iteration 22 --
+-- Iteration 20 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(0)
 
--- Iteration 23 --
+-- Iteration 21 --
 
 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d
 int(0)
 
--- Iteration 24 --
-int(0)
-
--- Iteration 25 --
-int(0)
-
--- Iteration 26 --
+-- Iteration 22 --
 octdec(): Argument #1 ($octal_string) must be of type string, resource given
 ---Done---
index 122d5b2c13fbf61c778124f7ce39e3955a6fbca8..3cc1317ea83577f707a4a90d50a4fa4b301000e7 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(1317.8029288008934)
 float(1343.5860295817804)
 float(1343.5860295817804)
 float(57295.77951308232)
-float(0)
 float(57.29577951308232)
 float(0)
index 87e9d7cd425daff949efc3125cb65fe19c2a101c..06b46b227719fbf6fffecb45811bd3fa704f9e67 100644 (file)
@@ -54,7 +54,6 @@ for ($x = 0; $x < count($min); $x++) {
 echo "\nNon-numeric cases\n";
 $min = array(true,
              false,
-             null,
              "10",
              "10.5");
 
@@ -94,6 +93,5 @@ PASSED: range min = 256 max = 448
 Non-numeric cases
 PASSED range min = 1 max = 100
 PASSED range min = 0 max = 100
-PASSED range min = 0 max = 100
 PASSED range min = 10 max = 100
 PASSED range min = 10 max = 100
index 8f2ded09f322259b09a8d639f347a4df59dec87a..44aacf2eecdc7762bd61562d6a0ad0ac4f52fa07 100644 (file)
@@ -25,7 +25,6 @@ $precision = array(2,
                 "04",
                 "3.6",
                 "2.1e1",
-                null,
                 true,
                 false);
 
@@ -50,7 +49,6 @@ round: 123456789
 ...with precision 04-> float(123456789)
 ...with precision 3.6-> float(123456789)
 ...with precision 2.1e1-> float(123456789)
-...with precision -> float(123456789)
 ...with precision 1-> float(123456789)
 ...with precision -> float(123456789)
 round: 123.456789
@@ -63,7 +61,6 @@ round: 123.456789
 ...with precision 04-> float(123.4568)
 ...with precision 3.6-> float(123.457)
 ...with precision 2.1e1-> float(123.456789)
-...with precision -> float(123)
 ...with precision 1-> float(123.5)
 ...with precision -> float(123)
 round: -4.5679123
@@ -76,7 +73,6 @@ round: -4.5679123
 ...with precision 04-> float(-4.5679)
 ...with precision 3.6-> float(-4.568)
 ...with precision 2.1e1-> float(-4.5679123)
-...with precision -> float(-5)
 ...with precision 1-> float(-4.6)
 ...with precision -> float(-5)
 round: 12300
@@ -89,7 +85,6 @@ round: 12300
 ...with precision 04-> float(12300)
 ...with precision 3.6-> float(12300)
 ...with precision 2.1e1-> float(12300)
-...with precision -> float(12300)
 ...with precision 1-> float(12300)
 ...with precision -> float(12300)
 round: -4567
@@ -102,7 +97,6 @@ round: -4567
 ...with precision 04-> float(-4567)
 ...with precision 3.6-> float(-4567)
 ...with precision 2.1e1-> float(-4567)
-...with precision -> float(-4567)
 ...with precision 1-> float(-4567)
 ...with precision -> float(-4567)
 round: 2311527
@@ -115,7 +109,6 @@ round: 2311527
 ...with precision 04-> float(2311527)
 ...with precision 3.6-> float(2311527)
 ...with precision 2.1e1-> float(2311527)
-...with precision -> float(2311527)
 ...with precision 1-> float(2311527)
 ...with precision -> float(2311527)
 round: 14680063
@@ -128,7 +121,6 @@ round: 14680063
 ...with precision 04-> float(14680063)
 ...with precision 3.6-> float(14680063)
 ...with precision 2.1e1-> float(14680063)
-...with precision -> float(14680063)
 ...with precision 1-> float(14680063)
 ...with precision -> float(14680063)
 round: 1.234567
@@ -141,7 +133,6 @@ round: 1.234567
 ...with precision 04-> float(1.2346)
 ...with precision 3.6-> float(1.235)
 ...with precision 2.1e1-> float(1.234567)
-...with precision -> float(1)
 ...with precision 1-> float(1.2)
 ...with precision -> float(1)
 round: 2.3456789e8
@@ -154,6 +145,5 @@ round: 2.3456789e8
 ...with precision 04-> float(234567890)
 ...with precision 3.6-> float(234567890)
 ...with precision 2.1e1-> float(234567890)
-...with precision -> float(234567890)
 ...with precision 1-> float(234567890)
 ...with precision -> float(234567890)
index b6ce56dd4acad64e75038ee09f26848e5f583280..2a2adf27cae09d640a1bda1a441e113f0c32f703 100644 (file)
@@ -85,7 +85,7 @@ foreach($inputs as $input) {
 };
 fclose($fp);
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing round() : usage variations ***
 
 -- Iteration 1 --
@@ -119,9 +119,13 @@ float(1.23457E-9)
 float(0.5)
 
 -- Iteration 11 --
+
+Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 12 --
+
+Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 13 --
@@ -158,9 +162,13 @@ round(): Argument #1 ($num) must be of type int|float, string given
 round(): Argument #1 ($num) must be of type int|float, classA given
 
 -- Iteration 24 --
+
+Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 25 --
+
+Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d
 float(0)
 
 -- Iteration 26 --
index 84c5b60c7b3246b23369e51992a3f37515cedabd..6cca50a167730cf91b911534dbb6d3c135ef0b20 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(-0.8462204042)
 float(-0.9937407102)
 float(-0.9937407102)
 float(0.8268795405)
-float(0)
 float(0.8414709848)
 float(0)
index 4a26efb50a7deda0602aff51b2f8b6edfac5babb..f053e58144ee11127d22832a2d32e12abe322f6e 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(4872401723)
 float(7641446995)
 float(7641446995)
 float(INF)
-float(0)
 float(1.175201194)
 float(0)
index b0683b701a1b0a32665f39582920735c79aa68a2..eb73870d1fc3c51256ddacc8f35c1752dde20b57 100644 (file)
@@ -22,7 +22,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -44,6 +43,5 @@ float(4.795831523312719)
 float(4.8425200051213)
 float(4.8425200051213)
 float(31.622776601683793)
-float(0)
 float(1)
 float(0)
index d3a5447553dce4de076a5f2927db25a998c51f52..ce9a4e3f97ad965374bea358fe7a4169c79b2953 100644 (file)
@@ -13,7 +13,6 @@ var_dump(srand("500"));
 var_dump(srand("500E3"));
 var_dump(srand(true));
 var_dump(srand(false));
-var_dump(srand(NULL));
 ?>
 --EXPECT--
 *** Testing srand() : basic functionality ***
@@ -24,4 +23,3 @@ NULL
 NULL
 NULL
 NULL
-NULL
index 602db48e494bbb904b772fe50ce7671417f1bda6..4394ddcd57a83a90b22deb861ce48cf97662fb0e 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(1.588153083)
 float(8.895619796)
 float(8.895619796)
 float(1.470324156)
-float(0)
 float(1.557407725)
 float(0)
index aab33fea60d9c4d58df3d45f7c36ca2c55498273..d2011f474572784f7491010d4a24b22261cc095b 100644 (file)
@@ -21,7 +21,6 @@ $values = array(23,
         "23.45",
         "2.345e1",
         "1000",
-        null,
         true,
         false);
 
@@ -42,6 +41,5 @@ float(1)
 float(1)
 float(1)
 float(1)
-float(0)
 float(0.7615941559557649)
 float(0)
index a196763c1362edd6a0276e73184dfdf4699b9952..5f2ff1230cc6364ee77c7edfe695ce855597f44a 100644 (file)
@@ -20,11 +20,13 @@ var_dump(password_verify("foo", "$1"));
 
 echo "OK!";
 ?>
---EXPECT--
+--EXPECTF--
 bool(false)
 bool(false)
 bool(false)
 bool(true)
+
+Deprecated: password_verify(): Passing null to parameter #2 ($hash) of type string is deprecated in %s on line %d
 bool(false)
 bool(true)
 bool(false)
index be6b18559faa64304ecf5399d0057352e5ec9775..e8fdf2b69ad28b085ba383ecfd5b0da244af88a4 100644 (file)
Binary files a/ext/standard/tests/strings/addcslashes_001.phpt and b/ext/standard/tests/strings/addcslashes_001.phpt differ
index f743726301f3b458c28be0a040292a2d19df5577..7736a9f58f99c5d364589a4122700ce99fe82a41 100644 (file)
Binary files a/ext/standard/tests/strings/addcslashes_003.phpt and b/ext/standard/tests/strings/addcslashes_003.phpt differ
index eae1f7fa511b633ad8d4cb875f50970c3924ea7d..c34b643600694fd6ecf63a7bfc28ae5914440364 100644 (file)
@@ -6,13 +6,11 @@ $file_path_variations = array (
   /* paths with shortcut home dir char, with suffix variation */
   array("~/home/user/bar"),
   array("~/home/user/bar", ""),
-  array("~/home/user/bar", NULL),
   array("~/home/user/bar", ' '),
   array("~/home/user/bar.tar", ".tar"),
   array("~/home/user/bar.tar", "~"),
   array("~/home/user/bar.tar/", "~"),
   array("~/home/user/bar.tar/", ""),
-  array("~/home/user/bar.tar", NULL),
   array("~/home/user/bar.tar", ''),
   array("~/home/user/bar.tar", " "),
 
@@ -29,7 +27,6 @@ $file_path_variations = array (
   array("hostname:/home/user/My Pics.gz/", "Pics.gz"),
   array("hostname:/home/user/My Pics.gz/", ".gz"),
   array("hostname:/home/user/My Pics.gz/"),
-  array("hostname:/home/user/My Pics.gz/", NULL),
   array("hostname:/home/user/My Pics.gz/", ' '),
   array("hostname:/home/user/My Pics.gz/", ''),
   array("hostname:/home/user/My Pics.gz/", "My Pics.gz"),
@@ -52,7 +49,6 @@ $file_path_variations = array (
   array("/bar.gz/", "/bar.gz/"),
   array(" ", " "),
   array(' ', ' '),
-  array(NULL, NULL),
 
   /* path with spaces */
   array(" "),
@@ -61,7 +57,6 @@ $file_path_variations = array (
   /* empty paths */
   array(""),
   array(''),
-  array(NULL),
 );
 
 function check_basename( $path_arrays ) {
@@ -97,7 +92,7 @@ string(3) "bar"
 string(3) "bar"
 
 --Iteration 5--
-string(3) "bar"
+string(7) "bar.tar"
 
 --Iteration 6--
 string(7) "bar.tar"
@@ -118,13 +113,13 @@ string(7) "bar.tar"
 string(7) "bar.tar"
 
 --Iteration 12--
-string(7) "bar.tar"
+string(1) "t"
 
 --Iteration 13--
-string(7) "bar.tar"
+string(7) "tbar.gz"
 
 --Iteration 14--
-string(1) "t"
+string(7) "tbar.gz"
 
 --Iteration 15--
 string(7) "tbar.gz"
@@ -133,22 +128,22 @@ string(7) "tbar.gz"
 string(7) "tbar.gz"
 
 --Iteration 17--
-string(7) "tbar.gz"
+string(10) "My Pics.gz"
 
 --Iteration 18--
-string(7) "tbar.gz"
+string(10) "My Pics.gz"
 
 --Iteration 19--
-string(10) "My Pics.gz"
+string(3) "My "
 
 --Iteration 20--
-string(10) "My Pics.gz"
+string(7) "My Pics"
 
 --Iteration 21--
-string(3) "My "
+string(10) "My Pics.gz"
 
 --Iteration 22--
-string(7) "My Pics"
+string(10) "My Pics.gz"
 
 --Iteration 23--
 string(10) "My Pics.gz"
@@ -157,16 +152,16 @@ string(10) "My Pics.gz"
 string(10) "My Pics.gz"
 
 --Iteration 25--
-string(10) "My Pics.gz"
+string(4) "10.5"
 
 --Iteration 26--
-string(10) "My Pics.gz"
+string(2) "10"
 
 --Iteration 27--
-string(10) "My Pics.gz"
+string(4) "10.5"
 
 --Iteration 28--
-string(4) "10.5"
+string(2) "10"
 
 --Iteration 29--
 string(2) "10"
@@ -175,56 +170,41 @@ string(2) "10"
 string(4) "10.5"
 
 --Iteration 31--
-string(2) "10"
+string(4) "10.5"
 
 --Iteration 32--
-string(2) "10"
+string(5) "10.gz"
 
 --Iteration 33--
-string(4) "10.5"
+string(1) "0"
 
 --Iteration 34--
-string(4) "10.5"
+string(1) "0"
 
 --Iteration 35--
-string(5) "10.gz"
+string(6) "bar.gz"
 
 --Iteration 36--
-string(1) "0"
+string(6) "bar.gz"
 
 --Iteration 37--
-string(1) "0"
+string(6) "bar.gz"
 
 --Iteration 38--
-string(6) "bar.gz"
+string(1) " "
 
 --Iteration 39--
-string(6) "bar.gz"
+string(1) " "
 
 --Iteration 40--
-string(6) "bar.gz"
+string(1) " "
 
 --Iteration 41--
 string(1) " "
 
 --Iteration 42--
-string(1) " "
-
---Iteration 43--
 string(0) ""
 
---Iteration 44--
-string(1) " "
-
---Iteration 45--
-string(1) " "
-
---Iteration 46--
-string(0) ""
-
---Iteration 47--
-string(0) ""
-
---Iteration 48--
+--Iteration 43--
 string(0) ""
 Done
index c118ee18de83a1bb9f8c70eca327fc9d209205f8..2809d430896daac13067de9f21db4b0437082f92 100644 (file)
@@ -2,9 +2,7 @@
 Bug #20934 (html_entity_decode() crash when "" is passed)
 --FILE--
 <?php
-    var_dump(html_entity_decode(NULL));
-    var_dump(html_entity_decode(""));
+var_dump(html_entity_decode(""));
 ?>
 --EXPECT--
 string(0) ""
-string(0) ""
index fb430cf30d5a2fb068ef10e9767ad50446419645..55fd535f42a76d6b8f67834dca814065769dd615 100644 (file)
@@ -8,7 +8,6 @@ var_dump(parse_ini_string('a= '));
 var_dump(parse_ini_string('a='.PHP_EOL));
 var_dump(parse_ini_string('a=b '));
 var_dump(parse_ini_string(''));
-var_dump(parse_ini_string(NULL));
 var_dump(parse_ini_string("\0"));
 
 ?>
@@ -33,5 +32,3 @@ array(0) {
 }
 array(0) {
 }
-array(0) {
-}
index c0fe43976fe6b4435c813cf5ba9876ccd2199727..2b86a9713b77f8ddd4aece0085d45857f97e6506 100644 (file)
@@ -10,7 +10,6 @@ echo "*** Testing chop() : with miscellaneous arguments ***\n";
 
  var_dump ( chop("chop test   \t\0 ") );                       /* without second Argument */
  var_dump ( chop("chop test   " , "") );                       /* no characters in second Argument */
- var_dump ( chop("chop test        ", NULL) );                 /* with NULL as second Argument */
  var_dump ( chop("chop test        ", true) );                 /* with boolean value as second Argument */
  var_dump ( chop("chop test        ", " ") );                  /* with single space as second Argument */
  var_dump ( chop("chop test \t\n\r\0\x0B", "\t\n\r\0\x0B") );  /* with multiple escape sequences as second Argument */
@@ -25,7 +24,6 @@ echo "Done\n";
 string(9) "chop test"
 string(12) "chop test   "
 string(17) "chop test        "
-string(17) "chop test        "
 string(9) "chop test"
 string(10) "chop test "
 string(9) "chop test"
index f9df308a7a77f2a8963155139cec2c5a0866d600..13a0636b8af9f82a9f1f2e187a4c4c708256253c 100644 (file)
@@ -5,10 +5,6 @@ Test chr() function : usage variations - test values for $ascii argument
 
 echo "*** Testing chr() function: with unexpected inputs for 'ascii' argument ***\n";
 
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
 //defining a class
 class sample  {
   public function __toString() {
@@ -38,16 +34,6 @@ $inputs =  array (
           false,
           TRUE,
           FALSE,
-
-          // null values
-/*15*/   NULL,
-          null,
-
-          // undefined variable
-/*19*/   @$undefined_var,
-
-          // unset variable
-/*20*/   @$unset_var
 );
 
 // loop through with each element of the $inputs array to test chr() function
@@ -85,11 +71,3 @@ string(2) "00"
 string(2) "01"
 -- Iteration 11 --
 string(2) "00"
--- Iteration 12 --
-string(2) "00"
--- Iteration 13 --
-string(2) "00"
--- Iteration 14 --
-string(2) "00"
--- Iteration 15 --
-string(2) "00"
index 5b8e22f5ae594e55606f6a0e5a5e4ac965ae1313..96140b755ec5bd8d7b85389e3962c2f342c59ad5 100644 (file)
@@ -43,8 +43,6 @@ $file_path_variations = array (
   /* empty path */
   "",
   '',
-  NULL,
-  null
 );
 
 function check_dirname( $paths ) {
@@ -131,10 +129,4 @@ string\(0\) ""
 
 --Iteration 22 --
 string\(0\) ""
-
---Iteration 23 --
-string\(0\) ""
-
---Iteration 24 --
-string\(0\) ""
 Done
index 9ba54680409af4bb1467f23828bbfd61bf7f3329..8754257d7fbf4bcaa4730ef01da07f77f2037700 100644 (file)
@@ -13,11 +13,9 @@ for($i=0; $i<256; $i++)
 
 /* giving arguments as NULL */
 echo "\n*** Testing htmlentities() with NULL as first,second and third argument ***\n";
-var_dump( htmlentities("\x82\x86\x99\x9f\x80\x82\x81", NULL, 'cp1252') );
 var_dump( htmlentities("\x82\x86\x99\x9f\x80\x82\x81", ENT_QUOTES, NULL) ); /* UTF-8 assumed */
 var_dump( htmlentities("\x82\x86\x99\x9f\x80\x82\x81", ENT_NOQUOTES, NULL) ); /* UTF-8 assumed */
 var_dump( htmlentities("\x82\x86\x99\x9f\x80\x82\x81", ENT_COMPAT, NULL) ); /* UTF-8 assumed */
-var_dump( htmlentities(NULL, NULL, NULL) );
 
 /* giving long string to check for proper memory re-allocation */
 echo "\n*** Checking for proper memory allocation with long string ***\n";
@@ -297,8 +295,6 @@ string(16) "6368722832353429"
 string(16) "6368722832353529"
 
 *** Testing htmlentities() with NULL as first,second and third argument ***
-string(42) "&sbquo;&dagger;&trade;&Yuml;&euro;&sbquo;\81"
-string(0) ""
 string(0) ""
 string(0) ""
 string(0) ""
index 5844fdadb04c31c08359c43765ca7d8b45c5a4db..775cb2f4d4b878e8f3156f43cde34415c6825aed 100644 (file)
@@ -9,11 +9,9 @@ var_dump( bin2hex( htmlspecialchars("chr($i)") ) );
 
 /* giving NULL as the argument */
 echo "\n*** Testing htmlspecialchars() with NULL as first, second and third argument ***\n";
-var_dump( htmlspecialchars("<br>", NULL, 'iso-8859-1') );
 var_dump( htmlspecialchars("<br>", ENT_NOQUOTES, NULL) );
 var_dump( htmlspecialchars("<br>", ENT_QUOTES, NULL) );
 var_dump( htmlspecialchars("<br>", ENT_COMPAT, NULL) );
-var_dump( htmlspecialchars(NULL, NULL, NULL) );
 
 /* giving long string to check for proper memory re-allocation */
 echo "\n*** Checking a long string for proper memory allocation ***\n";
@@ -296,8 +294,6 @@ string(16) "6368722832353529"
 string(10) "&lt;br&gt;"
 string(10) "&lt;br&gt;"
 string(10) "&lt;br&gt;"
-string(10) "&lt;br&gt;"
-string(0) ""
 
 *** Checking a long string for proper memory allocation ***
 string(187) "&lt;br&gt;Testing&lt;p&gt;New file.&lt;/p&gt;&lt;p&gt;&lt;br&gt;File &lt;b&gt;&lt;i&gt;&lt;u&gt;WORKS!!!&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;p&gt;End of file!!!&lt;/p&gt;"
index c1c1599eb7b56c5ddfb62286e2a2a0b696ca0938..ca121102112c5700d959f29e5221cee5425ff38f 100644 (file)
Binary files a/ext/standard/tests/strings/implode1.phpt and b/ext/standard/tests/strings/implode1.phpt differ
index 7a806349ce9cbcccf2aea7de45f378d124a31b05..256f361460b24d021992c86f3c832ba65fabecc9 100644 (file)
@@ -10,10 +10,6 @@ echo "*** Testing join() : usage variations ***\n";
 // initialize all required variables
 $pieces = array("element1", "element2");
 
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
 // get a resource variable
 $fp = fopen(__FILE__, "r");
 
@@ -62,18 +58,8 @@ $values =  array (
   "",
   '',
 
-  // null values
-  NULL,
-  null,
-
   // resource variable
   $fp,
-
-  // undefined variable
-  @$undefined_var,
-
-  // unset variable
-  @$unset_var
 );
 
 
@@ -143,13 +129,5 @@ string(16) "element1element2"
 -- Iteration 21 --
 string(16) "element1element2"
 -- Iteration 22 --
-string(16) "element1element2"
--- Iteration 23 --
-string(16) "element1element2"
--- Iteration 24 --
 join(): Argument #1 ($separator) must be of type array|string, resource given
--- Iteration 25 --
-string(16) "element1element2"
--- Iteration 26 --
-string(16) "element1element2"
 Done
index 8c8c8b9092d94edd0c97ab8461d3fa17861699e2..314345547cc9d6645026f34b57b8bdc60b169216 100644 (file)
Binary files a/ext/standard/tests/strings/join_variation4.phpt and b/ext/standard/tests/strings/join_variation4.phpt differ
index 359d210e7476ceba7557ff15d44c8eabeccf33e0..fc0b954199f2ad36d5d5e78d581d1d8ee5bed552 100644 (file)
Binary files a/ext/standard/tests/strings/lcfirst.phpt and b/ext/standard/tests/strings/lcfirst.phpt differ
index 8ac57ca92eb44d4d0f083a9fa8cb1b55897c0b5b..952ad282c6fe765172f69dac47dd7174963c859a 100644 (file)
@@ -23,7 +23,6 @@ var_dump( ltrim($str, "\nusi") );
  echo "\n *** Output for Normal Behaviour ***\n";
  var_dump ( ltrim(" \t\0    ltrim test") );                      /* without second Argument */
  var_dump ( ltrim("   ltrim test" , "") );                       /* no characters in second Argument */
- var_dump ( ltrim("        ltrim test", NULL) );                 /* with NULL as second Argument */
  var_dump ( ltrim("        ltrim test", true) );                 /* with boolean value as second Argument */
  var_dump ( ltrim("        ltrim test", " ") );                  /* with single space as second Argument */
  var_dump ( ltrim("\t\n\r\0\x0B ltrim test", "\t\n\r\0\x0B") );  /* with multiple escape sequences as second Argument */
@@ -32,11 +31,8 @@ var_dump( ltrim($str, "\nusi") );
  var_dump ( ltrim("@$#ltrim test", "#@$") );                     /* with some special characters as second Argument */
 
 
- echo "\n *** Output for  scalar argument) ***\n";
- var_dump( ltrim(  12345  ) );                                   /* Scalar argument */
-
- echo "\n *** Output for  NULL argument) ***\n";
- var_dump( ltrim(NULL) );                                        /* NULL Argument */
+echo "\n *** Output for  scalar argument) ***\n";
+var_dump( ltrim(  12345  ) );                                   /* Scalar argument */
 
 echo "\nDone\n";
 
@@ -51,7 +47,6 @@ string(17) "ng heredoc string"
 string(10) "ltrim test"
 string(13) "   ltrim test"
 string(18) "        ltrim test"
-string(18) "        ltrim test"
 string(10) "ltrim test"
 string(11) " ltrim test"
 string(10) "ltrim test"
@@ -61,7 +56,4 @@ string(10) "ltrim test"
  *** Output for  scalar argument) ***
 string(5) "12345"
 
- *** Output for  NULL argument) ***
-string(0) ""
-
 Done
index 26eb03bc5a5b384f75f9ad1c2f7c656196778f4b..c975c85cb719043f99dde2f9e8d41756ecab3e0b 100644 (file)
Binary files a/ext/standard/tests/strings/md5_file.phpt and b/ext/standard/tests/strings/md5_file.phpt differ
index b2ff9cf0900d268f6cdf794a4fddc8b0945698fd..c90788fd66e42554662df3eac080598f3b1f0400 100644 (file)
@@ -4,7 +4,6 @@ nl2br() function
 <?php
     var_dump(nl2br("test"));
     var_dump(nl2br(""));
-    var_dump(nl2br(NULL));
     var_dump(nl2br("\r\n"));
     var_dump(nl2br("\n"));
     var_dump(nl2br("\r"));
@@ -18,7 +17,6 @@ nl2br() function
 --EXPECT--
 string(4) "test"
 string(0) ""
-string(0) ""
 string(8) "<br />
 "
 string(7) "<br />
index 2566f365741b1b65c651b5635445c695787488e7..2e54eb1f0d5aee473b20c5399439134ac95f857d 100644 (file)
@@ -13,7 +13,6 @@ $values = array(1234.5678,
                 "123456789",
                 "123.456789",
                 "12.3456789e1",
-                null,
                 true,
                 false);
 
@@ -54,7 +53,6 @@ string(11) "402,653,183"
 string(11) "123,456,789"
 string(3) "123"
 string(3) "123"
-string(1) "0"
 string(1) "1"
 string(1) "0"
 
@@ -68,7 +66,6 @@ string(14) "402,653,183.00"
 string(14) "123,456,789.00"
 string(6) "123.46"
 string(6) "123.46"
-string(4) "0.00"
 string(4) "1.00"
 string(4) "0.00"
 
@@ -82,7 +79,6 @@ string(14) "402 653 183.00"
 string(14) "123 456 789.00"
 string(6) "123.46"
 string(6) "123.46"
-string(4) "0.00"
 string(4) "1.00"
 string(4) "0.00"
 
@@ -96,6 +92,5 @@ string(14) "402 653 183,00"
 string(14) "123 456 789,00"
 string(6) "123,46"
 string(6) "123,46"
-string(4) "0,00"
 string(4) "1,00"
 string(4) "0,00"
index db47f58c53ba31f377012db7ca6df6a03d761734..8ff95eb5d6519c55a255cfa36567a82c4fccae2e 100644 (file)
@@ -50,11 +50,6 @@ try {
 echo "\n*** Output for scalar argument ***\n";
 printf(3);
 
-/* NULL argument */
-echo "\n*** Output for NULL as argument ***\n";
-printf(NULL);
-
-
 /* Float type variations */
 
 $counter = 1;
@@ -244,8 +239,6 @@ printf() expects at least %d argument, %d given
 Error found: 5 arguments are required, 3 given
 *** Output for scalar argument ***
 3
-*** Output for NULL as argument ***
-
 
 *** Output for float type ***
 
index 2886799cc7ede816b62e558fb38bc1640cedf5ad..a37ad49c3dee19ff09e662adaccec251ccb55f9e 100644 (file)
@@ -50,11 +50,6 @@ try {
 echo "\n*** Output for scalar argument ***\n";
 printf(3);
 
-/* NULL argument */
-echo "\n*** Output for NULL as argument ***\n";
-printf(NULL);
-
-
 /* Float type variations */
 
 $counter = 1;
@@ -244,8 +239,6 @@ printf() expects at least 1 argument, 0 given
 Error found: 5 arguments are required, 3 given
 *** Output for scalar argument ***
 3
-*** Output for NULL as argument ***
-
 
 *** Output for float type ***
 
diff --git a/ext/standard/tests/strings/printf_variation1.phpt b/ext/standard/tests/strings/printf_variation1.phpt
deleted file mode 100644 (file)
index 5523716..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
---TEST--
-Test printf() function : usage variations - unexpected values for format argument
---FILE--
-<?php
-/*
-* Testing printf() : with different unexpected values for format argument other than the strings
-*/
-
-echo "*** Testing printf() : with unexpected values for format argument ***\n";
-
-// initialing required variables
-$arg1 = "second arg";
-$arg2 = "third arg";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring class
-class sample
-{
-  public function __toString() {
-    return "Object";
-  }
-}
-
-// creating a file resource
-$file_handle = fopen(__FILE__, 'r');
-
-//array of values to iterate over
-$values = array(
-
-          // int data
-/*1*/    0,
-          1,
-          12345,
-          -2345,
-
-          // float data
-/*5*/      10.5,
-          -10.5,
-          10.1234567e10,
-          10.7654321E-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
-/*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 format
-
-$count = 1;
-foreach($values as $value) {
-  echo "\n-- Iteration $count --\n";
-
-  // with default argument
-  try {
-    $result = printf($value);
-    echo "\n";
-    var_dump($result);
-  } catch (TypeError $exception) {
-    echo $exception->getMessage() . "\n";
-  }
-
-  // with two arguments
-  try {
-    $result = printf($value, $arg1);
-    echo "\n";
-    var_dump($result);
-  } catch (TypeError $exception) {
-    echo $exception->getMessage() . "\n";
-  }
-
-  // with three arguments
-  try {
-    $result = printf($value, $arg1, $arg2);
-    echo "\n";
-    var_dump($result);
-  } catch (TypeError $exception) {
-    echo $exception->getMessage() . "\n";
-  }
-
-  $count++;
-};
-
-// close the resource
-fclose($file_handle);
-
-?>
---EXPECT--
-*** Testing printf() : with unexpected values for format argument ***
-
--- Iteration 1 --
-0
-int(1)
-0
-int(1)
-0
-int(1)
-
--- Iteration 2 --
-1
-int(1)
-1
-int(1)
-1
-int(1)
-
--- Iteration 3 --
-12345
-int(5)
-12345
-int(5)
-12345
-int(5)
-
--- Iteration 4 --
--2345
-int(5)
--2345
-int(5)
--2345
-int(5)
-
--- Iteration 5 --
-10.5
-int(4)
-10.5
-int(4)
-10.5
-int(4)
-
--- Iteration 6 --
--10.5
-int(5)
--10.5
-int(5)
--10.5
-int(5)
-
--- Iteration 7 --
-101234567000
-int(12)
-101234567000
-int(12)
-101234567000
-int(12)
-
--- Iteration 8 --
-1.07654321E-9
-int(13)
-1.07654321E-9
-int(13)
-1.07654321E-9
-int(13)
-
--- Iteration 9 --
-0.5
-int(3)
-0.5
-int(3)
-0.5
-int(3)
-
--- Iteration 10 --
-printf(): Argument #1 ($format) must be of type string, array given
-printf(): Argument #1 ($format) must be of type string, array given
-printf(): Argument #1 ($format) must be of type string, array given
-
--- Iteration 11 --
-printf(): Argument #1 ($format) must be of type string, array given
-printf(): Argument #1 ($format) must be of type string, array given
-printf(): Argument #1 ($format) must be of type string, array given
-
--- Iteration 12 --
-printf(): Argument #1 ($format) must be of type string, array given
-printf(): Argument #1 ($format) must be of type string, array given
-printf(): Argument #1 ($format) must be of type string, array given
-
--- Iteration 13 --
-printf(): Argument #1 ($format) must be of type string, array given
-printf(): Argument #1 ($format) must be of type string, array given
-printf(): Argument #1 ($format) must be of type string, array given
-
--- Iteration 14 --
-printf(): Argument #1 ($format) must be of type string, array given
-printf(): Argument #1 ($format) must be of type string, array given
-printf(): Argument #1 ($format) must be of type string, array given
-
--- Iteration 15 --
-
-int(0)
-
-int(0)
-
-int(0)
-
--- Iteration 16 --
-
-int(0)
-
-int(0)
-
-int(0)
-
--- Iteration 17 --
-1
-int(1)
-1
-int(1)
-1
-int(1)
-
--- Iteration 18 --
-
-int(0)
-
-int(0)
-
-int(0)
-
--- Iteration 19 --
-1
-int(1)
-1
-int(1)
-1
-int(1)
-
--- Iteration 20 --
-
-int(0)
-
-int(0)
-
-int(0)
-
--- Iteration 21 --
-
-int(0)
-
-int(0)
-
-int(0)
-
--- Iteration 22 --
-
-int(0)
-
-int(0)
-
-int(0)
-
--- Iteration 23 --
-Object
-int(6)
-Object
-int(6)
-Object
-int(6)
-
--- Iteration 24 --
-
-int(0)
-
-int(0)
-
-int(0)
-
--- Iteration 25 --
-
-int(0)
-
-int(0)
-
-int(0)
-
--- Iteration 26 --
-printf(): Argument #1 ($format) must be of type string, resource given
-printf(): Argument #1 ($format) must be of type string, resource given
-printf(): Argument #1 ($format) must be of type string, resource given
index df26d5cf4b26abe7aab48860d3f67607e363e0d5..a1e0ec1338aa2b92af11bc0bd7a9e3b5acdd467f 100644 (file)
@@ -7,7 +7,6 @@ var_dump(quoted_printable_encode(""));
 var_dump(quoted_printable_encode("test"));
 
 var_dump(quoted_printable_encode(1));
-var_dump(quoted_printable_encode(NULL));
 var_dump(quoted_printable_encode(false));
 
 echo "Done\n";
@@ -17,5 +16,4 @@ string(0) ""
 string(4) "test"
 string(1) "1"
 string(0) ""
-string(0) ""
 Done
index 2fc531faada7171c0fdc7abe4c339a3265cf260f..b4cd2ac6acd51506ef54bde9b5da4de143adad41 100644 (file)
Binary files a/ext/standard/tests/strings/rtrim.phpt and b/ext/standard/tests/strings/rtrim.phpt differ
index 55130cb98a7f81ecbe0f53dfa5fb61b39a6df1ca..62419d708f22087b54698c35093430663091075c 100644 (file)
@@ -87,6 +87,8 @@ Warning: sha1_file(12): Failed to open stream: No such file or directory in %s o
 bool(false)
 
 -- NULL as filename --
+
+Deprecated: sha1_file(): Passing null to parameter #1 ($filename) of type string is deprecated in %s on line %d
 Path cannot be empty
 
 -- Hexadecimal Output for Empty file as Argument --
index a75e67b96e39aa6fd18033d23472a61f909fe11f..6b9430e38666f8973b2b2778af569e2d7a48e915 100644 (file)
@@ -12,10 +12,6 @@ echo "*** Testing sprintf() : with unexpected values for format argument ***\n";
 $arg1 = "second arg";
 $arg2 = "third arg";
 
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
 // declaring class
 class sample
 {
@@ -50,10 +46,6 @@ $values = array(
       array(1, 2),
       array('color' => 'red', 'item' => 'pen'),
 
-      // null data
-      NULL,
-      null,
-
       // boolean data
       true,
       false,
@@ -67,12 +59,6 @@ $values = array(
       // object data
       new sample(),
 
-      // undefined data
-      @$undefined_var,
-
-      // unset data
-      @$unset_var,
-
       // resource data
       $file_handle
 );
@@ -186,9 +172,9 @@ sprintf(): Argument #1 ($format) must be of type string, array given
 sprintf(): Argument #1 ($format) must be of type string, array given
 
 -- Iteration 15 --
-string(0) ""
-string(0) ""
-string(0) ""
+string(1) "1"
+string(1) "1"
+string(1) "1"
 
 -- Iteration 16 --
 string(0) ""
@@ -206,41 +192,21 @@ string(0) ""
 string(0) ""
 
 -- Iteration 19 --
-string(1) "1"
-string(1) "1"
-string(1) "1"
-
--- Iteration 20 --
-string(0) ""
-string(0) ""
-string(0) ""
-
--- Iteration 21 --
 string(0) ""
 string(0) ""
 string(0) ""
 
--- Iteration 22 --
+-- Iteration 20 --
 string(0) ""
 string(0) ""
 string(0) ""
 
--- Iteration 23 --
+-- Iteration 21 --
 string(6) "Object"
 string(6) "Object"
 string(6) "Object"
 
--- Iteration 24 --
-string(0) ""
-string(0) ""
-string(0) ""
-
--- Iteration 25 --
-string(0) ""
-string(0) ""
-string(0) ""
-
--- Iteration 26 --
+-- Iteration 22 --
 sprintf(): Argument #1 ($format) must be of type string, resource given
 sprintf(): Argument #1 ($format) must be of type string, resource given
 sprintf(): Argument #1 ($format) must be of type string, resource given
index becff2163badca998ad9addfeaf08ec38bd7f875..8bad30b2be5629b178b9a6828ceed1f3c0e0a23b 100644 (file)
@@ -24,8 +24,6 @@ var_dump(str_getcsv('.foo  . .  bar  .', ' ', '.', ''));
 print "-----\n";
 var_dump(str_getcsv('" "" "', ' '));
 print "-----\n";
-var_dump(str_getcsv(NULL));
-print "-----\n";
 var_dump(str_getcsv(''));
 print "-----\n";
 
@@ -108,8 +106,3 @@ array(1) {
   NULL
 }
 -----
-array(1) {
-  [0]=>
-  NULL
-}
------
index bcb03237c0a93e07faabe5d5c0ea1c4ac37f8f8c..278db455f8d556de8b6cab2866ddfb07b87dbbe3 100644 (file)
@@ -21,7 +21,6 @@ echo "\n#### variations with input string and pad-length ####\n";
 $input_strings = array(
     "variation", // normal string
     "",        // empty string
-    NULL,  // NULL
     true,  // boolean
     15,  // numeric
     15.55,  // numeric
@@ -63,13 +62,7 @@ foreach ( $pad_strings as $pad_string ) {
 
 echo "\n#### error conditions ####\n";
 
-echo "\n--- padding string as null ---\n";
-
-try {
-    str_pad($input_string, 12, NULL);
-} catch (\ValueError $e) {
-    echo $e->getMessage() . "\n";
-}
+echo "\n--- empty padding string ---\n";
 
 try {
     str_pad($input_string, 12, "");
@@ -155,36 +148,6 @@ string(16) "================"
 string(16) "================"
 string(16) "================"
 string(16) "================"
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(0) ""
-string(9) "         "
-string(9) "========="
-string(9) "========="
-string(9) "========="
-string(9) "========="
-string(10) "          "
-string(10) "=========="
-string(10) "=========="
-string(10) "=========="
-string(10) "=========="
-string(16) "                "
-string(16) "================"
-string(16) "================"
-string(16) "================"
-string(16) "================"
 string(1) "1"
 string(1) "1"
 string(1) "1"
@@ -338,7 +301,6 @@ string(16) "\t\variation\t\t"
 
 #### error conditions ####
 
---- padding string as null ---
-str_pad(): Argument #3 ($pad_string) must be a non-empty string
+--- empty padding string ---
 str_pad(): Argument #3 ($pad_string) must be a non-empty string
 str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH
index 3069f6bfe97f9bcb3a9523885b5ae82c49c1477f..6eef67ae5786afd7b04e52dbf47479677e3c5be4 100644 (file)
Binary files a/ext/standard/tests/strings/str_repeat.phpt and b/ext/standard/tests/strings/str_repeat.phpt differ
index aa7360a7f1c9752405fedca16ff19f3b356b962b..00ed1a8babe3519292cccdd8786fb93f1827da32 100644 (file)
@@ -271,6 +271,8 @@ int(2)
 
 -- Iteration 8 --
 
+Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in %s on line %d
+
 Warning: Array to string conversion in %s on line %d
 array(12) {
   [0]=>
index 1e92ff2bd22215e1d502b86c79b31f5dd16b0806..77dc6ae822626d675a37aee513f7404dcf9366d3 100644 (file)
Binary files a/ext/standard/tests/strings/str_replace_variation2.phpt and b/ext/standard/tests/strings/str_replace_variation2.phpt differ
index deb9fe986d929fb1f743045297c355460101dcc3..a8c2af9255f0d0c8562d86efe4cbce3daefb0904 100644 (file)
@@ -36,10 +36,10 @@ try {
 var_dump($str);
 
 $str2 = "F0o B4r 1s bar foo";
-var_dump(str_word_count($str2, NULL, "04"));
-var_dump(str_word_count($str2, NULL, "01"));
-var_dump(str_word_count($str2, NULL, "014"));
-var_dump(str_word_count($str2, NULL, ""));
+var_dump(str_word_count($str2, 0, "04"));
+var_dump(str_word_count($str2, 0, "01"));
+var_dump(str_word_count($str2, 0, "014"));
+var_dump(str_word_count($str2, 0, ""));
 var_dump(str_word_count($str2, 1, "04"));
 var_dump(str_word_count($str2, 1, "01"));
 var_dump(str_word_count($str2, 1, "014"));
index 95a25bd6994a7c75a51a4ccdbaf8396d1f6f7632..3c07539bd559a2da5587139cdfd7bc9c4aece1a5 100644 (file)
Binary files a/ext/standard/tests/strings/strcasecmp.phpt and b/ext/standard/tests/strings/strcasecmp.phpt differ
index 824d7ed1010a2e5b81df8a6d6b07b258c10e3a7c..d5f338844eab2ebf92c9e359a493f9917a0fe57c 100644 (file)
Binary files a/ext/standard/tests/strings/strcmp.phpt and b/ext/standard/tests/strings/strcmp.phpt differ
index 47a0b10b5e39d16997eeae131a2ee39132ccb98f..e205913fcfb00523ae6763e87976a0b98b9ca4ec 100644 (file)
@@ -24,8 +24,6 @@ $needle = array(
 
   //nulls
   "\0",
-  NULL,
-  null,
 
   //boolean false
   FALSE,
@@ -121,93 +119,87 @@ int(12)
 int(0)
 int(13)
 -- Iteration 15 --
-int(0)
-int(14)
--- Iteration 16 --
-int(0)
-int(15)
--- Iteration 17 --
 int(10)
 int(47)
--- Iteration 18 --
+-- Iteration 16 --
 int(12)
 bool(false)
--- Iteration 19 --
+-- Iteration 17 --
 int(11)
 bool(false)
--- Iteration 20 --
+-- Iteration 18 --
 int(13)
 bool(false)
--- Iteration 21 --
+-- Iteration 19 --
 int(14)
 bool(false)
--- Iteration 22 --
+-- Iteration 20 --
 int(16)
 bool(false)
--- Iteration 23 --
+-- Iteration 21 --
 int(17)
 bool(false)
--- Iteration 24 --
+-- Iteration 22 --
 int(20)
 bool(false)
--- Iteration 25 --
+-- Iteration 23 --
 int(22)
-bool(false)
--- Iteration 26 --
+int(22)
+-- Iteration 24 --
 int(23)
-bool(false)
--- Iteration 27 --
+int(23)
+-- Iteration 25 --
 int(24)
-bool(false)
--- Iteration 28 --
+int(24)
+-- Iteration 26 --
 int(25)
-bool(false)
--- Iteration 29 --
+int(25)
+-- Iteration 27 --
 bool(false)
 bool(false)
--- Iteration 30 --
+-- Iteration 28 --
 int(27)
-bool(false)
--- Iteration 31 --
+int(27)
+-- Iteration 29 --
 int(28)
-bool(false)
--- Iteration 32 --
+int(28)
+-- Iteration 30 --
 int(29)
-bool(false)
--- Iteration 33 --
+int(29)
+-- Iteration 31 --
 int(31)
-bool(false)
--- Iteration 34 --
+int(31)
+-- Iteration 32 --
 int(30)
 bool(false)
--- Iteration 35 --
+-- Iteration 33 --
 int(32)
-bool(false)
--- Iteration 36 --
+int(32)
+-- Iteration 34 --
 int(33)
-bool(false)
--- Iteration 37 --
+int(33)
+-- Iteration 35 --
 int(33)
 bool(false)
--- Iteration 38 --
+-- Iteration 36 --
 int(39)
 int(39)
--- Iteration 39 --
+-- Iteration 37 --
 int(15)
 int(48)
--- Iteration 40 --
+-- Iteration 38 --
 int(15)
 int(48)
--- Iteration 41 --
+-- Iteration 39 --
 int(51)
 int(51)
--- Iteration 42 --
+-- Iteration 40 --
 int(51)
 int(51)
--- Iteration 43 --
+-- Iteration 41 --
 bool(false)
 bool(false)
--- Iteration 44 --
+-- Iteration 42 --
 int(0)
 bool(false)
 *** Done ***
diff --git a/ext/standard/tests/strings/stripos_variation10.phpt b/ext/standard/tests/strings/stripos_variation10.phpt
deleted file mode 100644 (file)
index 156023c..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
---TEST--
-Test stripos() function : usage variations - unexpected inputs for 'needle' argument
---FILE--
-<?php
-/* Test stripos() function with unexpected inputs for 'needle' and
- *  an expected type of input for 'haystack' argument
-*/
-
-echo "*** Testing stripos() function with unexpected values for needle ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample  {
-  public function __toString() {
-    return "object";
-  }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-$haystack = "string 0 1 2 -2 10.5 -10.5 10.5e10 10.6E-10 .5 array true false object \"\" null Resource";
-
-// array with different values
-$needles =  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 sample(),
-
-  // empty string
-  "",
-  '',
-
-  // null values
-  NULL,
-  null,
-
-  // resource
-  $file_handle,
-
-  // undefined variable
-  @$undefined_var,
-
-  // unset variable
-  @$unset_var
-);
-
-// loop through each element of the 'needle' array to check the working of stripos()
-$counter = 1;
-for($index = 0; $index < count($needles); $index ++) {
-  echo "\n-- Iteration $counter --\n";
-  try {
-    var_dump( stripos($haystack, $needles[$index]) );
-  } catch (TypeError $e) {
-    echo $e->getMessage(), "\n";
-  }
-  $counter ++;
-}
-
-fclose($file_handle);  //closing the file handle
-
-echo "*** Done ***";
-?>
---EXPECT--
-*** Testing stripos() function with unexpected values for needle ***
-
--- Iteration 1 --
-int(7)
-
--- Iteration 2 --
-int(9)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-int(16)
-
--- Iteration 6 --
-int(21)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-int(17)
-
--- Iteration 10 --
-stripos(): Argument #2 ($needle) must be of type string, array given
-
--- Iteration 11 --
-stripos(): Argument #2 ($needle) must be of type string, array given
-
--- Iteration 12 --
-stripos(): Argument #2 ($needle) must be of type string, array given
-
--- Iteration 13 --
-stripos(): Argument #2 ($needle) must be of type string, array given
-
--- Iteration 14 --
-stripos(): Argument #2 ($needle) must be of type string, array given
-
--- Iteration 15 --
-int(9)
-
--- Iteration 16 --
-int(0)
-
--- Iteration 17 --
-int(9)
-
--- Iteration 18 --
-int(0)
-
--- Iteration 19 --
-int(64)
-
--- Iteration 20 --
-int(0)
-
--- Iteration 21 --
-int(0)
-
--- Iteration 22 --
-int(0)
-
--- Iteration 23 --
-int(0)
-
--- Iteration 24 --
-stripos(): Argument #2 ($needle) must be of type string, resource given
-
--- Iteration 25 --
-int(0)
-
--- Iteration 26 --
-int(0)
-*** Done ***
diff --git a/ext/standard/tests/strings/stripos_variation11.phpt b/ext/standard/tests/strings/stripos_variation11.phpt
deleted file mode 100644 (file)
index 6d9df2b..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
---TEST--
-Test stripos() function : usage variations - unexpected inputs for 'haystack' and 'needle' arguments
---FILE--
-<?php
-/* Test stripos() function with unexpected inputs for 'haystack' and 'needle' arguments */
-
-echo "*** Testing stripos() function with unexpected values for haystack and needle ***\n";
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// defining a class
-class sample  {
-  public function __toString() {
-    return "object";
-  }
-}
-
-//getting the resource
-$file_handle = 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'),
-
-  // 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($values); $index ++) {
-  echo "-- Iteration $counter --\n";
-  $haystack = $values[$index];
-  try {
-    var_dump( stripos($values[$index], $values[$index]) );
-  } catch (Error $e) {
-    echo get_class($e) . ": " . $e->getMessage(), "\n";
-  }
-  try {
-    var_dump( stripos($values[$index], $values[$index], 1) );
-  } catch (Error $e) {
-    echo get_class($e) . ": " . $e->getMessage(), "\n";
-  }
-  $counter ++;
-}
-
-echo "*** Done ***";
-?>
---EXPECT--
-*** Testing stripos() function with unexpected values for haystack and needle ***
--- Iteration 1 --
-int(0)
-bool(false)
--- Iteration 2 --
-int(0)
-bool(false)
--- Iteration 3 --
-int(0)
-bool(false)
--- Iteration 4 --
-int(0)
-bool(false)
--- Iteration 5 --
-int(0)
-bool(false)
--- Iteration 6 --
-int(0)
-bool(false)
--- Iteration 7 --
-int(0)
-bool(false)
--- Iteration 8 --
-int(0)
-bool(false)
--- Iteration 9 --
-int(0)
-bool(false)
--- Iteration 10 --
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 11 --
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 12 --
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 13 --
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 14 --
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 15 --
-int(0)
-bool(false)
--- Iteration 16 --
-int(0)
-ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 17 --
-int(0)
-bool(false)
--- Iteration 18 --
-int(0)
-ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 19 --
-int(0)
-bool(false)
--- Iteration 20 --
-int(0)
-ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 21 --
-int(0)
-ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 22 --
-int(0)
-ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 23 --
-int(0)
-ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 24 --
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, resource given
-TypeError: stripos(): Argument #1 ($haystack) must be of type string, resource given
--- Iteration 25 --
-int(0)
-ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 26 --
-int(0)
-ValueError: stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-*** Done ***
index bc176eecfeccae1fcff767b3f312352e8a7597b7..2f95822645bfa9eda5999a5912f14fec8401adb5 100644 (file)
@@ -24,8 +24,6 @@ $needle = array(
 
   //nulls
   '\0',
-  NULL,
-  null,
 
   //boolean false
   FALSE,
@@ -123,99 +121,93 @@ int(12)
 int(0)
 int(13)
 -- Iteration 15 --
-int(0)
 int(14)
--- Iteration 16 --
-int(0)
-int(15)
--- Iteration 17 --
 int(14)
-int(51)
--- Iteration 18 --
+-- Iteration 16 --
 int(16)
-bool(false)
--- Iteration 19 --
+int(16)
+-- Iteration 17 --
 int(15)
 bool(false)
--- Iteration 20 --
+-- Iteration 18 --
 int(17)
-bool(false)
--- Iteration 21 --
+int(17)
+-- Iteration 19 --
 int(18)
-bool(false)
--- Iteration 22 --
+int(18)
+-- Iteration 20 --
 int(20)
-bool(false)
--- Iteration 23 --
+int(20)
+-- Iteration 21 --
 int(21)
-bool(false)
--- Iteration 24 --
+int(21)
+-- Iteration 22 --
 int(24)
 int(24)
--- Iteration 25 --
+-- Iteration 23 --
 int(26)
 int(26)
--- Iteration 26 --
+-- Iteration 24 --
 int(27)
 int(27)
--- Iteration 27 --
+-- Iteration 25 --
 int(28)
 int(28)
--- Iteration 28 --
+-- Iteration 26 --
 int(29)
 int(29)
--- Iteration 29 --
+-- Iteration 27 --
 bool(false)
 bool(false)
--- Iteration 30 --
+-- Iteration 28 --
 bool(false)
 bool(false)
--- Iteration 31 --
+-- Iteration 29 --
 int(31)
 int(31)
--- Iteration 32 --
+-- Iteration 30 --
 int(32)
 int(32)
--- Iteration 33 --
+-- Iteration 31 --
 int(33)
 int(33)
--- Iteration 34 --
+-- Iteration 32 --
 int(35)
 int(35)
--- Iteration 35 --
+-- Iteration 33 --
 int(34)
 int(34)
--- Iteration 36 --
+-- Iteration 34 --
 int(36)
 int(36)
--- Iteration 37 --
+-- Iteration 35 --
 int(37)
 int(37)
--- Iteration 38 --
+-- Iteration 36 --
 int(37)
 int(37)
--- Iteration 39 --
+-- Iteration 37 --
 int(43)
 int(43)
--- Iteration 40 --
+-- Iteration 38 --
 int(52)
 int(52)
--- Iteration 41 --
+-- Iteration 39 --
 int(19)
 bool(false)
--- Iteration 42 --
+-- Iteration 40 --
 int(58)
 int(58)
--- Iteration 43 --
+-- Iteration 41 --
 bool(false)
 bool(false)
--- Iteration 44 --
+-- Iteration 42 --
 bool(false)
 bool(false)
--- Iteration 45 --
+-- Iteration 43 --
 bool(false)
 bool(false)
--- Iteration 46 --
+-- Iteration 44 --
 int(0)
 bool(false)
 *** Done ***
diff --git a/ext/standard/tests/strings/stripos_variation7.phpt b/ext/standard/tests/strings/stripos_variation7.phpt
deleted file mode 100644 (file)
index b9aa7db..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-Test stripos() function : usage variations - empty heredoc string for 'haystack' argument
---FILE--
-<?php
-/* Test stripos() function by passing empty heredoc string for haystack
- *  and with various needles & offsets
-*/
-
-echo "*** Testing stripos() function: with heredoc strings ***\n";
-echo "-- With empty heredoc string --\n";
-$empty_string = <<<EOD
-EOD;
-var_dump( stripos($empty_string, "") );
-
-try {
-    stripos($empty_string, "", 1);
-} catch (ValueError $exception) {
-    echo $exception->getMessage() . "\n";
-}
-var_dump( stripos($empty_string, FALSE) );
-var_dump( stripos($empty_string, NULL) );
-
-echo "*** Done ***";
-?>
---EXPECT--
-*** Testing stripos() function: with heredoc strings ***
--- With empty heredoc string --
-int(0)
-stripos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-int(0)
-int(0)
-*** Done ***
index fdc48a0922e6f207a086d4612c2b2ca30ee7f5db..72d5a93df8a631d0c076a7052ef058a4a1b35316 100644 (file)
@@ -5,10 +5,6 @@ Test stristr() function : usage variations - test values for $needle argument
 
 echo "*** Testing stristr() function: with unexpected inputs for 'needle' argument ***\n";
 
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
 //defining a class
 class sample  {
   public function __toString() {
@@ -44,21 +40,11 @@ $inputs =  array (
           TRUE,
           FALSE,
 
-          // null values
-/*15*/   NULL,
-          null,
-
           // objects
 /*17*/   new sample(),
 
           // resource
 /*18*/   $file_handle,
-
-          // undefined variable
-/*19*/   @$undefined_var,
-
-          // unset variable
-/*20*/   @$unset_var
 );
 
 //defining '$pad_length' argument
@@ -110,14 +96,6 @@ bool(false)
 -- Iteration 14 --
 string(11) "Hello World"
 -- Iteration 15 --
-string(11) "Hello World"
--- Iteration 16 --
-string(11) "Hello World"
--- Iteration 17 --
 bool(false)
--- Iteration 18 --
+-- Iteration 16 --
 stristr(): Argument #2 ($needle) must be of type string, resource given
--- Iteration 19 --
-string(11) "Hello World"
--- Iteration 20 --
-string(11) "Hello World"
index 468dd9acfec9a4cdf56835f831f764373af6e1b6..374001eed986c46c1f11390e1209ec434724075b 100644 (file)
Binary files a/ext/standard/tests/strings/strlen.phpt and b/ext/standard/tests/strings/strlen.phpt differ
index 135030544e046ccfa3406e5ffe153f8f51c9002f..267bc590c5be3b3cbd40e74a03f315b55f1fd012 100644 (file)
Binary files a/ext/standard/tests/strings/strpos.phpt and b/ext/standard/tests/strings/strpos.phpt differ
index 9617f5fff2040da19ed17f6d94367ac7abe0c672..a913a2045a496a429b282150cfe4fc6e528e5c81 100644 (file)
Binary files a/ext/standard/tests/strings/strrchr_variation1.phpt and b/ext/standard/tests/strings/strrchr_variation1.phpt differ
diff --git a/ext/standard/tests/strings/strrchr_variation10.phpt b/ext/standard/tests/strings/strrchr_variation10.phpt
deleted file mode 100644 (file)
index 4f28ad4..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
---TEST--
-Test strrchr() function : usage variations - unexpected inputs for needle
---FILE--
-<?php
-/* Test strrchr() function: with unexpected inputs for needle
- *  and expected type for haystack
-*/
-
-echo "*** Testing strrchr() function with unexpected inputs for needle ***\n";
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample  {
-  public function __toString() {
-    return "object";
-  }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-$haystacks =  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"
-);
-
-// array with different values
-$needles =  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,
-
-  // null values
-  NULL,
-  null,
-
-  // objects
-  new sample(),
-
-  // empty string
-  "",
-  '',
-
-  // resource
-  $file_handle,
-
-  // undefined variable
-  @$undefined_var,
-
-  // unset variable
-  @$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";
-  try {
-    var_dump( strrchr($haystacks[$index], $needles[$index]) );
-  } catch (TypeError $e) {
-    echo $e->getMessage(), "\n";
-  }
-  $count ++;
-}
-
-fclose($file_handle);  //closing the file handle
-
-echo "*** Done ***";
-?>
---EXPECT--
-*** Testing strrchr() function with unexpected inputs for needle ***
--- Iteration 1 --
-string(1) "0"
--- Iteration 2 --
-string(1) "1"
--- Iteration 3 --
-bool(false)
--- Iteration 4 --
-string(2) "-2"
--- Iteration 5 --
-string(4) "10.5"
--- Iteration 6 --
-string(5) "-10.5"
--- Iteration 7 --
-string(2) "10"
--- Iteration 8 --
-string(2) "10"
--- Iteration 9 --
-bool(false)
--- Iteration 10 --
-strrchr(): Argument #2 ($needle) must be of type string, array given
--- Iteration 11 --
-strrchr(): Argument #2 ($needle) must be of type string, array given
--- Iteration 12 --
-strrchr(): Argument #2 ($needle) must be of type string, array given
--- Iteration 13 --
-strrchr(): Argument #2 ($needle) must be of type string, array given
--- Iteration 14 --
-strrchr(): Argument #2 ($needle) must be of type string, array given
--- 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 --
-strrchr(): Argument #2 ($needle) must be of type string, resource given
--- Iteration 25 --
-bool(false)
--- Iteration 26 --
-bool(false)
-*** Done ***
diff --git a/ext/standard/tests/strings/strrchr_variation11.phpt b/ext/standard/tests/strings/strrchr_variation11.phpt
deleted file mode 100644 (file)
index 287d81c..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
---TEST--
-Test strrchr() function : usage variations - unexpected inputs for haystack and needle
---FILE--
-<?php
-/* Test strrchr() function with unexpected inputs for haystack and needle */
-
-echo "*** Testing strrchr() function: with unexpected inputs for haystack and needle ***\n";
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// declaring a class
-class sample  {
-  public function __toString() {
-    return "object";
-  }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// 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 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 strrchr()
-$counter = 1;
-for($index = 0; $index < count($values); $index ++) {
-  echo "-- Iteration $counter --\n";
-  try {
-    var_dump( strrchr($values[$index], $values[$index]) );
-  } catch (TypeError $e) {
-    echo $e->getMessage(), "\n";
-  }
-  $counter ++;
-}
-
-fclose($file_handle);  //closing the file handle
-
-echo "*** Done ***";
-?>
---EXPECT--
-*** Testing strrchr() function: with unexpected inputs for haystack and needle ***
--- 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(10) "1234567000"
--- Iteration 8 --
-string(4) "1E-9"
--- Iteration 9 --
-string(3) "0.5"
--- Iteration 10 --
-strrchr(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 11 --
-strrchr(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 12 --
-strrchr(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 13 --
-strrchr(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 14 --
-strrchr(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 15 --
-string(1) "1"
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-string(1) "1"
--- Iteration 18 --
-bool(false)
--- Iteration 19 --
-string(6) "object"
--- Iteration 20 --
-bool(false)
--- Iteration 21 --
-bool(false)
--- Iteration 22 --
-bool(false)
--- Iteration 23 --
-bool(false)
--- Iteration 24 --
-strrchr(): Argument #1 ($haystack) must be of type string, resource given
--- Iteration 25 --
-bool(false)
--- Iteration 26 --
-bool(false)
-*** Done ***
index 972ff3e703bf49df823bceff7a30253c2c6a05ee..abe5bfae650eaa0469f0b6f7a21313423d5c7a83 100644 (file)
Binary files a/ext/standard/tests/strings/strrchr_variation12.phpt and b/ext/standard/tests/strings/strrchr_variation12.phpt differ
index 72bb3fb0d3e3ad678c55ca63674a58ee8d3c3b88..646f13a702e4dff4d5e675abd7abd6ed83f5dfd6 100644 (file)
@@ -24,8 +24,6 @@ $needle = array(
 
   //nulls
   '\0',
-  NULL,
-  null,
 
   //boolean false
   FALSE,
@@ -121,95 +119,89 @@ bool(false)
 bool(false)
 
 -- Iteration 15 --
-bool(false)
+string(1) " "
 
 -- Iteration 16 --
-bool(false)
+string(47) "$&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 17 --
 string(1) " "
 
 -- Iteration 18 --
-string(47) "$&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
+string(46) "&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 19 --
-string(1) " "
+string(45) "!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 20 --
-string(46) "&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
+string(43) "%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 21 --
-string(45) "!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
+string(5) "\101 "
 
 -- Iteration 22 --
-string(43) "%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
+string(39) "()*+-./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 23 --
-string(5) "\101 "
+string(37) "*+-./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 24 --
-string(39) "()*+-./:;<=>?@hello123456he \x234 \101 "
+string(36) "+-./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 25 --
-string(37) "*+-./:;<=>?@hello123456he \x234 \101 "
+string(35) "-./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 26 --
-string(36) "+-./:;<=>?@hello123456he \x234 \101 "
+string(34) "./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 27 --
-string(35) "-./:;<=>?@hello123456he \x234 \101 "
+string(34) "./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 28 --
-string(34) "./:;<=>?@hello123456he \x234 \101 "
+string(32) ":;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 29 --
-string(34) "./:;<=>?@hello123456he \x234 \101 "
+string(31) ";<=>?@hello123456he \x234 \101 "
 
 -- Iteration 30 --
-string(32) ":;<=>?@hello123456he \x234 \101 "
+string(30) "<=>?@hello123456he \x234 \101 "
 
 -- Iteration 31 --
-string(31) ";<=>?@hello123456he \x234 \101 "
+string(28) ">?@hello123456he \x234 \101 "
 
 -- Iteration 32 --
-string(30) "<=>?@hello123456he \x234 \101 "
+string(29) "=>?@hello123456he \x234 \101 "
 
 -- Iteration 33 --
-string(28) ">?@hello123456he \x234 \101 "
+string(27) "?@hello123456he \x234 \101 "
 
 -- Iteration 34 --
-string(29) "=>?@hello123456he \x234 \101 "
+string(26) "@hello123456he \x234 \101 "
 
 -- Iteration 35 --
-string(27) "?@hello123456he \x234 \101 "
+string(26) "@hello123456he \x234 \101 "
 
 -- Iteration 36 --
-string(26) "@hello123456he \x234 \101 "
+string(2) "1 "
 
 -- Iteration 37 --
-string(26) "@hello123456he \x234 \101 "
+string(5) "\101 "
 
 -- Iteration 38 --
-string(2) "1 "
+string(44) "#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
 
 -- Iteration 39 --
 string(5) "\101 "
 
 -- Iteration 40 --
-string(44) "#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
-
--- Iteration 41 --
-string(5) "\101 "
-
--- Iteration 42 --
 bool(false)
 
--- Iteration 43 --
+-- Iteration 41 --
 string(7) "4 \101 "
 
--- Iteration 44 --
+-- Iteration 42 --
 string(7) "4 \101 "
 
--- Iteration 45 --
+-- Iteration 43 --
 string(63) "Hello,\t\n\0\n  $&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "
 *** Done ***
diff --git a/ext/standard/tests/strings/strrchr_variation8.phpt b/ext/standard/tests/strings/strrchr_variation8.phpt
deleted file mode 100644 (file)
index 826db29..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-Test strrchr() function : usage variations - empty heredoc string for 'haystack'
---FILE--
-<?php
-/* Test strrchr() function by passing empty heredoc string for haystack
- *  and with various needles
-*/
-
-echo "*** Testing strrchr() function: with heredoc strings ***\n";
-$empty_str = <<<EOD
-EOD;
-
-$needles = array(
-  "",
-  '',
-  FALSE,
-  NULL,
-  "\0",
-  $empty_str //needle as haystack
-);
-
-//loop through to test strrchr() with each needle
-foreach($needles as $needle) {
-  var_dump( strrchr($empty_str, $needle) );
-}
-echo "*** Done ***";
-?>
---EXPECT--
-*** Testing strrchr() function: with heredoc strings ***
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-*** Done ***
index 6303fccc20a01ea05719b5369555c0584e5a4fc3..15cf248f55f3a85366bd0174b7cb02b140e87408 100644 (file)
@@ -2,18 +2,16 @@
 strrev() function
 --FILE--
 <?php
-    $i = 0;
-    $str = '';
+$i = 0;
+$str = '';
 
-    while ($i<256) {
-        $str .= chr($i++);
-    }
+while ($i<256) {
+    $str .= chr($i++);
+}
 
-    var_dump(md5(strrev($str)));
-    var_dump(strrev(NULL));
-    var_dump(strrev(""));
+var_dump(md5(strrev($str)));
+var_dump(strrev(""));
 ?>
 --EXPECT--
 string(32) "ec6df70f2569891eae50321a9179eb82"
 string(0) ""
-string(0) ""
index 75330184ffb9f5b7bc9fadd2fc48e0e7c27665b5..57ae8dd11a65f859815b760295913cf259ffee0c 100644 (file)
@@ -24,8 +24,6 @@ $needles = array(
 
           //nulls
 /*11*/   "\0",
-          NULL,
-          null,
 
           //boolean false
 /*14*/   FALSE,
@@ -141,106 +139,96 @@ int(44)
 int(44)
 int(43)
 -- Iteration 15 --
-int(44)
-int(44)
-int(44)
 int(43)
--- Iteration 16 --
-int(44)
-int(44)
-int(44)
-int(43)
--- Iteration 17 --
 int(43)
 int(43)
 int(43)
-int(43)
--- Iteration 18 --
+-- Iteration 16 --
 int(12)
 int(12)
 bool(false)
 int(12)
--- Iteration 19 --
+-- Iteration 17 --
 int(11)
 int(11)
 bool(false)
 int(11)
--- Iteration 20 --
+-- Iteration 18 --
 int(13)
 int(13)
 bool(false)
 int(13)
--- Iteration 21 --
+-- Iteration 19 --
 int(14)
 int(14)
 bool(false)
 int(14)
--- Iteration 22 --
+-- Iteration 20 --
 int(17)
 int(17)
 bool(false)
 int(17)
--- Iteration 23 --
+-- Iteration 21 --
 int(20)
 int(20)
 int(20)
 int(20)
--- Iteration 24 --
+-- Iteration 22 --
 int(22)
 int(22)
 int(22)
 int(22)
--- Iteration 25 --
+-- Iteration 23 --
 int(21)
 int(21)
 int(21)
 int(21)
--- Iteration 26 --
+-- Iteration 24 --
 int(23)
 int(23)
 int(23)
 int(23)
--- Iteration 27 --
+-- Iteration 25 --
 int(24)
 int(24)
 int(24)
 int(24)
--- Iteration 28 --
+-- Iteration 26 --
 int(24)
 int(24)
 int(24)
 int(24)
--- Iteration 29 --
+-- Iteration 27 --
 int(30)
 int(30)
 int(30)
 int(30)
--- Iteration 30 --
+-- Iteration 28 --
 int(39)
 int(39)
 int(39)
 int(39)
--- Iteration 31 --
+-- Iteration 29 --
 int(39)
 int(39)
 int(39)
 int(39)
--- Iteration 32 --
+-- Iteration 30 --
 int(42)
 int(42)
 int(42)
 int(42)
--- Iteration 33 --
+-- Iteration 31 --
 int(42)
 int(42)
 int(42)
 int(42)
--- Iteration 34 --
+-- Iteration 32 --
 bool(false)
 bool(false)
 bool(false)
 bool(false)
--- Iteration 35 --
+-- Iteration 33 --
 int(0)
 bool(false)
 bool(false)
index 5a409c28d1256b3e0f14bc1602af91573d3a2e6a..12bcc2d22bb69bf284e76ffe1bb49266340f4650 100644 (file)
@@ -24,8 +24,6 @@ $needles = array(
 
           //nulls
 /*11*/   '\0',
-          NULL,
-          null,
 
           //boolean false
 /*14*/   FALSE,
@@ -142,111 +140,101 @@ int(54)
 int(54)
 int(53)
 -- Iteration 15 --
-int(54)
-int(54)
-int(54)
-int(53)
--- Iteration 16 --
-int(54)
-int(54)
-int(54)
-int(53)
--- Iteration 17 --
 int(53)
 int(53)
 int(53)
 int(53)
--- Iteration 18 --
+-- Iteration 16 --
 int(16)
 int(16)
 bool(false)
 int(16)
--- Iteration 19 --
+-- Iteration 17 --
 int(15)
 int(15)
 bool(false)
 int(15)
--- Iteration 20 --
+-- Iteration 18 --
 int(17)
 int(17)
 bool(false)
 int(17)
--- Iteration 21 --
+-- Iteration 19 --
 int(18)
 int(18)
 bool(false)
 int(18)
--- Iteration 22 --
+-- Iteration 20 --
 int(21)
 int(21)
 int(21)
 int(21)
--- Iteration 23 --
+-- Iteration 21 --
 int(24)
 int(24)
 int(24)
 int(24)
--- Iteration 24 --
+-- Iteration 22 --
 int(26)
 int(26)
 int(26)
 int(26)
--- Iteration 25 --
+-- Iteration 23 --
 int(25)
 int(25)
 int(25)
 int(25)
--- Iteration 26 --
+-- Iteration 24 --
 int(27)
 int(27)
 int(27)
 int(27)
--- Iteration 27 --
+-- Iteration 25 --
 int(28)
 int(28)
 int(28)
 int(28)
--- Iteration 28 --
+-- Iteration 26 --
 int(28)
 int(28)
 int(28)
 int(28)
--- Iteration 29 --
+-- Iteration 27 --
 int(34)
 int(34)
 int(34)
 int(34)
--- Iteration 30 --
+-- Iteration 28 --
 int(43)
 int(43)
 int(43)
 int(43)
--- Iteration 31 --
+-- Iteration 29 --
 int(19)
 int(19)
 bool(false)
 int(19)
--- Iteration 32 --
+-- Iteration 30 --
 int(49)
 int(49)
 int(49)
 int(49)
--- Iteration 33 --
+-- Iteration 31 --
 bool(false)
 bool(false)
 bool(false)
 bool(false)
--- Iteration 34 --
+-- Iteration 32 --
 bool(false)
 bool(false)
 bool(false)
 bool(false)
--- Iteration 35 --
+-- Iteration 33 --
 bool(false)
 bool(false)
 bool(false)
 bool(false)
--- Iteration 36 --
+-- Iteration 34 --
 int(0)
 bool(false)
 bool(false)
diff --git a/ext/standard/tests/strings/strrpos_variation1.phpt b/ext/standard/tests/strings/strrpos_variation1.phpt
deleted file mode 100644 (file)
index 509c015..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
---TEST--
-Test strrpos() function : usage variations - double quoted strings for 'haystack' & 'needle' arguments
---FILE--
-<?php
-/* Test strrpos() function by passing double quoted strings for 'haystack' & 'needle' arguments */
-
-echo "*** Testing strrpos() function: with double quoted strings ***\n";
-$haystack = "Hello,\t\n\0\n  $&!#%()*<=>?@hello123456he \x234 \101 ";
-$needle = array(
-  //regular strings
-  "l",
-  "L",
-  "HELLO",
-  "hEllo",
-
-  //escape characters
-  "\t",
-  "\T",  //invalid input
-  "     ",
-  "\n",
-  "\N",  //invalid input
-  "
-",  //new line
-
-  //nulls
-  "\0",
-  NULL,
-  null,
-
-  //boolean false
-  FALSE,
-  false,
-
-  //empty string
-  "",
-
-  //special chars
-  " ",
-  "$",
-  " $",
-  "&",
-  "!#",
-  "()",
-  "<=>",
-  ">",
-  "=>",
-  "?",
-  "@",
-  "@hEllo",
-
-  "12345", //decimal numeric string
-  "\x23",  //hexadecimal numeric string
-  "#",  //respective ASCII char of \x23
-  "\101",  //octal numeric string
-  "A",  //respective ASCII char of \101
-  "456HEE",  //numerics + chars
-  $haystack  //haystack as needle
-);
-
-/* loop through to get the position of the needle in haystack string */
-$count = 1;
-for($index=0; $index<count($needle); $index++) {
-  echo "-- Iteration $count --\n";
-  var_dump( strrpos($haystack, $needle[$index]) );
-  var_dump( strrpos($haystack, $needle[$index], $index) );
-  $count++;
-}
-echo "*** Done ***";
-?>
---EXPECT--
-*** Testing strrpos() function: with double quoted strings ***
--- Iteration 1 --
-int(28)
-int(28)
--- Iteration 2 --
-bool(false)
-bool(false)
--- Iteration 3 --
-bool(false)
-bool(false)
--- Iteration 4 --
-bool(false)
-bool(false)
--- Iteration 5 --
-int(6)
-int(6)
--- Iteration 6 --
-bool(false)
-bool(false)
--- Iteration 7 --
-bool(false)
-bool(false)
--- Iteration 8 --
-int(9)
-int(9)
--- Iteration 9 --
-bool(false)
-bool(false)
--- Iteration 10 --
-int(9)
-int(9)
--- Iteration 11 --
-int(8)
-bool(false)
--- Iteration 12 --
-int(44)
-int(44)
--- Iteration 13 --
-int(44)
-int(44)
--- Iteration 14 --
-int(44)
-int(44)
--- Iteration 15 --
-int(44)
-int(44)
--- Iteration 16 --
-int(44)
-int(44)
--- Iteration 17 --
-int(43)
-int(43)
--- Iteration 18 --
-int(12)
-bool(false)
--- Iteration 19 --
-int(11)
-bool(false)
--- Iteration 20 --
-int(13)
-bool(false)
--- Iteration 21 --
-int(14)
-bool(false)
--- Iteration 22 --
-int(17)
-bool(false)
--- Iteration 23 --
-int(20)
-bool(false)
--- Iteration 24 --
-int(22)
-bool(false)
--- Iteration 25 --
-int(21)
-bool(false)
--- Iteration 26 --
-int(23)
-bool(false)
--- Iteration 27 --
-int(24)
-bool(false)
--- Iteration 28 --
-bool(false)
-bool(false)
--- Iteration 29 --
-int(30)
-int(30)
--- Iteration 30 --
-int(39)
-int(39)
--- Iteration 31 --
-int(39)
-int(39)
--- Iteration 32 --
-int(42)
-int(42)
--- Iteration 33 --
-int(42)
-int(42)
--- Iteration 34 --
-bool(false)
-bool(false)
--- Iteration 35 --
-int(0)
-bool(false)
-*** Done ***
diff --git a/ext/standard/tests/strings/strrpos_variation10.phpt b/ext/standard/tests/strings/strrpos_variation10.phpt
deleted file mode 100644 (file)
index a598279..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
---TEST--
-Test strrpos() function : usage variations - unexpected inputs for 'needle' argument
---FILE--
-<?php
-/* Test strrpos() function with unexpected inputs for 'needle' and
- *  an expected type of input for 'haystack' argument
-*/
-
-echo "*** Testing strrpos() function with unexpected values for needle ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample  {
-  public function __toString() {
-    return "object";
-  }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-$haystack = "string 0 1 2 -2 10.5 -10.5 10.5e10 10.6E-10 .5 array true false object \"\" null Resource";
-
-// array with different values
-$needles =  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 sample(),
-
-  // empty string
-  "",
-  '',
-
-  // null values
-  NULL,
-  null,
-
-  // resource
-  $file_handle,
-
-  // undefined variable
-  @$undefined_var,
-
-  // unset variable
-  @$unset_var
-);
-
-// loop through each element of the 'needle' array to check the working of strrpos()
-$counter = 1;
-for($index = 0; $index < count($needles); $index ++) {
-  echo "-- Iteration $counter --\n";
-  try {
-    var_dump( strrpos($haystack, $needles[$index]) );
-  } catch (TypeError $e) {
-    echo $e->getMessage(), "\n";
-  }
-  $counter ++;
-}
-
-fclose($file_handle);  //closing the file handle
-
-echo "*** Done ***";
-?>
---EXPECT--
-*** Testing strrpos() function with unexpected values for needle ***
--- Iteration 1 --
-int(42)
--- Iteration 2 --
-int(41)
--- Iteration 3 --
-bool(false)
--- Iteration 4 --
-bool(false)
--- Iteration 5 --
-int(27)
--- Iteration 6 --
-int(21)
--- Iteration 7 --
-bool(false)
--- Iteration 8 --
-bool(false)
--- Iteration 9 --
-int(28)
--- Iteration 10 --
-strrpos(): Argument #2 ($needle) must be of type string, array given
--- Iteration 11 --
-strrpos(): Argument #2 ($needle) must be of type string, array given
--- Iteration 12 --
-strrpos(): Argument #2 ($needle) must be of type string, array given
--- Iteration 13 --
-strrpos(): Argument #2 ($needle) must be of type string, array given
--- Iteration 14 --
-strrpos(): Argument #2 ($needle) must be of type string, array given
--- Iteration 15 --
-int(41)
--- Iteration 16 --
-int(87)
--- Iteration 17 --
-int(41)
--- Iteration 18 --
-int(87)
--- Iteration 19 --
-int(64)
--- Iteration 20 --
-int(87)
--- Iteration 21 --
-int(87)
--- Iteration 22 --
-int(87)
--- Iteration 23 --
-int(87)
--- Iteration 24 --
-strrpos(): Argument #2 ($needle) must be of type string, resource given
--- Iteration 25 --
-int(87)
--- Iteration 26 --
-int(87)
-*** Done ***
diff --git a/ext/standard/tests/strings/strrpos_variation11.phpt b/ext/standard/tests/strings/strrpos_variation11.phpt
deleted file mode 100644 (file)
index da33a21..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
---TEST--
-Test strrpos() function : usage variations - unexpected inputs for 'haystack' and 'needle' arguments
---FILE--
-<?php
-/* Test strrpos() function with unexpected inputs for 'haystack' and 'needle' arguments */
-
-echo "*** Testing strrpos() function with unexpected values for haystack and needle ***\n";
-
-// get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-// defining a class
-class sample  {
-  public function __toString() {
-    return "object";
-  }
-}
-
-//getting the resource
-$file_handle = 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'),
-
-  // 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($values); $index ++) {
-  echo "-- Iteration $counter --\n";
-  $haystack = $values[$index];
-  try {
-    var_dump( strrpos($values[$index], $values[$index]) );
-  } catch (Error $e) {
-    echo get_class($e) . ": " . $e->getMessage(), "\n";
-  }
-
-  try {
-    var_dump( strrpos($values[$index], $values[$index], 1) );
-  } catch (Error $e) {
-    echo get_class($e) . ": " . $e->getMessage(), "\n";
-  }
-  $counter ++;
-}
-
-echo "*** Done ***";
-?>
---EXPECT--
-*** Testing strrpos() function with unexpected values for haystack and needle ***
--- Iteration 1 --
-int(0)
-bool(false)
--- Iteration 2 --
-int(0)
-bool(false)
--- Iteration 3 --
-int(0)
-bool(false)
--- Iteration 4 --
-int(0)
-bool(false)
--- Iteration 5 --
-int(0)
-bool(false)
--- Iteration 6 --
-int(0)
-bool(false)
--- Iteration 7 --
-int(0)
-bool(false)
--- Iteration 8 --
-int(0)
-bool(false)
--- Iteration 9 --
-int(0)
-bool(false)
--- Iteration 10 --
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 11 --
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 12 --
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 13 --
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 14 --
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, array given
--- Iteration 15 --
-int(0)
-bool(false)
--- Iteration 16 --
-int(0)
-ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 17 --
-int(0)
-bool(false)
--- Iteration 18 --
-int(0)
-ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 19 --
-int(0)
-bool(false)
--- Iteration 20 --
-int(0)
-ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 21 --
-int(0)
-ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 22 --
-int(0)
-ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 23 --
-int(0)
-ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 24 --
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, resource given
-TypeError: strrpos(): Argument #1 ($haystack) must be of type string, resource given
--- Iteration 25 --
-int(0)
-ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
--- Iteration 26 --
-int(0)
-ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
-*** Done ***
index b6b7cb149d87e6fdd56a8ead0d5613c406be1ef4..0022d0e2c3f3859d985c0572bb1ddf3734d2b6d1 100644 (file)
@@ -24,8 +24,6 @@ $needle = array(
 
   //nulls
   '\0',
-  NULL,
-  null,
 
   //boolean false
   FALSE,
@@ -113,69 +111,63 @@ int(54)
 int(54)
 int(54)
 -- Iteration 15 --
-int(54)
-int(54)
--- Iteration 16 --
-int(54)
-int(54)
--- Iteration 17 --
 int(53)
 int(53)
--- Iteration 18 --
+-- Iteration 16 --
 int(16)
-bool(false)
--- Iteration 19 --
+int(16)
+-- Iteration 17 --
 int(15)
 bool(false)
--- Iteration 20 --
+-- Iteration 18 --
 int(17)
-bool(false)
--- Iteration 21 --
+int(17)
+-- Iteration 19 --
 int(18)
-bool(false)
--- Iteration 22 --
+int(18)
+-- Iteration 20 --
 int(21)
 int(21)
--- Iteration 23 --
+-- Iteration 21 --
 int(24)
 int(24)
--- Iteration 24 --
+-- Iteration 22 --
 int(26)
 int(26)
--- Iteration 25 --
+-- Iteration 23 --
 int(25)
 int(25)
--- Iteration 26 --
+-- Iteration 24 --
 int(27)
 int(27)
--- Iteration 27 --
+-- Iteration 25 --
 int(28)
 int(28)
--- Iteration 28 --
+-- Iteration 26 --
 bool(false)
 bool(false)
--- Iteration 29 --
+-- Iteration 27 --
 int(34)
 int(34)
--- Iteration 30 --
+-- Iteration 28 --
 int(43)
 int(43)
--- Iteration 31 --
+-- Iteration 29 --
 int(19)
 bool(false)
--- Iteration 32 --
+-- Iteration 30 --
 int(49)
 int(49)
--- Iteration 33 --
+-- Iteration 31 --
 bool(false)
 bool(false)
--- Iteration 34 --
+-- Iteration 32 --
 bool(false)
 bool(false)
--- Iteration 35 --
+-- Iteration 33 --
 bool(false)
 bool(false)
--- Iteration 36 --
+-- Iteration 34 --
 int(0)
 bool(false)
 *** Done ***
index 884a9021127f5b18a76db52bec5bcc78ec9ead88..f73d4129d5c4d34101b5a25828ba7d197f39f3a8 100644 (file)
@@ -17,7 +17,6 @@ try {
     echo $exception->getMessage() . "\n";
 }
 var_dump( strrpos($empty_string, FALSE) );
-var_dump( strrpos($empty_string, NULL) );
 
 echo "*** Done ***";
 ?>
@@ -27,5 +26,4 @@ echo "*** Done ***";
 int(0)
 strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
 int(0)
-int(0)
 *** Done ***
index da2aa1e22eb145b6e784898fb9271a6474e42257..52088fb88ba3c944608745880ce307e3d3e1d4a7 100644 (file)
Binary files a/ext/standard/tests/strings/strstr.phpt and b/ext/standard/tests/strings/strstr.phpt differ
index b16e55cc505683eb2edec5f43080846a91513c51..368a81ad93b3fa53dabd50ab7cf1c22bfc2b71e8 100644 (file)
Binary files a/ext/standard/tests/strings/strtolower-win32.phpt and b/ext/standard/tests/strings/strtolower-win32.phpt differ
index 0f9b4299cf0db21fe959b0717cacb8a1263193ae..3a685880571e000c3b416afdaa3a3080a814bb4c 100644 (file)
Binary files a/ext/standard/tests/strings/strtolower.phpt and b/ext/standard/tests/strings/strtolower.phpt differ
index de26ca540097574917fc0ee89416609ed9952b92..98a314a7b411e37c898e3007a1d6d91ea8c2e759 100644 (file)
Binary files a/ext/standard/tests/strings/strtoupper1-win32.phpt and b/ext/standard/tests/strings/strtoupper1-win32.phpt differ
index bff3f97d96bb48e07b4b5249bd01f5c61ee3c764..864053d22dee2cfab30f79b26c38a905926caf2a 100644 (file)
Binary files a/ext/standard/tests/strings/strtoupper1.phpt and b/ext/standard/tests/strings/strtoupper1.phpt differ
index 21e5cab7732280194a95a6714680e1b8d4bce1d1..f89ff654a1869707fc20be3cada710fced06b1e3 100644 (file)
@@ -19,8 +19,6 @@ EOD;
 $str_arr = array(
   "",
   '',
-  NULL,
-  null,
   FALSE,
   false,
   $heredoc_str
@@ -64,10 +62,4 @@ string(0) ""
 -- Iteration 5 --
 string(0) ""
 string(0) ""
--- Iteration 6 --
-string(0) ""
-string(0) ""
--- Iteration 7 --
-string(0) ""
-string(0) ""
 *** Done ***
index fcc903d6377f490c3b7f1d13943a574b9de68fed..438eb168fae55b9affed3599836c15b3248b4955 100644 (file)
@@ -8,10 +8,6 @@ Test strtr() function : usage variations - unexpected inputs for 'from' argument
 
 echo "*** Testing strtr() function: with unexpected inputs for 'from' ***\n";
 
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
 //defining a class
 class sample  {
   public function __toString() {
@@ -58,12 +54,6 @@ $from_arr =  array (
 
           // resource
 /*17*/   $file_handle,
-
-          // undefined variable
-/*18*/   @$undefined_var,
-
-          // unset variable
-/*19*/   @$unset_var
 );
 
 //defining 'to' argument
@@ -84,7 +74,7 @@ for($index = 0; $index < count($from_arr); $index++) {
 
 fclose($file_handle);  //closing the file handle
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing strtr() function: with unexpected inputs for 'from' ***
 -- Iteration 1 --
 string(6) "a12atm"
@@ -113,14 +103,14 @@ string(6) "0a2atm"
 -- Iteration 13 --
 string(6) "012atm"
 -- Iteration 14 --
+
+Deprecated: strtr(): Passing null to parameter #2 ($from) of type array|string is deprecated in %s on line %d
 string(6) "012atm"
 -- Iteration 15 --
+
+Deprecated: strtr(): Passing null to parameter #2 ($from) of type array|string is deprecated in %s on line %d
 string(6) "012atm"
 -- Iteration 16 --
 string(6) "012ttm"
 -- Iteration 17 --
 strtr(): Argument #2 ($from) must be of type array|string, resource given
--- Iteration 18 --
-string(6) "012atm"
--- Iteration 19 --
-string(6) "012atm"
index 7ac60532f8b5bb0bde29551bce84365e81703656..d68c6f04e75bb823b450bc93975a26fbe3b818a9 100644 (file)
@@ -8,10 +8,6 @@ Test strtr() function : usage variations - unexpected inputs for 'replace_pairs'
 
 echo "*** Testing strtr() function: with unexpected inputs for 'replace_pairs' ***\n";
 
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
 //defining a class
 class sample  {
   public function __toString() {
@@ -58,12 +54,6 @@ $replace_pairs_arr =  array (
 
   // resource
   $file_handle,
-
-  // undefined variable
-  @$undefined_var,
-
-  // unset variable
-  @$unset_var
 );
 
 // loop through with each element of the $replace_pairs array to test strtr() function
@@ -84,7 +74,7 @@ fclose($file_handle);  //closing the file handle
 
 echo "*** Done ***";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing strtr() function: with unexpected inputs for 'replace_pairs' ***
 
 -- Iteration 1 --
@@ -127,9 +117,13 @@ strtr(): Argument #2 ($from) must be of type array, string given
 strtr(): Argument #2 ($from) must be of type array, string given
 
 -- Iteration 14 --
+
+Deprecated: strtr(): Passing null to parameter #2 ($from) of type array|string is deprecated in %s on line %d
 strtr(): Argument #2 ($from) must be of type array, string given
 
 -- Iteration 15 --
+
+Deprecated: strtr(): Passing null to parameter #2 ($from) of type array|string is deprecated in %s on line %d
 strtr(): Argument #2 ($from) must be of type array, string given
 
 -- Iteration 16 --
@@ -137,10 +131,4 @@ strtr(): Argument #2 ($from) must be of type array, string given
 
 -- Iteration 17 --
 strtr(): Argument #2 ($from) must be of type array|string, resource given
-
--- Iteration 18 --
-strtr(): Argument #2 ($from) must be of type array, string given
-
--- Iteration 19 --
-strtr(): Argument #2 ($from) must be of type array, string given
 *** Done ***
index 99dcd2bf2f0c08246eddce75d21a0e33f0960e56..8f172cee611b386f83e5e68ec331499b44477d48 100644 (file)
Binary files a/ext/standard/tests/strings/substr.phpt and b/ext/standard/tests/strings/substr.phpt differ
index abfecac0977dd19cd9ffc8341a85151cb6a6727e..d76c56d60fb215caaaa4719a02e53a3dd3127787 100644 (file)
@@ -9,10 +9,6 @@ $str = "this is a string";
 var_dump( substr_count($str, "t", "5") );
 var_dump( substr_count($str, "t", "5", "10") );
 
-echo "\n-- 3rd or 4th arg as NULL --\n";
-var_dump( substr_count($str, "I", NULL) );
-var_dump( substr_count($str, "i", NULL, 10) );
-
 echo "\n-- overlapped substrings --\n";
 var_dump( substr_count("abcabcabcabcabc", "abca") );
 var_dump( substr_count("abcabcabcabcabc", "abca", 2) );
@@ -53,10 +49,6 @@ echo "Done\n";
 int(1)
 int(1)
 
--- 3rd or 4th arg as NULL --
-int(0)
-int(2)
-
 -- overlapped substrings --
 int(2)
 int(2)
index e4601db7ac187f1373996d04082e974bc7b41ab9..849b972c117ab1c92658d64c3ee75740fe5ac89f 100644 (file)
Binary files a/ext/standard/tests/strings/trim1.phpt and b/ext/standard/tests/strings/trim1.phpt differ
index a54b984b882ee56aae3f7e55b737f8cfcd1e41b0..1d8ecd7630c211d1c2343327d2984647235397c4 100644 (file)
Binary files a/ext/standard/tests/strings/ucfirst.phpt and b/ext/standard/tests/strings/ucfirst.phpt differ
diff --git a/ext/standard/tests/strings/vprintf_variation1.phpt b/ext/standard/tests/strings/vprintf_variation1.phpt
deleted file mode 100644 (file)
index 18cf1a7..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
---TEST--
-Test vprintf() function : usage variations - unexpected values for the format argument
---FILE--
-<?php
-/*
- * Test vprintf() when different unexpected format strings are passed to
- * the '$format' argument of the function
-*/
-
-echo "*** Testing vprintf() : with unexpected values for format argument ***\n";
-
-// initialising the required variables
-$args = array(1, 2);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// declaring a class
-class sample
-{
-  public function __toString() {
-  return "object";
-  }
-}
-
-// Defining resource
-$file_handle = fopen(__FILE__, 'r');
-
-
-//array of values to iterate over
-$values = array(
-
-          // int data
-/*1*/    0,
-          1,
-          12345,
-          -2345,
-
-          // float data
-/*5*/    10.5,
-          -10.5,
-          10.1234567e10,
-          10.7654321E-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
-/*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 format
-
-$counter = 1;
-foreach($values as $value) {
-  echo "\n -- Iteration $counter --\n";
-  try {
-    $result = vprintf($value, $args);
-    echo "\n";
-    var_dump($result);
-  } catch (TypeError $exception) {
-    echo $exception->getMessage() . "\n";
-  }
-
-  $counter++;
-}
-
-// closing the resource
-fclose($file_handle);
-
-?>
---EXPECT--
-*** Testing vprintf() : with unexpected values for format argument ***
-
- -- Iteration 1 --
-0
-int(1)
-
- -- Iteration 2 --
-1
-int(1)
-
- -- Iteration 3 --
-12345
-int(5)
-
- -- Iteration 4 --
--2345
-int(5)
-
- -- Iteration 5 --
-10.5
-int(4)
-
- -- Iteration 6 --
--10.5
-int(5)
-
- -- Iteration 7 --
-101234567000
-int(12)
-
- -- Iteration 8 --
-1.07654321E-9
-int(13)
-
- -- Iteration 9 --
-0.5
-int(3)
-
- -- Iteration 10 --
-vprintf(): Argument #1 ($format) must be of type string, array given
-
- -- Iteration 11 --
-vprintf(): Argument #1 ($format) must be of type string, array given
-
- -- Iteration 12 --
-vprintf(): Argument #1 ($format) must be of type string, array given
-
- -- Iteration 13 --
-vprintf(): Argument #1 ($format) must be of type string, array given
-
- -- Iteration 14 --
-vprintf(): Argument #1 ($format) must be of type string, array given
-
- -- Iteration 15 --
-
-int(0)
-
- -- Iteration 16 --
-
-int(0)
-
- -- Iteration 17 --
-1
-int(1)
-
- -- Iteration 18 --
-
-int(0)
-
- -- Iteration 19 --
-1
-int(1)
-
- -- Iteration 20 --
-
-int(0)
-
- -- Iteration 21 --
-
-int(0)
-
- -- Iteration 22 --
-
-int(0)
-
- -- Iteration 23 --
-object
-int(6)
-
- -- Iteration 24 --
-
-int(0)
-
- -- Iteration 25 --
-
-int(0)
-
- -- Iteration 26 --
-vprintf(): Argument #1 ($format) must be of type string, resource given
index 7ea081c82f0bc167b55268891249baa4d31e0b75..7bcb2ef9bd73482dbe60c2fafddf33ab17f32717 100644 (file)
@@ -45,6 +45,7 @@ $reader->close();
 <?php
 unlink(__DIR__.'/015-get-errors.xml');
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: XMLReader::getAttributeNs(): Passing null to parameter #2 ($namespace) of type string is deprecated in %s on line %d
 XMLReader::getAttributeNs(): Argument #2 ($namespace) cannot be empty
 ns1:num: 1
index 303d5c63e45ea5426441aa6d83374a5a8b3e3f46..1c29b6983f29af60ffc5cc3be532821a119ba6b1 100644 (file)
@@ -40,5 +40,6 @@ $reader->close();
 <?php
 unlink(__DIR__.'/015-move-errors.xml');
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: XMLReader::moveToAttributeNs(): Passing null to parameter #2 ($namespace) of type string is deprecated in %s on line %d
 XMLReader::moveToAttributeNs(): Argument #2 ($namespace) cannot be empty
index 267c5331de31fb9857bdf5d8668c80af88d51c6d..da30c8e375e9ef45edf262cb99d2b99ff695a4ad 100644 (file)
@@ -21,7 +21,7 @@ $xw = new XMLWriter();
 $xw->openMemory();
 $xw->startDocument(NULL, "UTF-8");
 $xw->startDtd("root");
-$xw->writeDtdEntity("c", NULL, 0, "-//W3C//TEXT copyright//EN", "http://www.w3.org/xmlspec/copyright.xml");
+$xw->writeDtdEntity("c", "", 0, "-//W3C//TEXT copyright//EN", "http://www.w3.org/xmlspec/copyright.xml");
 $xw->endDtd();
 $xw->startElement("root");
 $xw->endDocument();
diff --git a/ext/zlib/tests/gzfile_variation3.phpt b/ext/zlib/tests/gzfile_variation3.phpt
deleted file mode 100644 (file)
index 276c839..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-Test function gzfile() by substituting argument 1 with emptyUnsetUndefNull values.
---SKIPIF--
-<?php
-if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
-?>
---FILE--
-<?php
-
-
-$use_include_path = false;
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation = array(
-  'unset var' => @$unset_var,
-  'undefined var' => @$undefined_var,
-  'empty string DQ' => "",
-  'empty string SQ' => '',
-  'uppercase NULL' => NULL,
-  'lowercase null' => null,
-  );
-
-
-foreach ( $variation as $var ) {
-    try {
-        var_dump(gzfile( $var ,  $use_include_path ) );
-    } catch (\ValueError $e) {
-        echo $e->getMessage() . \PHP_EOL;
-    }
-}
-?>
---EXPECT--
-Path cannot be empty
-Path cannot be empty
-Path cannot be empty
-Path cannot be empty
-Path cannot be empty
-Path cannot be empty
diff --git a/ext/zlib/tests/readgzfile_variation3.phpt b/ext/zlib/tests/readgzfile_variation3.phpt
deleted file mode 100644 (file)
index 4a7fcec..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-Test function readgzfile() by substituting argument 1 with emptyUnsetUndefNull values.
---SKIPIF--
-<?php
-if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
-?>
---FILE--
-<?php
-
-
-$use_include_path = false;
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation = array(
-  'unset var' => @$unset_var,
-  'undefined var' => @$undefined_var,
-  'empty string DQ' => "",
-  'empty string SQ' => '',
-  'uppercase NULL' => NULL,
-  'lowercase null' => null,
-  );
-
-
-foreach ( $variation as $var ) {
-    try {
-        var_dump(readgzfile( $var ,  $use_include_path ) );
-    } catch (\ValueError $e) {
-        echo $e->getMessage() . \PHP_EOL;
-    }
-}
-?>
---EXPECT--
-Path cannot be empty
-Path cannot be empty
-Path cannot be empty
-Path cannot be empty
-Path cannot be empty
-Path cannot be empty
index fb270f0adf4d33707e32264cecfc3c1cea7c3606..c6e27e42ea9d6023ea49e9dad36e9bfd5fd7f5a5 100755 (executable)
@@ -3385,7 +3385,7 @@ function clear_show_test(): void
     // Parallel testing
     global $workerID;
 
-    if (!$workerID) {
+    if (!$workerID && isset($line_length)) {
         // Write over the last line to avoid random trailing chars on next echo
         echo str_repeat(" ", $line_length), "\r";
     }