Re:Show HN: Virtual File System in PHP
by canadev on Sunday July 06, 2014 @02:42PM
(#7995269)
I am curious, what is the point of using something like this?
[ Parent
| on HN ]
How exactly do you perform runtime php evaluation using this?
You write your php to a file in the vfs, then you `require` it back out.
There's an example of it in the documentation[1] but a simple example could be:
```
<?php
FileSystem::factory('vfs://');
file_put_contents('vfs://foo.php', '<?php echo "Hello, World!";');
require 'vfs://foo.php'; // Hello, World!
```