TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
974 B

--TEST--
Test rtrim() function : error conditions
--SKIPIF--
<?php
echo 'skip Test output differs under AOT compilation';
?>
--FILE--
<?php
echo "*** Testing rtrim() : error conditions ***\n";
$hello = " Hello World\n";
echo "\n-- Test rtrim function with various invalid charlists\n";
var_dump(rtrim($hello, "..a"));
var_dump(rtrim($hello, "a.."));
var_dump(rtrim($hello, "z..a"));
var_dump(rtrim($hello, "a..b..c"));
?>
--EXPECTF--
*** Testing rtrim() : error conditions ***
-- Test rtrim function with various invalid charlists
Warning: rtrim(): Invalid '..'-range, no character to the left of '..' in %s on line %d
string(14) " Hello World
"
Warning: rtrim(): Invalid '..'-range, no character to the right of '..' in %s on line %d
string(14) " Hello World
"
Warning: rtrim(): Invalid '..'-range, '..'-range needs to be incrementing in %s on line %d
string(14) " Hello World
"
Warning: rtrim(): Invalid '..'-range in %s on line %d
string(14) " Hello World
"