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

Maintained Fork of PHP Simple HTML DOM Parser (PHP 7.X) #77

Open
voku opened this issue Nov 21, 2019 · 1 comment
Open

Maintained Fork of PHP Simple HTML DOM Parser (PHP 7.X) #77

voku opened this issue Nov 21, 2019 · 1 comment

Comments

@voku
Copy link

voku commented Nov 21, 2019

https://github.com/voku/simple_html_dom


A HTML DOM parser written in PHP - let you manipulate HTML in a very easy way! This is a fork of PHP Simple HTML DOM Parser project but instead of string manipulation we use DOMDocument and modern php classes like "Symfony CssSelector".

  • PHP 7.0+ Support
  • PHP-FIG Standard
  • Composer & PSR-4 support
  • PHPUnit testing via Travis CI
  • PHP-Quality testing via SensioLabsInsight
  • UTF-8 Support (more support via "voku/portable-utf8")
  • Invalid HTML Support (partly ...)
  • Find tags on an HTML page with selectors just like jQuery
  • Extract contents from HTML in a single line
@malsatin
Copy link

malsatin commented Dec 7, 2020

However, I think there should be made some caveats about migration. In the fork:

  • Method find wouldn't return [] if nothing found. Consider replacing by findOneOrFalse or findMultyOrFalse in your code
  • Method find wouldn't return array, so you can't use methods like array_pop on it's result
  • There in no attr property, replace it by getAttribute in your code
  • Not all of the JQuery selectors are supported, i.e. there is no :gt(), I think others are missing too

This is the list, that we have faced during the migration

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

No branches or pull requests

2 participants