php-src/ext/ereg/tests/spliti_basic_004.phpt
2008-11-18 17:55:07 +00:00

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