Skip to content

Commit e5eb953

Browse files
Use "float" and "integer" in typehint and zpp errors
1 parent e20cbdb commit e5eb953

File tree

697 files changed

+3369
-3367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

697 files changed

+3369
-3367
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
. Added ?? operator. (Andrea)
3333
. Added \u{xxxxx} Unicode Codepoint Escape Syntax. (Andrea)
3434
. Fixed oversight where define() did not support arrays yet const syntax did. (Andrea, Dmitry)
35+
. Use "integer" and "float" instead of "long" and "double" in ZPP, type hint and conversion error messages. (Andrea)
3536

3637
- Date:
3738
. Fixed day_of_week function as it could sometimes return negative values

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,4 @@ PHP X.Y UPGRADE NOTES
157157
always be zero when casted to integer.
158158
. Calling a method on a non-object no longer raises a fatal error; see
159159
also: https://wiki.php.net/rfc/catchable-call-to-member-of-non-object.
160+
. Error messages for zend_parse_parameters, type hints and conversions now always say "integer" and "float" instead of "long" and "double".

Zend/tests/bug33999.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ object(Foo)#1 (1) {
2626
Notice: Object of class Foo could not be converted to int in %sbug33999.php on line 9
2727
int(1)
2828

29-
Notice: Object of class Foo could not be converted to double in %sbug33999.php on line 12
29+
Notice: Object of class Foo could not be converted to float in %sbug33999.php on line 12
3030
float(1)

Zend/tests/cast_to_double.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ float(1)
5252
float(0)
5353
float(%d)
5454

55-
Notice: Object of class test could not be converted to double in %s on line %d
55+
Notice: Object of class test could not be converted to float in %s on line %d
5656
float(1)
5757
Done

Zend/tests/compare_001.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ float(2.5) != NULL
118118
float(2.5) == bool(true)
119119
float(2.5) != bool(false)
120120
float(2.5)
121-
Notice: Object of class stdClass could not be converted to double in %s on line %d
121+
Notice: Object of class stdClass could not be converted to float in %s on line %d
122122
!= object(stdClass)#1 (0) {}
123123
float(2.5)
124-
Notice: Object of class stdClass could not be converted to double in %s on line %d
124+
Notice: Object of class stdClass could not be converted to float in %s on line %d
125125
!= object(stdClass)#2 (0) {}
126126
float(2.5)
127-
Notice: Object of class test could not be converted to double in %s on line %d
127+
Notice: Object of class test could not be converted to float in %s on line %d
128128
!= object(test)#3 (0) {}
129129
float(2.5) != array(0) {}
130130
float(2.5) != int(-2147483648)
@@ -260,7 +260,7 @@ object(stdClass)#1 (0) {}
260260
Notice: Object of class stdClass could not be converted to int in %s on line %d
261261
== int(1)
262262
object(stdClass)#1 (0) {}
263-
Notice: Object of class stdClass could not be converted to double in %s on line %d
263+
Notice: Object of class stdClass could not be converted to float in %s on line %d
264264
!= float(2.5)
265265
object(stdClass)#1 (0) {}
266266
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -285,7 +285,7 @@ object(stdClass)#2 (0) {}
285285
Notice: Object of class stdClass could not be converted to int in %s on line %d
286286
== int(1)
287287
object(stdClass)#2 (0) {}
288-
Notice: Object of class stdClass could not be converted to double in %s on line %d
288+
Notice: Object of class stdClass could not be converted to float in %s on line %d
289289
!= float(2.5)
290290
object(stdClass)#2 (0) {}
291291
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -310,7 +310,7 @@ object(test)#3 (0) {}
310310
Notice: Object of class test could not be converted to int in %s on line %d
311311
== int(1)
312312
object(test)#3 (0) {}
313-
Notice: Object of class test could not be converted to double in %s on line %d
313+
Notice: Object of class test could not be converted to float in %s on line %d
314314
!= float(2.5)
315315
object(test)#3 (0) {}
316316
Notice: Object of class test could not be converted to int in %s on line %d

