1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 00:32:23 +01:00
Files
archived-php-src/ext/spl/tests/SplFileObject/SplFileObject_key_error002.phpt
George Peter Banyard 6f87a5c633 Fix GH-8563 Different results for seek() on SplFileObject and SplTempFileObject
With memory streams if we get a NULL buffer we must not instantiate an empty line
2022-06-20 12:47:37 +01:00

23 lines
345 B
PHP

--TEST--
SPL: SplFileObject::key error
--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(120);
$s->next();
var_dump($s->key());
var_dump($s->valid());
?>
--EXPECT--
int(12)
bool(false)