# What is auto_globals_jit?

- Thread: https://externals.io/message/14402
- Original archive: https://news-web.php.net/php.internals/14402
- Started by Philip Olson on 2005-01-19T04:11:51+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #14402 — Philip Olson — 2005-01-19T04:11:51+00:00

URL: https://externals.io/message/14402#14402

Hi!

Could someone explain auto_globals_jit a little? It'll then
be documented :)

Regards,
Philip

---

## #14403 — Derick Rethans — 2005-01-19T08:10:37+00:00

URL: https://externals.io/message/14402#14403 · In reply to: #14402

> Could someone explain auto_globals_jit a little? It'll then
> be documented :)

AFAIK it is a setting to control whether autoglobals (GET/POST/COOKIE et
al.) should be initialized JIT (Just In Time, when they are first used),
or always when the script starts. I am not sure for which auto globals
this setting has any effect though.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #14404 — Nuno Lopes — 2005-01-19T10:34:45+00:00

URL: https://externals.io/message/14402#14404 · In reply to: #14403

> 
>
> > […]
>
> AFAIK it is a setting to control whether autoglobals (GET/POST/COOKIE et
> al.) should be initialized JIT (Just In Time, when they are first used),
> or always when the script starts. I am not sure for which auto globals
> this setting has any effect though.
>
> Derick


Doing a search at LXR, I've found this 
http://lxr.php.net/source/php-src/main/php_variables.c#579

JIT is controled by this:
zend_bool jit_initialization = (PG(auto_globals_jit) && 
!PG(register_globals) && !PG(register_long_arrays) && 
!PG(register_argc_argv));

So, you need auto_globals_jit enabled, as well register_globals, 
register_long_arrays and register_argc_argv disabled.

Looking below, we can check that it is only applied to $_ENV and to 
$_SERVER. $_POST, $_GET and $_COOKIE seems not to implement this JIT 
initalization.
$_REQUEST seems also not to be initialized when 'jit_initialization' is 
true.


But to be sure, just make a bit of testing :)

Nuno