Zend/tests/compare_001_64bit.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ float(2.5) != NULL
118118
float(2.5) == bool(true)
119119
float(2.5) != bool(false)
120120
float(2.5)
121-
Notice: Object of class stdClass could not be converted to double in %s on line %d
121+
Notice: Object of class stdClass could not be converted to float in %s on line %d
122122
!= object(stdClass)#%d (0) {}
123123
float(2.5)
124-
Notice: Object of class stdClass could not be converted to double in %s on line %d
124+
Notice: Object of class stdClass could not be converted to float in %s on line %d
125125
!= object(stdClass)#%d (0) {}
126126
float(2.5)
127-
Notice: Object of class test could not be converted to double in %s on line %d
127+
Notice: Object of class test could not be converted to float in %s on line %d
128128
!= object(test)#%d (0) {}
129129
float(2.5) != array(0) {}
130130
float(2.5) != int(-9223372036854775808)
@@ -260,7 +260,7 @@ object(stdClass)#%d (0) {}
260260
Notice: Object of class stdClass could not be converted to int in %s on line %d
261261
== int(1)
262262
object(stdClass)#%d (0) {}
263-
Notice: Object of class stdClass could not be converted to double in %s on line %d
263+
Notice: Object of class stdClass could not be converted to float in %s on line %d
264264
!= float(2.5)
265265
object(stdClass)#%d (0) {}
266266
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -285,7 +285,7 @@ object(stdClass)#%d (0) {}
285285
Notice: Object of class stdClass could not be converted to int in %s on line %d
286286
== int(1)
287287
object(stdClass)#%d (0) {}
288-
Notice: Object of class stdClass could not be converted to double in %s on line %d
288+
Notice: Object of class stdClass could not be converted to float in %s on line %d
289289
!= float(2.5)
290290
object(stdClass)#%d (0) {}
291291
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -310,7 +310,7 @@ object(test)#%d (0) {}
310310
Notice: Object of class test could not be converted to int in %s on line %d
311311
== int(1)
312312
object(test)#%d (0) {}
313-
Notice: Object of class test could not be converted to double in %s on line %d
313+
Notice: Object of class test could not be converted to float in %s on line %d
314314
!= float(2.5)
315315
object(test)#%d (0) {}
316316
Notice: Object of class test could not be converted to int in %s on line %d

Zend/tests/compare_003.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ float(2.5) > NULL
118118
float(2.5) <= bool(true)
119119
float(2.5) > bool(false)
120120
float(2.5)
121-
Notice: Object of class stdClass could not be converted to double in %s on line %d
121+
Notice: Object of class stdClass could not be converted to float in %s on line %d
122122
> object(stdClass)#1 (0) {}
123123
float(2.5)
124-
Notice: Object of class stdClass could not be converted to double in %s on line %d
124+
Notice: Object of class stdClass could not be converted to float in %s on line %d
125125
> object(stdClass)#2 (0) {}
126126
float(2.5)
127-
Notice: Object of class test could not be converted to double in %s on line %d
127+
Notice: Object of class test could not be converted to float in %s on line %d
128128
> object(test)#3 (0) {}
129129
float(2.5) <= array(0) {}
130130
float(2.5) > int(-2147483648)
@@ -260,7 +260,7 @@ object(stdClass)#1 (0) {}
260260
Notice: Object of class stdClass could not be converted to int in %s on line %d
261261
<= int(1)
262262
object(stdClass)#1 (0) {}
263-
Notice: Object of class stdClass could not be converted to double in %s on line %d
263+
Notice: Object of class stdClass could not be converted to float in %s on line %d
264264
<= float(2.5)
265265
object(stdClass)#1 (0) {}
266266
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -285,7 +285,7 @@ object(stdClass)#2 (0) {}
285285
Notice: Object of class stdClass could not be converted to int in %s on line %d
286286
<= int(1)
287287
object(stdClass)#2 (0) {}
288-
Notice: Object of class stdClass could not be converted to double in %s on line %d
288+
Notice: Object of class stdClass could not be converted to float in %s on line %d
289289
<= float(2.5)
290290
object(stdClass)#2 (0) {}
291291
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -310,7 +310,7 @@ object(test)#3 (0) {}
310310
Notice: Object of class test could not be converted to int in %s on line %d
311311
<= int(1)
312312
object(test)#3 (0) {}
313-
Notice: Object of class test could not be converted to double in %s on line %d
313+
Notice: Object of class test could not be converted to float in %s on line %d
314314
<= float(2.5)
315315
object(test)#3 (0) {}
316316
Notice: Object of class test could not be converted to int in %s on line %d

