mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
513b76794b
Previously zend_parse_parameters (and FastZPP) would handle invalid arguments depending on strict_types: With strict_types=1, a TypeError is thrown, with strict_types=0 a warning is thrown and (usually) NULL is returned. Additionally, some functions (constructors always and other methods sometimes) opt-it to throwing regardless of strict_types. This commit changes zpp to always generate a TypeError exception in PHP 8.
25 lines
394 B
PHP
25 lines
394 B
PHP
--TEST--
|
|
strcasecmp() tests
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump(strcasecmp("", ""));
|
|
var_dump(strcasecmp("aef", "dfsgbdf"));
|
|
var_dump(strcasecmp("qwe", "qwer"));
|
|
var_dump(strcasecmp("qwerty", "QweRty"));
|
|
var_dump(strcasecmp("qwErtY", "qwerty"));
|
|
var_dump(strcasecmp("q123", "Q123"));
|
|
var_dump(strcasecmp("01", "01"));
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
int(0)
|
|
int(-3)
|
|
int(-1)
|
|
int(0)
|
|
int(0)
|
|
int(0)
|
|
int(0)
|
|
Done
|