mirror of
https://github.com/php/php-src.git
synced 2024-12-03 23:05:57 +08:00
30 lines
528 B
PHP
30 lines
528 B
PHP
--TEST--
|
|
SPL: SplFileObject::getFlags
|
|
--CREDITS--
|
|
Ricardo Oedietram <ricardo@odracir.nl>
|
|
Erwin Poeze <erwin.poeze@gmail.com>
|
|
#PFZ June PHP TestFest 2012
|
|
--FILE--
|
|
<?php
|
|
|
|
$fo = new SplFileObject(__FILE__);
|
|
|
|
$fo->setFlags(SplFileObject::DROP_NEW_LINE);
|
|
var_dump($fo->getFlags());
|
|
|
|
$fo->setFlags(SplFileObject::READ_AHEAD);
|
|
var_dump($fo->getFlags());
|
|
|
|
$fo->setFlags(SplFileObject::SKIP_EMPTY);
|
|
var_dump($fo->getFlags());
|
|
|
|
$fo->setFlags(SplFileObject::READ_CSV);
|
|
var_dump($fo->getFlags());
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
int(2)
|
|
int(4)
|
|
int(8)
|