forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-8.3: streams: Checking if a stream is castable should not emit warnings for user defined streams
- Loading branch information
Showing
2 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--TEST-- | ||
Non castable user-space streams (stream_cast()) | ||
--FILE-- | ||
<?php | ||
class test_wrapper { | ||
public $context; | ||
public $return_value; | ||
function stream_open($path, $mode, $openedpath) { | ||
return true; | ||
} | ||
function stream_eof() { | ||
return false; | ||
} | ||
} | ||
|
||
stream_wrapper_register('test', 'test_wrapper'); | ||
$fd = fopen("test://foo","r"); | ||
var_dump(stream_isatty($fd)); | ||
|
||
?> | ||
--EXPECT-- | ||
bool(false) |