Php Variable variables-php Tutorial

Source: Internet
Author: User
[Help] for php Variable variables, the Super global variable $ _ REQUEST $ _ type_REQUEST; var_dump ($ _ type); Notice: Undefinedvariable: _ REQUES. if $ _ type is _ GET or _ POST or another variable, there is no problem. what is the problem? ------ Solution ---------- [help] about php Variable variables
Super global variable $ _ REQUEST for php

$ _ Type = '_ request ';
Var_dump ($ _ type );

Notice: Undefined variable: _ REQUES

If $ _ type is _ GET or _ POST or another variable, there is no problem. what is wrong with me?

------ Solution --------------------
This should be a BUG.
My php version is 5.3.6, which is the same as yours.
However, if $ _ type = '_ request'; appears
That is
$ _ REQUEST;
$ _ Type = '_ request ';
It is not empty.

However, it is still incorrect. $ _ REQUEST should contain cookie content.
But at least $ _ REQUEST in php 5.3.6 does not


------ Solution --------------------
My account is 5.2.6. No problem.
------ Solution --------------------
Here is the answer
Http://stackoverflow.com/questions/2078102/request-not-created-when-using-variable-variables
Disable auto_globals_jit in php. ini and no notice will be prompted.
Http://www.php.net/manual/en/ini.core.php#ini.auto-globals-jit
------ Solution --------------------
Try to enable this

Register_long_arrays = On

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.