Zend/tests/compare_003_64bit.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ float(2.5) > NULL
118118
float(2.5) <= bool(true)
119119
float(2.5) > bool(false)
120120
float(2.5)
121-
Notice: Object of class stdClass could not be converted to double in %s on line %d
121+
Notice: Object of class stdClass could not be converted to float in %s on line %d
122122
> object(stdClass)#%d (0) {}
123123
float(2.5)
124-
Notice: Object of class stdClass could not be converted to double in %s on line %d
124+
Notice: Object of class stdClass could not be converted to float in %s on line %d
125125
> object(stdClass)#%d (0) {}
126126
float(2.5)
127-
Notice: Object of class test could not be converted to double in %s on line %d
127+
Notice: Object of class test could not be converted to float in %s on line %d
128128
> object(test)#%d (0) {}
129129
float(2.5) <= array(0) {}
130130
float(2.5) > int(-9223372036854775808)
@@ -260,7 +260,7 @@ object(stdClass)#%d (0) {}
260260
Notice: Object of class stdClass could not be converted to int in %s on line %d
261261
<= int(1)
262262
object(stdClass)#%d (0) {}
263-
Notice: Object of class stdClass could not be converted to double in %s on line %d
263+
Notice: Object of class stdClass could not be converted to float in %s on line %d
264264
<= float(2.5)
265265
object(stdClass)#%d (0) {}
266266
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -285,7 +285,7 @@ object(stdClass)#%d (0) {}
285285
Notice: Object of class stdClass could not be converted to int in %s on line %d
286286
<= int(1)
287287
object(stdClass)#%d (0) {}
288-
Notice: Object of class stdClass could not be converted to double in %s on line %d
288+
Notice: Object of class stdClass could not be converted to float in %s on line %d
289289
<= float(2.5)
290290
object(stdClass)#%d (0) {}
291291
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -310,7 +310,7 @@ object(test)#%d (0) {}
310310
Notice: Object of class test could not be converted to int in %s on line %d
311311
<= int(1)
312312
object(test)#%d (0) {}
313-
Notice: Object of class test could not be converted to double in %s on line %d
313+
Notice: Object of class test could not be converted to float in %s on line %d
314314
<= float(2.5)
315315
object(test)#%d (0) {}
316316
Notice: Object of class test could not be converted to int in %s on line %d

Zend/tests/compare_004.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ float(2.5) >= NULL
118118
float(2.5) >= bool(true)
119119
float(2.5) >= bool(false)
120120
float(2.5)
121-
Notice: Object of class stdClass could not be converted to double in %s on line %d
121+
Notice: Object of class stdClass could not be converted to float in %s on line %d
122122
>= object(stdClass)#1 (0) {}
123123
float(2.5)
124-
Notice: Object of class stdClass could not be converted to double in %s on line %d
124+
Notice: Object of class stdClass could not be converted to float in %s on line %d
125125
>= object(stdClass)#2 (0) {}
126126
float(2.5)
127-
Notice: Object of class test could not be converted to double in %s on line %d
127+
Notice: Object of class test could not be converted to float in %s on line %d
128128
>= object(test)#3 (0) {}
129129
float(2.5) < array(0) {}
130130
float(2.5) >= int(-2147483648)
@@ -260,7 +260,7 @@ object(stdClass)#1 (0) {}
260260
Notice: Object of class stdClass could not be converted to int in %s on line %d
261261
>= int(1)
262262
object(stdClass)#1 (0) {}
263-
Notice: Object of class stdClass could not be converted to double in %s on line %d
263+
Notice: Object of class stdClass could not be converted to float in %s on line %d
264264
< float(2.5)
265265
object(stdClass)#1 (0) {}
266266
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -285,7 +285,7 @@ object(stdClass)#2 (0) {}
285285
Notice: Object of class stdClass could not be converted to int in %s on line %d
286286
>= int(1)
287287
object(stdClass)#2 (0) {}
288-
Notice: Object of class stdClass could not be converted to double in %s on line %d
288+
Notice: Object of class stdClass could not be converted to float in %s on line %d
289289
< float(2.5)
290290
object(stdClass)#2 (0) {}
291291
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -310,7 +310,7 @@ object(test)#3 (0) {}
310310
Notice: Object of class test could not be converted to int in %s on line %d
311311
>= int(1)
312312
object(test)#3 (0) {}
313-
Notice: Object of class test could not be converted to double in %s on line %d
313+
Notice: Object of class test could not be converted to float in %s on line %d
314314
< float(2.5)
315315
object(test)#3 (0) {}
316316
Notice: Object of class test could not be converted to int in %s on line %d

