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

#48 introducing krumo::queue() #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

#48 introducing krumo::queue() #59

wants to merge 2 commits into from

Conversation

kktsvetkov
Copy link
Contributor

This is the feature discussed in #48. What this does is to capture the output immediatelly using krumo::fetch(), and then schedule it to be printed at the end of the execution of the script using register_shutdown_function().

What it does can be demonstrated with the following script:

<?php 
require 'class.krumo.php';
var_dump(123);
krumo::queue(456);
var_dump(789);

The output is

/Users/kt/mmucklo-krumo/a.php:3:
int(123)
/Users/kt/mmucklo-krumo/a.php:5:
int(789)
--------------------------------------------------------------------------------
456

Called from /Users/kt/mmucklo-krumo/a.php, line 4  (Krumo version 0.6.1)
--------------------------------------------------------------------------------

Same will happen when using it on a web page, where the output HTML is printed at the end of the script's life and will appear at the bottom of the page.

@kktsvetkov
Copy link
Contributor Author

@scottchiefbaker when you have spare time, can you have a look at this? I've added an example in my comment above about how to demonstrate this feature.

@scottchiefbaker
Copy link
Collaborator

When I have more time I will definitely review this.

@kktsvetkov
Copy link
Contributor Author

Thanks a lot

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.

2 participants