summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-02-01 12:57:55 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-02-05 09:38:55 +0100
commit8bc663f43bb3f556866a2f804c422646c4da56f2 (patch)
tree8b15beb7927b03369e69ec0545c354a7f7f9371b /ext/standard/tests/general_functions
parentda919a8b658bf65ff0705bc03c28c7be085d6329 (diff)
downloadphp-git-8bc663f43bb3f556866a2f804c422646c4da56f2.tar.gz
Remove zpp variation tests
Diffstat (limited to 'ext/standard/tests/general_functions')
-rw-r--r--ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt208
-rw-r--r--ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt210
-rw-r--r--ext/standard/tests/general_functions/get_extension_funcs_variation.phpt137
-rw-r--r--ext/standard/tests/general_functions/getrusage_variation1.phpt142
-rw-r--r--ext/standard/tests/general_functions/intval_variation2.phpt199
-rw-r--r--ext/standard/tests/general_functions/php_uname_variation1.phpt112
-rw-r--r--ext/standard/tests/general_functions/proc_nice_variation3.phpt48
7 files changed, 0 insertions, 1056 deletions
diff --git a/ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt b/ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt
deleted file mode 100644
index 51a079ad53..0000000000
--- a/ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt
+++ /dev/null
@@ -1,208 +0,0 @@
---TEST--
-Test call_user_func_array() function : first parameter variation
---FILE--
-<?php
-/* Prototype : mixed call_user_func_array(string function_name, array parameters)
- * Description: Call a user function which is the first parameter with the arguments contained in array
- * Source code: ext/standard/basic_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing call_user_func_array() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$parameters = array(1, 2);
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for function_name
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( call_user_func_array($value, $parameters) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing call_user_func_array() : usage variation ***
-
---int 0--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---int 1--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---int 12345--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---int -12345--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---float 10.5--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---float -10.5--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---float 12.3456789000e10--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---float -12.3456789000e10--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---float .5--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---empty array--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members, %s(%d)
-NULL
-
---associative array--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---lowercase null--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---lowercase true--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---lowercase false--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---uppercase TRUE--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---uppercase FALSE--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---empty string DQ--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-
---unset var--
-Error: 2 - call_user_func_array() expects parameter 1 to be a valid callback, no array or string given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt b/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt
deleted file mode 100644
index c8c8ce6604..0000000000
--- a/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt
+++ /dev/null
@@ -1,210 +0,0 @@
---TEST--
-Test call_user_func_array() function : second parameter variation
---FILE--
-<?php
-/* Prototype : mixed call_user_func_array(string function_name, array parameters)
- * Description: Call a user function which is the first parameter with the arguments contained in array
- * Source code: ext/standard/basic_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing call_user_func_array() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-function test_func() {
-}
-$function_name = 'test_func';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // int data
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -2345,
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for parameters
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( call_user_func_array($function_name, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing call_user_func_array() : usage variation ***
-
---int 0--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d)
-NULL
-
---int 1--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d)
-NULL
-
---int 12345--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d)
-NULL
-
---int -12345--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, int given, %s(%d)
-NULL
-
---float 10.5--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d)
-NULL
-
---float -10.5--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d)
-NULL
-
---float 12.3456789000e10--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d)
-NULL
-
---float -12.3456789000e10--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d)
-NULL
-
---float .5--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, float given, %s(%d)
-NULL
-
---uppercase NULL--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d)
-NULL
-
---lowercase null--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d)
-NULL
-
---lowercase true--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d)
-NULL
-
---lowercase false--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d)
-NULL
-
---uppercase TRUE--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d)
-NULL
-
---uppercase FALSE--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, bool given, %s(%d)
-NULL
-
---empty string DQ--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, object given, %s(%d)
-NULL
-
---undefined var--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d)
-NULL
-
---unset var--
-Error: 2 - call_user_func_array() expects parameter 2 to be array, null given, %s(%d)
-NULL
-===DONE===
diff --git a/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt b/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt
deleted file mode 100644
index ac4568c621..0000000000
--- a/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt
+++ /dev/null
@@ -1,137 +0,0 @@
---TEST--
-Test get_extension_funcs() function : error conditions
---FILE--
-<?php
-/* Prototype : array get_extension_funcs ( string $module_name )
- * Description: Returns an array with the names of the functions of a module.
- * Source code: Zend/zend_builtin_functions.c
- * Alias to functions:
- */
-
-echo "*** Testing get_extension_funcs() function: with unexpected inputs for 'module_name' argument ***\n";
-
-//get an unset variable
-$unset_var = 'string_val';
-unset($unset_var);
-
-//defining a class
-class sample {
- public function __toString() {
- return "sample object";
- }
-}
-
-//getting the resource
-$file_handle = fopen(__FILE__, "r");
-
-// array with different values for $str
-$inputs = array (
-
- // integer values
- 0,
- 1,
- 255,
- 256,
- PHP_INT_MAX,
- -PHP_INT_MAX,
-
- // float values
- 10.5,
- -20.5,
- 10.1234567e10,
-
- // array values
- array(),
- array(0),
- array(1, 2),
-
- // boolean values
- true,
- false,
- TRUE,
- FALSE,
-
- // null values
- NULL,
- null,
-
- // objects
- new sample(),
-
- // resource
- $file_handle,
-
- // undefined variable
- @$undefined_var,
-
- // unset variable
- @$unset_var
-);
-
-// loop through with each element of the $inputs array to test get_extension_funcs() function
-$count = 1;
-foreach($inputs as $input) {
- echo "-- Iteration $count --\n";
- var_dump( get_extension_funcs($input) );
- $count ++;
-}
-
-fclose($file_handle); //closing the file handle
-
-?>
-===DONE===
---EXPECTF--
-*** Testing get_extension_funcs() function: with unexpected inputs for 'module_name' argument ***
--- Iteration 1 --
-bool(false)
--- Iteration 2 --
-bool(false)
--- Iteration 3 --
-bool(false)
--- Iteration 4 --
-bool(false)
--- Iteration 5 --
-bool(false)
--- Iteration 6 --
-bool(false)
--- Iteration 7 --
-bool(false)
--- Iteration 8 --
-bool(false)
--- Iteration 9 --
-bool(false)
--- Iteration 10 --
-
-Warning: get_extension_funcs() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: get_extension_funcs() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: get_extension_funcs() expects parameter 1 to be string, array given in %s on line %d
-NULL
--- Iteration 13 --
-bool(false)
--- Iteration 14 --
-bool(false)
--- Iteration 15 --
-bool(false)
--- Iteration 16 --
-bool(false)
--- Iteration 17 --
-bool(false)
--- Iteration 18 --
-bool(false)
--- Iteration 19 --
-bool(false)
--- Iteration 20 --
-
-Warning: get_extension_funcs() expects parameter 1 to be string, resource given in %s on line %d
-NULL
--- Iteration 21 --
-bool(false)
--- Iteration 22 --
-bool(false)
-===DONE===
diff --git a/ext/standard/tests/general_functions/getrusage_variation1.phpt b/ext/standard/tests/general_functions/getrusage_variation1.phpt
deleted file mode 100644
index 0c072ed6e0..0000000000
--- a/ext/standard/tests/general_functions/getrusage_variation1.phpt
+++ /dev/null
@@ -1,142 +0,0 @@
---TEST--
-Test getrusage() function : usage variation - diff data types as $who arg
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
-if (!function_exists("getrusage")) die("skip");
-?>
---FILE--
-<?php
-/* Prototype : array getrusage ([ int $who ] )
- * Description: Gets the current resource usages
- * Source code: ext/standard/microtime.c
- * Alias to functions:
- */
-
-
-/*
- * Pass different data types as $who argument to test behaviour of getrusage()
- */
-
-echo "*** Testing getrusage() : usage variations ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-
-// unexpected values to be passed to $stream_id argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // string data
-/*16*/ "0",
- '1',
- "1232456",
- "1.23E4",
-
- // undefined data
-/*20*/ @$undefined_var,
-
- // unset data
-/*21*/ @$unset_var,
-);
-
-// loop through each element of $inputs to check the behavior of getrusage()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- $res = getrusage($input);
- echo "User time used (microseconds) " . $res["ru_utime.tv_usec"] . "\n";
- $iterator++;
-}
-?>
-===DONE===
---EXPECTF--
-*** Testing getrusage() : usage variations ***
-
--- Iteration 1 --
-User time used (microseconds) %d
-
--- Iteration 2 --
-User time used (microseconds) %d
-
--- Iteration 3 --
-User time used (microseconds) %d
-
--- Iteration 4 --
-User time used (microseconds) %d
-
--- Iteration 5 --
-User time used (microseconds) %d
-
--- Iteration 6 --
-User time used (microseconds) %d
-
--- Iteration 7 --
-User time used (microseconds) %d
-
--- Iteration 8 --
-User time used (microseconds) %d
-
--- Iteration 9 --
-User time used (microseconds) %d
-
--- Iteration 10 --
-User time used (microseconds) %d
-
--- Iteration 11 --
-User time used (microseconds) %d
-
--- Iteration 12 --
-User time used (microseconds) %d
-
--- Iteration 13 --
-User time used (microseconds) %d
-
--- Iteration 14 --
-User time used (microseconds) %d
-
--- Iteration 15 --
-User time used (microseconds) %d
-
--- Iteration 16 --
-User time used (microseconds) %d
-
--- Iteration 17 --
-User time used (microseconds) %d
-
--- Iteration 18 --
-User time used (microseconds) %d
-
--- Iteration 19 --
-User time used (microseconds) %d
-
--- Iteration 20 --
-User time used (microseconds) %d
-
--- Iteration 21 --
-User time used (microseconds) %d
-===DONE===
diff --git a/ext/standard/tests/general_functions/intval_variation2.phpt b/ext/standard/tests/general_functions/intval_variation2.phpt
deleted file mode 100644
index 6a295308af..0000000000
--- a/ext/standard/tests/general_functions/intval_variation2.phpt
+++ /dev/null
@@ -1,199 +0,0 @@
---TEST--
-Test intval() function : usage variation
---SKIPIF--
-<?php if (PHP_INT_SIZE !== 4) die("skip this test is for 32-bit only");
---FILE--
-<?php
-/* Prototype : int intval(mixed var [, int base])
- * Description: Get the integer value of a variable using the optional base for the conversion
- * Source code: ext/standard/type.c
- * Alias to functions:
- */
-
-echo "*** Testing intval() : usage variation ***\n";
-
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-// Initialise function arguments not being substituted (if any)
-$var = 1;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// define some classes
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// add arrays
-$index_array = array (1, 2, 3);
-$assoc_array = array ('one' => 1, 'two' => 2);
-
-//array of values to iterate over
-$inputs = array(
-
- // float data
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float -12.3456789000e10' => -12.3456789000e10,
- 'float .5' => .5,
-
- // array data
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
-
- // null data
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
-
- // undefined data
- 'undefined var' => @$undefined_var,
-
- // unset data
- 'unset var' => @$unset_var,
-);
-
-// loop through each element of the array for base
-
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( intval($var, $value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing intval() : usage variation ***
-
---float 10.5--
-int(1)
-
---float -10.5--
-int(1)
-
---float 12.3456789000e10--
-Error: 2 - intval() expects parameter 2 to be int, float given, %s(%d)
-NULL
-
---float -12.3456789000e10--
-Error: 2 - intval() expects parameter 2 to be int, float given, %s(%d)
-NULL
-
---float .5--
-int(1)
-
---empty array--
-Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---int indexed array--
-Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---associative array--
-Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---nested arrays--
-Error: 2 - intval() expects parameter 2 to be int, array given, %s(%d)
-NULL
-
---uppercase NULL--
-int(1)
-
---lowercase null--
-int(1)
-
---lowercase true--
-int(1)
-
---lowercase false--
-int(1)
-
---uppercase TRUE--
-int(1)
-
---uppercase FALSE--
-int(1)
-
---empty string DQ--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---empty string SQ--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string DQ--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---string SQ--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---mixed case string--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---heredoc--
-Error: 2 - intval() expects parameter 2 to be int, string given, %s(%d)
-NULL
-
---instance of classWithToString--
-Error: 2 - intval() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---instance of classWithoutToString--
-Error: 2 - intval() expects parameter 2 to be int, object given, %s(%d)
-NULL
-
---undefined var--
-int(1)
-
---unset var--
-int(1)
-===DONE===
diff --git a/ext/standard/tests/general_functions/php_uname_variation1.phpt b/ext/standard/tests/general_functions/php_uname_variation1.phpt
deleted file mode 100644
index d5b86c7b5c..0000000000
--- a/ext/standard/tests/general_functions/php_uname_variation1.phpt
+++ /dev/null
@@ -1,112 +0,0 @@
---TEST--
-Test php_uname() function - usage variations
---FILE--
-<?php
-/* Prototype: string php_uname ([ string $mode ] )
- * Description: Returns information about the operating system PHP is running on
-*/
-
-echo "*** Testing php_uname() - usage variations\n";
-// Prevent notices about undefines variables
-error_reporting(E_ALL & ~E_NOTICE);
-
-$unset_var = 10;
-unset ($unset_var);
-
-class fooClass {
- function __toString() {
- return "m";
- }
-}
-
-$values = array(
-
- // int data
- "0" => 0,
- "1" => 1,
- "12345" => 12345,
- "-2345" => -2345,
-
- // float data
- "10.5" => 10.5,
- "-10.5" => -10.5,
- "10.1234567e10" => 10.1234567e10,
- "10.7654321E-10" => 10.7654321E-10,
- ".5" => .5,
-
- // null data
- "NULL" => NULL,
- "null" => null,
-
- // boolean data
- "true" => true,
- "false" => false,
- "TRUE" => TRUE,
- "FALSE" => FALSE,
-
- // empty data
- "\"\"" => "",
- "''" => '',
-
- // object data
- "new fooClass()" => new fooClass(),
-
- // undefined data
- "undefined var" => $undefined_var,
-
- // unset data
- "unset var" => $unset_var,
-);
-
-// loop through each element of the array for data
-
-foreach($values as $key => $value) {
- echo "-- Iterator $key --\n";
- var_dump( php_uname($value) );
-};
-
-?>
-===DONE===
---EXPECTF--
-*** Testing php_uname() - usage variations
--- Iterator 0 --
-string(%d) "%s"
--- Iterator 1 --
-string(%d) "%s"
--- Iterator 12345 --
-string(%d) "%s"
--- Iterator -2345 --
-string(%d) "%s"
--- Iterator 10.5 --
-string(%d) "%s"
--- Iterator -10.5 --
-string(%d) "%s"
--- Iterator 10.1234567e10 --
-string(%d) "%s"
--- Iterator 10.7654321E-10 --
-string(%d) "%s"
--- Iterator .5 --
-string(%d) "%s"
--- Iterator NULL --
-string(%d) "%s"
--- Iterator null --
-string(%d) "%s"
--- Iterator true --
-string(%d) "%s"
--- Iterator false --
-string(%d) "%s"
--- Iterator TRUE --
-string(%d) "%s"
--- Iterator FALSE --
-string(%d) "%s"
--- Iterator "" --
-string(%d) "%s"
--- Iterator '' --
-string(%d) "%s"
--- Iterator new fooClass() --
-string(%d) "%s"
--- Iterator undefined var --
-string(%d) "%s"
--- Iterator unset var --
-string(%d) "%s"
-===DONE===
diff --git a/ext/standard/tests/general_functions/proc_nice_variation3.phpt b/ext/standard/tests/general_functions/proc_nice_variation3.phpt
deleted file mode 100644
index c5626dd50f..0000000000
--- a/ext/standard/tests/general_functions/proc_nice_variation3.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function proc_nice() by substituting argument 1 with emptyUnsetUndefNull values.
---CREDITS--
-Italian PHP TestFest 2009 Cesena 19-20-21 june
-Fabio Fabbrucci (fabbrucci@grupporetina.com)
-Michele Orselli (mo@ideato.it)
-Simone Gentili (sensorario@gmail.com)
---SKIPIF--
-<?php
-if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
-?>
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n";
-
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
- 'unset var' => @$unset_var,
- 'undefined var' => @$undefined_var,
- 'empty string DQ' => "",
- 'empty string SQ' => '',
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(proc_nice( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with emptyUnsetUndefNull values ***
-bool(true)
-bool(true)
-
-Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-bool(true)
-bool(true)