Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8809297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:50:18+00:00 2026-06-14T02:50:18+00:00

I just var_dump’ed object and got something like this: object(simple_html_dom)#1 (23) { [root]=> object(simple_html_dom_node)#2

  • 0

I just var_dump’ed object and got something like this:

    object(simple_html_dom)#1 (23) { ["root"]=> object(simple_html_dom_node)#2 (9) { 
["nodetype"]=> int(5) ["tag"]=> string(4) "root" ["attr"]=> array(0) { } ["children"]=> array(0) { } ["nodes"]=> array(1) { [0]=> object(simple_html_dom_node)#3 (9) { ["nodetype"]=> int(3) ["tag"]=> string(4) "text" ["attr"]=> array(0) { } ["children"]=> array(0) { } ["nodes"]=> array(0) { } ["parent"]=> *RECURSION* ["_"]=> array(1) { [4]=> string(51) "'http://www.lnik.com/num' 'http://www.lnik.com/com'" } ["tag_start"]=> int(0) ["dom":"simple_html_dom_node":private]=> *RECURSION* } } ["parent"]=> NULL ["_"]=> array(2) { [0]=> int(-1) [1]=> int(2) } ["tag_start"]=> int(0) ["dom":"simple_html_dom_node":private]=> *RECURSION* } ["nodes"]=> array(2) { [0]=> object(simple_html_dom_node)#2 (9) { ["nodetype"]=> int(5) ["tag"]=> string(4) "root" ["attr"]=> array(0) { } ["children"]=> array(0) { } ["nodes"]=> array(1) { [0]=> object(simple_html_dom_node)#3 (9) { ["nodetype"]=> int(3) ["tag"]=> string(4) "text" ["attr"]=> array(0) { } ["children"]=> array(0) { } ["nodes"]=> array(0) { } ["parent"]=> *RECURSION* ["_"]=> array(1) { [4]=> string(51) "'http://www.lnik.com/num' 'http://www.lnik.com/com'" } ["tag_start"]=> int(0) ["dom":"simple_html_dom_node":private]=> *RECURSION* } } ["parent"]=> NULL ["_"]=> array(2) { [0]=> int(-1) [1]=> int(2) } ["tag_start"]=> int(0) ["dom":"simple_html_dom_node":private]=> *RECURSION* } [1]=> object(simple_html_dom_node)#3 (9) { ["nodetype"]=> int(3) ["tag"]=> string(4) "text" ["attr"]=> array(0) { } ["children"]=> array(0) { } ["nodes"]=> array(0) { } ["parent"]=> object(simple_html_dom_node)#2 (9) { ["nodetype"]=> int(5) ["tag"]=> string(4) "root" ["attr"]=> array(0) { } ["children"]=> array(0) { } ["nodes"]=> array(1) { [0]=> *RECURSION* } ["parent"]=> NULL ["_"]=> array(2) { [0]=> int(-1) [1]=> int(2) } ["tag_start"]=> int(0) ["dom":"simple_html_dom_node":private]=> *RECURSION* } ["_"]=> array(1) { [4]=> string(51) "'http://www.lnik.com/num' 'http://www.lnik.com/com'" } ["tag_start"]=> int(0) ["dom":"simple_html_dom_node":private]=> *RECURSION* } } ["callback"]=> NULL ["lowercase"]=> bool(true) ["original_size"]=> int(51) ["size"]=> int(51) ["pos":protected]=> int(51) ["doc":protected]=> string(51) "'http://www.lnik.com/num' 'http://www.lnik.com/com'" ["char":protected]=> NULL ["cursor":protected]=> int(2) ["parent":protected]=> object(simple_html_dom_node)#2 (9) { ["nodetype"]=> int(5) ["tag"]=> string(4) "root" ["attr"]=> array(0) { } ["children"]=> array(0) { } ["nodes"]=> array(1) { [0]=> object(simple_html_dom_node)#3 (9) { ["nodetype"]=> int(3) ["tag"]=> string(4) "text" ["attr"]=> array(0) { } ["children"]=> array(0) { } ["nodes"]=> array(0) { } ["parent"]=> *RECURSION* ["_"]=> array(1) { [4]=> string(51) "'http://www.lnik.com/num' 'http://www.lnik.com/com'" } ["tag_start"]=> int(0) ["dom":"simple_html_dom_node":private]=> *RECURSION* } } ["parent"]=> NULL ["_"]=> array(2) { [0]=> int(-1) [1]=> int(2) } ["tag_start"]=> int(0) ["dom":"simple_html_dom_node":private]=> *RECURSION* } ["noise":protected]=> array(0) { } ["token_blank":protected]=> string(4) " " ["token_equal":protected]=> string(4) " =/>" ["token_slash":protected]=> string(6) " /> " ["token_attr":protected]=> string(2) " >" ["_charset"]=> string(5) "UTF-8" ["_target_charset"]=> string(5) "UTF-8" ["default_br_text":protected]=> string(2) " " ["default_span_text"]=> string(1) " " ["self_closing_tags":protected]=> array(9) { ["img"]=> int(1) ["br"]=> int(1) ["input"]=> int(1) ["meta"]=> int(1) ["link"]=> int(1) ["hr"]=> int(1) ["base"]=> int(1) ["embed"]=> int(1) ["spacer"]=> int(1) } ["block_tags":protected]=> array(6) { ["root"]=> int(1) ["body"]=> int(1) ["form"]=> int(1) ["div"]=> int(1) ["span"]=> int(1) ["table"]=> int(1) } ["optional_closing_tags":protected]=> array(11) { ["tr"]=> array(3) { ["tr"]=> int(1) ["td"]=> int(1) ["th"]=> int(1) } ["th"]=> array(1) { ["th"]=> int(1) } ["td"]=> array(1) { ["td"]=> int(1) } ["li"]=> array(1) { ["li"]=> int(1) } ["dt"]=> array(2) { ["dt"]=> int(1) ["dd"]=> int(1) } ["dd"]=> array(2) { ["dd"]=> int(1) ["dt"]=> int(1) } ["dl"]=> array(2) { ["dd"]=> int(1) ["dt"]=> int(1) } ["p"]=> array(1) { ["p"]=> int(1) } ["nobr"]=> array(1) { ["nobr"]=> int(1) } ["b"]=> array(1) { ["b"]=> int(1) } ["option"]=> array(1) { ["option"]=> int(1) } } } 

How can I echo some varbiables of object ? Tried $object->link; etc. but not working

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:50:19+00:00Added an answer on June 14, 2026 at 2:50 am

    How can I echo some variables of object ?

    The var_dump function is for debugging information about a concrete variable. In your case it tells you that the variable or expression you dump is an object of type simple_html_dom and outputs some additional information:

    object(simple_html_dom) #1 (23) { 
        ["root"]=> object(simple_html_dom_node)#2 (9) { 
            ["nodetype"]=> int(5) 
            ["tag"]=> string(4) "root" ["attr"]=> array(0) {} 
            ["children"]=> array(0) {}
            ["nodes"]=> array(1) {
                ...
    

    As this shows this has some strucutre, var_dump tries to traverse the values of the properties of that object, too.

    However, the way you posted the output in your question therefore makes it extremely difficult to actually see these. Consider to make line-breaks and whitespace visible, for example, if you have that copied from your browser, use the view-source feature of your browser first to actually see these line-breaks.

    This normally makes it a no-brainer to find out which object properties actually exist and which not.

     $object->link;
    

    Is that long-time not working it does not exist. Also as each object can be different, check the documentation of the simple html dom library how to use it. It might define own accessors through so called magic methods – var_dump does not see these, it is only about the bare values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a recursive query like this (note: this is just an example): var
I'm just trying to load a one element xml string to a DOMDocument object,
Here is my var_dump: array(2) { [1]=> object(stdClass)#382 (3) { [name]=> string(12) Other fields
here is the var_dump of object: object(SimpleXMLElement)#31 (1) { [0]=> string(70) /0.jpg } I
HI, I got two array. var_dump($tbDateArr); var_dump($tbTitleArr); output: array 0 => object(stdClass)[16] public 'eventDate'
Code: date_default_timezone_set('America/Los_Angeles'); $textDate = strtotime($date); var_dump($textDate); var_dump($date); The output: int 1352012400 string '11/04/12' (length=8)
just a bit confused by this code var counter = function() { //... var
I just posted this to a gist: https://gist.github.com/2228570 var out = ''; function doWhat(){
Ok i just don't have enough knowledge for this simple script apparently. Basically, in
$em = $this->getDoctrine()->getEntityManager(); $qb = $em->createQueryBuilder(); $tickets = $qb->select('COUNT(ticket.id)')->from('MyBundle:Ticket', 'ticket'); var_dump($tickets->getQuery()->getSingleScalarResult()); returns array(1) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.