Skip to content

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.

1 participant