Git Product home page Git Product logo

Comments (6)

dlakomski avatar dlakomski commented on August 15, 2024 1

The problem is probably with nikic/php-parser library, which is using forward-emulation by default: nikic/PHP-Parser#715 (comment)

from phpmnd.

kylekatarnls avatar kylekatarnls commented on August 15, 2024

I guess it's because of the match reserved statement introduced in PHP 8 https://wiki.php.net/rfc/match_expression_v2

from phpmnd.

kylekatarnls avatar kylekatarnls commented on August 15, 2024

Actually, T_MATCH can only be returned in PHP 8, so probably you're running phpmnd with PHP 8 and not PHP 7.4
https://3v4l.org/HWvAP

In this case, this behavior looks correct as class Match {} is invalid in PHP 8.

from phpmnd.

ksowa avatar ksowa commented on August 15, 2024

@kylekatarnls thank you for your input.

It's not possible I use PHP 8 for that. I'm inside Docker container based on php:7.4-fpm image.

Would you like me to prepare an example you could run on your machine?

from phpmnd.

ksowa avatar ksowa commented on August 15, 2024

@kylekatarnls, I've prepared an example Docker environment with php:7.4-cli, where the bug can be easily reproduced.

Please take a look into https://github.com/ksowa/phpmnd-bug-reproduction

from phpmnd.

ksowa avatar ksowa commented on August 15, 2024

Thanks @dlakomski!

I've created a PR which resolves this problem: #119

from phpmnd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.