Zend/tests/compare_004_64bit.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ float(2.5) >= NULL
118118
float(2.5) >= bool(true)
119119
float(2.5) >= bool(false)
120120
float(2.5)
121-
Notice: Object of class stdClass could not be converted to double in %s on line %d
121+
Notice: Object of class stdClass could not be converted to float in %s on line %d
122122
>= object(stdClass)#%d (0) {}
123123
float(2.5)
124-
Notice: Object of class stdClass could not be converted to double in %s on line %d
124+
Notice: Object of class stdClass could not be converted to float in %s on line %d
125125
>= object(stdClass)#%d (0) {}
126126
float(2.5)
127-
Notice: Object of class test could not be converted to double in %s on line %d
127+
Notice: Object of class test could not be converted to float in %s on line %d
128128
>= object(test)#%d (0) {}
129129
float(2.5) < array(0) {}
130130
float(2.5) >= int(-9223372036854775808)
@@ -260,7 +260,7 @@ object(stdClass)#%d (0) {}
260260
Notice: Object of class stdClass could not be converted to int in %s on line %d
261261
>= int(1)
262262
object(stdClass)#%d (0) {}
263-
Notice: Object of class stdClass could not be converted to double in %s on line %d
263+
Notice: Object of class stdClass could not be converted to float in %s on line %d
264264
< float(2.5)
265265
object(stdClass)#%d (0) {}
266266
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -285,7 +285,7 @@ object(stdClass)#%d (0) {}
285285
Notice: Object of class stdClass could not be converted to int in %s on line %d
286286
>= int(1)
287287
object(stdClass)#%d (0) {}
288-
Notice: Object of class stdClass could not be converted to double in %s on line %d
288+
Notice: Object of class stdClass could not be converted to float in %s on line %d
289289
< float(2.5)
290290
object(stdClass)#%d (0) {}
291291
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -310,7 +310,7 @@ object(test)#%d (0) {}
310310
Notice: Object of class test could not be converted to int in %s on line %d
311311
>= int(1)
312312
object(test)#%d (0) {}
313-
Notice: Object of class test could not be converted to double in %s on line %d
313+
Notice: Object of class test could not be converted to float in %s on line %d
314314
< float(2.5)
315315
object(test)#%d (0) {}
316316
Notice: Object of class test could not be converted to int in %s on line %d

