Unknown Expr Type Expr_YieldFrom · Issue #38 · designsecurity/progpilot (original) (raw)
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 <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>k</mi><mi>e</mi><mi>y</mi><mo>=</mo><mo>></mo></mrow><annotation encoding="application/x-tex">key => </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.03148em;">k</span><span class="mord mathnormal" style="margin-right:0.03588em;">ey</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=></span></span></span></span>value) {
echo "$key: $value\n";
}
> php test.php
foo: 123
> progpilot test.php
Unknown Expr Type Expr_YieldFrom