I wonder if it is possible to use php include
as a Rvalue, like this example:
$foo = include('bar.php);
I did a few experiments but it seems to not be possible.
The php files that I would like to load in this way are cached dumps of objects and arrays, saved with the var_export()
function.
It is quite important to me to load those file with import
(or require
) and not with the normal file operations in order to get the full advantage of PHP's internal code caching system.