Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8295077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:27:29+00:00 2026-06-08T14:27:29+00:00

I want to hook before execution / or replace standard core functions, for example

  • 0

I want to hook before execution / or replace standard core functions, for example I’m going to prevent both include and require access to any scripts. Is there any way to make it without any extra dll’s? Or in another case is_array($myarr); I would hook at array($myarr) === $myarr; (looks like it is faster) to avoid creating extra classes and functions.

And how could I prevent all PHP executions after some moment? I have HTML templates with PHP parts <?=$myvar?> I want to prevent short syntax and execution at all when my script ends work, what do I have to try?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:27:30+00:00Added an answer on June 8, 2026 at 2:27 pm

    About hooks to standart functions: there is no way to do that without external modules. APD PECL module
    will do the job.

    rename_function('require', 'internal_require'); // saving reference to original function
    override_function('require', '$filename', 
                      'print "require called"; internal_require($filename);');
    

    Second question is not very clear. Do you want to hook on standart is_array function, to array() lexical construct or (array) type casting?

    About stopping php interpretation: have a look at __halt_compiler function. But keep in mind that succeeding blocks of php will be just embedded in HTML (thus visible to everybody).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have a Mercurial hook that will run before committing a transaction
've written two functions in a file commit_hooks.py that I want to run before
I want to access the request object before a file upload gets converted into
I have a class of div MyClass I want to hook up to two
I want to add a commit hook that works when a push is received
On a grails progect I want to build a binary plugin with hook implementable
I am writing a Git pre-commit hook client script and I want to filter
I know I can use install-data-hook to do anything I want after my data
I am writing a pre-commit hook. I want to run php -l against all
Want to run javascript function from parent window in child window Example I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.