Hacker Newsnew | past | comments | ask | show | jobs | submitlogin



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!

```

[1]: https://github.com/adlawson/vfs.php#documentation




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: