4 ms·
I am curious, what is the point of using something like this?
by canadev 12y ago
I am curious, what is the point of using something like this?
- olso 12y agohttps://github.com/adlawson/vfs.php#example-use-cases https://github.com/adlawson/vfs.php#example-use-cases
- zapt02 12y agoHow exactly do you perform runtime php evaluation using this?
- adlawson 12y agoYou 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! ``` [1]: https://github.com/adlawson/vfs.php#documentation https://github.com/adlawson/vfs.php#documentation