Fast and Rich |
|
2024-11-24 |
|
|
24 |
|
|
Other Minor Changes
Stricter type checks on array handling
<?php
$a = "test";
$a[1][2][3] = "a"; // Warning in PHP 4, Fatal in 5.x
array_merge("string",123); // Warning in 5.x
?>
strrpos() works now
<?php
echo strrpos("kangaroo","an");
// Returns 4 in PHP 4
// Returns 1 in PHP 5
?>
ip2long has been fixed
<?php
var_dump(ip2long("000.000.998.889"));
// -1 in PHP 4, false in PHP 5
var_dump(ip2long("255.255.255.255"));
// -1 in PHP 4, -1 in PHP 5
?>
Don't use {} for string offsets
<?php
$a = "foo";
$a{0} = "F";
?>