question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

update file `php-variables.data`

See original GitHub issue

This is probably the most static list that we will have.

We can get all probably using https://www.php.net/get_defined_vars or similar?

Example:

php -r 'print_r(array_keys(get_defined_vars()));'
Array
(
    [0] => _GET
    [1] => _POST
    [2] => _COOKIE
    [3] => _FILES
    [4] => argv
    [5] => argc
    [6] => _SERVER
)

Maybe we want to extend this list by using php -r 'print_r(array_keys(get_defined_constants()));' or even php -r 'print_r(get_declared_classes());' 🤷

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
fzipicommented, Jun 27, 2022

Those are the superglobals. Of course they should be added!

0reactions
theMiddleBluecommented, Jun 29, 2022

it should be a good idea, except for booleans and nulls that could be prone to FPs

Read more comments on GitHub >

github_iconTop Results From Across the Web

updating php variables stored in file - Stack Overflow
This way, reading and writing variable data to a contained file is much more manageable than modifying a PHP file (introducing tenfold ways ......
Read more >
How to change the value of a PHP setting? - SiteGround KB
There are two ways to change the value of a PHP setting: Using PHP Variables in Site Tools. Go to Devs > PHP...
Read more >
PHP Variables - W3Schools
Creating (Declaring) PHP Variables. In PHP, a variable starts with the $ sign, followed by the name ... Think of variables as containers...
Read more >
Variable scope - Manual - PHP
For the most part all PHP variables only have a single scope. This single scope spans included and required files as well. For...
Read more >
PHP variables - w3resource
As a result, a variable can change the type of its value as much as we want. As previously mentioned you don't need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found