Jump to content

Recommended Posts

  Hello,
Can you advice some tools(php7/laravel5) for debugging/review of data read with phpQuery?
I mean when I need to get data-attribute of H2 tag I write:

$pq = pq($nextContainerDivItem);
$nextTitle= $pq->find('h2.s-access-title');
echo '<pre>$nextTitle::</pre>';
dump($nextTitle);
$next_title= !empty($nextTitle->attr('data-attribute') ) ? $nextTitle->attr('data-attribute') : '';

I googled the right decision and now in $next_title valid value, but debugging the output
https://imgur.com/a/bwEKS

is not really usefull, as I could not review the value in dumping: I suppose to find it in path elements->attributes,
but as you see at printscreen.

If there is better of dumping ? If possible with options to show some nodes. Say not empty or specifile in path, as if ["elements->attributes"]
specified show it opened.

Also when I write wrong path/class I have some output like in printscreen above.
I would like in some way to show if the node was found or not?
If there is way to make it?
Which debugging tools do you use with phpQuery requests ?

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/305492-debugging-of-data-read-with-phpquery/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.