xref: /PHP-8.3/ext/standard/tests/file/bug71287.phpt (revision 902d6439)
1--TEST--
2Bug #71287 (Error message contains hexadecimal instead of decimal number)
3--FILE--
4<?php
5class Stream {
6    public $context;
7
8    public function stream_open($path, $mode, $options, $opened_path) {
9        return true;
10    }
11
12    public function stream_write($data) {
13        return strlen($data) - 2;
14    }
15}
16
17stream_wrapper_register('test', Stream::class);
18file_put_contents('test://file.txt', 'foobarbaz');
19?>
20--EXPECTF--
21Warning: file_put_contents(): Only 7 of 9 bytes written, possibly out of free disk space in %sbug71287.php on line %d
22