mirror of
https://github.com/php/php-src.git
synced 2024-12-20 07:20:33 +08:00
53 lines
1.0 KiB
PHP
53 lines
1.0 KiB
PHP
--TEST--
|
|
Test spliti() function : basic functionality - confirm case insensitivity
|
|
--FILE--
|
|
<?php
|
|
/* Prototype : proto array spliti(string pattern, string string [, int limit])
|
|
* Description: spliti string into array by regular expression
|
|
* Source code: ext/standard/reg.c
|
|
* Alias to functions:
|
|
*/
|
|
|
|
$replacement = 'r';
|
|
|
|
var_dump(spliti('[a-z]', '--- A ---'));
|
|
var_dump(spliti('[A-Z]', '--- a ---'));
|
|
var_dump(spliti('[[:lower:]]', '--- A ---'));
|
|
var_dump(spliti('[[:upper:]]', '--- a ---'));
|
|
|
|
echo "Done";
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Function spliti() is deprecated in %s on line %d
|
|
array(2) {
|
|
[0]=>
|
|
string(4) "--- "
|
|
[1]=>
|
|
string(4) " ---"
|
|
}
|
|
|
|
Deprecated: Function spliti() is deprecated in %s on line %d
|
|
array(2) {
|
|
[0]=>
|
|
string(4) "--- "
|
|
[1]=>
|
|
string(4) " ---"
|
|
}
|
|
|
|
Deprecated: Function spliti() is deprecated in %s on line %d
|
|
array(2) {
|
|
[0]=>
|
|
string(4) "--- "
|
|
[1]=>
|
|
string(4) " ---"
|
|
}
|
|
|
|
Deprecated: Function spliti() is deprecated in %s on line %d
|
|
array(2) {
|
|
[0]=>
|
|
string(4) "--- "
|
|
[1]=>
|
|
string(4) " ---"
|
|
}
|
|
Done
|