Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static local variables to the dump #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JonathanGawrych
Copy link

Hello! I have been using php-meminfo to find how my projects tests exhausting memory, and it's been great. Thank you!

However, I found that meminfo misses something: static local variables. Using https://github.com/johannes/php-staticvardumper as a resource (but is 8 years old and worked only on php 5, so I had to do some updates), I augmented php-meminfo to find and add static local variables to the dump. Please see the two test for examples.

I had to make a choice for the frame_label. I chose <STATIC_VARIABLE(ClassName::MethodName)>, and in the case that the function wasn't a method, but global, I chose <GLOBAL_FUNCTION> for the classname (resulting in <STATIC_VARIABLE(<GLOBAL_FUNCTION>::MethodName)>). A little wordy, but I think it conveys the meaning pretty well. These are easily changeable though if you prefer something else :)

Thanks again for the tool and let me know if you'd like anything changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant