Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67343 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81938 invoked from network); 7 May 2013 18:11:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2013 18:11:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=drgomesp@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=drgomesp@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.169 as permitted sender) X-PHP-List-Original-Sender: drgomesp@gmail.com X-Host-Fingerprint: 209.85.212.169 mail-wi0-f169.google.com Received: from [209.85.212.169] ([209.85.212.169:61023] helo=mail-wi0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/D1-06696-BD349815 for ; Tue, 07 May 2013 14:11:39 -0400 Received: by mail-wi0-f169.google.com with SMTP id h11so4326881wiv.0 for ; Tue, 07 May 2013 11:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=untyycPcXyeFqFvtXmxrjCNmM2sgBjQptGBpzaB9tOc=; b=S9E4H21ZHUVvGszpo8Xbdb+LVZoY8Vn2MjiGQieTXeyX6r8TKublMdUIr7JUJdxzmR ctv/ntwPEytCxtLFTk9d4uzO/Qh54UVeFVNGsUuR8XRJMKD8zN5ycMXxsbUd7tSJ71uf 9dJVx82dbYhAU0lXQSbDz4fpU9GAdoQfdOqXZmw4cZcy0DZJWGcTI04vUMI1KT+Lgx5+ 5fcsxzlyN/7ApZhM+AmEVpG4xYrcHd9F8YU3P9h1kjko2Lf32zqJFVkneiJM37SmspBX SW742se4JiKYooIUrLo1coMchgtTB3k5HA9Q3bNYpmrAd4YhwAspaOe6Iw58Z718K9UZ cPag== X-Received: by 10.194.71.103 with SMTP id t7mr5324840wju.38.1367950296438; Tue, 07 May 2013 11:11:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.60.171 with HTTP; Tue, 7 May 2013 11:11:16 -0700 (PDT) In-Reply-To: References: Date: Tue, 7 May 2013 15:11:16 -0300 Message-ID: To: Nikita Popov Cc: Thomas Anderson , PHP internals Content-Type: multipart/alternative; boundary=047d7bd917607d5ffd04dc24bff5 Subject: Re: [PHP-DEV] idea: implement a Comparable interface From: drgomesp@gmail.com (Daniel Ribeiro) --047d7bd917607d5ffd04dc24bff5 Content-Type: text/plain; charset=ISO-8859-1 Its kinda useless feature for PHP. Daniel Ribeiro Gomes Pereira Twitter | Facebook | LinkedIn iPhone: +55 (48) 9111-0931 2013/5/7 Nikita Popov > On Tue, May 7, 2013 at 6:17 PM, Thomas Anderson wrote: > > > It'd be nice if, when doing $objA > $objB, that that'd invoke > > $objA->__compareTo($objB) or something, much like Java's Comparable > > interface. > > > > Do you have examples of what this would be useful for? The two things that > come to mind are DateTime (which can do this anyway as it's an internal > class) and classes for bignums or something like that (which are probably > also better implemented internally). So I'm not sure how much use there is > for this. > > Nikita > --047d7bd917607d5ffd04dc24bff5--