diff --git a/Zend/tests/backtrace/debug_backtrace_options.phpt b/Zend/tests/backtrace/debug_backtrace_options.phpt index 460bbe3936ff..d204fbf6bfbe 100644 --- a/Zend/tests/backtrace/debug_backtrace_options.phpt +++ b/Zend/tests/backtrace/debug_backtrace_options.phpt @@ -16,10 +16,8 @@ function doit($a, $b, $how) { echo "==default\n"; $how(); - echo "==true\n"; - $how(true); - echo "==false\n"; - $how(false); + echo "==0\n"; + $how(0); echo "==DEBUG_BACKTRACE_PROVIDE_OBJECT\n"; $how(DEBUG_BACKTRACE_PROVIDE_OBJECT); echo "==DEBUG_BACKTRACE_IGNORE_ARGS\n"; @@ -48,11 +46,7 @@ foo::statCall("doit", "backtrace_print"); #0 %sdebug_backtrace_options.php(%d): doit('a', 'b', 'debug_print_bac...') #1 %sdebug_backtrace_options.php(%d): foo->doCall('doit', 'debug_print_bac...') #2 %sdebug_backtrace_options.php(%d): foo::statCall('doit', 'debug_print_bac...') -==true -#0 %sdebug_backtrace_options.php(%d): doit('a', 'b', 'debug_print_bac...') -#1 %sdebug_backtrace_options.php(%d): foo->doCall('doit', 'debug_print_bac...') -#2 %sdebug_backtrace_options.php(%d): foo::statCall('doit', 'debug_print_bac...') -==false +==0 #0 %sdebug_backtrace_options.php(%d): doit('a', 'b', 'debug_print_bac...') #1 %sdebug_backtrace_options.php(%d): foo->doCall('doit', 'debug_print_bac...') #2 %sdebug_backtrace_options.php(%d): foo::statCall('doit', 'debug_print_bac...') @@ -131,7 +125,7 @@ Array ) ) -==true +==0 Array ( [0] => Array @@ -141,71 +135,7 @@ Array [function] => backtrace_print [args] => Array ( - [0] => 1 - ) - - ) - - [1] => Array - ( - [file] => %sdebug_backtrace_options.php - [line] => %d - [function] => doit - [args] => Array - ( - [0] => a - [1] => b - [2] => backtrace_print - ) - - ) - - [2] => Array - ( - [file] => %sdebug_backtrace_options.php - [line] => %d - [function] => doCall - [class] => foo - [object] => foo Object - ( - ) - - [type] => -> - [args] => Array - ( - [0] => doit - [1] => backtrace_print - ) - - ) - - [3] => Array - ( - [file] => %sdebug_backtrace_options.php - [line] => %d - [function] => statCall - [class] => foo - [type] => :: - [args] => Array - ( - [0] => doit - [1] => backtrace_print - ) - - ) - -) -==false -Array -( - [0] => Array - ( - [file] => %sdebug_backtrace_options.php - [line] => 19 - [function] => backtrace_print - [args] => Array - ( - [0] => + [0] => 0 ) ) @@ -261,7 +191,7 @@ Array [0] => Array ( [file] => %sdebug_backtrace_options.php - [line] => 21 + [line] => 19 [function] => backtrace_print [args] => Array ( @@ -325,7 +255,7 @@ Array [0] => Array ( [file] => %sdebug_backtrace_options.php - [line] => 23 + [line] => 21 [function] => backtrace_print ) @@ -361,7 +291,7 @@ Array [0] => Array ( [file] => %sdebug_backtrace_options.php - [line] => 25 + [line] => 23 [function] => backtrace_print ) diff --git a/Zend/tests/builtin_functions/builtin_functions_basic.phpt b/Zend/tests/builtin_functions/builtin_functions_basic.phpt index 619365cbce17..4e87dfaa037a 100644 --- a/Zend/tests/builtin_functions/builtin_functions_basic.phpt +++ b/Zend/tests/builtin_functions/builtin_functions_basic.phpt @@ -28,7 +28,7 @@ var_dump(count(get_defined_functions())); var_dump(gettype(get_declared_interfaces())); var_dump(count(get_declared_interfaces())); -var_dump(get_extension_funcs(true)); +var_dump(get_extension_funcs("1")); var_dump(gettype(get_extension_funcs("standard"))); var_dump(count(get_extension_funcs("standard"))); var_dump(gettype(get_extension_funcs("zend"))); diff --git a/Zend/tests/call_user_functions/call_user_func_strict_arginfo_check.phpt b/Zend/tests/call_user_functions/call_user_func_strict_arginfo_check.phpt index 1f21ee989dd5..18e968b3ef23 100644 --- a/Zend/tests/call_user_functions/call_user_func_strict_arginfo_check.phpt +++ b/Zend/tests/call_user_functions/call_user_func_strict_arginfo_check.phpt @@ -7,8 +7,8 @@ declare(strict_types=1); namespace Foo; // strlen() will be called with strict_types=0, so this is legal. -var_dump(call_user_func('strlen', false)); +var_dump(call_user_func('strlen', 25)); ?> --EXPECT-- -int(0) +int(2) diff --git a/ext/gd/tests/imageantialias_error2.phpt b/ext/gd/tests/imageantialias_error2.phpt deleted file mode 100644 index 40f4d64a12b6..000000000000 --- a/ext/gd/tests/imageantialias_error2.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -Testing wrong parameter passing in imageantialias() of GD library ---CREDITS-- -Guilherme Blanco -#testfest PHPSP on 2009-06-20 ---EXTENSIONS-- -gd ---FILE-- - ---EXPECT-- -bool(true) diff --git a/ext/json/tests/bug69187.phpt b/ext/json/tests/bug69187.phpt index 4d076c4b50b1..433177ab4e0e 100644 --- a/ext/json/tests/bug69187.phpt +++ b/ext/json/tests/bug69187.phpt @@ -2,8 +2,6 @@ Bug #69187 json_last_error return BC in PHP7 --FILE-- prepare(false))) - printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), var_export($tmp, true)); - printf("c) [%d] %s\n", $mysqli->errno, $mysqli->error); - if (false !== ($tmp = $mysqli->prepare(''))) printf("[005] Expecting boolean/false, got %s/%s\n", gettype($tmp), var_export($tmp, true)); printf("c) [%d] %s\n", $mysqli->errno, $mysqli->error); @@ -37,8 +29,6 @@ require_once 'skipifconnectfailure.inc'; require_once 'clean_table.inc'; ?> --EXPECT-- -a) [1065] Query was empty b) [1065] Query was empty c) [1065] Query was empty -c) [1065] Query was empty done! diff --git a/ext/openssl/tests/bug38261.phpt b/ext/openssl/tests/bug38261.phpt index 582ebac054a8..e739876d52d4 100644 --- a/ext/openssl/tests/bug38261.phpt +++ b/ext/openssl/tests/bug38261.phpt @@ -4,7 +4,7 @@ openssl key from zval leaks openssl --FILE-- getMessage() . "\n"; } -try { - var_dump(new ReflectionClass(true)); -} catch (Exception $e) { - echo $e->getMessage() . "\n"; -} - try { var_dump(new ReflectionClass(1)); } catch (Exception $e) { @@ -51,7 +45,6 @@ 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 ReflectionClass::__construct(): Argument #1 ($objectOrClass) must be of type object|string, array given ReflectionClass::__construct() expects exactly 1 argument, 2 given Class "X" does not exist diff --git a/ext/reflection/tests/ReflectionClass_getConstant_error.phpt b/ext/reflection/tests/ReflectionClass_getConstant_error.phpt deleted file mode 100644 index caadf2e3713f..000000000000 --- a/ext/reflection/tests/ReflectionClass_getConstant_error.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -ReflectionClass::getConstant() - bad params ---FILE-- -getConstant(1)); -var_dump($rc->getConstant(1.5)); -var_dump($rc->getConstant(true)); -?> ---EXPECTF-- -Check invalid params: - -Deprecated: ReflectionClass::getConstant() for a non-existent constant is deprecated, use ReflectionClass::hasConstant() to check if the constant exists in %s on line %d -bool(false) - -Deprecated: ReflectionClass::getConstant() for a non-existent constant is deprecated, use ReflectionClass::hasConstant() to check if the constant exists in %s on line %d -bool(false) - -Deprecated: ReflectionClass::getConstant() for a non-existent constant is deprecated, use ReflectionClass::hasConstant() to check if the constant exists in %s on line %d -bool(false) diff --git a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt index 9278b4787544..60b17d58b27a 100644 --- a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt @@ -36,11 +36,6 @@ try { } catch (Exception $e) { echo $e->getMessage() . "\n"; } -try { - var_dump($rc->getMethod(true)); -} catch (Exception $e) { - echo $e->getMessage() . "\n"; -} try { var_dump($rc->getMethod(array(1,2,3))); } catch (TypeError $e) { @@ -63,6 +58,5 @@ Deprecated: ReflectionClass::getMethod(): Passing null to parameter #1 ($name) o Method C::() does not exist Method C::1() does not exist Method C::1.5() does not exist -Method C::1() does not exist ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, array given ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, C given diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt index c2f8419a1ea7..4ddae0023951 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt @@ -36,11 +36,6 @@ try { } catch (exception $e) { echo $e->getMessage() . "\n"; } -try { - var_dump($rc->getProperty(true)); -} catch (exception $e) { - echo $e->getMessage() . "\n"; -} try { var_dump($rc->getProperty(array(1,2,3))); } catch (TypeError $e) { @@ -61,6 +56,5 @@ Deprecated: ReflectionClass::getProperty(): Passing null to parameter #1 ($name) Property C::$ does not exist Property C::$1 does not exist Property C::$1.5 does not exist -Property C::$1 does not exist ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, array given ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, C given diff --git a/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt b/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt deleted file mode 100644 index 4e4c206ac23e..000000000000 --- a/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -ReflectionClass::hasConstant() - error cases ---CREDITS-- -Robin Fernandes -Steve Seear ---FILE-- -hasConstant(1)); -var_dump($rc->hasConstant(1.5)); -var_dump($rc->hasConstant(true)); -?> ---EXPECT-- -Check invalid params: -bool(false) -bool(false) -bool(false) diff --git a/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt b/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt deleted file mode 100644 index 5e175fbb7e5d..000000000000 --- a/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -ReflectionClass::hasMethod() - error cases ---CREDITS-- -Robin Fernandes -Steve Seear ---FILE-- -hasMethod(1)); -var_dump($rc->hasMethod(1.5)); -var_dump($rc->hasMethod(true)); -?> ---EXPECT-- -Check invalid params: -bool(false) -bool(false) -bool(false) diff --git a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt deleted file mode 100644 index 14b4520e07ef..000000000000 --- a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -ReflectionClass::hasProperty() - error cases ---CREDITS-- -Robin Fernandes -Steve Seear ---FILE-- -hasProperty(1)); -var_dump($rc->hasProperty(1.5)); -var_dump($rc->hasProperty(true)); -?> ---EXPECT-- -Check invalid params: -bool(false) -bool(false) -bool(false) diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt index 9a1e340d83a3..2074da7816eb 100644 --- a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt +++ b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt @@ -14,8 +14,8 @@ class TestClass try { - echo "\nWrong type of argument (bool):\n"; - $methodInfo = new ReflectionMethod(true); + echo "\nWrong type of argument (numeric string):\n"; + $methodInfo = new ReflectionMethod("1"); } catch (Exception $e) { print $e->__toString(); } @@ -26,14 +26,14 @@ try { print $e->__toString(); } try { - echo "\nWrong type of argument (bool, string):\n"; - $methodInfo = new ReflectionMethod(true, "foo"); + echo "\nWrong type of argument (numeric string, string):\n"; + $methodInfo = new ReflectionMethod("1", "foo"); } catch (Exception $e) { print $e->__toString(); } try { - echo "\nWrong type of argument (string, bool):\n"; - $methodInfo = new ReflectionMethod('TestClass', true); + echo "\nWrong type of argument (string, numeric string):\n"; + $methodInfo = new ReflectionMethod('TestClass', "1"); } catch (Exception $e) { print $e->__toString(); } @@ -64,7 +64,7 @@ try { ?> --EXPECTF-- -Wrong type of argument (bool): +Wrong type of argument (numeric string): Deprecated: Calling ReflectionMethod::__construct() with 1 argument is deprecated, use ReflectionMethod::createFromMethodName() instead in %s on line %d ReflectionException: ReflectionMethod::__construct(): Argument #1 ($objectOrMethod) must be a valid method name in %s:%d @@ -78,12 +78,12 @@ ReflectionException: ReflectionMethod::__construct(): Argument #1 ($objectOrMeth Stack trace: #0 %s ReflectionMethod->__construct('3') #1 {main} -Wrong type of argument (bool, string): +Wrong type of argument (numeric string, string): ReflectionException: Class "1" does not exist in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('1', 'foo') #1 {main} -Wrong type of argument (string, bool): +Wrong type of argument (string, numeric string): ReflectionException: Method TestClass::1() does not exist in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('TestClass', '1') diff --git a/ext/standard/tests/array/count_invalid_mode.phpt b/ext/standard/tests/array/count_invalid_mode.phpt index dd4c1e4bc267..6ce28a1bfe61 100644 --- a/ext/standard/tests/array/count_invalid_mode.phpt +++ b/ext/standard/tests/array/count_invalid_mode.phpt @@ -10,8 +10,6 @@ $modes = [ 1, -1, 2, - TRUE, - FALSE, ]; foreach ($modes as $mode) { @@ -29,5 +27,3 @@ int(0) int(0) ValueError: count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE ValueError: count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE -int(0) -int(0) diff --git a/ext/standard/tests/file/005_variation2-win32.phpt b/ext/standard/tests/file/005_variation2-win32.phpt index 9f5b7ba6795d..0f26f66cbed0 100644 --- a/ext/standard/tests/file/005_variation2-win32.phpt +++ b/ext/standard/tests/file/005_variation2-win32.phpt @@ -28,12 +28,10 @@ function stat_fn( $filename ) { echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; echo "\n*** testing file info ***"; -stat_fn(false); stat_fn(''); stat_fn(' '); stat_fn('|'); echo "\n*** testing touch ***\n"; -var_dump(touch(false)); var_dump(touch('')); //php generates permission denied, we generate No such file or dir. @@ -52,11 +50,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 @@ -81,7 +74,6 @@ Warning: filectime(): stat failed for | in %s on line %d *** testing touch *** bool(false) -bool(false) Warning: touch(): %s in %s on line %d bool(false) diff --git a/ext/standard/tests/file/005_variation2.phpt b/ext/standard/tests/file/005_variation2.phpt index 42b0fd1904d7..15f604f8ba5b 100644 --- a/ext/standard/tests/file/005_variation2.phpt +++ b/ext/standard/tests/file/005_variation2.phpt @@ -33,19 +33,16 @@ $dir = __DIR__ . '/005_variation2'; mkdir($dir); chdir($dir); -$b = touch(false); $c = touch(''); $d = touch(' '); $e = touch('|'); var_dump($a); -var_dump($b); var_dump($c); var_dump($d); var_dump($e); echo "\n*** testing file info ***"; -stat_fn(false); stat_fn(''); stat_fn(' '); stat_fn('|'); @@ -65,7 +62,6 @@ echo "Done"; Warning: Undefined variable $a in %s on line %d NULL bool(false) -bool(false) bool(true) bool(true) @@ -75,11 +71,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 diff --git a/ext/standard/tests/file/file_exists_variation1.phpt b/ext/standard/tests/file/file_exists_variation1.phpt index 446e7fac16a0..01cd63a353b6 100644 --- a/ext/standard/tests/file/file_exists_variation1.phpt +++ b/ext/standard/tests/file/file_exists_variation1.phpt @@ -6,7 +6,6 @@ Dave Kelsey -1, - "TRUE" => TRUE, - "FALSE" => FALSE, + "\"1\"" => "1", "\"\"" => "", "\" \"" => " ", "\\0" => "\0", @@ -49,14 +48,11 @@ foreach($names_arr as $key =>$value) { Warning: file_get_contents(): Failed to open stream: No such file or directory in %s on line %d bool(false) --- Filename: TRUE -- +-- Filename: "1" -- Warning: file_get_contents(): Failed to open stream: No such file or directory in %s on line %d bool(false) --- Filename: FALSE -- -ValueError: Path must not be empty - -- Filename: "" -- ValueError: Path must not be empty diff --git a/ext/standard/tests/file/file_get_contents_variation8.phpt b/ext/standard/tests/file/file_get_contents_variation8.phpt index d56249675667..35ba69d50cf3 100644 --- a/ext/standard/tests/file/file_get_contents_variation8.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8.phpt @@ -17,8 +17,7 @@ echo "*** Testing file_get_contents() : variation ***\n"; $names_arr = array( /* Invalid args */ -1, - TRUE, - FALSE, + "1", "", " ", "\0", @@ -54,20 +53,18 @@ bool(false) -- Iteration 2 -- ValueError: Path must not be empty -- Iteration 3 -- -ValueError: Path must not be empty --- Iteration 4 -- Warning: file_get_contents(): Failed to open stream: No such file or directory in %s on line %d bool(false) --- Iteration 5 -- +-- Iteration 4 -- ValueError: file_get_contents(): Argument #1 ($filename) must not contain any null bytes --- Iteration 6 -- +-- Iteration 5 -- TypeError: file_get_contents(): Argument #1 ($filename) must be of type string, array given --- Iteration 7 -- +-- Iteration 6 -- Warning: file_get_contents(): Failed to open stream: No such file or directory in %s on line %d bool(false) --- Iteration 8 -- +-- Iteration 7 -- Warning: file_get_contents(): Failed to open stream: No such file or directory in %s on line %d bool(false) diff --git a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt index 221bffc54db0..8911d8c47941 100644 --- a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt @@ -16,8 +16,7 @@ echo "*** Testing file_put_contents() : usage variation ***\n"; /* An array of filenames */ $names_arr = array( "-1" => -1, - "TRUE" => TRUE, - "FALSE" => FALSE, + "\"1\"" => "1", "\"\"" => "", "\" \"" => " ", "\\0" => "\0", @@ -51,12 +50,9 @@ foreach($names_arr as $key =>$value) { -- Filename: -1 -- 9 bytes written to: '-1' --- Filename: TRUE -- +-- Filename: "1" -- 9 bytes written to: '1' --- Filename: FALSE -- -ValueError: Path must not be empty - -- Filename: "" -- ValueError: Path must not be empty diff --git a/ext/standard/tests/file/file_put_contents_variation8.phpt b/ext/standard/tests/file/file_put_contents_variation8.phpt index 7f1ad5c4a66a..74c68849229c 100644 --- a/ext/standard/tests/file/file_put_contents_variation8.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8.phpt @@ -20,8 +20,7 @@ chdir($dir); /* An array of filenames */ $names_arr = array( -1, - TRUE, - FALSE, + "1", "", " ", //this one also generates a java message rather than our own so we don't replicate php message @@ -66,18 +65,16 @@ rmdir($dir); -- Iteration 2 -- ValueError: Path must not be empty -- Iteration 3 -- -ValueError: Path must not be empty --- Iteration 4 -- 9 bytes written to: ' ' --- Iteration 5 -- +-- Iteration 4 -- ValueError: file_put_contents(): Argument #1 ($filename) must not contain any null bytes --- Iteration 6 -- +-- Iteration 5 -- TypeError: file_put_contents(): Argument #1 ($filename) must be of type string, array given --- Iteration 7 -- +-- Iteration 6 -- Warning: file_put_contents(): Failed to open stream: %s in %s on line %d Failed to write data to: '%sir' --- Iteration 8 -- +-- Iteration 7 -- Warning: file_put_contents(): Failed to open stream: %s in %s on line %d Failed to write data to: '%sphp' diff --git a/ext/standard/tests/file/filegroup_variation2.phpt b/ext/standard/tests/file/filegroup_variation2.phpt index eeff71fa61ba..4006d7749436 100644 --- a/ext/standard/tests/file/filegroup_variation2.phpt +++ b/ext/standard/tests/file/filegroup_variation2.phpt @@ -6,7 +6,7 @@ Dave Kelsey obscure_filename --FILE-- obscure_filename --FILE-- obscure_filename --FILE-- diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt index 8f1e92eb5d1c..5869a9b57001 100644 --- a/ext/standard/tests/file/fnmatch_variation.phpt +++ b/ext/standard/tests/file/fnmatch_variation.phpt @@ -111,19 +111,15 @@ $str_arr = array( ); match_($str_arr, $str_arr); -echo "\n--- With booleans ---\n"; -$bool_arr = array( - TRUE, - true, +echo "\n--- With mixed integers and strings ---\n"; +$mixed_arr = array( 1, 10, - FALSE, - false, 0, "", "string" ); -match_($bool_arr, $bool_arr); +match_($mixed_arr, $mixed_arr); echo "\n--- With NULL ---\n"; $null_arr = array( @@ -302,35 +298,23 @@ ValueError: fnmatch(): Argument #2 ($filename) must not contain any null bytes bool(false) bool(true) ---- With booleans --- +--- With mixed integers and strings --- -- Iteration 0 -- bool(true) -bool(true) -bool(true) -bool(false) -bool(false) bool(false) bool(false) bool(false) bool(false) -- Iteration 1 -- -bool(true) -bool(true) -bool(true) -bool(false) -bool(false) bool(false) +bool(true) bool(false) bool(false) bool(false) -- Iteration 2 -- -bool(true) -bool(true) -bool(true) -bool(false) -bool(false) bool(false) bool(false) +bool(true) bool(false) bool(false) -- Iteration 3 -- @@ -339,60 +323,12 @@ bool(false) bool(false) bool(true) bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -- Iteration 4 -- bool(false) bool(false) bool(false) bool(false) bool(true) -bool(true) -bool(false) -bool(true) -bool(false) --- Iteration 5 -- -bool(false) -bool(false) -bool(false) -bool(false) -bool(true) -bool(true) -bool(false) -bool(true) -bool(false) --- Iteration 6 -- -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(true) -bool(false) -bool(false) --- Iteration 7 -- -bool(false) -bool(false) -bool(false) -bool(false) -bool(true) -bool(true) -bool(false) -bool(true) -bool(false) --- Iteration 8 -- -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(true) --- With NULL --- -- Iteration 0 -- diff --git a/ext/standard/tests/file/fscanf_variation13.phpt b/ext/standard/tests/file/fscanf_variation13.phpt index 7dbff56b5c1f..c5482abf9142 100644 --- a/ext/standard/tests/file/fscanf_variation13.phpt +++ b/ext/standard/tests/file/fscanf_variation13.phpt @@ -29,7 +29,7 @@ $counter = 1; // writing to the file foreach($bool_types as $value) { - @fprintf($file_handle, $value); + @fprintf($file_handle, (string) $value); @fprintf($file_handle, "\n"); } // closing the file diff --git a/ext/standard/tests/file/fscanf_variation19.phpt b/ext/standard/tests/file/fscanf_variation19.phpt index 00d60ee31ce5..da1478ff2bc4 100644 --- a/ext/standard/tests/file/fscanf_variation19.phpt +++ b/ext/standard/tests/file/fscanf_variation19.phpt @@ -33,7 +33,7 @@ $counter = 1; // writing to the file foreach($bool_types as $value) { - @fprintf($file_handle, $value); + @fprintf($file_handle, (string) $value); @fprintf($file_handle, "\n"); } // closing the file diff --git a/ext/standard/tests/file/fscanf_variation25.phpt b/ext/standard/tests/file/fscanf_variation25.phpt index 1a2b9f2a3d05..2d473e508535 100644 --- a/ext/standard/tests/file/fscanf_variation25.phpt +++ b/ext/standard/tests/file/fscanf_variation25.phpt @@ -33,7 +33,7 @@ $counter = 1; // writing to the file foreach($bool_types as $value) { - @fprintf($file_handle, $value); + @fprintf($file_handle, (string) $value); @fprintf($file_handle, "\n"); } // closing the file diff --git a/ext/standard/tests/file/fscanf_variation32.phpt b/ext/standard/tests/file/fscanf_variation32.phpt index 0b0351c10f2a..5b08276994f7 100644 --- a/ext/standard/tests/file/fscanf_variation32.phpt +++ b/ext/standard/tests/file/fscanf_variation32.phpt @@ -34,7 +34,7 @@ $counter = 1; // writing to the file foreach($bool_types as $value) { - @fprintf($file_handle, $value); + @fprintf($file_handle, (string) $value); @fprintf($file_handle, "\n"); } // closing the file diff --git a/ext/standard/tests/file/fscanf_variation38.phpt b/ext/standard/tests/file/fscanf_variation38.phpt index 28563727effd..826bcbb6d6fc 100644 --- a/ext/standard/tests/file/fscanf_variation38.phpt +++ b/ext/standard/tests/file/fscanf_variation38.phpt @@ -29,7 +29,7 @@ $counter = 1; // writing to the file foreach($bool_types as $value) { - @fprintf($file_handle, $value); + @fprintf($file_handle, (string) $value); @fprintf($file_handle, "\n"); } // closing the file diff --git a/ext/standard/tests/file/fscanf_variation44.phpt b/ext/standard/tests/file/fscanf_variation44.phpt index 5e58ad2df68a..ea0ff92413e8 100644 --- a/ext/standard/tests/file/fscanf_variation44.phpt +++ b/ext/standard/tests/file/fscanf_variation44.phpt @@ -29,7 +29,7 @@ $counter = 1; // writing to the file foreach($bool_types as $value) { - @fprintf($file_handle, $value); + @fprintf($file_handle, (string) $value); @fprintf($file_handle, "\n"); } // closing the file diff --git a/ext/standard/tests/file/fscanf_variation50.phpt b/ext/standard/tests/file/fscanf_variation50.phpt index c52f5a571d73..c467f66c23b4 100644 --- a/ext/standard/tests/file/fscanf_variation50.phpt +++ b/ext/standard/tests/file/fscanf_variation50.phpt @@ -29,7 +29,7 @@ $counter = 1; // writing to the file foreach($bool_types as $value) { - @fprintf($file_handle, $value); + @fprintf($file_handle, (string) $value); @fprintf($file_handle, "\n"); } // closing the file diff --git a/ext/standard/tests/file/fscanf_variation7.phpt b/ext/standard/tests/file/fscanf_variation7.phpt index 36af4e193da7..e1ac62ebae8b 100644 --- a/ext/standard/tests/file/fscanf_variation7.phpt +++ b/ext/standard/tests/file/fscanf_variation7.phpt @@ -29,7 +29,7 @@ $counter = 1; // writing to the file foreach($bool_types as $value) { - @fprintf($file_handle, $value); + @fprintf($file_handle, (string) $value); @fprintf($file_handle, "\n"); } // closing the file diff --git a/ext/standard/tests/file/glob_variation-win32-mb.phpt b/ext/standard/tests/file/glob_variation-win32-mb.phpt index f34563db4b68..30a260f48aa0 100644 --- a/ext/standard/tests/file/glob_variation-win32-mb.phpt +++ b/ext/standard/tests/file/glob_variation-win32-mb.phpt @@ -35,7 +35,7 @@ $patterns = array ( '$file_path/glob_variation私はガラスを食べられます/wonder5', "$file_path/glob_variation私はガラスを食べられます/?wonder?", "$file_path/glob_variation私はガラスを食べられます/wonder?", - TRUE // boolean true + "1" // boolean true ); $counter = 1; /* loop through $patterns to match each $pattern with the files created diff --git a/ext/standard/tests/file/glob_variation-win32.phpt b/ext/standard/tests/file/glob_variation-win32.phpt index 74a1c3e5c7e4..e574781814c2 100644 --- a/ext/standard/tests/file/glob_variation-win32.phpt +++ b/ext/standard/tests/file/glob_variation-win32.phpt @@ -34,7 +34,7 @@ $patterns = array ( '$file_path/glob_variation/wonder5', "$file_path/glob_variation/?wonder?", "$file_path/glob_variation/wonder?", - TRUE // boolean true + "1" // boolean true ); $counter = 1; /* loop through $patterns to match each $pattern with the files created diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt index b36793d3f3e0..43e3e26df221 100644 --- a/ext/standard/tests/file/glob_variation.phpt +++ b/ext/standard/tests/file/glob_variation.phpt @@ -37,7 +37,7 @@ $patterns = array ( '$file_path/glob_variation/wonder5', "$file_path/glob_variation/?wonder?", "$file_path/glob_variation/wonder?", - TRUE // boolean true + "1" // boolean true ); $counter = 1; /* loop through $patterns to match each $pattern with the files created diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt index 730a2bcfea4d..ad8688f22ecf 100644 --- a/ext/standard/tests/file/is_dir_variation3.phpt +++ b/ext/standard/tests/file/is_dir_variation3.phpt @@ -10,8 +10,8 @@ echo "*** Testing is_dir() with Invalid arguments: expected bool(false) ***\n"; $dirnames = array( /* Invalid dirnames */ -2.34555, - TRUE, - FALSE, + "1", + "", " ", /* scalars */ diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt index b9b3a98e5c62..0e1707734938 100644 --- a/ext/standard/tests/file/is_executable_variation3.phpt +++ b/ext/standard/tests/file/is_executable_variation3.phpt @@ -21,8 +21,8 @@ $invalid_files = array( 0, 1234, -2.34555, - TRUE, - FALSE, + "1", + "", " ", ); /* loop through to test each element in the above array diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt index e4a576676282..31bfb5c1c5b1 100644 --- a/ext/standard/tests/file/is_readable_variation3.phpt +++ b/ext/standard/tests/file/is_readable_variation3.phpt @@ -15,8 +15,8 @@ $misc_files = array( 0, 1234, -2.34555, - TRUE, - FALSE, + "1", + "", " ", ); /* loop through to test each element in the above array diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt index 021d6e564541..e4de54cb157e 100644 --- a/ext/standard/tests/file/is_writable_variation3.phpt +++ b/ext/standard/tests/file/is_writable_variation3.phpt @@ -17,8 +17,8 @@ $misc_files = array( 0, 1234, -2.34555, - TRUE, - FALSE, + "1", + "", " ", ); /* loop through to test each element in the above array diff --git a/ext/standard/tests/file/lstat_stat_variation22.phpt b/ext/standard/tests/file/lstat_stat_variation22.phpt index 9efb23fc4178..4b8aae576046 100644 --- a/ext/standard/tests/file/lstat_stat_variation22.phpt +++ b/ext/standard/tests/file/lstat_stat_variation22.phpt @@ -13,13 +13,11 @@ obscure_filename --FILE-- - string(0) "" - ["filename"]=> - string(0) "" -} -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 7 -- array(3) { ["dirname"]=> string(1) "." @@ -166,7 +152,7 @@ string(1) "." string(11) "array(1, 2)" string(0) "" string(11) "array(1, 2)" --- Iteration 8 -- +-- Iteration 7 -- array(3) { ["dirname"]=> string(1) "." @@ -179,7 +165,7 @@ string(1) "." string(21) "array( array(), null)" string(0) "" string(21) "array( array(), null)" --- Iteration 9 -- +-- Iteration 8 -- array(3) { ["dirname"]=> string(1) "." @@ -192,7 +178,7 @@ string(1) "." string(1) " " string(0) "" string(1) " " --- Iteration 10 -- +-- Iteration 9 -- array(3) { ["dirname"]=> string(1) "." @@ -205,7 +191,7 @@ string(1) "." string(1) " " string(0) "" string(1) " " --- Iteration 11 -- +-- Iteration 10 -- array(2) { ["basename"]=> string(0) "" @@ -216,7 +202,7 @@ string(0) "" string(0) "" string(0) "" string(0) "" --- Iteration 12 -- +-- Iteration 11 -- array(2) { ["basename"]=> string(0) "" @@ -227,7 +213,7 @@ string(0) "" string(0) "" string(0) "" string(0) "" --- Iteration 13 -- +-- Iteration 12 -- array(4) { ["dirname"]=> string(1) "." @@ -242,7 +228,7 @@ string(1) "." string(11) "www.foo.com" string(3) "com" string(7) "www.foo" --- Iteration 14 -- +-- Iteration 13 -- array(4) { ["dirname"]=> string(17) "/var/html/testdir" @@ -257,7 +243,7 @@ string(17) "/var/html/testdir" string(12) "example.html" string(4) "html" string(7) "example" --- Iteration 15 -- +-- Iteration 14 -- array(3) { ["dirname"]=> string(12) "/testdir/foo" @@ -270,7 +256,7 @@ string(12) "/testdir/foo" string(4) "test" string(0) "" string(4) "test" --- Iteration 16 -- +-- Iteration 15 -- array(4) { ["dirname"]=> string(4) "/foo" @@ -285,7 +271,7 @@ string(4) "/foo" string(12) "symlink.link" string(4) "link" string(7) "symlink" --- Iteration 17 -- +-- Iteration 16 -- array(3) { ["dirname"]=> string(1) "." @@ -298,7 +284,7 @@ string(1) "." string(5) "12345" string(0) "" string(5) "12345" --- Iteration 18 -- +-- Iteration 17 -- array(4) { ["dirname"]=> string(1) "." @@ -313,7 +299,7 @@ string(1) "." string(15) "www.example.com" string(3) "com" string(11) "www.example" --- Iteration 19 -- +-- Iteration 18 -- array(3) { ["dirname"]=> string(12) "/testdir/foo" @@ -326,7 +312,7 @@ string(12) "/testdir/foo" string(4) "test" string(0) "" string(4) "test" --- Iteration 20 -- +-- Iteration 19 -- array(4) { ["dirname"]=> string(6) "../foo" @@ -341,7 +327,7 @@ string(6) "../foo" string(9) "test.link" string(4) "link" string(4) "test" --- Iteration 21 -- +-- Iteration 20 -- array(4) { ["dirname"]=> string(76) "./test/work/scratch/mydir/yourdir/ourdir/test1/test2/test3/test4/test5/test6" @@ -356,7 +342,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 22 -- +-- Iteration 21 -- array(4) { ["dirname"]=> string(1) "." diff --git a/ext/standard/tests/file/readfile_error.phpt b/ext/standard/tests/file/readfile_error.phpt index cc47ca7560e2..10e4d4e2520c 100644 --- a/ext/standard/tests/file/readfile_error.phpt +++ b/ext/standard/tests/file/readfile_error.phpt @@ -13,11 +13,6 @@ try { } catch (Throwable $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } -try { - var_dump( readfile(false) ); // boolean false as $filename -} catch (Throwable $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} echo "\n-- Testing readfile() with non-existent file --\n"; $non_existent_file = __DIR__."/non_existent_file.tmp"; @@ -30,7 +25,6 @@ echo "Done\n"; -- Testing readfile() with invalid arguments -- ValueError: Path must not be empty -ValueError: Path must not be empty -- Testing readfile() with non-existent file -- diff --git a/ext/standard/tests/file/readfile_variation10-win32.phpt b/ext/standard/tests/file/readfile_variation10-win32.phpt index 1dbb896fbc8c..9eaeec3a1b9e 100644 --- a/ext/standard/tests/file/readfile_variation10-win32.phpt +++ b/ext/standard/tests/file/readfile_variation10-win32.phpt @@ -17,8 +17,7 @@ echo "*** Testing readfile() : variation ***\n"; $names_arr = array( /* Invalid args */ "-1" => -1, - "TRUE" => TRUE, - "FALSE" => FALSE, + "\"1\"" => "1", "\"\"" => "", "\" \"" => " ", "\\0" => "\0", @@ -46,13 +45,10 @@ foreach($names_arr as $key => $value) { Warning: readfile(): Failed to open stream: No such file or directory in %s on line %d --- Filename: TRUE -- +-- Filename: "1" -- Warning: readfile(): Failed to open stream: No such file or directory in %s on line %d --- Filename: FALSE -- -ValueError: Path must not be empty - -- Filename: "" -- ValueError: Path must not be empty diff --git a/ext/standard/tests/file/readfile_variation10.phpt b/ext/standard/tests/file/readfile_variation10.phpt index 90910ebc65d6..275bd182dbb1 100644 --- a/ext/standard/tests/file/readfile_variation10.phpt +++ b/ext/standard/tests/file/readfile_variation10.phpt @@ -18,8 +18,7 @@ echo "*** Testing readfile() : variation ***\n"; $names_arr = array( /* Invalid args */ -1, - TRUE, - FALSE, + "1", "", " ", "\0", @@ -50,8 +49,6 @@ Warning: readfile(): Failed to open stream: %s in %s on line %d Warning: readfile(): Failed to open stream: %s in %s on line %d -- testing '' -- ValueError: Path must not be empty --- testing '' -- -ValueError: Path must not be empty -- testing ' ' -- Warning: readfile(): Failed to open stream: %s in %s on line %d diff --git a/ext/standard/tests/file/readlink_variation1.phpt b/ext/standard/tests/file/readlink_variation1.phpt index b3d6fc9a44ef..bf9895863111 100644 --- a/ext/standard/tests/file/readlink_variation1.phpt +++ b/ext/standard/tests/file/readlink_variation1.phpt @@ -6,7 +6,7 @@ Dave Kelsey obscure_filename --FILE-- "1" */ - FALSE, + "1", "", // 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". @@ -67,40 +66,33 @@ bool(true) Warning: rename(): The system cannot find the file specified (code: 2) in %srename_variation13-win32.php on line %d bool(false) --- 1 testing '1' boolean -- +-- 1 testing '1' string -- bool(true) Warning: rename(): The system cannot find the file specified (code: 2) in %srename_variation13-win32.php on line %d bool(false) --- 2 testing '' boolean -- +-- 2 testing '' string -- Warning: rename(): %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(): %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 '' string -- - -Warning: rename(): %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(): %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 -- +-- 3 testing ' ' string -- Warning: rename(): The filename, directory name, or volume label syntax is incorrect (code: 123) in %srename_variation13-win32.php on line %d bool(false) Warning: rename(): The filename, directory name, or volume label syntax is incorrect (code: 123) in %srename_variation13-win32.php on line %d bool(false) --- 5 testing '/no/such/file/dir' string -- +-- 4 testing '/no/such/file/dir' string -- Warning: rename(): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d bool(false) Warning: rename(): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d bool(false) --- 6 testing 'php/php' string -- +-- 5 testing 'php/php' string -- Warning: rename(): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d bool(false) diff --git a/ext/standard/tests/file/rename_variation13.phpt b/ext/standard/tests/file/rename_variation13.phpt index e53cf86f16bb..b6a199d96f19 100644 --- a/ext/standard/tests/file/rename_variation13.phpt +++ b/ext/standard/tests/file/rename_variation13.phpt @@ -24,8 +24,7 @@ mkdir($file_path); $names_arr = array( /* Invalid args */ -1, - TRUE, - FALSE, + "1", "", " ", @@ -71,13 +70,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 ' ' -- diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt index a247967823c3..b5c2c084ab6b 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt @@ -20,9 +20,7 @@ echo "*** Testing symlink() for error conditions ***\n"; //invalid arguments var_dump( symlink('', $linkname) ); // empty string as filename -var_dump( symlink(false, $linkname) ); // boolean false as filename var_dump( symlink($filename, '') ); // '' as linkname -var_dump( symlink($filename, false) ); // false as linkname echo "\n*** Testing linkinfo() for error conditions ***\n"; @@ -49,12 +47,6 @@ 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 *** ValueError: linkinfo(): Argument #1 ($path) must not be empty Done diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt index fcc64d409849..2319168a8d7d 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt @@ -21,16 +21,13 @@ echo "*** Testing link() for error conditions ***\n"; //invalid arguments 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, '') ); // '' 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('') ); // empty string as linkname var_dump( is_link(' ') ); // space as linkname -var_dump( is_link(false) ); // boolean false as linkname var_dump( is_link($filename) ); // file given to is_link echo "Done\n"; @@ -51,15 +48,8 @@ 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) Done diff --git a/ext/standard/tests/file/tempnam_variation3.phpt b/ext/standard/tests/file/tempnam_variation3.phpt index 0512c472b976..637e7dfc555f 100644 --- a/ext/standard/tests/file/tempnam_variation3.phpt +++ b/ext/standard/tests/file/tempnam_variation3.phpt @@ -19,8 +19,7 @@ mkdir($file_path); $names_arr = array( /* Invalid args */ -1, - TRUE, - FALSE, + "1", "", " ", /* prefix with path separator of a non existing directory*/ @@ -85,14 +84,10 @@ File name is => %s/%s File permissions are => 100600 File created in => directory specified -- Iteration 4 -- -File name is => %s/%s -File permissions are => 100600 -File created in => directory specified --- Iteration 5 -- File name is => %s/dir%s File permissions are => 100600 File created in => directory specified --- Iteration 6 -- +-- Iteration 5 -- File name is => %s/php%s File permissions are => 100600 File created in => directory specified diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt index b731c7644912..19f6f545299d 100644 --- a/ext/standard/tests/file/tempnam_variation7-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt @@ -17,8 +17,7 @@ echo "*** Testing tempnam() with invalid/non-existing directory names ***\n"; $names_arr = array( /* Invalid args */ -1, - TRUE, - FALSE, + "1", "", " ", "\0", @@ -81,26 +80,22 @@ File name is => %s%et%s File permissions are => 100666 File created in => temp dir -- Iteration 3 -- -File name is => %s%et%s -File permissions are => 100666 -File created in => temp dir --- Iteration 4 -- 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 5 -- +-- Iteration 4 -- tempnam(): Argument #1 ($directory) must not contain any null bytes --- Iteration 6 -- +-- Iteration 5 -- tempnam(): Argument #1 ($directory) must be of type string, array given --- Iteration 7 -- +-- Iteration 6 -- 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 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 diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt index 300673db321a..00aef379cf21 100644 --- a/ext/standard/tests/file/tempnam_variation7.phpt +++ b/ext/standard/tests/file/tempnam_variation7.phpt @@ -17,8 +17,7 @@ echo "*** Testing tempnam() with invalid/non-existing directory names ***\n"; $names_arr = array( /* Invalid args */ -1, - TRUE, - FALSE, + "1", "", " ", /* Non-existing dirs */ @@ -78,22 +77,18 @@ File name is => %s%etempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 3 -- -File name is => %s%etempnam_variation3.tmp%s -File permissions are => 100600 -File created in => temp dir --- Iteration 4 -- 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 5 -- +-- Iteration 4 -- 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 6 -- +-- Iteration 5 -- 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 diff --git a/ext/standard/tests/file/unlink_error-win32-mb.phpt b/ext/standard/tests/file/unlink_error-win32-mb.phpt index a62114fe7dab..14a1cfc6d39b 100644 --- a/ext/standard/tests/file/unlink_error-win32-mb.phpt +++ b/ext/standard/tests/file/unlink_error-win32-mb.phpt @@ -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(false) ); // $filename as boolean false -var_dump( file_exists(false) ); // confirm file doesn't exist - echo "\n-- Testing unlink() on non-existent file --\n"; var_dump( unlink(__DIR__."/non_existent_file.tmp") ); @@ -59,10 +56,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(): No such file or directory in %s on line %d diff --git a/ext/standard/tests/file/unlink_error-win32.phpt b/ext/standard/tests/file/unlink_error-win32.phpt index 1e4500d2b7e8..1f22c63f47d2 100644 --- a/ext/standard/tests/file/unlink_error-win32.phpt +++ b/ext/standard/tests/file/unlink_error-win32.phpt @@ -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(false) ); // $filename as boolean false -var_dump( file_exists(false) ); // confirm file doesn't exist - echo "\n-- Testing unlink() on non-existent file --\n"; var_dump( unlink(__DIR__."/non_existent_file.tmp") ); @@ -56,10 +53,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(): No such file or directory in %s on line %d diff --git a/ext/standard/tests/file/unlink_error.phpt b/ext/standard/tests/file/unlink_error.phpt index 8174f1b01268..8c4694cc0ed6 100644 --- a/ext/standard/tests/file/unlink_error.phpt +++ b/ext/standard/tests/file/unlink_error.phpt @@ -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(false) ); // $filename as boolean false -var_dump( file_exists(false) ); // confirm file doesn't exist - echo "\n-- Testing unlink() on non-existent file --\n"; var_dump( unlink(__DIR__."/non_existent_file.tmp") ); @@ -55,10 +52,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(): No such file or directory in %s on line %d diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt deleted file mode 100644 index 195affe4fc68..000000000000 --- a/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -Test function get_cfg_var() by substituting argument 1 with boolean 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-- - true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - ); - - -foreach ( $variation_array as $var ) { - var_dump(get_cfg_var( $var ) ); -} -?> ---EXPECT-- -*** Test substituting argument 1 with boolean values *** -bool(false) -bool(false) -bool(false) -bool(false) diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation7.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation7.phpt index d6bdf693e8d7..96f50dec4e59 100644 --- a/ext/standard/tests/general_functions/get_cfg_var_variation7.phpt +++ b/ext/standard/tests/general_functions/get_cfg_var_variation7.phpt @@ -23,7 +23,8 @@ $variation_array = array( 'string DQ' => "string", 'string SQ' => 'string', 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc + 'heredoc' => $heredoc, + 'empty string' => '' ); @@ -37,3 +38,4 @@ bool(false) bool(false) bool(false) bool(false) +bool(false) diff --git a/ext/standard/tests/general_functions/proc_nice_variation2.phpt b/ext/standard/tests/general_functions/proc_nice_variation2.phpt deleted file mode 100644 index f1f93be221ef..000000000000 --- a/ext/standard/tests/general_functions/proc_nice_variation2.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Test function proc_nice() by substituting argument 1 with boolean values. ---CREDITS-- -Italian PHP TestFest 2009 Cesena 19-20-21 june -Fabio Fabbrucci (fabbrucci@grupporetina.com) -Michele Orselli (mo@ideato.it) -Simone Gentili (sensorario@gmail.com) ---SKIPIF-- - ---FILE-- - true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - ); - - -foreach ( $variation_array as $var ) { - var_dump(proc_nice( $var ) ); -} -?> ---EXPECT-- -*** Test substituting argument 1 with boolean values *** -bool(true) -bool(true) -bool(true) -bool(true) diff --git a/ext/standard/tests/general_functions/uniqid_basic.phpt b/ext/standard/tests/general_functions/uniqid_basic.phpt index 408f72bfdbaa..fb9af7ead282 100644 --- a/ext/standard/tests/general_functions/uniqid_basic.phpt +++ b/ext/standard/tests/general_functions/uniqid_basic.phpt @@ -17,8 +17,7 @@ $prefix = array ( 99999, "99999", 10.5e2, - true, - false + "1" ); for ($i = 0; $i < count($prefix); $i++) { @@ -54,7 +53,3 @@ string(17) "1050%s" string(14) "1%s" string(24) "1%s.%s" string(14) "1%s" - -string(13) "%s" -string(23) "%s.%s" -string(13) "%s" diff --git a/ext/standard/tests/math/abs_basic.phpt b/ext/standard/tests/math/abs_basic.phpt index 2b4957b996a8..6a826177e22e 100644 --- a/ext/standard/tests/math/abs_basic.phpt +++ b/ext/standard/tests/math/abs_basic.phpt @@ -18,8 +18,8 @@ $values = array(23, "2.345e1", "-2.345e1", null, - true, - false); + 1, + 0); for ($i = 0; $i < count($values); $i++) { $res = abs($values[$i]); diff --git a/ext/standard/tests/math/acos_variation.phpt b/ext/standard/tests/math/acos_variation.phpt index 1fac4ccc246d..d7f66e6a46b9 100644 --- a/ext/standard/tests/math/acos_variation.phpt +++ b/ext/standard/tests/math/acos_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = acos($values[$i]); diff --git a/ext/standard/tests/math/acosh_variation.phpt b/ext/standard/tests/math/acosh_variation.phpt index 9335961e637d..0e8f2343d7db 100644 --- a/ext/standard/tests/math/acosh_variation.phpt +++ b/ext/standard/tests/math/acosh_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = acosh($values[$i]); diff --git a/ext/standard/tests/math/asin_variation.phpt b/ext/standard/tests/math/asin_variation.phpt index d0286894396e..1545ea15b3c9 100644 --- a/ext/standard/tests/math/asin_variation.phpt +++ b/ext/standard/tests/math/asin_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = asin($values[$i]); diff --git a/ext/standard/tests/math/asinh_variation.phpt b/ext/standard/tests/math/asinh_variation.phpt index e7b9fd9c543b..73331bce301e 100644 --- a/ext/standard/tests/math/asinh_variation.phpt +++ b/ext/standard/tests/math/asinh_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = asinh($values[$i]); diff --git a/ext/standard/tests/math/atan2_basic.phpt b/ext/standard/tests/math/atan2_basic.phpt index 1c89cfa1c2fc..bf119f6a73b3 100644 --- a/ext/standard/tests/math/atan2_basic.phpt +++ b/ext/standard/tests/math/atan2_basic.phpt @@ -13,8 +13,8 @@ $valuesy = array(23, "23", "23.45", "2.345e1", - true, - false); + 1.0, + 0.0); $valuesx = array(23, -23, @@ -25,8 +25,8 @@ $valuesx = array(23, "23", "23.45", "2.345e1", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($valuesy); $i++) { for ($j = 0; $j < count($valuesx); $j++) { @@ -47,7 +47,7 @@ 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:1 float(1.5273454314034) -Y:23 X: float(1.5707963267949) +Y:23 X:0 float(1.5707963267949) Y:-23 X:23 float(-0.78539816339745) Y:-23 X:-23 float(-2.3561944901923) Y:-23 X:23.45 float(-0.77571063007847) @@ -58,7 +58,7 @@ 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:1 float(-1.5273454314034) -Y:-23 X: float(-1.5707963267949) +Y:-23 X:0 float(-1.5707963267949) Y:23.45 X:23 float(0.79508569671643) Y:23.45 X:-23 float(2.3465069568734) Y:23.45 X:23.45 float(0.78539816339745) @@ -69,7 +69,7 @@ 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:1 float(1.5281782247706) -Y:23.45 X: float(1.5707963267949) +Y:23.45 X:0 float(1.5707963267949) Y:-23.45 X:23 float(-0.79508569671643) Y:-23.45 X:-23 float(-2.3465069568734) Y:-23.45 X:23.45 float(-0.78539816339745) @@ -80,7 +80,7 @@ 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:1 float(-1.5281782247706) -Y:-23.45 X: float(-1.5707963267949) +Y:-23.45 X:0 float(-1.5707963267949) Y:23 X:23 float(0.78539816339745) Y:23 X:-23 float(2.3561944901923) Y:23 X:23.45 float(0.77571063007847) @@ -91,7 +91,7 @@ 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:1 float(1.5273454314034) -Y:23 X: float(1.5707963267949) +Y:23 X:0 float(1.5707963267949) Y:23 X:23 float(0.78539816339745) Y:23 X:-23 float(2.3561944901923) Y:23 X:23.45 float(0.77571063007847) @@ -102,7 +102,7 @@ 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:1 float(1.5273454314034) -Y:23 X: float(1.5707963267949) +Y:23 X:0 float(1.5707963267949) Y:23 X:23 float(0.78539816339745) Y:23 X:-23 float(2.3561944901923) Y:23 X:23.45 float(0.77571063007847) @@ -113,7 +113,7 @@ 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:1 float(1.5273454314034) -Y:23 X: float(1.5707963267949) +Y:23 X:0 float(1.5707963267949) Y:23.45 X:23 float(0.79508569671643) Y:23.45 X:-23 float(2.3465069568734) Y:23.45 X:23.45 float(0.78539816339745) @@ -124,7 +124,7 @@ 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:1 float(1.5281782247706) -Y:23.45 X: float(1.5707963267949) +Y:23.45 X:0 float(1.5707963267949) Y:2.345e1 X:23 float(0.79508569671643) Y:2.345e1 X:-23 float(2.3465069568734) Y:2.345e1 X:23.45 float(0.78539816339745) @@ -135,7 +135,7 @@ 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:1 float(1.5281782247706) -Y:2.345e1 X: float(1.5707963267949) +Y:2.345e1 X:0 float(1.5707963267949) Y:1 X:23 float(0.043450895391531) Y:1 X:-23 float(3.0981417581983) Y:1 X:23.45 float(0.042618102024328) @@ -146,15 +146,15 @@ 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:1 float(0.78539816339745) -Y:1 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:1 float(0) -Y: X: float(0) +Y:1 X:0 float(1.5707963267949) +Y:0 X:23 float(0) +Y:0 X:-23 float(3.1415926535898) +Y:0 X:23.45 float(0) +Y:0 X:-23.45 float(3.1415926535898) +Y:0 X:23 float(0) +Y:0 X:23 float(0) +Y:0 X:23 float(0) +Y:0 X:23.45 float(0) +Y:0 X:2.345e1 float(0) +Y:0 X:1 float(0) +Y:0 X:0 float(0) diff --git a/ext/standard/tests/math/atan_variation.phpt b/ext/standard/tests/math/atan_variation.phpt index abd3831dddc6..0725b619d4e1 100644 --- a/ext/standard/tests/math/atan_variation.phpt +++ b/ext/standard/tests/math/atan_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = atan($values[$i]); diff --git a/ext/standard/tests/math/atanh_variation.phpt b/ext/standard/tests/math/atanh_variation.phpt index f740c1ccc00a..9a7b53f2d990 100644 --- a/ext/standard/tests/math/atanh_variation.phpt +++ b/ext/standard/tests/math/atanh_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = atanh($values[$i]); diff --git a/ext/standard/tests/math/base_convert_variation1.phpt b/ext/standard/tests/math/base_convert_variation1.phpt index c191f8103735..e567fe6563c8 100644 --- a/ext/standard/tests/math/base_convert_variation1.phpt +++ b/ext/standard/tests/math/base_convert_variation1.phpt @@ -25,17 +25,11 @@ $inputs = array( 1.234567E-2, .5, - // boolean data -/*13*/ true, - false, - TRUE, - FALSE, - // empty data -/*17*/ "", +/*13*/ "", '', // string data -/*20*/ "abcxyz", +/*16*/ "abcxyz", 'abcxyz', $heredoc, ); @@ -86,28 +80,16 @@ Exception: Invalid characters passed for attempted conversion Exception: Invalid characters passed for attempted conversion -- Iteration 11 -- -string(1) "1" +string(1) "0" -- Iteration 12 -- string(1) "0" -- Iteration 13 -- -string(1) "1" - --- Iteration 14 -- -string(1) "0" - --- Iteration 15 -- -string(1) "0" - --- Iteration 16 -- -string(1) "0" - --- Iteration 17 -- Exception: Invalid characters passed for attempted conversion --- Iteration 18 -- +-- Iteration 14 -- Exception: Invalid characters passed for attempted conversion --- Iteration 19 -- +-- Iteration 15 -- Exception: Invalid characters passed for attempted conversion diff --git a/ext/standard/tests/math/bindec_basic.phpt b/ext/standard/tests/math/bindec_basic.phpt index 47c6453dec5f..a2795eb7a148 100644 --- a/ext/standard/tests/math/bindec_basic.phpt +++ b/ext/standard/tests/math/bindec_basic.phpt @@ -24,8 +24,8 @@ $values = array(111000111, 31.1013e5, 0x111ABC, 011237, - true, - false, + "1", + "", ); for ($i = 0; $i < count($values); $i++) { diff --git a/ext/standard/tests/math/bindec_basic_64bit.phpt b/ext/standard/tests/math/bindec_basic_64bit.phpt index 7bbab6f85ff2..8e9f758ca859 100644 --- a/ext/standard/tests/math/bindec_basic_64bit.phpt +++ b/ext/standard/tests/math/bindec_basic_64bit.phpt @@ -24,8 +24,8 @@ $values = array(111000111, 31.1013e5, 0x111ABC, 011237, - true, - false, + "1", + "", ); for ($i = 0; $i < count($values); $i++) { diff --git a/ext/standard/tests/math/bindec_variation1.phpt b/ext/standard/tests/math/bindec_variation1.phpt index 1ce32f066536..d76b250648aa 100644 --- a/ext/standard/tests/math/bindec_variation1.phpt +++ b/ext/standard/tests/math/bindec_variation1.phpt @@ -31,24 +31,18 @@ $inputs = array( 12.3456789000E-10, .5, - // boolean data -/*12*/ true, - false, - TRUE, - FALSE, - // empty data -/*16*/ "", +/*12*/ "", '', array(), // string data -/*19*/ "abcxyz", +/*15*/ "abcxyz", 'abcxyz', $heredoc, // resource variable -/*24*/ $fp +/*20*/ $fp ); // loop through each element of $inputs to check the behaviour of bindec() @@ -95,34 +89,22 @@ Exception: Invalid characters passed for attempted conversion Exception: Invalid characters passed for attempted conversion -- Iteration 10 -- -int(1) +int(0) -- Iteration 11 -- int(0) -- Iteration 12 -- -int(1) - --- Iteration 13 -- -int(0) - --- Iteration 14 -- -int(0) - --- Iteration 15 -- -int(0) - --- Iteration 16 -- TypeError: bindec(): Argument #1 ($binary_string) must be of type string, array given --- Iteration 17 -- +-- Iteration 13 -- Exception: Invalid characters passed for attempted conversion --- Iteration 18 -- +-- Iteration 14 -- Exception: Invalid characters passed for attempted conversion --- Iteration 19 -- +-- Iteration 15 -- Exception: Invalid characters passed for attempted conversion --- Iteration 20 -- +-- Iteration 16 -- TypeError: bindec(): Argument #1 ($binary_string) must be of type string, resource given diff --git a/ext/standard/tests/math/bindec_variation1_64bit.phpt b/ext/standard/tests/math/bindec_variation1_64bit.phpt index 417c751654f1..641d675402aa 100644 --- a/ext/standard/tests/math/bindec_variation1_64bit.phpt +++ b/ext/standard/tests/math/bindec_variation1_64bit.phpt @@ -28,18 +28,12 @@ $inputs = array( 12.3456789000E-10, .5, - // boolean data -/*12*/ true, - false, - TRUE, - FALSE, - // empty data -/*16*/ "", +/*12*/ "", '', // string data -/*19*/ "abcxyz", +/*15*/ "abcxyz", 'abcxyz', $heredoc, ); @@ -87,28 +81,16 @@ Exception: Invalid characters passed for attempted conversion Exception: Invalid characters passed for attempted conversion -- Iteration 10 -- -int(1) +int(0) -- Iteration 11 -- int(0) -- Iteration 12 -- -int(1) - --- Iteration 13 -- -int(0) - --- Iteration 14 -- -int(0) - --- Iteration 15 -- -int(0) - --- Iteration 16 -- Exception: Invalid characters passed for attempted conversion --- Iteration 17 -- +-- Iteration 13 -- Exception: Invalid characters passed for attempted conversion --- Iteration 18 -- +-- Iteration 14 -- Exception: Invalid characters passed for attempted conversion diff --git a/ext/standard/tests/math/ceil_basic.phpt b/ext/standard/tests/math/ceil_basic.phpt index 7bdc87d16eaf..66b519deafd1 100644 --- a/ext/standard/tests/math/ceil_basic.phpt +++ b/ext/standard/tests/math/ceil_basic.phpt @@ -22,8 +22,6 @@ $values = array(0, "3.95E3", "-3.95E3", "039", - true, - false, null, ); @@ -52,8 +50,6 @@ float(-10) float(3950) 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) diff --git a/ext/standard/tests/math/cos_variation.phpt b/ext/standard/tests/math/cos_variation.phpt index 19d72f60a795..54a72d6a0544 100644 --- a/ext/standard/tests/math/cos_variation.phpt +++ b/ext/standard/tests/math/cos_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = cos($values[$i]); diff --git a/ext/standard/tests/math/cosh_variation.phpt b/ext/standard/tests/math/cosh_variation.phpt index 475c19fd50d6..a5760d4ce998 100644 --- a/ext/standard/tests/math/cosh_variation.phpt +++ b/ext/standard/tests/math/cosh_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = cosh($values[$i]); diff --git a/ext/standard/tests/math/decbin_basic.phpt b/ext/standard/tests/math/decbin_basic.phpt index 91cf9aa13360..56cf95733154 100644 --- a/ext/standard/tests/math/decbin_basic.phpt +++ b/ext/standard/tests/math/decbin_basic.phpt @@ -11,8 +11,8 @@ $values = array(10, "3950.5", "3.9505e3", "039", - true, - false, + 1, + 0, ); foreach ($values as $value) { diff --git a/ext/standard/tests/math/decbin_variation1.phpt b/ext/standard/tests/math/decbin_variation1.phpt index b2744bb1b6bf..d605497c7183 100644 --- a/ext/standard/tests/math/decbin_variation1.phpt +++ b/ext/standard/tests/math/decbin_variation1.phpt @@ -22,14 +22,8 @@ $inputs = [ // float data /* 7*/ 12.3456789000e10, - // boolean data -/* 8*/ true, - false, - TRUE, - FALSE, - // empty data -/*12*/ "", +/* 8*/ "", '', ]; @@ -70,19 +64,7 @@ decbin(): Argument #1 ($num) must be of type int, float given decbin(): Argument #1 ($num) must be of type int, float given -- Iteration 8 -- -string(1) "1" - --- Iteration 9 -- -string(1) "0" - --- Iteration 10 -- -string(1) "1" - --- Iteration 11 -- -string(1) "0" - --- Iteration 12 -- decbin(): Argument #1 ($num) must be of type int, string given --- Iteration 13 -- +-- Iteration 9 -- decbin(): Argument #1 ($num) must be of type int, string given diff --git a/ext/standard/tests/math/decbin_variation1_64bit.phpt b/ext/standard/tests/math/decbin_variation1_64bit.phpt index e34fdd68d25a..4e0820153db7 100644 --- a/ext/standard/tests/math/decbin_variation1_64bit.phpt +++ b/ext/standard/tests/math/decbin_variation1_64bit.phpt @@ -19,12 +19,6 @@ $inputs = [ // float data /* 7*/ 12.3456789000e10, - - // boolean data -/* 8*/ true, - false, - TRUE, - FALSE, ]; // loop through each element of $inputs to check the behaviour of decbin() @@ -52,15 +46,3 @@ string(64) "1111111111111111111111111111111111111111111111111111011011010111" -- Iteration 5 -- string(37) "1110010111110100110010001101000001000" - --- Iteration 6 -- -string(1) "1" - --- Iteration 7 -- -string(1) "0" - --- Iteration 8 -- -string(1) "1" - --- Iteration 9 -- -string(1) "0" diff --git a/ext/standard/tests/math/dechex_basic.phpt b/ext/standard/tests/math/dechex_basic.phpt index e39086dfd5ce..fa5e52a92919 100644 --- a/ext/standard/tests/math/dechex_basic.phpt +++ b/ext/standard/tests/math/dechex_basic.phpt @@ -11,8 +11,8 @@ $values = array(10, "3950.5", "3.9505e3", "039", - true, - false, + 1, + 0, ); foreach ($values as $value) { diff --git a/ext/standard/tests/math/dechex_variation1.phpt b/ext/standard/tests/math/dechex_variation1.phpt index 4e014f35b760..e1756c48303b 100644 --- a/ext/standard/tests/math/dechex_variation1.phpt +++ b/ext/standard/tests/math/dechex_variation1.phpt @@ -22,14 +22,8 @@ $inputs = [ // float data /* 7*/ 12.3456789000e10, - // boolean data -/* 8*/ true, - false, - TRUE, - FALSE, - // empty data -/*12*/ "", +/* 8*/ "", '', ]; @@ -70,19 +64,7 @@ dechex(): Argument #1 ($num) must be of type int, float given dechex(): Argument #1 ($num) must be of type int, float given -- Iteration 8 -- -string(1) "1" - --- Iteration 9 -- -string(1) "0" - --- Iteration 10 -- -string(1) "1" - --- Iteration 11 -- -string(1) "0" - --- Iteration 12 -- dechex(): Argument #1 ($num) must be of type int, string given --- Iteration 13 -- +-- Iteration 9 -- dechex(): Argument #1 ($num) must be of type int, string given diff --git a/ext/standard/tests/math/dechex_variation1_64bit.phpt b/ext/standard/tests/math/dechex_variation1_64bit.phpt index 24d36d0e15bc..3345283475de 100644 --- a/ext/standard/tests/math/dechex_variation1_64bit.phpt +++ b/ext/standard/tests/math/dechex_variation1_64bit.phpt @@ -19,12 +19,6 @@ $inputs = [ // float data /* 7*/ 12.3456789000e10, - - // boolean data -/* 8*/ true, - false, - TRUE, - FALSE, ]; // loop through each element of $inputs to check the behaviour of dechex() @@ -52,15 +46,3 @@ string(16) "fffffffffffff6d7" -- Iteration 5 -- string(10) "1cbe991a08" - --- Iteration 6 -- -string(1) "1" - --- Iteration 7 -- -string(1) "0" - --- Iteration 8 -- -string(1) "1" - --- Iteration 9 -- -string(1) "0" diff --git a/ext/standard/tests/math/decoct_basic.phpt b/ext/standard/tests/math/decoct_basic.phpt index 31bfa96a49f5..aa1ab7987702 100644 --- a/ext/standard/tests/math/decoct_basic.phpt +++ b/ext/standard/tests/math/decoct_basic.phpt @@ -12,8 +12,8 @@ $values = array(10, "3.9505e3", "039", "0x5F", - true, - false, + 1, + 0, ); foreach ($values as $value) { diff --git a/ext/standard/tests/math/decoct_variation1.phpt b/ext/standard/tests/math/decoct_variation1.phpt index 1936464fd4b3..f797a1af0f1b 100644 --- a/ext/standard/tests/math/decoct_variation1.phpt +++ b/ext/standard/tests/math/decoct_variation1.phpt @@ -22,14 +22,8 @@ $inputs = [ // float data /* 7*/ 12.3456789000e10, - // boolean data -/* 8*/ true, - false, - TRUE, - FALSE, - // empty data -/*12*/ "", +/* 8*/ "", '', ]; @@ -70,19 +64,7 @@ decoct(): Argument #1 ($num) must be of type int, float given decoct(): Argument #1 ($num) must be of type int, float given -- Iteration 8 -- -string(1) "1" - --- Iteration 9 -- -string(1) "0" - --- Iteration 10 -- -string(1) "1" - --- Iteration 11 -- -string(1) "0" - --- Iteration 12 -- decoct(): Argument #1 ($num) must be of type int, string given --- Iteration 13 -- +-- Iteration 9 -- decoct(): Argument #1 ($num) must be of type int, string given diff --git a/ext/standard/tests/math/decoct_variation1_64bit.phpt b/ext/standard/tests/math/decoct_variation1_64bit.phpt index 56e468a72ef5..3e5ff7ed0d8e 100644 --- a/ext/standard/tests/math/decoct_variation1_64bit.phpt +++ b/ext/standard/tests/math/decoct_variation1_64bit.phpt @@ -22,14 +22,8 @@ $inputs = [ // float data /* 7*/ 12.3456789000e10, - // boolean data -/* 8*/ true, - false, - TRUE, - FALSE, - // empty data -/*12*/ "", +/* 8*/ "", '', ]; @@ -70,19 +64,7 @@ TypeError: decoct(): Argument #1 ($num) must be of type int, float given string(13) "1627646215010" -- Iteration 8 -- -string(1) "1" - --- Iteration 9 -- -string(1) "0" - --- Iteration 10 -- -string(1) "1" - --- Iteration 11 -- -string(1) "0" - --- Iteration 12 -- TypeError: decoct(): Argument #1 ($num) must be of type int, string given --- Iteration 13 -- +-- Iteration 9 -- TypeError: decoct(): Argument #1 ($num) must be of type int, string given diff --git a/ext/standard/tests/math/deg2rad_variation.phpt b/ext/standard/tests/math/deg2rad_variation.phpt index 47a5a893679a..8d2c74997f23 100644 --- a/ext/standard/tests/math/deg2rad_variation.phpt +++ b/ext/standard/tests/math/deg2rad_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = deg2rad($values[$i]); diff --git a/ext/standard/tests/math/exp_basic.phpt b/ext/standard/tests/math/exp_basic.phpt index b10ab493a884..63b52d65b55a 100644 --- a/ext/standard/tests/math/exp_basic.phpt +++ b/ext/standard/tests/math/exp_basic.phpt @@ -13,8 +13,8 @@ $values = array(10, "3950.5", "3.9505e3", "039", - true, - false, + 1.0, + 0.0, ); $iterator = 1; diff --git a/ext/standard/tests/math/expm1_basic.phpt b/ext/standard/tests/math/expm1_basic.phpt index ea4c165da2c4..b77b8b4076ee 100644 --- a/ext/standard/tests/math/expm1_basic.phpt +++ b/ext/standard/tests/math/expm1_basic.phpt @@ -14,8 +14,8 @@ $values = array(10, "3950.5", "3.9505e3", "039", - true, - false, + 1.0, + 0.0, ); // loop through each element of $values to check the behaviour of expm1() diff --git a/ext/standard/tests/math/floor_basic.phpt b/ext/standard/tests/math/floor_basic.phpt index 308a055f808a..c9ce581b6028 100644 --- a/ext/standard/tests/math/floor_basic.phpt +++ b/ext/standard/tests/math/floor_basic.phpt @@ -22,8 +22,6 @@ $values = array(0, "3.95E3", "-3.95E3", "039", - true, - false, null, ); @@ -87,12 +85,6 @@ float(-3950) -- floor 039 -- float(39) --- floor 1 -- -float(1) - --- floor -- -float(0) - -- floor -- Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d diff --git a/ext/standard/tests/math/fmod_basic.phpt b/ext/standard/tests/math/fmod_basic.phpt index 84cd27125c41..959e91f69db4 100644 --- a/ext/standard/tests/math/fmod_basic.phpt +++ b/ext/standard/tests/math/fmod_basic.phpt @@ -13,8 +13,8 @@ $values1 = array(234, "234", "234.5", "23.45e1", - true, - false); + 1.0, + 0.0); $values2 = array(2, -2, @@ -25,8 +25,8 @@ $values2 = array(2, "2", "2.3", "2.3e1", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values1); $i++) { echo "\niteration ", $i, "\n"; diff --git a/ext/standard/tests/math/hexdec_basic.phpt b/ext/standard/tests/math/hexdec_basic.phpt index f518b74ad860..2f523642b365 100644 --- a/ext/standard/tests/math/hexdec_basic.phpt +++ b/ext/standard/tests/math/hexdec_basic.phpt @@ -21,8 +21,8 @@ $values = array(0x123abc, 31.1013e5, 011237, '011237', - true, - false, + "1", + "", ); for ($i = 0; $i < count($values); $i++) { try { diff --git a/ext/standard/tests/math/hexdec_basic_64bit.phpt b/ext/standard/tests/math/hexdec_basic_64bit.phpt index e011bce1c2af..180a04b7c0e9 100644 --- a/ext/standard/tests/math/hexdec_basic_64bit.phpt +++ b/ext/standard/tests/math/hexdec_basic_64bit.phpt @@ -23,8 +23,8 @@ $values = array(0x123abc, 31.1013e5, 011237, '011237', - true, - false, + "1", + "", ); foreach($values as $value) { diff --git a/ext/standard/tests/math/hexdec_variation1.phpt b/ext/standard/tests/math/hexdec_variation1.phpt index da22d403a18c..b6b9d999f693 100644 --- a/ext/standard/tests/math/hexdec_variation1.phpt +++ b/ext/standard/tests/math/hexdec_variation1.phpt @@ -35,24 +35,18 @@ $inputs = array( 12.3456789000E-10, .5, - // boolean data -/*14*/ true, - false, - TRUE, - FALSE, - // empty data -/*18*/ "", +/*14*/ "", '', array(), // string data -/*21*/ "abcxyz", +/*17*/ "abcxyz", 'abcxyz', $heredoc, // resource variable -/*26*/ $fp +/*22*/ $fp ); // loop through each element of $inputs to check the behaviour of hexdec() @@ -111,34 +105,22 @@ Exception: Invalid characters passed for attempted conversion Exception: Invalid characters passed for attempted conversion -- Iteration 12 -- -int(1) +int(0) -- Iteration 13 -- int(0) -- Iteration 14 -- -int(1) - --- Iteration 15 -- -int(0) - --- Iteration 16 -- -int(0) - --- Iteration 17 -- -int(0) - --- Iteration 18 -- TypeError: hexdec(): Argument #1 ($hex_string) must be of type string, array given --- Iteration 19 -- +-- Iteration 15 -- Exception: Invalid characters passed for attempted conversion --- Iteration 20 -- +-- Iteration 16 -- Exception: Invalid characters passed for attempted conversion --- Iteration 21 -- +-- Iteration 17 -- Exception: Invalid characters passed for attempted conversion --- Iteration 22 -- +-- Iteration 18 -- TypeError: hexdec(): Argument #1 ($hex_string) must be of type string, resource given diff --git a/ext/standard/tests/math/hexdec_variation1_64bit.phpt b/ext/standard/tests/math/hexdec_variation1_64bit.phpt index 70d89ba69eb1..37463d118824 100644 --- a/ext/standard/tests/math/hexdec_variation1_64bit.phpt +++ b/ext/standard/tests/math/hexdec_variation1_64bit.phpt @@ -35,24 +35,18 @@ $inputs = array( 12.3456789000E-10, .5, - // boolean data -/*14*/ true, - false, - TRUE, - FALSE, - // empty data -/*18*/ "", +/*14*/ "", '', array(), // string data -/*21*/ "abcxyz", +/*17*/ "abcxyz", 'abcxyz', $heredoc, // resource variable -/*26*/ $fp +/*22*/ $fp ); // loop through each element of $inputs to check the behaviour of hexdec() @@ -105,34 +99,22 @@ Exception: Invalid characters passed for attempted conversion Exception: Invalid characters passed for attempted conversion -- Iteration 12 -- -int(1) +int(0) -- Iteration 13 -- int(0) -- Iteration 14 -- -int(1) - --- Iteration 15 -- -int(0) - --- Iteration 16 -- -int(0) - --- Iteration 17 -- -int(0) - --- Iteration 18 -- TypeError: hexdec(): Argument #1 ($hex_string) must be of type string, array given --- Iteration 19 -- +-- Iteration 15 -- Exception: Invalid characters passed for attempted conversion --- Iteration 20 -- +-- Iteration 16 -- Exception: Invalid characters passed for attempted conversion --- Iteration 21 -- +-- Iteration 17 -- Exception: Invalid characters passed for attempted conversion --- Iteration 22 -- +-- Iteration 18 -- TypeError: hexdec(): Argument #1 ($hex_string) must be of type string, resource given diff --git a/ext/standard/tests/math/hypot_basic.phpt b/ext/standard/tests/math/hypot_basic.phpt index 750d688a1705..6acba907a787 100644 --- a/ext/standard/tests/math/hypot_basic.phpt +++ b/ext/standard/tests/math/hypot_basic.phpt @@ -16,8 +16,8 @@ $valuesy = array(23, "23", "23.45", "2.345e1", - true, - false); + 1.0, + 0.0); $valuesx = array(33, -33, @@ -28,8 +28,8 @@ $valuesx = array(33, "33", "43.45", "1.345e1", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($valuesy); $i++) { for ($j = 0; $j < count($valuesx); $j++) { @@ -62,7 +62,7 @@ Y:23 X:1.345e1 float(26.6439955712352) Y:23 X:1 float(23.0217288664427) -Y:23 X: float(23) +Y:23 X:0 float(23) Y:-23 X:33 float(40.2243707222375) @@ -84,7 +84,7 @@ Y:-23 X:1.345e1 float(26.6439955712352) Y:-23 X:1 float(23.0217288664427) -Y:-23 X: float(23) +Y:-23 X:0 float(23) Y:23.45 X:33 float(40.483360779461) @@ -106,7 +106,7 @@ Y:23.45 X:1.345e1 float(27.033405260899) Y:23.45 X:1 float(23.4713122769052) -Y:23.45 X: float(23.45) +Y:23.45 X:0 float(23.45) Y:-23.45 X:33 float(40.483360779461) @@ -128,7 +128,7 @@ Y:-23.45 X:1.345e1 float(27.033405260899) Y:-23.45 X:1 float(23.4713122769052) -Y:-23.45 X: float(23.45) +Y:-23.45 X:0 float(23.45) Y:23 X:33 float(40.2243707222375) @@ -150,7 +150,7 @@ Y:23 X:1.345e1 float(26.6439955712352) Y:23 X:1 float(23.0217288664427) -Y:23 X: float(23) +Y:23 X:0 float(23) Y:23 X:33 float(40.2243707222375) @@ -172,7 +172,7 @@ Y:23 X:1.345e1 float(26.6439955712352) Y:23 X:1 float(23.0217288664427) -Y:23 X: float(23) +Y:23 X:0 float(23) Y:23 X:33 float(40.2243707222375) @@ -194,7 +194,7 @@ Y:23 X:1.345e1 float(26.6439955712352) Y:23 X:1 float(23.0217288664427) -Y:23 X: float(23) +Y:23 X:0 float(23) Y:23.45 X:33 float(40.483360779461) @@ -216,7 +216,7 @@ Y:23.45 X:1.345e1 float(27.033405260899) Y:23.45 X:1 float(23.4713122769052) -Y:23.45 X: float(23.45) +Y:23.45 X:0 float(23.45) Y:2.345e1 X:33 float(40.483360779461) @@ -238,7 +238,7 @@ Y:2.345e1 X:1.345e1 float(27.033405260899) Y:2.345e1 X:1 float(23.4713122769052) -Y:2.345e1 X: float(23.45) +Y:2.345e1 X:0 float(23.45) Y:1 X:33 float(33.0151480384384) @@ -260,26 +260,26 @@ Y:1 X:1.345e1 float(13.4871234887206) Y:1 X:1 float(1.4142135623731) -Y:1 X: float(1) +Y:1 X:0 float(1) -Y: X:33 float(33) +Y:0 X:33 float(33) -Y: X:-33 float(33) +Y:0 X:-33 float(33) -Y: X:33.45 float(33.45) +Y:0 X:33.45 float(33.45) -Y: X:-33.45 float(33.45) +Y:0 X:-33.45 float(33.45) -Y: X:39 float(39) +Y:0 X:39 float(39) -Y: X:31 float(31) +Y:0 X:31 float(31) -Y: X:33 float(33) +Y:0 X:33 float(33) -Y: X:43.45 float(43.45) +Y:0 X:43.45 float(43.45) -Y: X:1.345e1 float(13.45) +Y:0 X:1.345e1 float(13.45) -Y: X:1 float(1) +Y:0 X:1 float(1) -Y: X: float(0) +Y:0 X:0 float(0) diff --git a/ext/standard/tests/math/is_finite_basic.phpt b/ext/standard/tests/math/is_finite_basic.phpt index 99af66be4e78..cdd5974fd676 100644 --- a/ext/standard/tests/math/is_finite_basic.phpt +++ b/ext/standard/tests/math/is_finite_basic.phpt @@ -11,8 +11,8 @@ $values = array(234, "234", "234.5", "23.45e1", - true, - false, + 1.0, + 0.0, pow(0, -2), acos(1.01)); ; diff --git a/ext/standard/tests/math/is_infinite_basic.phpt b/ext/standard/tests/math/is_infinite_basic.phpt index 599bdd635fba..353158c09b33 100644 --- a/ext/standard/tests/math/is_infinite_basic.phpt +++ b/ext/standard/tests/math/is_infinite_basic.phpt @@ -11,8 +11,8 @@ $values = array(234, "234", "234.5", "23.45e1", - true, - false, + 1.0, + 0.0, pow(0, -2), acos(1.01)); ; diff --git a/ext/standard/tests/math/is_nan_basic.phpt b/ext/standard/tests/math/is_nan_basic.phpt index f0111e00e979..e7e34081e906 100644 --- a/ext/standard/tests/math/is_nan_basic.phpt +++ b/ext/standard/tests/math/is_nan_basic.phpt @@ -11,8 +11,8 @@ $values = array(234, "234", "234.5", "23.45e1", - true, - false, + 1.0, + 0.0, pow(0, -2), acos(1.01)); diff --git a/ext/standard/tests/math/log10_variation.phpt b/ext/standard/tests/math/log10_variation.phpt index 9da765d5ae16..16b72f5fd062 100644 --- a/ext/standard/tests/math/log10_variation.phpt +++ b/ext/standard/tests/math/log10_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = log10($values[$i]); diff --git a/ext/standard/tests/math/log1p_basic.phpt b/ext/standard/tests/math/log1p_basic.phpt index 7b19c3f9f425..ce71f046e78a 100644 --- a/ext/standard/tests/math/log1p_basic.phpt +++ b/ext/standard/tests/math/log1p_basic.phpt @@ -15,8 +15,8 @@ $values = array(23, "23", "23.45", "2.345e1", - true, - false); + 1.0, + 0.0); echo "\n LOG1p tests\n"; @@ -62,5 +62,5 @@ float(3.196630215920881) -- log1p 1 -- float(0.6931471805599453) --- log1p -- +-- log1p 0 -- float(0) diff --git a/ext/standard/tests/math/log_basic.phpt b/ext/standard/tests/math/log_basic.phpt index ae2e790bcceb..dfba6cef9d99 100644 --- a/ext/standard/tests/math/log_basic.phpt +++ b/ext/standard/tests/math/log_basic.phpt @@ -13,8 +13,8 @@ $values = array(23, "23", "23.45", "2.345e1", - true, - false); + 1.0, + 0.0); echo "\n LOG tests...no base\n"; for ($i = 0; $i < count($values); $i++) { diff --git a/ext/standard/tests/math/number_format_basic.phpt b/ext/standard/tests/math/number_format_basic.phpt index 40b00d1a4f63..faf2ae24a2fd 100644 --- a/ext/standard/tests/math/number_format_basic.phpt +++ b/ext/standard/tests/math/number_format_basic.phpt @@ -15,8 +15,8 @@ $values = array(1234.5678, "123456789", "123.456789", "12.3456789e1", - true, - false); + 1.0, + 0.0); echo "\n number_format tests.....default\n"; for ($i = 0; $i < count($values); $i++) { diff --git a/ext/standard/tests/math/number_format_multichar.phpt b/ext/standard/tests/math/number_format_multichar.phpt index 1ed823042f18..28bebe498e33 100644 --- a/ext/standard/tests/math/number_format_multichar.phpt +++ b/ext/standard/tests/math/number_format_multichar.phpt @@ -11,8 +11,8 @@ $values = array(1234.5678, "123456789", "123.456789", "12.3456789e1", - true, - false); + 1.0, + 0.0); echo " number_format tests.....multiple character decimal point\n"; for ($i = 0; $i < count($values); $i++) { diff --git a/ext/standard/tests/math/octdec_basic.phpt b/ext/standard/tests/math/octdec_basic.phpt index e2414e7f509f..d6e1307f2354 100644 --- a/ext/standard/tests/math/octdec_basic.phpt +++ b/ext/standard/tests/math/octdec_basic.phpt @@ -20,8 +20,8 @@ $values = array(01234567, '12345', 31101.3, 31.1013e5, - true, - false, + "1", + "", ); for ($i = 0; $i < count($values); $i++) { diff --git a/ext/standard/tests/math/octdec_basic_64bit.phpt b/ext/standard/tests/math/octdec_basic_64bit.phpt index 886cc317fa52..7ffa8d9a7df8 100644 --- a/ext/standard/tests/math/octdec_basic_64bit.phpt +++ b/ext/standard/tests/math/octdec_basic_64bit.phpt @@ -23,8 +23,8 @@ $values = array(01234567, '12345', 31101.3, 31.1013e5, - true, - false, + "1", + "", ); for ($i = 0; $i < count($values); $i++) { diff --git a/ext/standard/tests/math/octdec_variation1.phpt b/ext/standard/tests/math/octdec_variation1.phpt index d3a8a80093a2..7133aa509340 100644 --- a/ext/standard/tests/math/octdec_variation1.phpt +++ b/ext/standard/tests/math/octdec_variation1.phpt @@ -31,24 +31,18 @@ $inputs = array( 12.3456789000E-10, .5, - // boolean data -/*14*/ true, - false, - TRUE, - FALSE, - // empty data -/*18*/ "", +/*14*/ "", '', array(), // string data -/*21*/ "abcxyz", +/*17*/ "abcxyz", 'abcxyz', $heredoc, // resource variable -/*26*/ $fp +/*22*/ $fp ); // loop through each element of $inputs to check the behaviour of octdec() @@ -102,35 +96,23 @@ Exception: Invalid characters passed for attempted conversion Exception: Invalid characters passed for attempted conversion -- Iteration 12 -- -int(1) +int(0) -- Iteration 13 -- int(0) -- Iteration 14 -- -int(1) - --- Iteration 15 -- -int(0) - --- Iteration 16 -- -int(0) - --- Iteration 17 -- -int(0) - --- Iteration 18 -- TypeError: octdec(): Argument #1 ($octal_string) must be of type string, array given --- Iteration 19 -- +-- Iteration 15 -- Exception: Invalid characters passed for attempted conversion --- Iteration 20 -- +-- Iteration 16 -- Exception: Invalid characters passed for attempted conversion --- Iteration 21 -- +-- Iteration 17 -- Exception: Invalid characters passed for attempted conversion --- Iteration 22 -- +-- Iteration 18 -- TypeError: octdec(): Argument #1 ($octal_string) must be of type string, resource given ---Done--- diff --git a/ext/standard/tests/math/rad2deg_variation.phpt b/ext/standard/tests/math/rad2deg_variation.phpt index 3cc1317ea835..bbe5ec70f149 100644 --- a/ext/standard/tests/math/rad2deg_variation.phpt +++ b/ext/standard/tests/math/rad2deg_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = rad2deg($values[$i]); diff --git a/ext/standard/tests/math/round_basic.phpt b/ext/standard/tests/math/round_basic.phpt index f2a7447a3747..a78700108a1d 100644 --- a/ext/standard/tests/math/round_basic.phpt +++ b/ext/standard/tests/math/round_basic.phpt @@ -25,8 +25,8 @@ $precision = array(2, "04", "3.6", "2.1e1", - true, - false); + 1, + 0); for ($i = 0; $i < count($values); $i++) { echo "round: $values[$i]\n"; @@ -54,7 +54,7 @@ Deprecated: Implicit conversion from float-string "3.6" to int loses precision i ...with precision 3.6-> float(123456789) ...with precision 2.1e1-> float(123456789) ...with precision 1-> float(123456789) -...with precision -> float(123456789) +...with precision 0-> float(123456789) round: 123.456789 ...with precision 2-> float(123.46) ...with precision 8-> float(123.456789) @@ -70,7 +70,7 @@ Deprecated: Implicit conversion from float-string "3.6" to int loses precision i ...with precision 3.6-> float(123.457) ...with precision 2.1e1-> float(123.456789) ...with precision 1-> float(123.5) -...with precision -> float(123) +...with precision 0-> float(123) round: -4.5679123 ...with precision 2-> float(-4.57) ...with precision 8-> float(-4.5679123) @@ -86,7 +86,7 @@ Deprecated: Implicit conversion from float-string "3.6" to int loses precision i ...with precision 3.6-> float(-4.568) ...with precision 2.1e1-> float(-4.5679123) ...with precision 1-> float(-4.6) -...with precision -> float(-5) +...with precision 0-> float(-5) round: 12300 ...with precision 2-> float(12300) ...with precision 8-> float(12300) @@ -102,7 +102,7 @@ Deprecated: Implicit conversion from float-string "3.6" to int loses precision i ...with precision 3.6-> float(12300) ...with precision 2.1e1-> float(12300) ...with precision 1-> float(12300) -...with precision -> float(12300) +...with precision 0-> float(12300) round: -4567 ...with precision 2-> float(-4567) ...with precision 8-> float(-4567) @@ -118,7 +118,7 @@ Deprecated: Implicit conversion from float-string "3.6" to int loses precision i ...with precision 3.6-> float(-4567) ...with precision 2.1e1-> float(-4567) ...with precision 1-> float(-4567) -...with precision -> float(-4567) +...with precision 0-> float(-4567) round: 2311527 ...with precision 2-> float(2311527) ...with precision 8-> float(2311527) @@ -134,7 +134,7 @@ Deprecated: Implicit conversion from float-string "3.6" to int loses precision i ...with precision 3.6-> float(2311527) ...with precision 2.1e1-> float(2311527) ...with precision 1-> float(2311527) -...with precision -> float(2311527) +...with precision 0-> float(2311527) round: 14680063 ...with precision 2-> float(14680063) ...with precision 8-> float(14680063) @@ -150,7 +150,7 @@ Deprecated: Implicit conversion from float-string "3.6" to int loses precision i ...with precision 3.6-> float(14680063) ...with precision 2.1e1-> float(14680063) ...with precision 1-> float(14680063) -...with precision -> float(14680063) +...with precision 0-> float(14680063) round: 1.234567 ...with precision 2-> float(1.23) ...with precision 8-> float(1.234567) @@ -166,7 +166,7 @@ Deprecated: Implicit conversion from float-string "3.6" to int loses precision i ...with precision 3.6-> float(1.235) ...with precision 2.1e1-> float(1.234567) ...with precision 1-> float(1.2) -...with precision -> float(1) +...with precision 0-> float(1) round: 2.3456789e8 ...with precision 2-> float(234567890) ...with precision 8-> float(234567890) @@ -182,4 +182,4 @@ Deprecated: Implicit conversion from float-string "3.6" to int loses precision i ...with precision 3.6-> float(234567890) ...with precision 2.1e1-> float(234567890) ...with precision 1-> float(234567890) -...with precision -> float(234567890) +...with precision 0-> float(234567890) diff --git a/ext/standard/tests/math/sin_variation.phpt b/ext/standard/tests/math/sin_variation.phpt index 6cca50a16773..c2226fe4e246 100644 --- a/ext/standard/tests/math/sin_variation.phpt +++ b/ext/standard/tests/math/sin_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = sin($values[$i]); diff --git a/ext/standard/tests/math/sinh_variation.phpt b/ext/standard/tests/math/sinh_variation.phpt index f053e58144ee..ada35aa9d9f9 100644 --- a/ext/standard/tests/math/sinh_variation.phpt +++ b/ext/standard/tests/math/sinh_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = sinh($values[$i]); diff --git a/ext/standard/tests/math/sqrt_variation.phpt b/ext/standard/tests/math/sqrt_variation.phpt index eb73870d1fc3..b6d886a7ddca 100644 --- a/ext/standard/tests/math/sqrt_variation.phpt +++ b/ext/standard/tests/math/sqrt_variation.phpt @@ -22,8 +22,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = sqrt($values[$i]); diff --git a/ext/standard/tests/math/tan_variation.phpt b/ext/standard/tests/math/tan_variation.phpt index 4394ddcd57a8..702cff700edb 100644 --- a/ext/standard/tests/math/tan_variation.phpt +++ b/ext/standard/tests/math/tan_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = tan($values[$i]); diff --git a/ext/standard/tests/math/tanh_variation.phpt b/ext/standard/tests/math/tanh_variation.phpt index d2011f474572..7bd24640f869 100644 --- a/ext/standard/tests/math/tanh_variation.phpt +++ b/ext/standard/tests/math/tanh_variation.phpt @@ -21,8 +21,8 @@ $values = array(23, "23.45", "2.345e1", "1000", - true, - false); + 1.0, + 0.0); for ($i = 0; $i < count($values); $i++) { $res = tanh($values[$i]); diff --git a/ext/standard/tests/misc/get_browser_error.phpt b/ext/standard/tests/misc/get_browser_error.phpt index f1d645b0263f..e10ba148949c 100644 --- a/ext/standard/tests/misc/get_browser_error.phpt +++ b/ext/standard/tests/misc/get_browser_error.phpt @@ -11,8 +11,8 @@ echo "*** Testing get_browser() : error functionality ***\n"; /* Unknown browser uses defaults. */ var_dump( get_browser( 'foobar', true ) ); -/* Some wrong parameters, no HTTP_USER_AGENT set */ -var_dump( get_browser( null, 'foobar' ) ); +/* No HTTP_USER_AGENT set */ +var_dump( get_browser( null, true ) ); ?> --EXPECTF-- diff --git a/ext/standard/tests/strings/chop_variation5.phpt b/ext/standard/tests/strings/chop_variation5.phpt index 2b86a9713b77..e4aac208c207 100644 --- a/ext/standard/tests/strings/chop_variation5.phpt +++ b/ext/standard/tests/strings/chop_variation5.phpt @@ -10,7 +10,7 @@ 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 ", true) ); /* with boolean value as second Argument */ + var_dump ( chop("chop test ", "1") ); /* with "1" 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 */ var_dump ( chop("chop testABCXYZ", "A..Z") ); /* with characters range as second Argument */ diff --git a/ext/standard/tests/strings/chr_variation1.phpt b/ext/standard/tests/strings/chr_variation1.phpt index d181e752c2aa..806d13ac9a3d 100644 --- a/ext/standard/tests/strings/chr_variation1.phpt +++ b/ext/standard/tests/strings/chr_variation1.phpt @@ -12,9 +12,6 @@ $inputs = [ 255, // float values 10.5, - // bool values - true, - false, ]; // loop through with each element of the $inputs array to test chr() function @@ -37,8 +34,4 @@ string(2) "ff" -- Iteration 4 -- Deprecated: Implicit conversion from float 10.5 to int loses precision in %s on line %d -string(2) "0a" --- Iteration 5 -- -string(2) "01" --- Iteration 6 -- -string(2) "00" +string(2) "0a" \ No newline at end of file diff --git a/ext/standard/tests/strings/explode1.phpt b/ext/standard/tests/strings/explode1.phpt index 2acd74bee094..a5160525e9af 100644 --- a/ext/standard/tests/strings/explode1.phpt +++ b/ext/standard/tests/strings/explode1.phpt @@ -12,8 +12,7 @@ $delimiters = array ( "abcd", // string 0, // zero "0", - TRUE, // boolean value - FALSE, + "1", -1, // negative integer -11.23, // double 4, // positive integer @@ -201,11 +200,6 @@ array(2) { string(56) "234NULL23abcd00000TRUEFALSE-11.234444true-11.24%PHP%ZEND" } -- Iteration 7 -- -ValueError: explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters -ValueError: explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters -ValueError: explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters -ValueError: explode(): Argument #1 ($separator) must not be empty, use str_split() to split a string into characters --- Iteration 8 -- array(2) { [0]=> string(28) "1234NULL23abcd00000TRUEFALSE" @@ -226,7 +220,7 @@ array(2) { [1]=> string(27) "1.234444true-11.24%PHP%ZEND" } --- Iteration 9 -- +-- Iteration 8 -- array(1) { [0]=> string(28) "1234NULL23abcd00000TRUEFALSE" @@ -245,7 +239,7 @@ array(2) { [1]=> string(23) "4444true-11.24%PHP%ZEND" } --- Iteration 10 -- +-- Iteration 9 -- array(6) { [0]=> string(3) "123" @@ -274,7 +268,7 @@ array(2) { [1]=> string(53) "NULL23abcd00000TRUEFALSE-11.234444true-11.24%PHP%ZEND" } --- Iteration 11 -- +-- Iteration 10 -- array(2) { [0]=> string(48) "1234NULL23abcd00000TRUEFALSE-11.234444true-11.24" diff --git a/ext/standard/tests/strings/implode_variation.phpt b/ext/standard/tests/strings/implode_variation.phpt index e721447c2eb0..e3e191e7c878 100644 --- a/ext/standard/tests/strings/implode_variation.phpt +++ b/ext/standard/tests/strings/implode_variation.phpt @@ -33,8 +33,7 @@ $pieces = array( ); $glues = array( "TRUE", - true, - false, + "1", array("key1", "key2"), "", " ", @@ -183,18 +182,16 @@ string(59) "2TRUE0TRUE-639TRUE1TRUEPHPTRUETRUETRUE TRUEstring%0with%0...%0" -- Iteration 2 -- string(35) "2101-639111PHP111 1string%0with%0...%0" -- Iteration 3 -- -string(27) "20-6391PHP string%0with%0...%0" --- Iteration 4 -- TypeError: implode(): Argument #1 ($separator) must be of type string, array given --- Iteration 5 -- +-- Iteration 4 -- string(27) "20-6391PHP string%0with%0...%0" --- Iteration 6 -- +-- Iteration 5 -- string(35) "2 0 -639 1 PHP string%0with%0...%0" --- Iteration 7 -- +-- Iteration 6 -- string(139) "2string%0between0string%0between-639string%0between1string%0betweenPHPstring%0betweenstring%0betweenstring%0between string%0betweenstring%0with%0...%0" --- Iteration 8 -- +-- Iteration 7 -- string(35) "2000-639010PHP000 0string%0with%0...%0" --- Iteration 9 -- +-- Iteration 8 -- string(43) "2\00\0-639\01\0PHP\0\0\0 \0string%0with%0...%0" *** Testing implode() on empty string *** diff --git a/ext/standard/tests/strings/join_variation4.phpt b/ext/standard/tests/strings/join_variation4.phpt index 786047b602e3..4181d982fd35 100644 --- a/ext/standard/tests/strings/join_variation4.phpt +++ b/ext/standard/tests/strings/join_variation4.phpt @@ -10,8 +10,7 @@ echo "*** Testing join() : usage variations ***\n"; $glues = array ( "TRUE", - true, - false, + "1", array("key1", "key2"), "", " ", @@ -55,19 +54,17 @@ string(87) "2TRUE0TRUE-639TRUE-1.3444TRUE1TRUEPHPTRUETRUETRUE TRUE6999.99999999T -- Iteration 2 -- string(57) "2101-6391-1.3444111PHP111 16999.999999991string%0with%0...%0" -- Iteration 3 -- -string(47) "20-639-1.34441PHP 6999.99999999string%0with%0...%0" --- Iteration 4 -- TypeError: join(): Argument #1 ($separator) must be of type string, array given --- Iteration 5 -- +-- Iteration 4 -- string(47) "20-639-1.34441PHP 6999.99999999string%0with%0...%0" --- Iteration 6 -- +-- Iteration 5 -- string(57) "2 0 -639 -1.3444 1 PHP 6999.99999999 string%0with%0...%0" --- Iteration 7 -- +-- Iteration 6 -- string(187) "2string%0between0string%0between-639string%0between-1.3444string%0between1string%0betweenPHPstring%0betweenstring%0betweenstring%0between string%0between6999.99999999string%0betweenstring%0with%0...%0" --- Iteration 8 -- +-- Iteration 7 -- string(117) "2-1.56660-1.5666-639-1.5666-1.3444-1.56661-1.5666PHP-1.5666-1.5666-1.5666 -1.56666999.99999999-1.5666string%0with%0...%0" --- Iteration 9 -- +-- Iteration 8 -- string(57) "2000-6390-1.3444010PHP000 06999.999999990string%0with%0...%0" --- Iteration 10 -- +-- Iteration 9 -- string(67) "2\00\0-639\0-1.3444\01\0PHP\0\0\0 \06999.99999999\0string%0with%0...%0" Done diff --git a/ext/standard/tests/strings/lcfirst.phpt b/ext/standard/tests/strings/lcfirst.phpt index 1abc31d0b3b5..9e372c9856b8 100644 --- a/ext/standard/tests/strings/lcfirst.phpt +++ b/ext/standard/tests/strings/lcfirst.phpt @@ -24,12 +24,11 @@ $str_array = array( "NULL", "0", 0, - TRUE, // bool type "TRUE", "1", 1, 1.234444, - FALSE, + "", "FALSE", " ", " ", @@ -148,7 +147,6 @@ string(6) "-3.344" string(4) "nULL" string(1) "0" string(1) "0" -string(1) "1" string(4) "tRUE" string(1) "1" string(1) "1" diff --git a/ext/standard/tests/strings/ltrim.phpt b/ext/standard/tests/strings/ltrim.phpt index 952ad282c6fe..53855f2ac802 100644 --- a/ext/standard/tests/strings/ltrim.phpt +++ b/ext/standard/tests/strings/ltrim.phpt @@ -23,7 +23,7 @@ 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", true) ); /* with boolean value as second Argument */ + var_dump ( ltrim(" ltrim test", "1") ); /* with "1" 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 */ var_dump ( ltrim("ABCXYZltrim test", "A..Z") ); /* with characters range as second Argument */ diff --git a/ext/standard/tests/strings/number_format_basic.phpt b/ext/standard/tests/strings/number_format_basic.phpt index 2e54eb1f0d5a..fc7e9cabb948 100644 --- a/ext/standard/tests/strings/number_format_basic.phpt +++ b/ext/standard/tests/strings/number_format_basic.phpt @@ -13,8 +13,8 @@ $values = array(1234.5678, "123456789", "123.456789", "12.3456789e1", - true, - false); + 1.0, + 0.0); echo "\n-- number_format tests.....default --\n"; for ($i = 0; $i < count($values); $i++) { diff --git a/ext/standard/tests/strings/quoted_printable_encode_001.phpt b/ext/standard/tests/strings/quoted_printable_encode_001.phpt index a1e0ec1338aa..03ce17734953 100644 --- a/ext/standard/tests/strings/quoted_printable_encode_001.phpt +++ b/ext/standard/tests/strings/quoted_printable_encode_001.phpt @@ -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(false)); echo "Done\n"; ?> @@ -15,5 +14,4 @@ echo "Done\n"; string(0) "" string(4) "test" string(1) "1" -string(0) "" Done diff --git a/ext/standard/tests/strings/rtrim.phpt b/ext/standard/tests/strings/rtrim.phpt index 21e91c1ac361..7c234d889abc 100644 --- a/ext/standard/tests/strings/rtrim.phpt +++ b/ext/standard/tests/strings/rtrim.phpt @@ -8,7 +8,7 @@ Testing rtrim() function echo "\n *** Output for Normal Behaviour ***\n"; var_dump ( rtrim("rtrim test \t\0 ") ); /* without second Argument */ var_dump ( rtrim("rtrim test " , "") ); /* no characters in second Argument */ - var_dump ( rtrim("rtrim test ", true) ); /* with boolean value as second Argument */ + var_dump ( rtrim("rtrim test ", "1") ); /* with "1" as second Argument */ var_dump ( rtrim("rtrim test ", " ") ); /* with single space as second Argument */ var_dump ( rtrim("rtrim test \t\n\r\0\x0B", "\t\n\r\0\x0B") ); /* with multiple escape sequences as second Argument */ var_dump ( rtrim("rtrim testABCXYZ", "A..Z") ); /* with characters range as second Argument */ diff --git a/ext/standard/tests/strings/str_pad.phpt b/ext/standard/tests/strings/str_pad.phpt index e5b6030b44ce..15db106cb979 100644 --- a/ext/standard/tests/strings/str_pad.phpt +++ b/ext/standard/tests/strings/str_pad.phpt @@ -21,7 +21,7 @@ echo "\n#### variations with input string and pad-length ####\n"; $input_strings = array( "variation", // normal string "", // empty string - true, // boolean + "1", // numeric string 15, // numeric 15.55, // numeric "2990" // numeric string @@ -50,7 +50,7 @@ foreach ($input_strings as $input_string ) { } echo "\n#### variation with pad string ####\n"; -$pad_strings = array ("=", 1, true, "string_pad", 1.5, "\t", '\t'); +$pad_strings = array ("=", 1, "string_pad", 1.5, "\t", '\t'); $input_string="variation"; $pad_length = 16; foreach ( $pad_strings as $pad_string ) { @@ -278,10 +278,6 @@ string(16) "variation1111111" string(16) "1111111variation" string(16) "variation1111111" string(16) "111variation1111" -string(16) "variation1111111" -string(16) "1111111variation" -string(16) "variation1111111" -string(16) "111variation1111" string(16) "variationstring_" string(16) "string_variation" string(16) "variationstring_" diff --git a/ext/standard/tests/strings/str_repeat.phpt b/ext/standard/tests/strings/str_repeat.phpt index 0d5ca207d290..7ea21bea46c2 100644 --- a/ext/standard/tests/strings/str_repeat.phpt +++ b/ext/standard/tests/strings/str_repeat.phpt @@ -11,7 +11,7 @@ $variations = array( 'barbazbax', "\x00", '\0', - TRUE, + "1", 4, 1.23, "", diff --git a/ext/standard/tests/strings/str_replace_variation1.phpt b/ext/standard/tests/strings/str_replace_variation1.phpt index 00ed1a8babe3..95c43a1de52f 100644 --- a/ext/standard/tests/strings/str_replace_variation1.phpt +++ b/ext/standard/tests/strings/str_replace_variation1.phpt @@ -5,7 +5,7 @@ precision=14 --FILE-- string(5) "FOUND" [1]=> - string(0) "" - [2]=> - string(5) "FOUND" - [3]=> string(1) "0" - [4]=> + [2]=> string(6) "-FOUND" - [5]=> + [3]=> string(5) "FOUND" - [6]=> + [4]=> string(1) "0" - [7]=> + [5]=> string(6) "-FOUND" - [8]=> + [6]=> string(0) "" - [9]=> + [7]=> string(5) "Array" - [10]=> + [8]=> string(3) "php" - [11]=> + [9]=> string(0) "" } -int(5) +int(4) -- Iteration 1 -- Warning: Array to string conversion in %s on line %d -array(12) { +array(10) { [0]=> string(1) "1" [1]=> - string(0) "" + string(5) "FOUND" [2]=> - string(1) "1" + string(2) "-1" [3]=> - string(1) "0" + string(1) "1" [4]=> - string(2) "-1" + string(5) "FOUND" [5]=> - string(1) "1" - [6]=> - string(1) "0" - [7]=> string(2) "-1" - [8]=> + [6]=> string(0) "" - [9]=> + [7]=> string(5) "Array" - [10]=> + [8]=> string(3) "php" - [11]=> + [9]=> string(0) "" } -int(0) +int(2) -- Iteration 2 -- Warning: Array to string conversion in %s on line %d -array(12) { +array(10) { [0]=> - string(5) "FOUND" + string(1) "1" [1]=> - string(0) "" + string(1) "0" [2]=> string(5) "FOUND" [3]=> - string(1) "0" + string(1) "1" [4]=> - string(6) "-FOUND" + string(1) "0" [5]=> string(5) "FOUND" [6]=> - string(1) "0" - [7]=> - string(6) "-FOUND" - [8]=> string(0) "" - [9]=> + [7]=> string(5) "Array" - [10]=> + [8]=> string(3) "php" - [11]=> + [9]=> string(0) "" } -int(5) +int(2) -- Iteration 3 -- Warning: Array to string conversion in %s on line %d -array(12) { +array(10) { [0]=> - string(1) "1" + string(5) "FOUND" [1]=> - string(0) "" + string(1) "0" [2]=> - string(1) "1" + string(6) "-FOUND" [3]=> string(5) "FOUND" [4]=> - string(2) "-1" + string(1) "0" [5]=> - string(1) "1" + string(6) "-FOUND" [6]=> - string(5) "FOUND" - [7]=> - string(2) "-1" - [8]=> string(0) "" - [9]=> + [7]=> string(5) "Array" - [10]=> + [8]=> string(3) "php" - [11]=> + [9]=> string(0) "" } -int(2) +int(4) -- Iteration 4 -- Warning: Array to string conversion in %s on line %d -array(12) { +array(10) { [0]=> string(1) "1" [1]=> - string(0) "" + string(5) "FOUND" [2]=> - string(1) "1" + string(2) "-1" [3]=> - string(1) "0" + string(1) "1" [4]=> string(5) "FOUND" [5]=> - string(1) "1" + string(2) "-1" [6]=> - string(1) "0" - [7]=> - string(5) "FOUND" - [8]=> string(0) "" - [9]=> + [7]=> string(5) "Array" - [10]=> + [8]=> string(3) "php" - [11]=> + [9]=> string(0) "" } int(2) @@ -179,218 +159,136 @@ int(2) -- Iteration 5 -- Warning: Array to string conversion in %s on line %d -array(12) { +array(10) { [0]=> - string(5) "FOUND" + string(1) "1" [1]=> - string(0) "" + string(1) "0" [2]=> string(5) "FOUND" [3]=> - string(1) "0" + string(1) "1" [4]=> - string(6) "-FOUND" + string(1) "0" [5]=> string(5) "FOUND" [6]=> - string(1) "0" - [7]=> - string(6) "-FOUND" - [8]=> string(0) "" - [9]=> - string(5) "Array" - [10]=> - string(3) "php" - [11]=> - string(0) "" -} -int(5) - --- Iteration 6 -- - -Warning: Array to string conversion in %s on line %d -array(12) { - [0]=> - string(1) "1" - [1]=> - string(0) "" - [2]=> - string(1) "1" - [3]=> - string(5) "FOUND" - [4]=> - string(2) "-1" - [5]=> - string(1) "1" - [6]=> - string(5) "FOUND" [7]=> - string(2) "-1" - [8]=> - string(0) "" - [9]=> string(5) "Array" - [10]=> - string(3) "php" - [11]=> - string(0) "" -} -int(2) - --- Iteration 7 -- - -Warning: Array to string conversion in %s on line %d -array(12) { - [0]=> - string(1) "1" - [1]=> - string(0) "" - [2]=> - string(1) "1" - [3]=> - string(1) "0" - [4]=> - string(5) "FOUND" - [5]=> - string(1) "1" - [6]=> - string(1) "0" - [7]=> - string(5) "FOUND" [8]=> - string(0) "" - [9]=> - string(5) "Array" - [10]=> string(3) "php" - [11]=> + [9]=> string(0) "" } int(2) --- Iteration 8 -- +-- Iteration 6 -- 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) { +array(10) { [0]=> string(1) "1" [1]=> - string(0) "" - [2]=> - string(1) "1" - [3]=> string(1) "0" - [4]=> + [2]=> string(2) "-1" - [5]=> + [3]=> string(1) "1" - [6]=> + [4]=> string(1) "0" - [7]=> + [5]=> string(2) "-1" - [8]=> + [6]=> string(0) "" - [9]=> + [7]=> string(5) "Array" - [10]=> + [8]=> string(3) "php" - [11]=> + [9]=> string(0) "" } int(0) --- Iteration 9 -- +-- Iteration 7 -- Warning: Array to string conversion in %s on line %d -array(12) { +array(10) { [0]=> string(1) "1" [1]=> - string(0) "" - [2]=> - string(1) "1" - [3]=> string(1) "0" - [4]=> + [2]=> string(2) "-1" - [5]=> + [3]=> string(1) "1" - [6]=> + [4]=> string(1) "0" - [7]=> + [5]=> string(2) "-1" - [8]=> + [6]=> string(0) "" - [9]=> + [7]=> string(5) "Array" - [10]=> + [8]=> string(3) "php" - [11]=> + [9]=> string(0) "" } int(0) --- Iteration 10 -- +-- Iteration 8 -- Warning: Array to string conversion in %s on line %d -array(12) { +array(10) { [0]=> string(1) "1" [1]=> - string(0) "" - [2]=> - string(1) "1" - [3]=> string(1) "0" - [4]=> + [2]=> string(2) "-1" - [5]=> + [3]=> string(1) "1" - [6]=> + [4]=> string(1) "0" - [7]=> + [5]=> string(2) "-1" - [8]=> + [6]=> string(0) "" - [9]=> + [7]=> string(5) "Array" - [10]=> + [8]=> string(5) "FOUND" - [11]=> + [9]=> string(0) "" } int(1) --- Iteration 11 -- +-- Iteration 9 -- Warning: Array to string conversion in %s on line %d -array(12) { +array(10) { [0]=> string(1) "1" [1]=> - string(0) "" - [2]=> - string(1) "1" - [3]=> string(1) "0" - [4]=> + [2]=> string(2) "-1" - [5]=> + [3]=> string(1) "1" - [6]=> + [4]=> string(1) "0" - [7]=> + [5]=> string(2) "-1" - [8]=> + [6]=> string(0) "" - [9]=> + [7]=> string(5) "Array" - [10]=> + [8]=> string(3) "php" - [11]=> + [9]=> string(0) "" } int(0) diff --git a/ext/standard/tests/strings/str_replace_variation2.phpt b/ext/standard/tests/strings/str_replace_variation2.phpt index d8dcd58e1b60..4aa53508ab69 100644 --- a/ext/standard/tests/strings/str_replace_variation2.phpt +++ b/ext/standard/tests/strings/str_replace_variation2.phpt @@ -37,11 +37,9 @@ $search_str = array ( "\x5AC", "\0000", ".3", - TRUE, "TRUE", "1", 1, - FALSE, "FALSE", " ", " ", @@ -212,89 +210,75 @@ string(196) "Hello, world,0120333FOUND445-1.234567 NULL TRUE FALSE%0 --- Iteration 21 --- -- String after replacing the search value is => -- -string(205) "Hello, world,0FOUND20333.3445-FOUND.234567 NULL TRUE FALSE%0 - %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World - ?Hello, World chr(0).chr(FOUND28).chr(234).chr(65).chr(255).chr(0)" --- search string has found '3' times - ---- Iteration 22 --- --- String after replacing the search value is => -- string(194) "Hello, world,0120333.3445-1.234567 NULL FOUND FALSE%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(0)" -- search string has found '1' times ---- Iteration 23 --- +--- Iteration 22 --- -- String after replacing the search value is => -- string(205) "Hello, world,0FOUND20333.3445-FOUND.234567 NULL TRUE FALSE%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(FOUND28).chr(234).chr(65).chr(255).chr(0)" -- search string has found '3' times ---- Iteration 24 --- +--- Iteration 23 --- -- String after replacing the search value is => -- string(205) "Hello, world,0FOUND20333.3445-FOUND.234567 NULL TRUE FALSE%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(FOUND28).chr(234).chr(65).chr(255).chr(0)" -- search string has found '3' times ---- Iteration 25 --- --- String after replacing the search value is => -- -string(193) "Hello, world,0120333.3445-1.234567 NULL TRUE FALSE%0 - %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World - ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(0)" --- search string has found '0' times - ---- Iteration 26 --- +--- Iteration 24 --- -- String after replacing the search value is => -- string(193) "Hello, world,0120333.3445-1.234567 NULL TRUE FOUND%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(0)" -- search string has found '1' times ---- Iteration 27 --- +--- Iteration 25 --- -- String after replacing the search value is => -- string(333) "Hello,FOUNDworld,0120333.3445-1.234567FOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDNULLFOUNDTRUEFOUNDFALSE%0 FOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUND%00ZCD%0abcdFOUND\xXYZ abcdFOUND$$@#%^&*!~,.:;?:FOUND!!Hello,FOUNDWorld FOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUND?Hello,FOUNDWorldFOUNDchr(0).chr(128).chr(234).chr(65).chr(255).chr(0)" -- search string has found '35' times ---- Iteration 28 --- +--- Iteration 26 --- -- String after replacing the search value is => -- string(188) "Hello, world,0120333.3445-1.234567FOUNDNULL TRUE FALSE%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(0)" -- search string has found '1' times ---- Iteration 29 --- +--- Iteration 27 --- -- String after replacing the search value is => -- string(201) "Hello, world,0120333.3445-1.234567 NULL TRUE FALSE%0 %00ZCD%0aFOUNDcd \xXYZ aFOUNDcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(0)" -- search string has found '2' times ---- Iteration 30 --- +--- Iteration 28 --- -- String after replacing the search value is => -- string(193) "Hello, world,0120333.3445-1.234567 NULL TRUE FALSE%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(0)" -- search string has found '0' times ---- Iteration 31 --- +--- Iteration 29 --- -- String after replacing the search value is => -- string(197) "Hello, world,0120333.3445-1.234567 NULL TRUE FALSE%0 %00ZCD%0abcd \xXYZFOUNDabcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(0)" -- search string has found '1' times ---- Iteration 32 --- +--- Iteration 30 --- -- String after replacing the search value is => -- string(193) "Hello, world,0120333.3445-1.234567 NULL TRUE FALSE%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(0)" -- search string has found '0' times ---- Iteration 33 --- +--- Iteration 31 --- -- String after replacing the search value is => -- string(5) "FOUND" -- search string has found '1' times diff --git a/ext/standard/tests/strings/strcasecmp.phpt b/ext/standard/tests/strings/strcasecmp.phpt index 1136774b38ac..4ff9ee4ecf96 100644 --- a/ext/standard/tests/strings/strcasecmp.phpt +++ b/ext/standard/tests/strings/strcasecmp.phpt @@ -11,7 +11,7 @@ echo "#### Basic and Possible operations ####"; $arrays = array( array("a", 'A', chr(128), chr(255), chr(0)), array("acc", "Acc", 'aC', "acCc", 'acd', "?acc", 'Acc!', "$!acc", ";acc"), - array("1", "0", 0, "-1", -1, "", TRUE, true, FALSE, "string"), + array("1", "0", 0, "-1", -1, "", "string"), array(10.5, 1.5, 9.5, 11.5, 100.5, 10.5E1, -10.5, 10, 0.5) ); @@ -282,10 +282,7 @@ Array [3] => -1 [4] => -1 [5] => - [6] => 1 - [7] => 1 - [8] => - [9] => string + [6] => string ) Iteration 0 @@ -295,9 +292,6 @@ Iteration 0 - strcasecmp of '1' and '-1' is => int(%d) - strcasecmp of '1' and '-1' is => int(%d) - strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '' is => int(%d) - strcasecmp of '1' and 'string' is => int(-%d) Iteration 1 @@ -307,9 +301,6 @@ Iteration 1 - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '' is => int(%d) - strcasecmp of '0' and 'string' is => int(-%d) Iteration 2 @@ -319,9 +310,6 @@ Iteration 2 - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '' is => int(%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '1' is => int(-%d) -- strcasecmp of '0' and '' is => int(%d) - strcasecmp of '0' and 'string' is => int(-%d) Iteration 3 @@ -331,9 +319,6 @@ Iteration 3 - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '' is => int(%d) - strcasecmp of '-1' and 'string' is => int(-%d) Iteration 4 @@ -343,9 +328,6 @@ Iteration 4 - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '' is => int(%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '1' is => int(-%d) -- strcasecmp of '-1' and '' is => int(%d) - strcasecmp of '-1' and 'string' is => int(-%d) Iteration 5 @@ -355,57 +337,15 @@ Iteration 5 - strcasecmp of '' and '-1' is => int(-%d) - strcasecmp of '' and '-1' is => int(-%d) - strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '' is => int(0) - strcasecmp of '' and 'string' is => int(-%d) Iteration 6 -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and 'string' is => int(-%d) - -Iteration 7 -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '0' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '-1' is => int(%d) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '1' is => int(0) -- strcasecmp of '1' and '' is => int(%d) -- strcasecmp of '1' and 'string' is => int(-%d) - -Iteration 8 -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '0' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) -- strcasecmp of '' and '-1' is => int(-%d) -- strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '1' is => int(-%d) -- strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and 'string' is => int(-%d) - -Iteration 9 - strcasecmp of 'string' and '1' is => int(%d) - strcasecmp of 'string' and '0' is => int(%d) - strcasecmp of 'string' and '0' is => int(%d) - strcasecmp of 'string' and '-1' is => int(%d) - strcasecmp of 'string' and '-1' is => int(%d) - strcasecmp of 'string' and '' is => int(%d) -- strcasecmp of 'string' and '1' is => int(%d) -- strcasecmp of 'string' and '1' is => int(%d) -- strcasecmp of 'string' and '' is => int(%d) - strcasecmp of 'string' and 'string' is => int(0) *** comparing the strings in an diff --git a/ext/standard/tests/strings/strcmp.phpt b/ext/standard/tests/strings/strcmp.phpt index fa94a9cc3a01..e6b07e7ae819 100644 --- a/ext/standard/tests/strings/strcmp.phpt +++ b/ext/standard/tests/strings/strcmp.phpt @@ -11,7 +11,7 @@ echo "#### Basic and Possible operations ####"; $arrays = array( array("a", "A", 'a', 'A', chr(128), chr(255), chr(0)), array("acc", "Acc", 'ac', "accc", 'acd', "?acc", 'acc!', "$!acc", ";acc"), - array("1", "0", 0, "-1", -1, "", TRUE, FALSE, "string"), + array("1", "0", 0, "-1", -1, "", "string"), array(10.5, 1.5, 9.5, 11.5, 100.5, 10.5E1, -10.5, 10, 0.5) ); @@ -312,9 +312,7 @@ Array [3] => -1 [4] => -1 [5] => - [6] => 1 - [7] => - [8] => string + [6] => string ) Iteration 0 @@ -324,8 +322,6 @@ Iteration 0 - strcmp of '1' and '-1' is => int(%d) - strcmp of '1' and '-1' is => int(%d) - strcmp of '1' and '' is => int(%d) -- strcmp of '1' and '1' is => int(0) -- strcmp of '1' and '' is => int(%d) - strcmp of '1' and 'string' is => int(-%d) Iteration 1 @@ -335,8 +331,6 @@ Iteration 1 - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '' is => int(%d) -- strcmp of '0' and '1' is => int(-%d) -- strcmp of '0' and '' is => int(%d) - strcmp of '0' and 'string' is => int(-%d) Iteration 2 @@ -346,8 +340,6 @@ Iteration 2 - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '' is => int(%d) -- strcmp of '0' and '1' is => int(-%d) -- strcmp of '0' and '' is => int(%d) - strcmp of '0' and 'string' is => int(-%d) Iteration 3 @@ -357,8 +349,6 @@ Iteration 3 - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '' is => int(%d) -- strcmp of '-1' and '1' is => int(-%d) -- strcmp of '-1' and '' is => int(%d) - strcmp of '-1' and 'string' is => int(-%d) Iteration 4 @@ -368,8 +358,6 @@ Iteration 4 - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '' is => int(%d) -- strcmp of '-1' and '1' is => int(-%d) -- strcmp of '-1' and '' is => int(%d) - strcmp of '-1' and 'string' is => int(-%d) Iteration 5 @@ -379,41 +367,15 @@ Iteration 5 - strcmp of '' and '-1' is => int(-%d) - strcmp of '' and '-1' is => int(-%d) - strcmp of '' and '' is => int(0) -- strcmp of '' and '1' is => int(-%d) -- strcmp of '' and '' is => int(0) - strcmp of '' and 'string' is => int(-%d) Iteration 6 -- strcmp of '1' and '1' is => int(0) -- strcmp of '1' and '0' is => int(%d) -- strcmp of '1' and '0' is => int(%d) -- strcmp of '1' and '-1' is => int(%d) -- strcmp of '1' and '-1' is => int(%d) -- strcmp of '1' and '' is => int(%d) -- strcmp of '1' and '1' is => int(0) -- strcmp of '1' and '' is => int(%d) -- strcmp of '1' and 'string' is => int(-%d) - -Iteration 7 -- strcmp of '' and '1' is => int(-%d) -- strcmp of '' and '0' is => int(-%d) -- strcmp of '' and '0' is => int(-%d) -- strcmp of '' and '-1' is => int(-%d) -- strcmp of '' and '-1' is => int(-%d) -- strcmp of '' and '' is => int(0) -- strcmp of '' and '1' is => int(-%d) -- strcmp of '' and '' is => int(0) -- strcmp of '' and 'string' is => int(-%d) - -Iteration 8 - strcmp of 'string' and '1' is => int(%d) - strcmp of 'string' and '0' is => int(%d) - strcmp of 'string' and '0' is => int(%d) - strcmp of 'string' and '-1' is => int(%d) - strcmp of 'string' and '-1' is => int(%d) - strcmp of 'string' and '' is => int(%d) -- strcmp of 'string' and '1' is => int(%d) -- strcmp of 'string' and '' is => int(%d) - strcmp of 'string' and 'string' is => int(0) *** comparing the strings in an diff --git a/ext/standard/tests/strings/strip_tags_variation2.phpt b/ext/standard/tests/strings/strip_tags_variation2.phpt index 009124c9cca9..e375a75a22bf 100644 --- a/ext/standard/tests/strings/strip_tags_variation2.phpt +++ b/ext/standard/tests/strings/strip_tags_variation2.phpt @@ -42,12 +42,6 @@ $values = array( NULL, null, - // boolean data - true, - false, - TRUE, - FALSE, - // empty data "", '', @@ -106,12 +100,4 @@ string(10) "helloworld" string(10) "helloworld" -- Iteration 16 -- string(10) "helloworld" --- Iteration 17 -- -string(10) "helloworld" --- Iteration 18 -- -string(10) "helloworld" --- Iteration 19 -- -string(10) "helloworld" --- Iteration 20 -- -string(10) "helloworld" Done diff --git a/ext/standard/tests/strings/stripos.phpt b/ext/standard/tests/strings/stripos.phpt index f56d38d3de7b..80cbb77772d5 100644 --- a/ext/standard/tests/strings/stripos.phpt +++ b/ext/standard/tests/strings/stripos.phpt @@ -16,14 +16,9 @@ stripos() function test var_dump(stripos("a", " ")); var_dump(stripos("a", "a")); var_dump(stripos("", 1)); - var_dump(stripos("", false)); - var_dump(stripos("", true)); var_dump(stripos("a", 1)); - var_dump(stripos("a", false)); - var_dump(stripos("a", true)); var_dump(stripos("1", 1)); - var_dump(stripos("0", false)); - var_dump(stripos("1", true)); + var_dump(stripos("0", "")); var_dump(stripos("\\\\a", "\\a")); ?> @@ -43,13 +38,8 @@ bool(false) bool(false) int(0) bool(false) -int(0) -bool(false) bool(false) int(0) -bool(false) -int(0) -int(0) int(0) int(1) diff --git a/ext/standard/tests/strings/stripos_variation1.phpt b/ext/standard/tests/strings/stripos_variation1.phpt index e205913fcfb0..cd6f95882c85 100644 --- a/ext/standard/tests/strings/stripos_variation1.phpt +++ b/ext/standard/tests/strings/stripos_variation1.phpt @@ -25,10 +25,6 @@ $needle = array( //nulls "\0", - //boolean false - FALSE, - false, - //empty string "", @@ -113,93 +109,87 @@ bool(false) int(0) int(11) -- Iteration 13 -- -int(0) -int(12) --- Iteration 14 -- -int(0) -int(13) --- Iteration 15 -- int(10) int(47) --- Iteration 16 -- +-- Iteration 14 -- int(12) bool(false) --- Iteration 17 -- +-- Iteration 15 -- int(11) bool(false) --- Iteration 18 -- +-- Iteration 16 -- int(13) bool(false) --- Iteration 19 -- +-- Iteration 17 -- int(14) bool(false) --- Iteration 20 -- +-- Iteration 18 -- int(16) bool(false) --- Iteration 21 -- +-- Iteration 19 -- int(17) bool(false) --- Iteration 22 -- +-- Iteration 20 -- int(20) -bool(false) --- Iteration 23 -- +int(20) +-- Iteration 21 -- int(22) int(22) --- Iteration 24 -- +-- Iteration 22 -- int(23) int(23) --- Iteration 25 -- +-- Iteration 23 -- int(24) int(24) --- Iteration 26 -- +-- Iteration 24 -- int(25) int(25) --- Iteration 27 -- +-- Iteration 25 -- bool(false) bool(false) --- Iteration 28 -- +-- Iteration 26 -- int(27) int(27) --- Iteration 29 -- +-- Iteration 27 -- int(28) int(28) --- Iteration 30 -- +-- Iteration 28 -- int(29) int(29) --- Iteration 31 -- +-- Iteration 29 -- int(31) int(31) --- Iteration 32 -- +-- Iteration 30 -- int(30) -bool(false) --- Iteration 33 -- +int(30) +-- Iteration 31 -- int(32) int(32) --- Iteration 34 -- +-- Iteration 32 -- int(33) int(33) --- Iteration 35 -- +-- Iteration 33 -- int(33) -bool(false) --- Iteration 36 -- +int(33) +-- Iteration 34 -- int(39) int(39) --- Iteration 37 -- +-- Iteration 35 -- int(15) int(48) --- Iteration 38 -- +-- Iteration 36 -- int(15) int(48) --- Iteration 39 -- +-- Iteration 37 -- int(51) int(51) --- Iteration 40 -- +-- Iteration 38 -- int(51) int(51) --- Iteration 41 -- +-- Iteration 39 -- bool(false) bool(false) --- Iteration 42 -- +-- Iteration 40 -- int(0) bool(false) *** Done *** diff --git a/ext/standard/tests/strings/stripos_variation2.phpt b/ext/standard/tests/strings/stripos_variation2.phpt index 2f95822645bf..6a599a860932 100644 --- a/ext/standard/tests/strings/stripos_variation2.phpt +++ b/ext/standard/tests/strings/stripos_variation2.phpt @@ -25,10 +25,6 @@ $needle = array( //nulls '\0', - //boolean false - FALSE, - false, - //empty string '', @@ -115,99 +111,93 @@ int(10) int(0) int(11) -- Iteration 13 -- -int(0) -int(12) --- Iteration 14 -- -int(0) -int(13) --- Iteration 15 -- int(14) int(14) --- Iteration 16 -- +-- Iteration 14 -- int(16) int(16) --- Iteration 17 -- +-- Iteration 15 -- int(15) -bool(false) --- Iteration 18 -- +int(15) +-- Iteration 16 -- int(17) int(17) --- Iteration 19 -- +-- Iteration 17 -- int(18) int(18) --- Iteration 20 -- +-- Iteration 18 -- int(20) int(20) --- Iteration 21 -- +-- Iteration 19 -- int(21) int(21) --- Iteration 22 -- +-- Iteration 20 -- int(24) int(24) --- Iteration 23 -- +-- Iteration 21 -- int(26) int(26) --- Iteration 24 -- +-- Iteration 22 -- int(27) int(27) --- Iteration 25 -- +-- Iteration 23 -- int(28) int(28) --- Iteration 26 -- +-- Iteration 24 -- int(29) int(29) --- Iteration 27 -- +-- Iteration 25 -- bool(false) bool(false) --- Iteration 28 -- +-- Iteration 26 -- bool(false) bool(false) --- Iteration 29 -- +-- Iteration 27 -- int(31) int(31) --- Iteration 30 -- +-- Iteration 28 -- int(32) int(32) --- Iteration 31 -- +-- Iteration 29 -- int(33) int(33) --- Iteration 32 -- +-- Iteration 30 -- int(35) int(35) --- Iteration 33 -- +-- Iteration 31 -- int(34) int(34) --- Iteration 34 -- +-- Iteration 32 -- int(36) int(36) --- Iteration 35 -- +-- Iteration 33 -- int(37) int(37) --- Iteration 36 -- +-- Iteration 34 -- int(37) int(37) --- Iteration 37 -- +-- Iteration 35 -- int(43) int(43) --- Iteration 38 -- +-- Iteration 36 -- int(52) int(52) --- Iteration 39 -- +-- Iteration 37 -- int(19) bool(false) --- Iteration 40 -- +-- Iteration 38 -- int(58) int(58) --- Iteration 41 -- +-- Iteration 39 -- bool(false) bool(false) --- Iteration 42 -- +-- Iteration 40 -- bool(false) bool(false) --- Iteration 43 -- +-- Iteration 41 -- bool(false) bool(false) --- Iteration 44 -- +-- Iteration 42 -- int(0) bool(false) *** Done *** diff --git a/ext/standard/tests/strings/stristr_variation2.phpt b/ext/standard/tests/strings/stristr_variation2.phpt index 44a9e6a71ac6..c5e371cf6793 100644 --- a/ext/standard/tests/strings/stristr_variation2.phpt +++ b/ext/standard/tests/strings/stristr_variation2.phpt @@ -26,12 +26,11 @@ $inputs = array ( -20.5, 10.1234567e10, - // boolean values -/*8*/ true, - false, + // empty string +/*8*/ "", // objects -/*10*/ new sample(), +/*9*/ new sample(), ); //defining '$pad_length' argument @@ -63,8 +62,6 @@ bool(false) -- Iteration 7 -- bool(false) -- Iteration 8 -- -bool(false) --- Iteration 9 -- string(11) "Hello World" --- Iteration 10 -- +-- Iteration 9 -- bool(false) diff --git a/ext/standard/tests/strings/strlen.phpt b/ext/standard/tests/strings/strlen.phpt index b1ff4f4e74d9..0926936d8fbf 100644 --- a/ext/standard/tests/strings/strlen.phpt +++ b/ext/standard/tests/strings/strlen.phpt @@ -26,8 +26,7 @@ $strings = array( "Hello, World", 0, "\t", // len = 1 '\t', // len = 2 - TRUE, - FALSE, + "1", "Hello, World\0", "Hello\0World", 'Hello, World\0', @@ -144,7 +143,6 @@ String length of '0' is => int(1) String length of ' ' is => int(1) String length of '\t' is => int(2) String length of '1' is => int(1) -String length of '' is => int(0) String length of 'Hello, World%0' is => int(13) String length of 'Hello%0World' is => int(11) String length of 'Hello, World\0' is => int(14) diff --git a/ext/standard/tests/strings/strnatcasecmp_variation1.phpt b/ext/standard/tests/strings/strnatcasecmp_variation1.phpt index dff57b337208..6cb9e37eb147 100644 --- a/ext/standard/tests/strings/strnatcasecmp_variation1.phpt +++ b/ext/standard/tests/strings/strnatcasecmp_variation1.phpt @@ -30,7 +30,7 @@ function str_dump($a, $b) { echo "*** Testing strnatcasecmp() : variation ***\n"; -str_dump('0', false); +str_dump('0', ''); str_dump('fooBar', ''); str_dump('', -1); str_dump("Hello\0world", "Helloworld"); diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt index 739d9d86721d..3fe84490ee12 100644 --- a/ext/standard/tests/strings/strpos.phpt +++ b/ext/standard/tests/strings/strpos.phpt @@ -41,11 +41,10 @@ $needles = array( "NULL", "0", 0, - TRUE, "TRUE", "1", 1, - FALSE, + "", "FALSE", " ", " ", @@ -68,8 +67,6 @@ echo "\n*** Testing strpos() with possible variations in offset ***\n"; $offset_values = array ( 1, // offset = 1 "0", - TRUE, - FALSE, -10, // Not found -15, // Found -strlen($string), @@ -199,7 +196,6 @@ Position of '-3.344' is => int(19) Position of 'NULL' is => int(31) Position of '0' is => int(12) Position of '0' is => int(12) -Position of '1' is => int(13) Position of 'TRUE' is => int(36) Position of '1' is => int(13) Position of '1' is => int(13) @@ -220,8 +216,6 @@ abcd$:Hello world' is => int(0) *** Testing strpos() with possible variations in offset *** Position of 'Hello' with offset '1' is => int(74) Position of 'Hello' with offset '0' is => int(0) -Position of 'Hello' with offset '1' is => int(74) -Position of 'Hello' with offset '' is => int(0) Position of 'Hello' with offset '-10' is => bool(false) Position of 'Hello' with offset '-15' is => int(74) Position of 'Hello' with offset '-85' is => int(0) diff --git a/ext/standard/tests/strings/strrchr_variation1.phpt b/ext/standard/tests/strings/strrchr_variation1.phpt index 3e71728ef880..f0a25c9395d6 100644 --- a/ext/standard/tests/strings/strrchr_variation1.phpt +++ b/ext/standard/tests/strings/strrchr_variation1.phpt @@ -26,10 +26,6 @@ $needle = array( //nulls "\0", - //boolean false - FALSE, - false, - //empty string "", @@ -124,98 +120,90 @@ string(45) "%0 $&!#%\o,()*+-./:;<=>?@hello123456he #4 A " -- Iteration 13 -- -string(45) "%0 - $&!#%\o,()*+-./:;<=>?@hello123456he #4 A " +string(1) " " -- Iteration 14 -- -string(45) "%0 - $&!#%\o,()*+-./:;<=>?@hello123456he #4 A " +string(41) "$&!#%\o,()*+-./:;<=>?@hello123456he #4 A " -- Iteration 15 -- string(1) " " -- Iteration 16 -- -string(41) "$&!#%\o,()*+-./:;<=>?@hello123456he #4 A " - --- Iteration 17 -- -string(1) " " - --- Iteration 18 -- string(40) "&!#%\o,()*+-./:;<=>?@hello123456he #4 A " --- Iteration 19 -- +-- Iteration 17 -- string(39) "!#%\o,()*+-./:;<=>?@hello123456he #4 A " --- Iteration 20 -- +-- Iteration 18 -- string(37) "%\o,()*+-./:;<=>?@hello123456he #4 A " --- Iteration 21 -- +-- Iteration 19 -- string(36) "\o,()*+-./:;<=>?@hello123456he #4 A " --- Iteration 22 -- +-- Iteration 20 -- string(33) "()*+-./:;<=>?@hello123456he #4 A " --- Iteration 23 -- +-- Iteration 21 -- string(31) "*+-./:;<=>?@hello123456he #4 A " --- Iteration 24 -- +-- Iteration 22 -- string(30) "+-./:;<=>?@hello123456he #4 A " --- Iteration 25 -- +-- Iteration 23 -- string(29) "-./:;<=>?@hello123456he #4 A " --- Iteration 26 -- +-- Iteration 24 -- string(28) "./:;<=>?@hello123456he #4 A " --- Iteration 27 -- +-- Iteration 25 -- string(28) "./:;<=>?@hello123456he #4 A " --- Iteration 28 -- +-- Iteration 26 -- string(26) ":;<=>?@hello123456he #4 A " --- Iteration 29 -- +-- Iteration 27 -- string(25) ";<=>?@hello123456he #4 A " --- Iteration 30 -- +-- Iteration 28 -- string(24) "<=>?@hello123456he #4 A " --- Iteration 31 -- +-- Iteration 29 -- string(22) ">?@hello123456he #4 A " --- Iteration 32 -- +-- Iteration 30 -- string(23) "=>?@hello123456he #4 A " --- Iteration 33 -- +-- Iteration 31 -- string(21) "?@hello123456he #4 A " --- Iteration 34 -- +-- Iteration 32 -- string(20) "@hello123456he #4 A " --- Iteration 35 -- +-- Iteration 33 -- string(20) "@hello123456he #4 A " --- Iteration 36 -- +-- Iteration 34 -- string(14) "123456he #4 A " --- Iteration 37 -- +-- Iteration 35 -- string(5) "#4 A " --- Iteration 38 -- +-- Iteration 36 -- string(5) "#4 A " --- Iteration 39 -- +-- Iteration 37 -- string(2) "A " --- Iteration 40 -- +-- Iteration 38 -- string(2) "A " --- Iteration 41 -- +-- Iteration 39 -- string(4) "4 A " --- Iteration 42 -- +-- Iteration 40 -- string(4) "4 A " --- Iteration 43 -- +-- Iteration 41 -- string(53) "Hello, %0 $&!#%\o,()*+-./:;<=>?@hello123456he #4 A " diff --git a/ext/standard/tests/strings/strrchr_variation2.phpt b/ext/standard/tests/strings/strrchr_variation2.phpt index 646f13a702e4..30f2600c6678 100644 --- a/ext/standard/tests/strings/strrchr_variation2.phpt +++ b/ext/standard/tests/strings/strrchr_variation2.phpt @@ -25,10 +25,6 @@ $needle = array( //nulls '\0', - //boolean false - FALSE, - false, - //empty string '', @@ -113,95 +109,89 @@ string(5) "\101 " bool(false) -- Iteration 13 -- -bool(false) +string(1) " " -- Iteration 14 -- -bool(false) +string(47) "$&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 " -- Iteration 15 -- string(1) " " -- Iteration 16 -- -string(47) "$&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 " +string(46) "&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 " -- Iteration 17 -- -string(1) " " +string(45) "!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 " -- Iteration 18 -- -string(46) "&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 " +string(43) "%\o,()*+-./:;<=>?@hello123456he \x234 \101 " -- Iteration 19 -- -string(45) "!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 " +string(5) "\101 " -- Iteration 20 -- -string(43) "%\o,()*+-./:;<=>?@hello123456he \x234 \101 " +string(39) "()*+-./:;<=>?@hello123456he \x234 \101 " -- Iteration 21 -- -string(5) "\101 " +string(37) "*+-./:;<=>?@hello123456he \x234 \101 " -- Iteration 22 -- -string(39) "()*+-./:;<=>?@hello123456he \x234 \101 " +string(36) "+-./:;<=>?@hello123456he \x234 \101 " -- Iteration 23 -- -string(37) "*+-./:;<=>?@hello123456he \x234 \101 " +string(35) "-./:;<=>?@hello123456he \x234 \101 " -- Iteration 24 -- -string(36) "+-./:;<=>?@hello123456he \x234 \101 " +string(34) "./:;<=>?@hello123456he \x234 \101 " -- Iteration 25 -- -string(35) "-./:;<=>?@hello123456he \x234 \101 " +string(34) "./:;<=>?@hello123456he \x234 \101 " -- Iteration 26 -- -string(34) "./:;<=>?@hello123456he \x234 \101 " +string(32) ":;<=>?@hello123456he \x234 \101 " -- Iteration 27 -- -string(34) "./:;<=>?@hello123456he \x234 \101 " +string(31) ";<=>?@hello123456he \x234 \101 " -- Iteration 28 -- -string(32) ":;<=>?@hello123456he \x234 \101 " +string(30) "<=>?@hello123456he \x234 \101 " -- Iteration 29 -- -string(31) ";<=>?@hello123456he \x234 \101 " +string(28) ">?@hello123456he \x234 \101 " -- Iteration 30 -- -string(30) "<=>?@hello123456he \x234 \101 " +string(29) "=>?@hello123456he \x234 \101 " -- Iteration 31 -- -string(28) ">?@hello123456he \x234 \101 " +string(27) "?@hello123456he \x234 \101 " -- Iteration 32 -- -string(29) "=>?@hello123456he \x234 \101 " +string(26) "@hello123456he \x234 \101 " -- Iteration 33 -- -string(27) "?@hello123456he \x234 \101 " +string(26) "@hello123456he \x234 \101 " -- Iteration 34 -- -string(26) "@hello123456he \x234 \101 " +string(2) "1 " -- Iteration 35 -- -string(26) "@hello123456he \x234 \101 " +string(5) "\101 " -- Iteration 36 -- -string(2) "1 " +string(44) "#%\o,()*+-./:;<=>?@hello123456he \x234 \101 " -- Iteration 37 -- string(5) "\101 " -- Iteration 38 -- -string(44) "#%\o,()*+-./:;<=>?@hello123456he \x234 \101 " - --- Iteration 39 -- -string(5) "\101 " - --- Iteration 40 -- bool(false) --- Iteration 41 -- +-- Iteration 39 -- string(7) "4 \101 " --- Iteration 42 -- +-- Iteration 40 -- string(7) "4 \101 " --- Iteration 43 -- +-- Iteration 41 -- string(63) "Hello,\t\n\0\n $&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 " *** Done *** diff --git a/ext/standard/tests/strings/strripos_variation1.phpt b/ext/standard/tests/strings/strripos_variation1.phpt index 57ae8dd11a65..7ae5a88724c9 100644 --- a/ext/standard/tests/strings/strripos_variation1.phpt +++ b/ext/standard/tests/strings/strripos_variation1.phpt @@ -25,10 +25,6 @@ $needles = array( //nulls /*11*/ "\0", - //boolean false -/*14*/ FALSE, - false, - //empty string /*16*/ "", @@ -129,106 +125,96 @@ int(44) int(44) int(43) -- Iteration 13 -- -int(44) -int(44) -int(44) -int(43) --- Iteration 14 -- -int(44) -int(44) -int(44) -int(43) --- Iteration 15 -- int(43) int(43) int(43) int(43) --- Iteration 16 -- +-- Iteration 14 -- int(12) int(12) bool(false) int(12) --- Iteration 17 -- +-- Iteration 15 -- int(11) int(11) bool(false) int(11) --- Iteration 18 -- +-- Iteration 16 -- int(13) int(13) bool(false) int(13) --- Iteration 19 -- +-- Iteration 17 -- int(14) int(14) bool(false) int(14) --- Iteration 20 -- +-- Iteration 18 -- int(17) int(17) bool(false) int(17) --- Iteration 21 -- +-- Iteration 19 -- int(20) int(20) int(20) int(20) --- Iteration 22 -- +-- Iteration 20 -- int(22) int(22) int(22) int(22) --- Iteration 23 -- +-- Iteration 21 -- int(21) int(21) int(21) int(21) --- Iteration 24 -- +-- Iteration 22 -- int(23) int(23) int(23) int(23) --- Iteration 25 -- +-- Iteration 23 -- int(24) int(24) int(24) int(24) --- Iteration 26 -- +-- Iteration 24 -- int(24) int(24) int(24) int(24) --- Iteration 27 -- +-- Iteration 25 -- int(30) int(30) int(30) int(30) --- Iteration 28 -- +-- Iteration 26 -- int(39) int(39) int(39) int(39) --- Iteration 29 -- +-- Iteration 27 -- int(39) int(39) int(39) int(39) --- Iteration 30 -- +-- Iteration 28 -- int(42) int(42) int(42) int(42) --- Iteration 31 -- +-- Iteration 29 -- int(42) int(42) int(42) int(42) --- Iteration 32 -- +-- Iteration 30 -- bool(false) bool(false) bool(false) bool(false) --- Iteration 33 -- +-- Iteration 31 -- int(0) bool(false) bool(false) diff --git a/ext/standard/tests/strings/strripos_variation2.phpt b/ext/standard/tests/strings/strripos_variation2.phpt index 12bcc2d22bb6..ade0b271b629 100644 --- a/ext/standard/tests/strings/strripos_variation2.phpt +++ b/ext/standard/tests/strings/strripos_variation2.phpt @@ -25,10 +25,6 @@ $needles = array( //nulls /*11*/ '\0', - //boolean false -/*14*/ FALSE, - false, - //empty string /*16*/ '', @@ -130,111 +126,101 @@ int(54) int(54) int(53) -- Iteration 13 -- -int(54) -int(54) -int(54) -int(53) --- Iteration 14 -- -int(54) -int(54) -int(54) -int(53) --- Iteration 15 -- int(53) int(53) int(53) int(53) --- Iteration 16 -- +-- Iteration 14 -- int(16) int(16) bool(false) int(16) --- Iteration 17 -- +-- Iteration 15 -- int(15) int(15) bool(false) int(15) --- Iteration 18 -- +-- Iteration 16 -- int(17) int(17) bool(false) int(17) --- Iteration 19 -- +-- Iteration 17 -- int(18) int(18) bool(false) int(18) --- Iteration 20 -- +-- Iteration 18 -- int(21) int(21) int(21) int(21) --- Iteration 21 -- +-- Iteration 19 -- int(24) int(24) int(24) int(24) --- Iteration 22 -- +-- Iteration 20 -- int(26) int(26) int(26) int(26) --- Iteration 23 -- +-- Iteration 21 -- int(25) int(25) int(25) int(25) --- Iteration 24 -- +-- Iteration 22 -- int(27) int(27) int(27) int(27) --- Iteration 25 -- +-- Iteration 23 -- int(28) int(28) int(28) int(28) --- Iteration 26 -- +-- Iteration 24 -- int(28) int(28) int(28) int(28) --- Iteration 27 -- +-- Iteration 25 -- int(34) int(34) int(34) int(34) --- Iteration 28 -- +-- Iteration 26 -- int(43) int(43) int(43) int(43) --- Iteration 29 -- +-- Iteration 27 -- int(19) int(19) bool(false) int(19) --- Iteration 30 -- +-- Iteration 28 -- int(49) int(49) int(49) int(49) --- Iteration 31 -- +-- Iteration 29 -- bool(false) bool(false) bool(false) bool(false) --- Iteration 32 -- +-- Iteration 30 -- bool(false) bool(false) bool(false) bool(false) --- Iteration 33 -- +-- Iteration 31 -- bool(false) bool(false) bool(false) bool(false) --- Iteration 34 -- +-- Iteration 32 -- int(0) bool(false) bool(false) diff --git a/ext/standard/tests/strings/strrpos_variation2.phpt b/ext/standard/tests/strings/strrpos_variation2.phpt index 0022d0e2c3f3..61aa98b7b000 100644 --- a/ext/standard/tests/strings/strrpos_variation2.phpt +++ b/ext/standard/tests/strings/strrpos_variation2.phpt @@ -25,10 +25,6 @@ $needle = array( //nulls '\0', - //boolean false - FALSE, - false, - //empty string '', @@ -105,69 +101,63 @@ int(10) int(54) int(54) -- Iteration 13 -- -int(54) -int(54) --- Iteration 14 -- -int(54) -int(54) --- Iteration 15 -- int(53) int(53) --- Iteration 16 -- +-- Iteration 14 -- int(16) int(16) --- Iteration 17 -- +-- Iteration 15 -- int(15) -bool(false) --- Iteration 18 -- +int(15) +-- Iteration 16 -- int(17) int(17) --- Iteration 19 -- +-- Iteration 17 -- int(18) int(18) --- Iteration 20 -- +-- Iteration 18 -- int(21) int(21) --- Iteration 21 -- +-- Iteration 19 -- int(24) int(24) --- Iteration 22 -- +-- Iteration 20 -- int(26) int(26) --- Iteration 23 -- +-- Iteration 21 -- int(25) int(25) --- Iteration 24 -- +-- Iteration 22 -- int(27) int(27) --- Iteration 25 -- +-- Iteration 23 -- int(28) int(28) --- Iteration 26 -- +-- Iteration 24 -- bool(false) bool(false) --- Iteration 27 -- +-- Iteration 25 -- int(34) int(34) --- Iteration 28 -- +-- Iteration 26 -- int(43) int(43) --- Iteration 29 -- +-- Iteration 27 -- int(19) bool(false) --- Iteration 30 -- +-- Iteration 28 -- int(49) int(49) --- Iteration 31 -- +-- Iteration 29 -- bool(false) bool(false) --- Iteration 32 -- +-- Iteration 30 -- bool(false) bool(false) --- Iteration 33 -- +-- Iteration 31 -- bool(false) bool(false) --- Iteration 34 -- +-- Iteration 32 -- int(0) bool(false) *** Done *** diff --git a/ext/standard/tests/strings/strrpos_variation7.phpt b/ext/standard/tests/strings/strrpos_variation7.phpt index 01d8996b57b2..577b172f2ff6 100644 --- a/ext/standard/tests/strings/strrpos_variation7.phpt +++ b/ext/standard/tests/strings/strrpos_variation7.phpt @@ -16,7 +16,6 @@ try { } catch (Throwable $exception) { echo $exception::class, ': ', $exception->getMessage(), "\n"; } -var_dump( strrpos($empty_string, FALSE) ); echo "*** Done ***"; ?> @@ -25,5 +24,4 @@ echo "*** Done ***"; -- With empty heredoc string -- int(0) ValueError: strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) -int(0) *** Done *** diff --git a/ext/standard/tests/strings/strstr.phpt b/ext/standard/tests/strings/strstr.phpt index 0d4065b54fb2..9a78bd8e4ef3 100644 --- a/ext/standard/tests/strings/strstr.phpt +++ b/ext/standard/tests/strings/strstr.phpt @@ -38,11 +38,10 @@ $needles = array( "NULL", "0", 0, - TRUE, "TRUE", "1", 1, - FALSE, + "", "FALSE", " ", " ", @@ -130,7 +129,7 @@ var_dump( strstr("Hello, worldS", "{$needle}S") ); // works echo "\n*** Testing error conditions ***"; var_dump( strstr($string, "")); -var_dump( strstr("a", "b", "c") ); // args > expected +var_dump( strstr("a", "b", true) ); ?> @@ -225,12 +224,12 @@ string(73) "012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 15 -- -string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal +string(49) "TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 16 -- -string(49) "TRUE FALSE%0 abcd\xxyz %00 octal +string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" @@ -240,52 +239,47 @@ string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 18 -- -string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal - -abcd$:Hello world" - --- Iteration 19 -- string(85) "Hello world,012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" --- Iteration 20 -- +-- Iteration 19 -- string(44) "FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" --- Iteration 21 -- +-- Iteration 20 -- string(80) " world,012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" --- Iteration 22 -- +-- Iteration 21 -- string(59) " NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" --- Iteration 23 -- +-- Iteration 22 -- string(36) "bcd\xxyz %00 octal abcd$:Hello world" --- Iteration 24 -- +-- Iteration 23 -- bool(false) --- Iteration 25 -- +-- Iteration 24 -- string(19) " abcd$:Hello world" --- Iteration 26 -- +-- Iteration 25 -- string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" --- Iteration 27 -- +-- Iteration 26 -- bool(false) --- Iteration 28 -- +-- Iteration 27 -- string(85) "Hello world,012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" diff --git a/ext/standard/tests/strings/strtolower.phpt b/ext/standard/tests/strings/strtolower.phpt index 1abe45a8a052..498279ed303b 100644 --- a/ext/standard/tests/strings/strtolower.phpt +++ b/ext/standard/tests/strings/strtolower.phpt @@ -22,8 +22,7 @@ $strings = array ( "1.233.344StrinG12333", "$$$$$$!!!!@@@@@@@ ABCDEF !!!***", "ABCD\0abcdABCD", - TRUE, - FALSE, + "1", /* Check for off-by-one errors in the SSE implementation */ "AAAAAAAAAAAAAAAAAAAA", @@ -334,21 +333,18 @@ string(13) "abcd%0abcdabcd" string(1) "1" -- Iteration 7 -- -string(0) "" - --- Iteration 8 -- string(20) "aaaaaaaaaaaaaaaaaaaa" --- Iteration 9 -- +-- Iteration 8 -- string(20) "zzzzzzzzzzzzzzzzzzzz" --- Iteration 10 -- +-- Iteration 9 -- string(20) "@@@@@@@@@@@@@@@@@@@@" --- Iteration 11 -- +-- Iteration 10 -- string(20) "[[[[[[[[[[[[[[[[[[[[" --- Iteration 12 -- +-- Iteration 11 -- string(62) "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz" *** Testing strtolower() with two different case strings *** diff --git a/ext/standard/tests/strings/strtoupper1.phpt b/ext/standard/tests/strings/strtoupper1.phpt index 220906a5ba53..9bb7888cdcad 100644 --- a/ext/standard/tests/strings/strtoupper1.phpt +++ b/ext/standard/tests/strings/strtoupper1.phpt @@ -21,8 +21,7 @@ $strings = array ( "1.233.344StrinG12333", "$$$$$$!!!!@@@@@@@ ABCDEF !!!***", "ABCD\0abcdABCD", - TRUE, - FALSE, + "1", /* Check for off-by-one errors in the SSE implementation */ "aaaaaaaaaaaaaaaaaaaa", "zzzzzzzzzzzzzzzzzzzz", @@ -338,33 +337,30 @@ string(13) "ABCD%0ABCDABCD" string(1) "1" -- Iteration 7 -- -string(0) "" - --- Iteration 8 -- string(20) "AAAAAAAAAAAAAAAAAAAA" --- Iteration 9 -- +-- Iteration 8 -- string(20) "ZZZZZZZZZZZZZZZZZZZZ" --- Iteration 10 -- +-- Iteration 9 -- string(20) "````````````````````" --- Iteration 11 -- +-- Iteration 10 -- string(20) "{{{{{{{{{{{{{{{{{{{{" --- Iteration 12 -- +-- Iteration 11 -- string(40) "{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{" --- Iteration 13 -- +-- Iteration 12 -- string(31) "ABCDEFGHIJKLMNOPQRSTUVWXYZ01234" --- Iteration 14 -- +-- Iteration 13 -- string(32) "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345" --- Iteration 15 -- +-- Iteration 14 -- string(33) "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456" --- Iteration 16 -- +-- Iteration 15 -- string(62) "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" *** Testing strtoupper() with two different case strings *** diff --git a/ext/standard/tests/strings/strtr_variation4.phpt b/ext/standard/tests/strings/strtr_variation4.phpt index f89ff654a186..639ed99507ba 100644 --- a/ext/standard/tests/strings/strtr_variation4.phpt +++ b/ext/standard/tests/strings/strtr_variation4.phpt @@ -19,8 +19,6 @@ EOD; $str_arr = array( "", '', - FALSE, - false, $heredoc_str ); @@ -56,10 +54,4 @@ string(0) "" -- Iteration 3 -- string(0) "" string(0) "" --- Iteration 4 -- -string(0) "" -string(0) "" --- Iteration 5 -- -string(0) "" -string(0) "" *** Done *** diff --git a/ext/standard/tests/strings/strtr_variation6.phpt b/ext/standard/tests/strings/strtr_variation6.phpt index 90ef75370eb2..81810b863ee0 100644 --- a/ext/standard/tests/strings/strtr_variation6.phpt +++ b/ext/standard/tests/strings/strtr_variation6.phpt @@ -31,18 +31,15 @@ $from_arr = array ( -20.5, 10.1234567e10, - // boolean values -/*7*/ true, - false, - TRUE, - FALSE, + // empty string +/*7*/ "", // null values -/*14*/ NULL, +/*8*/ NULL, null, // objects -/*13*/ new sample(), +/*10*/ new sample(), ); //defining 'to' argument @@ -73,20 +70,14 @@ string(6) "m1tatm" -- Iteration 6 -- string(6) "tm0atm" -- Iteration 7 -- -string(6) "0a2atm" --- Iteration 8 -- string(6) "012atm" --- Iteration 9 -- -string(6) "0a2atm" --- Iteration 10 -- -string(6) "012atm" --- Iteration 11 -- +-- Iteration 8 -- Deprecated: strtr(): Passing null to parameter #2 ($from) of type array|string is deprecated in %s on line %d string(6) "012atm" --- Iteration 12 -- +-- Iteration 9 -- Deprecated: strtr(): Passing null to parameter #2 ($from) of type array|string is deprecated in %s on line %d string(6) "012atm" --- Iteration 13 -- +-- Iteration 10 -- string(6) "012ttm" diff --git a/ext/standard/tests/strings/trim1.phpt b/ext/standard/tests/strings/trim1.phpt index e0cdbea1c899..68bcdb1f19be 100644 --- a/ext/standard/tests/strings/trim1.phpt +++ b/ext/standard/tests/strings/trim1.phpt @@ -13,7 +13,7 @@ var_dump( trim($null_var) ); /* second argument charlist as empty - does not trim any white spaces */ var_dump( trim("\ttesting trim", "") ); -var_dump( trim("\ttesting trim ", true) ); +var_dump( trim("\ttesting trim ", "1") ); /* Use of class and objects */ echo "\n*** Testing with OBJECTS ***\n"; diff --git a/ext/standard/tests/strings/ucfirst.phpt b/ext/standard/tests/strings/ucfirst.phpt index 5389579eb2f3..705c963c7531 100644 --- a/ext/standard/tests/strings/ucfirst.phpt +++ b/ext/standard/tests/strings/ucfirst.phpt @@ -24,12 +24,11 @@ $str_array = array( "NULL", "0", 0, - TRUE, // bool type "TRUE", "1", 1, 1.234444, - FALSE, + "", "FALSE", " ", " ", @@ -119,7 +118,6 @@ string(6) "-3.344" string(4) "NULL" string(1) "0" string(1) "0" -string(1) "1" string(4) "TRUE" string(1) "1" string(1) "1"