-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[5.1] Fix some functions that have been replaced (#5480)
* The php_strtoupper(), php_string_toupper(), php_strtolower(), and php_string_tolower() functions has been removed, use zend_str_toupper(), zend_string_toupper(), zend_str_tolower(), and zend_string_tolower() respectively instead, Replace zend_atol with zend_ini_parse_quantity. * exclude versions lower than PHP 8.2
- Loading branch information
1 parent
f0ca8d0
commit 964b97f
Showing
4 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
swoole_server: parse option value to size | ||
--SKIPIF-- | ||
<?php | ||
if (PHP_VERSION_ID < 80200) { | ||
require __DIR__ . '/../include/skipif.inc'; | ||
skip('php version 8.2 or higher'); | ||
} | ||
?> | ||
--FILE-- | ||
<?php | ||
require __DIR__ . '/../include/bootstrap.php'; | ||
|
||
use Swoole\Server; | ||
|
||
$server = new Server('127.0.0.1', SWOOLE_BASE); | ||
$server->set([ | ||
'buffer_output_size' => '2M', | ||
]); | ||
$server->set([ | ||
'buffer_output_size' => 2 * 1024 * 1024, | ||
]); | ||
$server->set([ | ||
'buffer_output_size' => 'xxx--2M', | ||
]); | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Swoole\Server::set(): failed to parse 'xxx--2M' to size, Error: Invalid quantity "xxx--2M": no valid leading digits, interpreting as "0" for backwards compatibility in %s on line %d |