1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00
Files
archived-php-src/ext/spl/tests/SplFileObject_key_error001.phpt
George Peter Banyard 1e7afbd281 Revert "Fix GH-8563 Different results for seek() on SplFileObject and SplTempFileObject"
Although the fix is partially correct it also breaks long standing behaviour which has been produced since PHP 5.3.

This reverts commit 6f87a5c633.

This was cherry-picked to PHP-8.1.8 from 79a283240e
2022-07-05 16:13:55 -05:00

23 lines
344 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(13);
$s->next();
var_dump($s->key());
var_dump($s->valid());
?>
--EXPECT--
int(14)
bool(false)