Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unknown Expr Type Expr_YieldFrom #38

Closed
rigrig opened this issue Jun 14, 2022 · 2 comments
Closed

Unknown Expr Type Expr_YieldFrom #38

rigrig opened this issue Jun 14, 2022 · 2 comments

Comments

@rigrig
Copy link

rigrig commented Jun 14, 2022

Using yield from in PHP code causes an error: Unknown Expr Type Expr_YieldFrom.

PHP version: 7.4.3
progpilot version: 0.7.0
Configuration: default
Code I'm trying to analyze:

function test() {
        yield from ['foo' => 123];
}
Raw log
> progpilot --version
progpilot 0.7.0
> php --version
PHP 7.4.3 (cli) (built: Mar  2 2022 15:36:52) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
richard@richardspc ~> progpilot --version
progpilot 0.7.0
> cat test.php
<?php
function test() {
        yield from ['foo' => 123];
}
foreach (test() as $key => $value) {
        echo "$key: $value\n";
}
> php test.php
foo: 123
> progpilot test.php


Unknown Expr Type Expr_YieldFrom




@eric-therond
Copy link
Collaborator

if you have time to try with the latest progpilot version (v1.0.0)

Eric

@eric-therond
Copy link
Collaborator

progpilot version (v1.0.2) should solve this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants