[php-src] Issue #11781: Error on writing const object property in 8.2

From: Date: Tue, 25 Jul 2023 00:51:47 +0000
Subject: [php-src] Issue #11781: Error on writing const object property in 8.2
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245021@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/11781
Author: MaxD2

### Description

The following code:

```php
<?php

class Test {
    public int $x;
}

const test = new Test();

test->x = 1;
```

Resulted in this output:
**Fatal error**: Cannot use temporary expression in write context

https://3v4l.org/BmtTZ

### PHP Version

PHP 8.1 - 8.2

### Operating System

_No response_


Thread (1 message)

  • MaxD2
« previous php.bugs (#245021) next »