Menu

#50 PHP 7 .x compatibility

Unassigned
closed
None
2022-04-09
2018-10-07
Steven
No

Would love to see this awesome script being updated to a PHP 7.x compatible version.

Perhaps it's idea to fully rewrite it for PHP7+ only for easier maintenance of the script without having to worry about backwards compatibility of PHP5.x.

And, please, keep the distribution like it is now and don't put it into a Composer setup :)

Discussion

  • Yardena Cohen

    Yardena Cohen - 2018-10-26

    I want to use this in PHP7 as well. I've created a fork over here: https://github.com/yardenac/simplehtmldom

     
  • LogMANOriginal

    LogMANOriginal - 2018-11-27

    @Steven: Do you have any particular problems with the script in PHP 7+?

    @Yardena: I added changes to the repository based on your fork, so it should work in PHP 7.3 now. Let me know if you still experience issues.

     
    • Steven

      Steven - 2018-11-27

      I just couldn't get it to work properly with PHP 7.x although the script I have worked fine with PHP 5.6. I've also tried the patch which was mentioned in one topic but that didn't solve the problem either for me. Hopefully I've some time available around the Christmas holidays to fix my crawler.

       
      • LogMANOriginal

        LogMANOriginal - 2018-11-28

        I see. There could indeed be compatibility issues. That being said, it is workingfine on my machine so far (using PHP 7.0). If you have any specific error message, please don't hesitate to post it here. That's always very helpful in tracking issues.

        As for the differences between 5.6 and 7.x, here is the official migration guide in case you need it for your crawler:
        http://php.net/manual/en/migration70.php

        I'm working on updating unit tests to make it easier to test for compatibility issues, but that will take some time. I let you know if I find anything suspicious.

         
  • LogMANOriginal

    LogMANOriginal - 2019-04-15

    Steven, does the latest version work for you?
    I'm using 7.3 now and it works well on my end.

     
  • LogMANOriginal

    LogMANOriginal - 2019-04-15
    • status: open --> pending
    • assigned_to: LogMANOriginal
     
  • Gustavo Camacho

    Gustavo Camacho - 2020-11-24

    Funciona perfectamente con php5.6, 7.0, 7.1, 7.2, 7.3 y 7.4.
    Works perfectly with 7.0, 7.1, 7.2, 7.3 y 7.4.

     
  • LogMANOriginal

    LogMANOriginal - 2022-04-09
    • status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB