note 128009 added to language.constants.syntax

From: Date: Mon, 12 Dec 2022 12:52:32 +0000
Subject: note 128009 added to language.constants.syntax
Groups: php.notes 
Request: Send a blank email to php-notes+get-219965@lists.php.net to get a copy of this message
As of php 8.1 objects can be set to an object. <?php class Database{ function query(string $query): void { //... } } const DB = new Database(); DB->query("SELECT * FROM users"); ?> I didn't see that in the documentation nor in change log/release notes. ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.175 (proxied: 85.11.146.60) ---- Manual Page -- https://php.net/manual/en/language.constants.syntax.php Edit -- https://main.php.net/note/edit/128009 Del: integrated -- https://main.php.net/note/delete/128009/integrated Del: useless -- https://main.php.net/note/delete/128009/useless Del: bad code -- https://main.php.net/note/delete/128009/bad+code Del: spam -- https://main.php.net/note/delete/128009/spam Del: non-english -- https://main.php.net/note/delete/128009/non-english Del: in docs -- https://main.php.net/note/delete/128009/in+docs Del: other reasons-- https://main.php.net/note/delete/128009 Reject -- https://main.php.net/note/reject/128009 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#219965) next »