cvs: php-src(PHP_5_2) /ext/standard/tests/strings implode1.phpt
| From: | Antony Dovgal | Date: | Tue, 22 Aug 2006 20:10:50 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/standard/tests/strings implode1.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-40063@lists.php.net to get a copy of this message | ||
tony2001 Tue Aug 22 20:10:50 2006 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings implode1.phpt
Log:
add test for real
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/implode1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/strings/implode1.phpt
+++ php-src/ext/standard/tests/strings/implode1.phpt
--TEST--
implode() and various args
--FILE--
<?php
$a = array(
array(1,2),
array(1.1,2.2),
array(array(2),array(1)),
array(false,true),
);
foreach ($a as $val) {
var_dump(implode(', ', $val));
var_dump($val);
}
echo "Done\n";
?>
--EXPECTF--
string(4) "1, 2"
array(2) {
[0]=>
int(1)
[1]=>
int(2)
}
string(8) "1.1, 2.2"
array(2) {
[0]=>
float(1.1)
[1]=>
float(2.2)
}
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
string(12) "Array, Array"
array(2) {
[0]=>
array(1) {
[0]=>
int(2)
}
[1]=>
array(1) {
[0]=>
int(1)
}
}
string(3) ", 1"
array(2) {
[0]=>
bool(false)
[1]=>
bool(true)
}
Done
--UEXPECTF--
unicode(4) "1, 2"
array(2) {
[0]=>
int(1)
[1]=>
int(2)
}
unicode(8) "1.1, 2.2"
array(2) {
[0]=>
float(1.1)
[1]=>
float(2.2)
}
Notice: Array to string conversion in %s on line %d
Notice: Array to string conversion in %s on line %d
unicode(12) "Array, Array"
array(2) {
[0]=>
array(1) {
[0]=>
int(2)
}
[1]=>
array(1) {
[0]=>
int(1)
}
}
unicode(3) ", 1"
array(2) {
[0]=>
bool(false)
[1]=>
bool(true)
}
Done