mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
b2248789ed
RFC: https://wiki.php.net/rfc/saner-numeric-strings This removes the -1 allow_error mode from is_numeric_string functions and replaces it by a trailing boolean out argument to preserve BC in a couple of places. Most of the changes can be resumed to "numeric" strings which emitted a E_NOTICE now emit a E_WARNING and "numeric" strings which emitted a E_WARNING now throw a TypeError. This mostly affects: - String offsets - Arithmetic operations - Bitwise operations Closes GH-5762
30 lines
477 B
PHP
30 lines
477 B
PHP
--TEST--
|
|
Bug #19943 (memleaks)
|
|
--FILE--
|
|
<?php
|
|
$ar = array();
|
|
for ($count = 0; $count < 10; $count++) {
|
|
$ar[$count] = "$count";
|
|
@$ar[$count]['0idx'] = "$count";
|
|
}
|
|
|
|
for ($count = 0; $count < 10; $count++) {
|
|
echo $ar[$count]." -- ".@$ar[$count]['0idx']."\n";
|
|
}
|
|
$a = "0123456789";
|
|
$a[9] = $a[0];
|
|
var_dump($a);
|
|
?>
|
|
--EXPECT--
|
|
0 -- 0
|
|
1 -- 1
|
|
2 -- 2
|
|
3 -- 3
|
|
4 -- 4
|
|
5 -- 5
|
|
6 -- 6
|
|
7 -- 7
|
|
8 -- 8
|
|
9 -- 9
|
|
string(10) "0123456780"
|