progpilot icon indicating copy to clipboard operation
progpilot copied to clipboard

Unknown Expr Type Expr_YieldFrom

Open rigrig opened this issue 3 years ago • 0 comments

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




rigrig avatar Jun 14 '22 09:06 rigrig