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 6542749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:15:52+00:00 2026-05-25T11:15:52+00:00

<?php declare(ticks=1); function tick_handler() { print($GLOBALS[‘a’]); } register_tick_function(‘tick_handler’); function test() { $a = 1;//This

  • 0
<?php
declare(ticks=1);
function tick_handler()
{
print($GLOBALS['a']);
}
register_tick_function('tick_handler');


function test()
{
$a = 1;//This not print
$a = 2;//This not print
$a = 3;//This not print
$a = 4;//This not print
}
test();
$a = 1;//This print
$a = 2;//This print
$a = 3;//This print
$a = 4;//This print
?>

How print //This not print ,but without global $a ?

And without

function test()
{
$GLOBALS['a'] = 1;//This not print
$GLOBALS['a'] = 2;//This not print
$GLOBALS['a'] = 3;//This not print
$GLOBALS['a'] = 4;//This not print
}
  • 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-05-25T11:15:53+00:00Added an answer on May 25, 2026 at 11:15 am

    I am not 100% sure what you are trying to do but

    For example, in Joomla to change the label prescribed bottom of the page bottom of page for this 1) You must download hosting dump script 2) Find a piece of html script code that is next to 3) To investigate the behavior of functions 4) Find a place html code education It takes a couple of hours I just find with the help of $globals and register_tick_function

    sounds like you-are-doing-it-wrong.

    If you need to debug your application and/or need to see which functions and methods got called in what order and with what parameters, then use a proper debugger:

    See https://stackoverflow.com/questions/1494288/good-free-php-debugger

    Big Thanks, but xdebug in hostmonster.com disabled

    You do not want to debug your production site. If you need to add more features or apply changes, do so on your development server first. Make sure it works, then deploy the changes to your production site. So either put XDebug on your local machine or into a VM or anything like that. Or get a new hoster for your development environment. In any case, put it where development and debugging wont disrupt production.

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

Sidebar

Related Questions

I am a little bit confused by the PHP function declare . What exactly
Can I declare a function in php that throws an exception? For example: public
Can we declare a variable with fixed length in PHP? I'm not asking about
In php/perl we can simply say $a='hi and then $a=1 without needing to declare
I am writing some PHP. I have several classes that do not declare any
I understand that if you declare a variable within a php function with the
Recently stumbled upon this neat little bug or 'feature' in PHP: function myCmpFunc($a,$b) {
in php you can declare a function in a global scope with function. is
I've done a bit of PHP and when you declare variables you do not
For Best Practices - In PHP 5.3+, can we, as for C++, declare function

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.