Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php super super globals

Tags:

php

php-5.3

I was wondering, I have this big array, is it possible to have it only once in memory rather then once per thread? Take the tags here at stackoverflow as example. They barely ever change, why not have a single memory spot for them? And maybe even keep that array permanently in memory?

like image 872
RoboTamer Avatar asked May 31 '11 02:05

RoboTamer


People also ask

How many Superglobal variables are there in PHP?

There are about nine superglobal variables in PHP which are sometimes referred to as automatic globals .

Which PHP Superglobals collect form data?

PHP $_POST is widely used to collect form data after submitting an HTML form with method="post".

Which Super global variable works with POST method?

Where the $_GET superglobal variable is used to collect form data which is submitted with the GET method, the $_POST superglobal variable is used to get the form data for the POST method. The POST form data won't be displayed in the URL; instead, it's available as a part of the request body.

Is $_ POST global variable?

PHP $_POST is a PHP super global variable which is used to collect form data after submitting an HTML form with method="post".


1 Answers

Take a look at apc_store

Unlike many other mechanisms in PHP, variables stored using apc_store() will persist between requests (until the value is removed from the cache).

like image 67
Captain Giraffe Avatar answered Oct 20 '22 10:10

Captain Giraffe