Zend/tests/compare_005.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ float(2.5) >= NULL
118118
float(2.5) >= bool(true)
119119
float(2.5) >= bool(false)
120120
float(2.5)
121-
Notice: Object of class stdClass could not be converted to double in %s on line %d
121+
Notice: Object of class stdClass could not be converted to float in %s on line %d
122122
>= object(stdClass)#1 (0) {}
123123
float(2.5)
124-
Notice: Object of class stdClass could not be converted to double in %s on line %d
124+
Notice: Object of class stdClass could not be converted to float in %s on line %d
125125
>= object(stdClass)#2 (0) {}
126126
float(2.5)
127-
Notice: Object of class test could not be converted to double in %s on line %d
127+
Notice: Object of class test could not be converted to float in %s on line %d
128128
>= object(test)#3 (0) {}
129129
float(2.5) < array(0) {}
130130
float(2.5) >= int(-2147483648)
@@ -260,7 +260,7 @@ object(stdClass)#1 (0) {}
260260
Notice: Object of class stdClass could not be converted to int in %s on line %d
261261
>= int(1)
262262
object(stdClass)#1 (0) {}
263-
Notice: Object of class stdClass could not be converted to double in %s on line %d
263+
Notice: Object of class stdClass could not be converted to float in %s on line %d
264264
< float(2.5)
265265
object(stdClass)#1 (0) {}
266266
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -285,7 +285,7 @@ object(stdClass)#2 (0) {}
285285
Notice: Object of class stdClass could not be converted to int in %s on line %d
286286
>= int(1)
287287
object(stdClass)#2 (0) {}
288-
Notice: Object of class stdClass could not be converted to double in %s on line %d
288+
Notice: Object of class stdClass could not be converted to float in %s on line %d
289289
< float(2.5)
290290
object(stdClass)#2 (0) {}
291291
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -310,7 +310,7 @@ object(test)#3 (0) {}
310310
Notice: Object of class test could not be converted to int in %s on line %d
311311
>= int(1)
312312
object(test)#3 (0) {}
313-
Notice: Object of class test could not be converted to double in %s on line %d
313+
Notice: Object of class test could not be converted to float in %s on line %d
314314
< float(2.5)
315315
object(test)#3 (0) {}
316316
Notice: Object of class test could not be converted to int in %s on line %d

Zend/tests/compare_005_64bit.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ float(2.5) >= NULL
118118
float(2.5) >= bool(true)
119119
float(2.5) >= bool(false)
120120
float(2.5)
121-
Notice: Object of class stdClass could not be converted to double in %s on line %d
121+
Notice: Object of class stdClass could not be converted to float in %s on line %d
122122
>= object(stdClass)#%d (0) {}
123123
float(2.5)
124-
Notice: Object of class stdClass could not be converted to double in %s on line %d
124+
Notice: Object of class stdClass could not be converted to float in %s on line %d
125125
>= object(stdClass)#%d (0) {}
126126
float(2.5)
127-
Notice: Object of class test could not be converted to double in %s on line %d
127+
Notice: Object of class test could not be converted to float in %s on line %d
128128
>= object(test)#%d (0) {}
129129
float(2.5) < array(0) {}
130130
float(2.5) >= int(-9223372036854775808)
@@ -260,7 +260,7 @@ object(stdClass)#%d (0) {}
260260
Notice: Object of class stdClass could not be converted to int in %s on line %d
261261
>= int(1)
262262
object(stdClass)#%d (0) {}
263-
Notice: Object of class stdClass could not be converted to double in %s on line %d
263+
Notice: Object of class stdClass could not be converted to float in %s on line %d
264264
< float(2.5)
265265
object(stdClass)#%d (0) {}
266266
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -285,7 +285,7 @@ object(stdClass)#%d (0) {}
285285
Notice: Object of class stdClass could not be converted to int in %s on line %d
286286
>= int(1)
287287
object(stdClass)#%d (0) {}
288-
Notice: Object of class stdClass could not be converted to double in %s on line %d
288+
Notice: Object of class stdClass could not be converted to float in %s on line %d
289289
< float(2.5)
290290
object(stdClass)#%d (0) {}
291291
Notice: Object of class stdClass could not be converted to int in %s on line %d
@@ -310,7 +310,7 @@ object(test)#%d (0) {}
310310
Notice: Object of class test could not be converted to int in %s on line %d
311311
>= int(1)
312312
object(test)#%d (0) {}
313-
Notice: Object of class test could not be converted to double in %s on line %d
313+
Notice: Object of class test could not be converted to float in %s on line %d
314314
< float(2.5)
315315
object(test)#%d (0) {}
316316
Notice: Object of class test could not be converted to int in %s on line %d

0 commit comments

Comments
 (0)