需求

Modifying Constants, Functions, Classes, and Methods as well as Custom Superglobals works with all releases of PHP 5. No special requirements are necessary.

Sandboxing requires PHP 5.1.0 or later, or PHP 5.0.0 with a special TSRM patch applied. Regardless of which version of PHP is in use it must be compiled with the --enable-maintainer-zts option. See the README file in the runkit package for additional information.

User Contributed Notes

schertt at gmail dot com 05-Jun-2019 05:34
It's worth noting that the runkit7 project noted in previous comments no longer has Sandboxing support as runkit did for PHP5.
Truong at chuongduong dot net 14-Mar-2017 09:58
Some one added runkit for php7 but not completed: https://github.com/runkit7/runkit7
wanjochan at gmail dot com 12-Jul-2016 05:32
the author of runkit seems dropped the dev for php7....

https://github.com/zenovich/runkit/issues/87