I know this question sounds easy to answer, and I must have missed something somewhere, but after searching, I can't find an answer. I only can find answers about wrapping functions in classes, but I would like to wrap functions themselves, such as fopen
.
Why: This may sound strange, but I want to make a site builder in which you write code and it saves it on your account. You should be able to write PHP, but of course you shouldn't delete or open server files, so I want to wrap functions so that I can first check if their fopen
, rmdir
, or similar functions are safe.