php-src/ext/standard/tests/strings/bug55451.phpt
Lauri Kenttä e616bc8694 Fix bug #55451
Make substr_compare ignore the length if it's NULL. This allows to
use the last parameter (case_insensitivity) with the default length.
2016-08-07 18:48:36 +02:00

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)