icewind / executer
Eval php code in temporary files to enable debugging
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/icewind/executer
Requires
- makasim/temp-file: ^0.2.0
Requires (Dev)
- phpunit/phpunit: ^4.8.0
This package is auto-updated.
Last update: 2025-06-18 19:26:18 UTC
README
Eval php code in temporary files to enable debugging
composer require icewind/executer
Why not just use eval
?
Since code loaded trough eval
doesn't come from a file it's not possible for debuggers to show you the code being executed,
by placing the code in a temporary file and including it you gain the ability view the code in your favorite debugger while stepping trough it.
Usage
use Icewind\Executer\Executer; $executer = new Executer(); $executer->evalCode('echo "foo"');
API
evalCode(string $code)
Execute eval-compatible code (doesn't start with '<?php...')includeCode(string $code)
Execute include-compatible code (start with '<?php...')