You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it may not be problem with real filesystem where writing to root directory is a no-go, it's quite useful in tests for writing via custom stream wrapper into a php variable which exists just for that test. Following code used to create directories hierarchy before writing into file due to the problem creates directory vfs.var: in current working directory instead of (not) creating root directory.
This is not a bug. dirname() is explicitely for paths, not uniform resource locators or identifiers.
A double slash in a path is simply simplified to a single slash. And, under Linux at least, a colon is a valid part of a path (though it is used as a path separator in some contexts, you can have a directory named file:).
PHP has no direct facilities for URI parsing (URL parsing is provided by parse_url()).
Description
The following code:
Resulted in this output:
But I expected this output instead:
https://3v4l.org/6FlUN
While it may not be problem with real filesystem where writing to root directory is a no-go, it's quite useful in tests for writing via custom stream wrapper into a php variable which exists just for that test. Following code used to create directories hierarchy before writing into file due to the problem creates directory
vfs.var:
in current working directory instead of (not) creating root directory.PHP Version
All
Operating System
No response
The text was updated successfully, but these errors were encountered: