Skip to content

Commit 31a626c

Browse files
committed
Remove the deprecated is_real() function
Closes GH-5506
1 parent 1d20443 commit 31a626c

File tree

4 files changed

+14
-162
lines changed

4 files changed

+14
-162
lines changed

ext/standard/basic_functions.stub.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,13 +1438,6 @@ function is_float($value): bool {}
14381438
*/
14391439
function is_double($value): bool {}
14401440

1441-
/**
1442-
* @param mixed $value
1443-
* @alias is_float
1444-
* @deprecated
1445-
*/
1446-
function is_real($value): bool {}
1447-
14481441
/** @param mixed $value */
14491442
function is_numeric($value): bool {}
14501443

ext/standard/basic_functions_arginfo.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,8 +2093,6 @@ ZEND_END_ARG_INFO()
20932093

20942094
#define arginfo_is_double arginfo_boolval
20952095

2096-
#define arginfo_is_real arginfo_boolval
2097-
20982096
#define arginfo_is_numeric arginfo_boolval
20992097

21002098
#define arginfo_is_string arginfo_boolval
@@ -3454,7 +3452,6 @@ static const zend_function_entry ext_functions[] = {
34543452
ZEND_FALIAS(is_long, is_int, arginfo_is_long)
34553453
ZEND_FE(is_float, arginfo_is_float)
34563454
ZEND_FALIAS(is_double, is_float, arginfo_is_double)
3457-
ZEND_FALIAS(is_real, is_float, arginfo_is_real)
34583455
ZEND_FE(is_numeric, arginfo_is_numeric)
34593456
ZEND_FE(is_string, arginfo_is_string)
34603457
ZEND_FE(is_array, arginfo_is_array)

ext/standard/tests/general_functions/is_float.phpt

Lines changed: 7 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Test is_float() & it's FALIASes: is_double() & is_real() functions
2+
Test is_float() & its is_double() alias
33
--SKIPIF--
44
<?php
55
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
@@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
1010
* Description: Finds whether the given variable is a float
1111
*/
1212

13-
echo "*** Testing is_float(), is_double() and is_real() with float values***\n";
13+
echo "*** Testing is_float(), is_double() with float values***\n";
1414
// different valid float values
1515
$floats = array(
1616
-2147483649, // float value
@@ -44,17 +44,16 @@ $floats = array(
4444
.0034E-30,
4545
-.0034E-30
4646
);
47-
/* loop to check that is_float(), is_double() & is_real() recognizes
47+
/* loop to check that is_float(), is_double() & recognizes
4848
different float values, expected: bool(true) */
4949
$loop_counter = 1;
5050
foreach ($floats as $float ) {
5151
echo "-- Iteration $loop_counter --\n"; $loop_counter++;
5252
var_dump( is_float($float) );
5353
var_dump( is_double($float) );
54-
var_dump( @is_real($float) );
5554
}
5655

57-
echo "\n*** Testing is_float(), is_double() & is_real() with non float values ***\n";
56+
echo "\n*** Testing is_float(), is_double() with non float values ***\n";
5857
// get a resource type variable
5958
$fp = fopen (__FILE__, "r");
6059
$dfp = opendir ( __DIR__ );
@@ -117,14 +116,13 @@ $not_floats = array (
117116
@$undefined_var
118117
);
119118
/* loop through the $not_floats to see working of
120-
is_float(), is_double() & is_real() on objects,
119+
is_float(), is_double() on objects,
121120
arrays, boolean and others */
122121
$loop_counter = 1;
123122
foreach ($not_floats as $value ) {
124123
echo "--Iteration $loop_counter--\n"; $loop_counter++;
125124
var_dump( is_float($value) );
126125
var_dump( is_double($value) );
127-
var_dump( @is_real($value) );
128126
}
129127

130128
echo "Done\n";
@@ -135,275 +133,208 @@ closedir($dfp);
135133

136134
?>
137135
--EXPECTF--
138-
*** Testing is_float(), is_double() and is_real() with float values***
136+
*** Testing is_float(), is_double() with float values***
139137
-- Iteration 1 --
140138
bool(true)
141139
bool(true)
142-
bool(true)
143140
-- Iteration 2 --
144141
bool(true)
145142
bool(true)
146-
bool(true)
147143
-- Iteration 3 --
148144
bool(true)
149145
bool(true)
150-
bool(true)
151146
-- Iteration 4 --
152147
bool(true)
153148
bool(true)
154-
bool(true)
155149
-- Iteration 5 --
156150
bool(true)
157151
bool(true)
158-
bool(true)
159152
-- Iteration 6 --
160153
bool(true)
161154
bool(true)
162-
bool(true)
163155
-- Iteration 7 --
164156
bool(true)
165157
bool(true)
166-
bool(true)
167158
-- Iteration 8 --
168159
bool(true)
169160
bool(true)
170-
bool(true)
171161
-- Iteration 9 --
172162
bool(true)
173163
bool(true)
174-
bool(true)
175164
-- Iteration 10 --
176165
bool(true)
177166
bool(true)
178-
bool(true)
179167
-- Iteration 11 --
180168
bool(true)
181169
bool(true)
182-
bool(true)
183170
-- Iteration 12 --
184171
bool(true)
185172
bool(true)
186-
bool(true)
187173
-- Iteration 13 --
188174
bool(true)
189175
bool(true)
190-
bool(true)
191176
-- Iteration 14 --
192177
bool(true)
193178
bool(true)
194-
bool(true)
195179
-- Iteration 15 --
196180
bool(true)
197181
bool(true)
198-
bool(true)
199182
-- Iteration 16 --
200183
bool(true)
201184
bool(true)
202-
bool(true)
203185
-- Iteration 17 --
204186
bool(true)
205187
bool(true)
206-
bool(true)
207188
-- Iteration 18 --
208189
bool(true)
209190
bool(true)
210-
bool(true)
211191
-- Iteration 19 --
212192
bool(true)
213193
bool(true)
214-
bool(true)
215194
-- Iteration 20 --
216195
bool(true)
217196
bool(true)
218-
bool(true)
219197
-- Iteration 21 --
220198
bool(true)
221199
bool(true)
222-
bool(true)
223200
-- Iteration 22 --
224201
bool(true)
225202
bool(true)
226-
bool(true)
227203
-- Iteration 23 --
228204
bool(true)
229205
bool(true)
230-
bool(true)
231206
-- Iteration 24 --
232207
bool(true)
233208
bool(true)
234-
bool(true)
235209
-- Iteration 25 --
236210
bool(true)
237211
bool(true)
238-
bool(true)
239212
-- Iteration 26 --
240213
bool(true)
241214
bool(true)
242-
bool(true)
243215
-- Iteration 27 --
244216
bool(true)
245217
bool(true)
246-
bool(true)
247218
-- Iteration 28 --
248219
bool(true)
249220
bool(true)
250-
bool(true)
251221
-- Iteration 29 --
252222
bool(true)
253223
bool(true)
254-
bool(true)
255224
-- Iteration 30 --
256225
bool(true)
257226
bool(true)
258-
bool(true)
259227

260-
*** Testing is_float(), is_double() & is_real() with non float values ***
228+
*** Testing is_float(), is_double() with non float values ***
261229
--Iteration 1--
262230
bool(false)
263231
bool(false)
264-
bool(false)
265232
--Iteration 2--
266233
bool(false)
267234
bool(false)
268-
bool(false)
269235
--Iteration 3--
270236
bool(false)
271237
bool(false)
272-
bool(false)
273238
--Iteration 4--
274239
bool(false)
275240
bool(false)
276-
bool(false)
277241
--Iteration 5--
278242
bool(false)
279243
bool(false)
280-
bool(false)
281244
--Iteration 6--
282245
bool(false)
283246
bool(false)
284-
bool(false)
285247
--Iteration 7--
286248
bool(false)
287249
bool(false)
288-
bool(false)
289250
--Iteration 8--
290251
bool(false)
291252
bool(false)
292-
bool(false)
293253
--Iteration 9--
294254
bool(false)
295255
bool(false)
296-
bool(false)
297256
--Iteration 10--
298257
bool(false)
299258
bool(false)
300-
bool(false)
301259
--Iteration 11--
302260
bool(false)
303261
bool(false)
304-
bool(false)
305262
--Iteration 12--
306263
bool(false)
307264
bool(false)
308-
bool(false)
309265
--Iteration 13--
310266
bool(false)
311267
bool(false)
312-
bool(false)
313268
--Iteration 14--
314269
bool(false)
315270
bool(false)
316-
bool(false)
317271
--Iteration 15--
318272
bool(false)
319273
bool(false)
320-
bool(false)
321274
--Iteration 16--
322275
bool(false)
323276
bool(false)
324-
bool(false)
325277
--Iteration 17--
326278
bool(false)
327279
bool(false)
328-
bool(false)
329280
--Iteration 18--
330281
bool(false)
331282
bool(false)
332-
bool(false)
333283
--Iteration 19--
334284
bool(false)
335285
bool(false)
336-
bool(false)
337286
--Iteration 20--
338287
bool(false)
339288
bool(false)
340-
bool(false)
341289
--Iteration 21--
342290
bool(false)
343291
bool(false)
344-
bool(false)
345292
--Iteration 22--
346293
bool(false)
347294
bool(false)
348-
bool(false)
349295
--Iteration 23--
350296
bool(false)
351297
bool(false)
352-
bool(false)
353298
--Iteration 24--
354299
bool(false)
355300
bool(false)
356-
bool(false)
357301
--Iteration 25--
358302
bool(false)
359303
bool(false)
360-
bool(false)
361304
--Iteration 26--
362305
bool(false)
363306
bool(false)
364-
bool(false)
365307
--Iteration 27--
366308
bool(false)
367309
bool(false)
368-
bool(false)
369310
--Iteration 28--
370311
bool(false)
371312
bool(false)
372-
bool(false)
373313
--Iteration 29--
374314
bool(false)
375315
bool(false)
376-
bool(false)
377316
--Iteration 30--
378317
bool(false)
379318
bool(false)
380-
bool(false)
381319
--Iteration 31--
382320
bool(false)
383321
bool(false)
384-
bool(false)
385322
--Iteration 32--
386323
bool(false)
387324
bool(false)
388-
bool(false)
389325
--Iteration 33--
390326
bool(false)
391327
bool(false)
392-
bool(false)
393328
--Iteration 34--
394329
bool(false)
395330
bool(false)
396-
bool(false)
397331
--Iteration 35--
398332
bool(false)
399333
bool(false)
400-
bool(false)
401334
--Iteration 36--
402335
bool(false)
403336
bool(false)
404-
bool(false)
405337
--Iteration 37--
406338
bool(false)
407339
bool(false)
408-
bool(false)
409340
Done

0 commit comments

Comments
 (0)