|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
Description: ------------ When a StreamWrapper is used in combination with the ReflectionClass API, the scheme is stripped from the path returned by getFileName(). For example: If a create an in-memory file at 'vfs:://foo/bar.php' which contains valid PHP code (something like '<?php namespace Suite { class Test {} }'). I can include or exec the file and create an instance of the class. Note, this is done as part of a test suite for a package which generates PHP classes from templates. So: include 'vfs:://foo/bar.php'; $inst = new Suite\Test(); $refl = new \ReflectionClass($inst); I would now expect $refl->getFileName() to return 'vfs:://foo/bar.php', but it actually returns '/foo/bar.php'. If this is the intended behaviour, perhaps the docs could be updated to mention it.