php-src/ext/spl/tests/SplFileObject_fstat_with_basic_fstat_disabled.phpt
George Peter Banyard 430b3ac7df Refactor parts of SPL Dir/SplFileObject
This fixes a way it was possible to trigger an Internel Error
by disabling function (via the INI setting) when SPL was acting
as a proxy to the function call.

Fix flock_compat layer as it needs to used in SPL now.

Use macro to check if object is initialized

Closes GH-6014
2020-09-03 14:23:18 +02:00

64 lines
772 B
PHP

--TEST--
SplFileObject::fstat when fstat() has been disabled.
--INI--
disable_functions="fstat"
--FILE--
<?php
$obj = New SplFileObject(__DIR__.'/SplFileObject_testinput.csv');
var_dump($obj->fstat());
?>
--EXPECTF--
array(26) {
[0]=>
int(%i)
[1]=>
int(%i)
[2]=>
int(%i)
[3]=>
int(%i)
[4]=>
int(%i)
[5]=>
int(%i)
[6]=>
int(%i)
[7]=>
int(%i)
[8]=>
int(%i)
[9]=>
int(%i)
[10]=>
int(%i)
[11]=>
int(%i)
[12]=>
int(%i)
["dev"]=>
int(%i)
["ino"]=>
int(%i)
["mode"]=>
int(%i)
["nlink"]=>
int(%i)
["uid"]=>
int(%i)
["gid"]=>
int(%i)
["rdev"]=>
int(%i)
["size"]=>
int(%i)
["atime"]=>
int(%i)
["mtime"]=>
int(%i)
["ctime"]=>
int(%i)
["blksize"]=>
int(%i)
["blocks"]=>
int(%i)
}