mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
e616bc8694
Make substr_compare ignore the length if it's NULL. This allows to use the last parameter (case_insensitivity) with the default length.
15 lines
394 B
PHP
15 lines
394 B
PHP
--TEST--
|
|
Bug #55451 (substr_compare with NULL as default length)
|
|
--FILE--
|
|
<?php
|
|
var_dump(substr_compare("abcde", "ABCD", 0, NULL, false) != 0);
|
|
var_dump(substr_compare("abcde", "ABCD", 0, NULL, true) != 0);
|
|
var_dump(substr_compare("abcde", "ABCDE", 0, NULL, false) != 0);
|
|
var_dump(substr_compare("abcde", "ABCDE", 0, NULL, true) == 0);
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
bool(true)
|
|
bool(true)
|