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