diff options
author | Andrea Faulds <ajf@ajf.me> | 2014-12-14 18:20:23 +0000 |
---|---|---|
committer | Andrea Faulds <ajf@ajf.me> | 2014-12-21 13:23:02 +0000 |
commit | e5eb9530ab13a174feee83a81d87bfceee37bd88 (patch) | |
tree | 76ba0f9806f6ad369cacb9c0e9b408fc0a8ba721 /Zend | |
parent | e20cbdbe97cbda010fd386cb35a474aa255cd7f6 (diff) | |
download | php-git-e5eb9530ab13a174feee83a81d87bfceee37bd88.tar.gz |
Use "float" and "integer" in typehint and zpp errors
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/tests/bug33999.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/cast_to_double.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/compare_001.phpt | 12 | ||||
-rw-r--r-- | Zend/tests/compare_001_64bit.phpt | 12 | ||||
-rw-r--r-- | Zend/tests/compare_003.phpt | 12 | ||||
-rw-r--r-- | Zend/tests/compare_003_64bit.phpt | 12 | ||||
-rw-r--r-- | Zend/tests/compare_004.phpt | 12 | ||||
-rw-r--r-- | Zend/tests/compare_004_64bit.phpt | 12 | ||||
-rw-r--r-- | Zend/tests/compare_005.phpt | 12 | ||||
-rw-r--r-- | Zend/tests/compare_005_64bit.phpt | 12 | ||||
-rw-r--r-- | Zend/tests/compare_006.phpt | 12 | ||||
-rw-r--r-- | Zend/tests/compare_006_64bit.phpt | 12 | ||||
-rw-r--r-- | Zend/tests/objects_001.phpt | 4 | ||||
-rw-r--r-- | Zend/tests/settype_double.phpt | 2 | ||||
-rw-r--r-- | Zend/zend_API.c | 18 | ||||
-rw-r--r-- | Zend/zend_API.h | 4 | ||||
-rw-r--r-- | Zend/zend_object_handlers.c | 2 | ||||
-rw-r--r-- | Zend/zend_operators.c | 2 |
18 files changed, 78 insertions, 78 deletions
diff --git a/Zend/tests/bug33999.phpt b/Zend/tests/bug33999.phpt index 1946280712..7460815441 100644 --- a/Zend/tests/bug33999.phpt +++ b/Zend/tests/bug33999.phpt @@ -26,5 +26,5 @@ object(Foo)#1 (1) { Notice: Object of class Foo could not be converted to int in %sbug33999.php on line 9 int(1) -Notice: Object of class Foo could not be converted to double in %sbug33999.php on line 12 +Notice: Object of class Foo could not be converted to float in %sbug33999.php on line 12 float(1) diff --git a/Zend/tests/cast_to_double.phpt b/Zend/tests/cast_to_double.phpt index a5b9819b02..a1a1adc1dc 100644 --- a/Zend/tests/cast_to_double.phpt +++ b/Zend/tests/cast_to_double.phpt @@ -52,6 +52,6 @@ float(1) float(0) float(%d) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d float(1) Done diff --git a/Zend/tests/compare_001.phpt b/Zend/tests/compare_001.phpt index 1d42c637d6..51243da5df 100644 --- a/Zend/tests/compare_001.phpt +++ b/Zend/tests/compare_001.phpt @@ -118,13 +118,13 @@ float(2.5) != NULL float(2.5) == bool(true) float(2.5) != bool(false) float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d != object(stdClass)#1 (0) {} float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d != object(stdClass)#2 (0) {} float(2.5) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d != object(test)#3 (0) {} float(2.5) != array(0) {} float(2.5) != int(-2147483648) @@ -260,7 +260,7 @@ object(stdClass)#1 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d == int(1) object(stdClass)#1 (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d != float(2.5) object(stdClass)#1 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -285,7 +285,7 @@ object(stdClass)#2 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d == int(1) object(stdClass)#2 (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d != float(2.5) object(stdClass)#2 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -310,7 +310,7 @@ object(test)#3 (0) {} Notice: Object of class test could not be converted to int in %s on line %d == int(1) object(test)#3 (0) {} -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d != float(2.5) object(test)#3 (0) {} Notice: Object of class test could not be converted to int in %s on line %d diff --git a/Zend/tests/compare_001_64bit.phpt b/Zend/tests/compare_001_64bit.phpt index bc57d0fec9..6d5a175d3d 100644 --- a/Zend/tests/compare_001_64bit.phpt +++ b/Zend/tests/compare_001_64bit.phpt @@ -118,13 +118,13 @@ float(2.5) != NULL float(2.5) == bool(true) float(2.5) != bool(false) float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d != object(stdClass)#%d (0) {} float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d != object(stdClass)#%d (0) {} float(2.5) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d != object(test)#%d (0) {} float(2.5) != array(0) {} float(2.5) != int(-9223372036854775808) @@ -260,7 +260,7 @@ object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d == int(1) object(stdClass)#%d (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d != float(2.5) object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -285,7 +285,7 @@ object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d == int(1) object(stdClass)#%d (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d != float(2.5) object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -310,7 +310,7 @@ object(test)#%d (0) {} Notice: Object of class test could not be converted to int in %s on line %d == int(1) object(test)#%d (0) {} -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d != float(2.5) object(test)#%d (0) {} Notice: Object of class test could not be converted to int in %s on line %d diff --git a/Zend/tests/compare_003.phpt b/Zend/tests/compare_003.phpt index 9327ee58bc..3b293d1daa 100644 --- a/Zend/tests/compare_003.phpt +++ b/Zend/tests/compare_003.phpt @@ -118,13 +118,13 @@ float(2.5) > NULL float(2.5) <= bool(true) float(2.5) > bool(false) float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d > object(stdClass)#1 (0) {} float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d > object(stdClass)#2 (0) {} float(2.5) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d > object(test)#3 (0) {} float(2.5) <= array(0) {} float(2.5) > int(-2147483648) @@ -260,7 +260,7 @@ object(stdClass)#1 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d <= int(1) object(stdClass)#1 (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d <= float(2.5) object(stdClass)#1 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -285,7 +285,7 @@ object(stdClass)#2 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d <= int(1) object(stdClass)#2 (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d <= float(2.5) object(stdClass)#2 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -310,7 +310,7 @@ object(test)#3 (0) {} Notice: Object of class test could not be converted to int in %s on line %d <= int(1) object(test)#3 (0) {} -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d <= float(2.5) object(test)#3 (0) {} Notice: Object of class test could not be converted to int in %s on line %d diff --git a/Zend/tests/compare_003_64bit.phpt b/Zend/tests/compare_003_64bit.phpt index 1f936c6e37..eca4b5c8ff 100644 --- a/Zend/tests/compare_003_64bit.phpt +++ b/Zend/tests/compare_003_64bit.phpt @@ -118,13 +118,13 @@ float(2.5) > NULL float(2.5) <= bool(true) float(2.5) > bool(false) float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d > object(stdClass)#%d (0) {} float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d > object(stdClass)#%d (0) {} float(2.5) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d > object(test)#%d (0) {} float(2.5) <= array(0) {} float(2.5) > int(-9223372036854775808) @@ -260,7 +260,7 @@ object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d <= int(1) object(stdClass)#%d (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d <= float(2.5) object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -285,7 +285,7 @@ object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d <= int(1) object(stdClass)#%d (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d <= float(2.5) object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -310,7 +310,7 @@ object(test)#%d (0) {} Notice: Object of class test could not be converted to int in %s on line %d <= int(1) object(test)#%d (0) {} -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d <= float(2.5) object(test)#%d (0) {} Notice: Object of class test could not be converted to int in %s on line %d diff --git a/Zend/tests/compare_004.phpt b/Zend/tests/compare_004.phpt index 69131cd5cd..6f6d29b1fb 100644 --- a/Zend/tests/compare_004.phpt +++ b/Zend/tests/compare_004.phpt @@ -118,13 +118,13 @@ float(2.5) >= NULL float(2.5) >= bool(true) float(2.5) >= bool(false) float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d >= object(stdClass)#1 (0) {} float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d >= object(stdClass)#2 (0) {} float(2.5) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d >= object(test)#3 (0) {} float(2.5) < array(0) {} float(2.5) >= int(-2147483648) @@ -260,7 +260,7 @@ object(stdClass)#1 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d >= int(1) object(stdClass)#1 (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d < float(2.5) object(stdClass)#1 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -285,7 +285,7 @@ object(stdClass)#2 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d >= int(1) object(stdClass)#2 (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d < float(2.5) object(stdClass)#2 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -310,7 +310,7 @@ object(test)#3 (0) {} Notice: Object of class test could not be converted to int in %s on line %d >= int(1) object(test)#3 (0) {} -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d < float(2.5) object(test)#3 (0) {} Notice: Object of class test could not be converted to int in %s on line %d diff --git a/Zend/tests/compare_004_64bit.phpt b/Zend/tests/compare_004_64bit.phpt index 36bdaa78ee..ef5083943b 100644 --- a/Zend/tests/compare_004_64bit.phpt +++ b/Zend/tests/compare_004_64bit.phpt @@ -118,13 +118,13 @@ float(2.5) >= NULL float(2.5) >= bool(true) float(2.5) >= bool(false) float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d >= object(stdClass)#%d (0) {} float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d >= object(stdClass)#%d (0) {} float(2.5) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d >= object(test)#%d (0) {} float(2.5) < array(0) {} float(2.5) >= int(-9223372036854775808) @@ -260,7 +260,7 @@ object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d >= int(1) object(stdClass)#%d (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d < float(2.5) object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -285,7 +285,7 @@ object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d >= int(1) object(stdClass)#%d (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d < float(2.5) object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -310,7 +310,7 @@ object(test)#%d (0) {} Notice: Object of class test could not be converted to int in %s on line %d >= int(1) object(test)#%d (0) {} -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d < float(2.5) object(test)#%d (0) {} Notice: Object of class test could not be converted to int in %s on line %d diff --git a/Zend/tests/compare_005.phpt b/Zend/tests/compare_005.phpt index 4f5cd80b54..38f4200ef7 100644 --- a/Zend/tests/compare_005.phpt +++ b/Zend/tests/compare_005.phpt @@ -118,13 +118,13 @@ float(2.5) >= NULL float(2.5) >= bool(true) float(2.5) >= bool(false) float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d >= object(stdClass)#1 (0) {} float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d >= object(stdClass)#2 (0) {} float(2.5) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d >= object(test)#3 (0) {} float(2.5) < array(0) {} float(2.5) >= int(-2147483648) @@ -260,7 +260,7 @@ object(stdClass)#1 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d >= int(1) object(stdClass)#1 (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d < float(2.5) object(stdClass)#1 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -285,7 +285,7 @@ object(stdClass)#2 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d >= int(1) object(stdClass)#2 (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d < float(2.5) object(stdClass)#2 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -310,7 +310,7 @@ object(test)#3 (0) {} Notice: Object of class test could not be converted to int in %s on line %d >= int(1) object(test)#3 (0) {} -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d < float(2.5) object(test)#3 (0) {} Notice: Object of class test could not be converted to int in %s on line %d diff --git a/Zend/tests/compare_005_64bit.phpt b/Zend/tests/compare_005_64bit.phpt index 69492b3b24..86dcbe50f1 100644 --- a/Zend/tests/compare_005_64bit.phpt +++ b/Zend/tests/compare_005_64bit.phpt @@ -118,13 +118,13 @@ float(2.5) >= NULL float(2.5) >= bool(true) float(2.5) >= bool(false) float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d >= object(stdClass)#%d (0) {} float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d >= object(stdClass)#%d (0) {} float(2.5) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d >= object(test)#%d (0) {} float(2.5) < array(0) {} float(2.5) >= int(-9223372036854775808) @@ -260,7 +260,7 @@ object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d >= int(1) object(stdClass)#%d (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d < float(2.5) object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -285,7 +285,7 @@ object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d >= int(1) object(stdClass)#%d (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d < float(2.5) object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -310,7 +310,7 @@ object(test)#%d (0) {} Notice: Object of class test could not be converted to int in %s on line %d >= int(1) object(test)#%d (0) {} -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d < float(2.5) object(test)#%d (0) {} Notice: Object of class test could not be converted to int in %s on line %d diff --git a/Zend/tests/compare_006.phpt b/Zend/tests/compare_006.phpt index 743983b97f..43389fb250 100644 --- a/Zend/tests/compare_006.phpt +++ b/Zend/tests/compare_006.phpt @@ -118,13 +118,13 @@ float(2.5) > NULL float(2.5) <= bool(true) float(2.5) > bool(false) float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d > object(stdClass)#1 (0) {} float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d > object(stdClass)#2 (0) {} float(2.5) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d > object(test)#3 (0) {} float(2.5) <= array(0) {} float(2.5) > int(-2147483648) @@ -260,7 +260,7 @@ object(stdClass)#1 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d <= int(1) object(stdClass)#1 (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d <= float(2.5) object(stdClass)#1 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -285,7 +285,7 @@ object(stdClass)#2 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d <= int(1) object(stdClass)#2 (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d <= float(2.5) object(stdClass)#2 (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -310,7 +310,7 @@ object(test)#3 (0) {} Notice: Object of class test could not be converted to int in %s on line %d <= int(1) object(test)#3 (0) {} -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d <= float(2.5) object(test)#3 (0) {} Notice: Object of class test could not be converted to int in %s on line %d diff --git a/Zend/tests/compare_006_64bit.phpt b/Zend/tests/compare_006_64bit.phpt index 56aad8d4b7..3870e189f0 100644 --- a/Zend/tests/compare_006_64bit.phpt +++ b/Zend/tests/compare_006_64bit.phpt @@ -118,13 +118,13 @@ float(2.5) > NULL float(2.5) <= bool(true) float(2.5) > bool(false) float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d > object(stdClass)#%d (0) {} float(2.5) -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d > object(stdClass)#%d (0) {} float(2.5) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d > object(test)#%d (0) {} float(2.5) <= array(0) {} float(2.5) > int(-9223372036854775808) @@ -260,7 +260,7 @@ object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d <= int(1) object(stdClass)#%d (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d <= float(2.5) object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -285,7 +285,7 @@ object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d <= int(1) object(stdClass)#%d (0) {} -Notice: Object of class stdClass could not be converted to double in %s on line %d +Notice: Object of class stdClass could not be converted to float in %s on line %d <= float(2.5) object(stdClass)#%d (0) {} Notice: Object of class stdClass could not be converted to int in %s on line %d @@ -310,7 +310,7 @@ object(test)#%d (0) {} Notice: Object of class test could not be converted to int in %s on line %d <= int(1) object(test)#%d (0) {} -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d <= float(2.5) object(test)#%d (0) {} Notice: Object of class test could not be converted to int in %s on line %d diff --git a/Zend/tests/objects_001.phpt b/Zend/tests/objects_001.phpt index 5cdc3dded0..fa1f171a28 100644 --- a/Zend/tests/objects_001.phpt +++ b/Zend/tests/objects_001.phpt @@ -49,10 +49,10 @@ bool(true) Notice: Object of class Bar could not be converted to int in %s on line %d bool(false) -Notice: Object of class Bar could not be converted to double in %s on line %d +Notice: Object of class Bar could not be converted to float in %s on line %d bool(true) -Notice: Object of class Bar could not be converted to double in %s on line %d +Notice: Object of class Bar could not be converted to float in %s on line %d bool(false) Notice: Object of class Bar could not be converted to int in %s on line %d diff --git a/Zend/tests/settype_double.phpt b/Zend/tests/settype_double.phpt index ed63f8ae83..7f1deccc8f 100644 --- a/Zend/tests/settype_double.phpt +++ b/Zend/tests/settype_double.phpt @@ -52,6 +52,6 @@ float(1) float(0) float(%d) -Notice: Object of class test could not be converted to double in %s on line %d +Notice: Object of class test could not be converted to float in %s on line %d float(1) Done diff --git a/Zend/zend_API.c b/Zend/zend_API.c index f62fab1b87..f6fcd356f5 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -168,7 +168,7 @@ ZEND_API char *zend_get_type_by_const(int type) /* {{{ */ case IS_LONG: return "integer"; case IS_DOUBLE: - return "double"; + return "float"; case IS_STRING: return "string"; case IS_OBJECT: @@ -400,16 +400,16 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons int type; if ((type = is_numeric_string(Z_STRVAL_P(arg), Z_STRLEN_P(arg), p, &d, -1)) == 0) { - return "long"; + return "integer"; } else if (type == IS_DOUBLE) { if (zend_isnan(d)) { - return "long"; + return "integer"; } if (!ZEND_DOUBLE_FITS_LONG(d)) { if (c == 'L') { *p = (d > 0) ? ZEND_LONG_MAX : ZEND_LONG_MIN; } else { - return "long"; + return "integer"; } break; } @@ -421,13 +421,13 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons case IS_DOUBLE: if (zend_isnan(Z_DVAL_P(arg))) { - return "long"; + return "integer"; } if (!ZEND_DOUBLE_FITS_LONG(Z_DVAL_P(arg))) { if (c == 'L') { *p = (Z_DVAL_P(arg) > 0) ? ZEND_LONG_MAX : ZEND_LONG_MIN; } else { - return "long"; + return "integer"; } break; } @@ -443,7 +443,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons case IS_OBJECT: case IS_RESOURCE: default: - return "long"; + return "integer"; } } break; @@ -464,7 +464,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons int type; if ((type = is_numeric_string(Z_STRVAL_P(arg), Z_STRLEN_P(arg), &l, p, -1)) == 0) { - return "double"; + return "float"; } else if (type == IS_LONG) { *p = (double) l; } @@ -484,7 +484,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons case IS_OBJECT: case IS_RESOURCE: default: - return "double"; + return "float"; } } break; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 9442724ec1..9b3e3f39fc 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -676,7 +676,7 @@ END_EXTERN_C() #ifdef FAST_ZPP #define Z_EXPECTED_TYPES(_) \ - _(Z_EXPECTED_LONG, "long") \ + _(Z_EXPECTED_LONG, "integer") \ _(Z_EXPECTED_BOOL, "boolean") \ _(Z_EXPECTED_STRING, "string") \ _(Z_EXPECTED_ARRAY, "array") \ @@ -684,7 +684,7 @@ END_EXTERN_C() _(Z_EXPECTED_RESOURCE, "resource") \ _(Z_EXPECTED_PATH, "a valid path") \ _(Z_EXPECTED_OBJECT, "object") \ - _(Z_EXPECTED_DOUBLE, "double") + _(Z_EXPECTED_DOUBLE, "float") #define Z_EXPECTED_TYPE_ENUM(id, str) id, #define Z_EXPECTED_TYPE_STR(id, str) str, diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index d18ee1c8ee..a0f3bfc45b 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1488,7 +1488,7 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty return SUCCESS; case IS_DOUBLE: ce = Z_OBJCE_P(readobj); - zend_error(E_NOTICE, "Object of class %s could not be converted to double", ce->name->val); + zend_error(E_NOTICE, "Object of class %s could not be converted to float", ce->name->val); if (readobj == writeobj) { zval_dtor(readobj); } diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 70de104975..23f3ddcf7f 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -353,7 +353,7 @@ ZEND_API void convert_to_double(zval *op) /* {{{ */ if (Z_TYPE(dst) == IS_DOUBLE) { ZVAL_COPY_VALUE(op, &dst); } else { - zend_error(E_NOTICE, "Object of class %s could not be converted to double", Z_OBJCE_P(op)->name->val); + zend_error(E_NOTICE, "Object of class %s could not be converted to float", Z_OBJCE_P(op)->name->val); ZVAL_DOUBLE(op, 1.0); } |