2004-09-09 15:46:19 +08:00
|
|
|
--TEST--
|
|
|
|
SPL: Problem with casting to string
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$d = new DirectoryIterator('.');
|
|
|
|
var_dump($d);
|
2004-09-30 04:09:52 +08:00
|
|
|
var_dump(is_string($d));
|
2004-09-29 17:43:33 +08:00
|
|
|
preg_match('/x/', $d);
|
|
|
|
var_dump(is_string($d));
|
2004-09-09 15:46:19 +08:00
|
|
|
?>
|
2004-09-29 17:43:33 +08:00
|
|
|
===DONE===
|
2004-09-09 15:46:19 +08:00
|
|
|
--EXPECTF--
|
2008-07-09 06:40:48 +08:00
|
|
|
object(DirectoryIterator)#%d (4) {
|
2007-11-03 03:41:12 +08:00
|
|
|
%s"pathName"%s"SplFileInfo":private]=>
|
2008-07-24 16:56:51 +08:00
|
|
|
%s(%d) ".%c%s"
|
2008-07-09 06:40:48 +08:00
|
|
|
%s"fileName"%s"SplFileInfo":private]=>
|
|
|
|
%s(%d) "%s"
|
2008-02-05 01:07:07 +08:00
|
|
|
%s"glob"%s"DirectoryIterator":private]=>
|
2008-01-31 15:44:01 +08:00
|
|
|
bool(false)
|
|
|
|
%s"subPathName"%s"RecursiveDirectoryIterator":private]=>
|
|
|
|
%s(0) ""
|
2004-09-09 15:46:19 +08:00
|
|
|
}
|
2004-09-30 04:09:52 +08:00
|
|
|
bool(false)
|
|
|
|
bool(false)
|
2004-09-29 17:43:33 +08:00
|
|
|
===DONE===
|