-
Notifications
You must be signed in to change notification settings - Fork 353
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
Not compatible with php 7.3 #64
Comments
I got the same error |
php 7.3 has some bugs in preg_* function |
@wotupset Not bugs. PHP 7.3 has updated its regular expression engine to PCRE2, which brings some breaking changes. I think the dash in referenced expression needs to be escaped. More: http://php.net/manual/en/migration73.other-changes.php#migration73.other-changes.pcre |
There's even a PR opened two months ago that fixes this: #63 but it's left unmerged. This package might be abandoned. |
7.3 compatible version: Author of original PHP Simple HTML DOM Parser (sourceforge hosted) did an update on 2018-12-10 (after 6 year ;)) version 1.7 is compatible with PHP 7.3 |
This fixes the compatibility issue with PHP 7.3 issue sunra/php-simple-html-dom-parser#64 and Quinn-Interactive#36
careful with 1.8.1 which is the version used by https://github.com/Kub-AT/php-simple-html-dom-parser This version doesn't work as expected for example:
The above fails if the div has more than 1 class. I'm currently working with version 1.7.1 which doesn't have this issue. |
It would be nice if you reported a bug here https://sourceforge.net/p/simplehtmldom/bugs/ |
Thanks m8, I've opened an bug issue: I'll include more details to it as soon as I get a chance 👍 |
hi use this but i get error |
it looks like you have mistaken the library, there is no loadFromUrl in simplehtmldom |
this should be reported in the |
@vistart, Get the last version of simplehtmldom from "https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.9.1/" site. It will work. |
Thanks this works like charm +1 |
Thank you, it worked for me too. |
How can we install the 1.7 version of the original parser? I'm using laravel and the listed package doesn't contain a composer.json file |
@serg1uu I found an alternative, go for https://github.com/simplehtmldom/simplehtmldom |
PHP Warning 'yii\base\ErrorException' with message 'preg_match(): Compilation failed: invalid range in character class at offset 4'
in .../sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php:1378
https://github.com/sunra/php-simple-html-dom-parser/blob/master/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php#L1378
The text was updated successfully, but these errors were encountered: