uopz_set_hook Invalid
tingfeng-key opened this issue · comments
php version: 7.4.16
code :
<?php
uopz_allow_exit(true);
$result = uopz_set_hook("eval", function () {
var_dump("111111");
exit;
});
var_dump(111, $result);
var_dump(eval("echo 'test';"));die;
output:
int(111) bool(true) testNULL
eval
isn't a proper function, so I don't think it's possible to set the hook. uopz_set_hook()
should return false
in that case, though, by checking whether the function exists. That wouldn't work if the function is defined after the hook has been set.