Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102407 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46019 invoked from network); 25 Jun 2018 03:31:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jun 2018 03:31:45 -0000 Authentication-Results: pb1.pair.com header.from=levim@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.208.194 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.208.194 mail-lj1-f194.google.com Received: from [209.85.208.194] ([209.85.208.194:44141] helo=mail-lj1-f194.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/10-13077-E12603B5 for ; Sun, 24 Jun 2018 23:31:43 -0400 Received: by mail-lj1-f194.google.com with SMTP id t12-v6so4927324ljc.11 for ; Sun, 24 Jun 2018 20:31:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RYuyiZhAUk1snbu08XyUt5Dr2IgLJRW1rASX24EZ9UI=; b=j2J+s7+ddEBLhFJuJKSdLXukdvZjwnoXfzjpA7t5Z6fWeec+C1AqSuoGQF79a/ZbRe AyG6PbVmItnbQeyBG8VR448I2yDQbAoxJRo7njFjhM9H55ITbipR50rKegw+ov7nZ3UW mj/s8mO8YxcDCE8hXokbEnZhsCkwak/Ov2++VmO3tSaFH43sf32RKL0FOShQ5Himh6zC fmxXdLJyCOjeUXN0u9zBdNxczJK6ruR3NuItTYcjpXPleKK1oXFlByF9AkBXMMD/oHUG 3GrQgyP8E6XpAbZ6TwMT3hdt4qjENOfKQvF9XArTqs8MPM7uO3BAHGfk/H35PMUTOYjx LxeQ== X-Gm-Message-State: APt69E2BtsrbvXJ74EmTDMMysoxYO7BNmmuj+J5KduYsfZvgQ6Jryh7d M89QKVtr9kQOpMlt1nKzw6BXizbO5dAu5bnw0GZn2A== X-Google-Smtp-Source: ADUXVKLzFqRylVozErsr8mPRYaiwL1TCqJLP0yjpJiKUa+ui92Cs2w/COXmw2IDe6PLJO1E8ZAlux8n3LZw9Ee0iGmE= X-Received: by 2002:a2e:25a:: with SMTP id 87-v6mr2648603ljc.41.1529897499658; Sun, 24 Jun 2018 20:31:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 24 Jun 2018 21:31:17 -0600 Message-ID: To: rtheunissen@php.net Cc: internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Equality and relative ordering of objects From: levim@php.net (Levi Morrison) On Sun, Jun 24, 2018 at 2:31 PM Rudi Theunissen wrote: >> >> Other languages (most? all?) separate equality and ordering for this reason. > > > Java doesn't really separate them. Their `==` always checks object reference so is like PHP's ===. > But they do have the .equals() method on all objects (our ==) and the collections use that for equality. Java has .equals and .compareTo; these operations are separate. In Java neither integrates with operators.