Why doesn't the first example from the documentation of PHP HTML Parser?

0 like 0 dislike
19 views
Set HTML Parser for PHP via Composer, doing the first example from the documentation — there is nothing displayed.
require 'vendor/autoload.php'; use PHPHtmlParser\\Dom; $dom = new Dom; $dom->load('Hey bro, click here
:)'); $a = $dom->find('a')[0]; echo $a->text; // click here

By the way, why at the beginning of the reference vendor/autoload.php?
by | 19 views

1 Answer

0 like 0 dislike
I do not recommend to use this library. Documentation except on the main project page I have not found or bad looking. Therefore, its potential can only guess. I read that inside the Taliban there and it's like not able to search on attributes that, in principle and at the docks is not described.

I personally tried to use this library. In the end oplevelse and went back to Simple HTML DOM
\rsimplehtmldom.sourceforge.net

For 4 years as the library has not been updated, and supports all the deviants methods of content search.
Simple as a stick and great documentation. For PHP this is probably a must-have.
by

Related questions

0 like 0 dislike
2 answers
asked Apr 27, 2019 by AlbertS001
0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
0 like 0 dislike
4 answers
asked Apr 13, 2019 by BidiBom
110,608 questions
257,186 answers
0 comments
33,949 users