On the surface of it, there is no real difference. You can use them both with your usual `fopen` and `file_get_contents` builtins.
I believe that the implementation is truer to the behaviour of how these builtin functions behave with a unix FS. Amongst some other subtleties, here's some examples:
- vfsStream simply ignores handle modifiers (except for +)[1]
- some effort has gone into showing where errors were triggered in userland code[2]
- node types are represented as `fstat` would see them[3] rather than using simple types[4]
vfsStream works perfectly fine, but if you want to use it more with testing file system operations; the closer you are to a true environment the better. Obviously this project isn't quite there yet, but it should be once a few issues have been ironed out.
I believe that the implementation is truer to the behaviour of how these builtin functions behave with a unix FS. Amongst some other subtleties, here's some examples:
- vfsStream simply ignores handle modifiers (except for +)[1]
- some effort has gone into showing where errors were triggered in userland code[2]
- node types are represented as `fstat` would see them[3] rather than using simple types[4]
vfsStream works perfectly fine, but if you want to use it more with testing file system operations; the closer you are to a true environment the better. Obviously this project isn't quite there yet, but it should be once a few issues have been ironed out.
[1]: https://github.com/mikey179/vfsStream/blob/master/src/main/p...
[2]: https://github.com/adlawson/vfs.php/blob/master/src/Logger/P...
[3]: https://github.com/adlawson/vfs.php/blob/master/src/Node/Sta...
[4]: https://github.com/mikey179/vfsStream/blob/master/src/main/p...