File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / spl / tests / SplFileObject_next_variation002.phpt
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:02 2013 UTC (11 years, 1 month ago) by misho
CVS tags: MAIN, HEAD
Initial revision

--TEST--
SPL: SplFileObject::next variation 002, read ahead
--CREDITS--
Ricardo Oedietram <ricardo@odracir.nl>
Erwin Poeze <erwin.poeze@gmail.com>
#PFZ June PHP TestFest 2012
--FILE--
<?php
//line 2
//line 3
//line 4
//line 5
$s = new SplFileObject(__FILE__);
$s->seek(2);
echo $s->current();
$s->next();
echo $s->current();

$s->setFlags(SplFileObject::READ_AHEAD);

$s->seek(2);
echo $s->current();
$s->next();
echo $s->current();
?>
--EXPECT--
//line 3
//line 4
//line 3
//line 4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>