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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:35:33+00:00 2026-06-11T12:35:33+00:00

When I print $GLOBALS using this code: <?php print_r($GLOBALS); ?> I get this output:

  • 0

When I print $GLOBALS using this code:

<?php print_r($GLOBALS); ?>

I get this output:

Array ( [_GET] => Array ( ) [_POST] => Array ( ) [_COOKIE] => Array ( ) [_FILES] => Array ( ) [GLOBALS] => Array *RECURSION* )

What does “*RECURSION*” mean in this case, and why are $_SERVER, $_REQUEST, etc. not printed as well?

  • 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-11T12:35:34+00:00Added an answer on June 11, 2026 at 12:35 pm

    See this part of PHP Manual:

    Keep in mind that $GLOBALS is, itself, a global variable. So code like this won’t work:

    <?php
        print '$GLOBALS = ' . var_export($GLOBALS, true) . "\n";
    ?>
    

    This results in the error message: “Nesting level too deep – recursive dependency?”

    You already have retrieved the whole list – you just cannot display part of it (the one containing a recursion, because you would have timeout rather than anything meaningful).

    When it comes to $_REQUEST, it is a derivative from $_GET, $_POST and $_COOKIE, so its content is redundant.

    EDIT: There is an old bug / feature, that seems to be populating $GLOBALS with $_SERVER and $_REQUEST when they are accessed. So try to access $_REQUEST and hope it helps. Anyway, it can be found in $GLOBALS after that: ideone.com/CGetH

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

Sidebar

Related Questions

I am using luabind and I want to make this lua code work. print(hello..welcome
Print_r function is usually to output the array result, but I want to hide
print_r($address['Country']); echo $address['Country']['name']; Here is what I get for the print_r: Array ( [Country]
I'm having a strange issue here, i have this bit of code: <?php if
I'm using the Views PHP module with the following code: <?php echo $row->title; echo
I'm using PHP 4.3.9, Apache/2.0.52 I'm trying to get a login system working that
I am using CKEditor with PHP. Using the sample PHP where the $code variable
when I run this program, it print NameError global name 'viewAll' is not defined
This is my code: from xgoogle.search import GoogleSearch, SearchError import urllib, urllib2, sys, argparse
I have installed the Net_Geo pear package on my PHP Server. This is the

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.