All Projects → mk-j → Php_diseval_extension

mk-j / Php_diseval_extension

Licence: mit
Disable eval in php 7 with this extension

Programming Languages

c
50402 projects - #5 most used programming language

PHP diseval extension

The purpose of the diseval php extension is to disable eval in php. While suhosin can disable eval, it is not stable for php7. This extension is able to disable eval in both php5 and php7.

When this php extension is enabled, the following will yield PHP Errors:

eval("echo 44;");

PHP Fatal error: DISEVAL - Use of eval is forbidden in /path/to/script.php(4) : eval()'d code on line 1

$newfunc = create_function('$a,$b', 'return $a+$b;');

PHP Fatal error: DISEVAL - Use of eval is forbidden in /path/to/script.php(4) : runtime-created function on line 1

echo mb_ereg_replace("[0-3]", '4*4', "4434","e" );

PHP Fatal error: DISEVAL - Use of eval is forbidden in /path/to/script.php(4) : mbregex replace on line 1

assert('is_array(15)');

PHP Fatal error: DISEVAL - Use of eval is forbidden in /path/to/script.php(4) : assert code on line 1

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].