# betterdocs/4.9.3/includes/Dependencies/PhpParser/Node/Expr/Yield_.php

BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ &amp; Chatbot, version 4.9.3. 31 lines.

- Page: https://pluginprobe.com/plugins/betterdocs/4.9.3/code/includes/Dependencies/PhpParser/Node/Expr/Yield_.php
- Raw: https://pluginprobe.com/plugins/betterdocs/4.9.3/raw/includes/Dependencies/PhpParser/Node/Expr/Yield_.php
- Modified: 2026-06-18T07:20:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/betterdocs/4.9.3/code/includes/Dependencies/PhpParser/Node/Expr/Yield_.php#L10-L20`.

```php
<?php

namespace WPDeveloper\BetterDocs\Dependencies\PhpParser\Node\Expr;

use WPDeveloper\BetterDocs\Dependencies\PhpParser\Node\Expr;

class Yield_ extends Expr
{
    /** @var null|Expr Key expression */
    public $key;
    /** @var null|Expr Value expression */
    public $value;

    /**
     * Constructs a yield expression node.
     *
     * @param null|Expr $value      Value expression
     * @param null|Expr $key        Key expression
     * @param array     $attributes Additional attributes
     */
    public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = array()) {
        parent::__construct($attributes);
        $this->key = $key;
        $this->value = $value;
    }

    public function getSubNodeNames() {
        return array('key', 'value');
    }
}

```
