php-src/ext/spl/tests/dit_001.phpt

26 lines
518 B
Plaintext
Raw Normal View History

2004-09-09 15:46:19 +08:00
--TEST--
SPL: Problem with casting to string
--FILE--
<?php
$d = new DirectoryIterator('.');
var_dump($d);
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--
object(DirectoryIterator)#%d (4) {
%s"pathName"%s"SplFileInfo":private]=>
2008-07-24 16:56:51 +08:00
%s(%d) ".%c%s"
%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
}
bool(false)
bool(false)
2004-09-29 17:43:33 +08:00
===DONE===