diff --git a/example/eval.php b/example/eval.php new file mode 100644 index 0000000..6afd958 --- /dev/null +++ b/example/eval.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +use Vfs\FileSystem; + +require __DIR__ . '/../vendor/autoload.php'; + +FileSystem::factory('eval://'); + +file_put_contents('eval://foo.php', <<<'EOF' +name = $name; + } + + public function getName() + { + return $this->name; + } +} +EOF +); + +require 'eval://foo.php'; + +$foo = new Foo('bar'); + +var_dump($foo->getName());