string(3) "bat"
}
-Notice: Object of class Foo could not be converted to int in %sbug33999.php on line 9
+Warning: Object of class Foo could not be converted to int in %s on line %d
int(1)
-Notice: Object of class Foo could not be converted to float in %sbug33999.php on line 12
+Warning: Object of class Foo could not be converted to float in %s on line %d
float(1)
float(0)
float(%f)
-Notice: Object of class test could not be converted to float in %s on line %d
+Warning: Object of class test could not be converted to float in %s on line %d
float(1)
Done
int(0)
int(%d)
-Notice: Object of class test could not be converted to int in %s on line %d
+Warning: Object of class test could not be converted to int in %s on line %d
int(1)
Done
string(1) "S"
Cannot access offset of type resource on string
-Notice: Object of class stdClass could not be converted to int in %s on line %d
+Warning: Object of class stdClass could not be converted to int in %s on line %d
Cannot access offset of type stdClass on string
Cannot access offset of type array on string
Done
float(0)
float(%f)
-Notice: Object of class test could not be converted to float in %s on line %d
+Warning: Object of class test could not be converted to float in %s on line %d
float(1)
Done
int(0)
int(%d)
-Notice: Object of class test could not be converted to int in %s on line %d
+Warning: Object of class test could not be converted to int in %s on line %d
int(1)
Done
#define convert_object_to_type(op, dst, ctype) \
ZVAL_UNDEF(dst); \
if (Z_OBJ_HT_P(op)->cast_object(Z_OBJ_P(op), dst, ctype) == FAILURE) { \
- zend_error(E_NOTICE, \
+ zend_error(E_WARNING, \
"Object of class %s could not be converted to %s", ZSTR_VAL(Z_OBJCE_P(op)->name),\
zend_get_type_by_const(ctype)); \
} \
!! [TypeError] imageaffinematrixget(): Argument #1 ($type) must be of type array when using translate or scale
!! [TypeError] imageaffinematrixget(): Argument #1 ($type) must be of type array when using translate or scale
-Notice: Object of class stdClass could not be converted to float in %s on line %d
+Warning: Object of class stdClass could not be converted to float in %s on line %d
array(6) {
[0]=>
float(%f)
float(0)
}
-Notice: Object of class stdClass could not be converted to float in %s on line %d
+Warning: Object of class stdClass could not be converted to float in %s on line %d
array(6) {
[0]=>
float(1)
float(0)
}
-Notice: Object of class stdClass could not be converted to float in %s on line %d
+Warning: Object of class stdClass could not be converted to float in %s on line %d
array(6) {
[0]=>
float(1)
echo "*** Test substituting argument 1 with object values ***\n";
-
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-
-
class classWithToString
{
public function __toString() {
?>
--EXPECTF--
*** Test substituting argument 1 with object values ***
-Error: 8 - Object of class classWithToString could not be converted to int, %s(%d)
+
+Warning: Object of class classWithToString could not be converted to int in %s on line %d
bool(false)
-Error: 8 - Object of class classWithoutToString could not be converted to int, %s(%d)
+
+Warning: Object of class classWithoutToString could not be converted to int in %s on line %d
bool(false)
int(0)
Count returns an object:
-Notice: Object of class returnObject could not be converted to int in %s on line 40
+Warning: Object of class returnObject could not be converted to int in %s on line %d
int(1)
Count returns an array:
int(1)
--EXPECTF--
*** Testing array_multisort() : usage variation - test sort order of all types***
-Notice: Object of class classWithToString could not be converted to float in %sarray_multisort_variation9.php on line %d
+Warning: Object of class classWithToString could not be converted to float in %s on line %d
-Notice: Object of class classWithToString could not be converted to float in %sarray_multisort_variation9.php on line %d
+Warning: Object of class classWithToString could not be converted to float in %s on line %d
-Notice: Object of class classWithoutToString could not be converted to float in %sarray_multisort_variation9.php on line %d
+Warning: Object of class classWithoutToString could not be converted to float in %s on line %d
-Notice: Object of class classWithoutToString could not be converted to float in %sarray_multisort_variation9.php on line %d
+Warning: Object of class classWithoutToString could not be converted to float in %s on line %d
bool(true)
array(10) {
["float -10.5"]=>
int(%d)
string(7) "integer"
-- Iteration 14 --
-8: Object of class point could not be converted to int
+2: Object of class point could not be converted to int
bool(true)
int(1)
string(7) "integer"
int(%d)
string(7) "integer"
-- Iteration 14 --
-8: Object of class point could not be converted to int
+2: Object of class point could not be converted to int
bool(true)
int(1)
string(7) "integer"
float(%f)
string(6) "double"
-- Iteration 14 --
-8: Object of class point could not be converted to float
+2: Object of class point could not be converted to float
bool(true)
float(1)
string(6) "double"
float(%f)
string(6) "double"
-- Iteration 14 --
-8: Object of class point could not be converted to float
+2: Object of class point could not be converted to float
bool(true)
float(1)
string(6) "double"
string(7) "integer"
-- Iteration 76 --
string(6) "object"
-8: Object of class point could not be converted to int
+2: Object of class point could not be converted to int
bool(true)
int(1)
string(7) "integer"
-- Iteration 77 --
string(6) "object"
-8: Object of class point could not be converted to int
+2: Object of class point could not be converted to int
bool(true)
int(1)
string(7) "integer"
-- Iteration 78 --
string(6) "object"
-8: Object of class point could not be converted to int
+2: Object of class point could not be converted to int
bool(true)
int(1)
string(7) "integer"
string(7) "integer"
-- Iteration 76 --
string(6) "object"
-8: Object of class point could not be converted to int
+2: Object of class point could not be converted to int
bool(true)
int(1)
string(7) "integer"
-- Iteration 77 --
string(6) "object"
-8: Object of class point could not be converted to int
+2: Object of class point could not be converted to int
bool(true)
int(1)
string(7) "integer"
-- Iteration 78 --
string(6) "object"
-8: Object of class point could not be converted to int
+2: Object of class point could not be converted to int
bool(true)
int(1)
string(7) "integer"
string(6) "double"
-- Iteration 76 --
string(6) "object"
-8: Object of class point could not be converted to float
+2: Object of class point could not be converted to float
bool(true)
float(1)
string(6) "double"
-- Iteration 77 --
string(6) "object"
-8: Object of class point could not be converted to float
+2: Object of class point could not be converted to float
bool(true)
float(1)
string(6) "double"
-- Iteration 78 --
string(6) "object"
-8: Object of class point could not be converted to float
+2: Object of class point could not be converted to float
bool(true)
float(1)
string(6) "double"
string(6) "double"
-- Iteration 76 --
string(6) "object"
-8: Object of class point could not be converted to float
+2: Object of class point could not be converted to float
bool(true)
float(1)
string(6) "double"
-- Iteration 77 --
string(6) "object"
-8: Object of class point could not be converted to float
+2: Object of class point could not be converted to float
bool(true)
float(1)
string(6) "double"
-- Iteration 78 --
string(6) "object"
-8: Object of class point could not be converted to float
+2: Object of class point could not be converted to float
bool(true)
float(1)
string(6) "double"
<?php
echo "*** Testing intval() : usage variation ***\n";
-// Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum) {
- if (error_reporting() & $err_no) {
- // 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)
$base = 10;
int(0)
--instance of classWithToString--
-Error: 8 - Object of class classWithToString could not be converted to int, %s(%d)
+
+Warning: Object of class classWithToString could not be converted to int in %s on line %d
int(1)
--instance of classWithoutToString--
-Error: 8 - Object of class classWithoutToString could not be converted to int, %s(%d)
+
+Warning: Object of class classWithoutToString could not be converted to int in %s on line %d
int(1)
--undefined var--
Arg value Some Ascii Data
-Notice: Object of class aClass could not be converted to int in %s on line %d
+Warning: Object of class aClass could not be converted to int in %s on line %d
bool(true)
Arg value Resource id %s