Immutability RFC

From: Date: Wed, 16 Nov 2016 13:57:19 +0000
Subject: Immutability RFC
Groups: php.internals 
Request: Send a blank email to internals+get-96919@lists.php.net to get a copy of this message
Hi, To anyone who is interested in this RFC. What do you think what behavour we should have when you try to compare two immutable objects by identity like this: immutable class A { public $a; public function __construct($a) { $this->a = $a } } $a1 = new A(1); $a2 = new A(1); $a1 === $a2 If we treat those objects as values then this should return true. But then again there might be some confusion because then two operators are doing the same thing. Maybe throw an error ? Suggestions ? Cheers. -- Silvio Marijić Software Engineer 2e Systems

« previous php.internals (#96919) next »