1--TEST--
2SplFileObject::fflush function - basic test
3--FILE--
4<?php
5/*
6 * test a successful flush
7*/
8$obj = New SplFileObject(__DIR__.'/SplFileObject_testinput.csv');
9var_dump($obj->fflush());
10
11/*
12 * test a unsuccessful flush
13*/
14//create a basic stream class
15class VariableStream {
16    public $position;
17    public $varname;
18    public $context;
19
20    function stream_open($path, $mode, $options, &$opened_path)
21    {
22        return true;
23    }
24
25    function url_stat() {
26    }
27}
28stream_wrapper_register("SPLtest", "VariableStream");
29$ftruncate_test = "";
30//end creating stream
31
32//open an SplFileObject using the above test stream
33$obj = New SplFileObject("SPLtest://ftruncate_test");
34var_dump($obj->fflush());
35
36?>
37--EXPECT--
38bool(true)
39bool(false)
40