Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26589 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10151 invoked by uid 1010); 14 Nov 2006 23:05:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 10136 invoked from network); 14 Nov 2006 23:05:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Nov 2006 23:05:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.141.85.117 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.141.85.117 uf1.search.ch Linux 2.4/2.6 Received: from [195.141.85.117] ([195.141.85.117:38978] helo=smtp.rim.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/96-02763-2DB4A554 for ; Tue, 14 Nov 2006 18:05:56 -0500 Received: from localhost (localhost [127.0.0.1]) by verksam.search.ch (Postfix) with ESMTP id 1C2D23A0667; Wed, 15 Nov 2006 00:05:51 +0100 (CET) Received: from unknown by localhost (amavisd-new, unix socket) id client-XXzttDFP; Wed, 15 Nov 2006 00:05:50 +0100 (CET) Received: by verksam.search.ch (Postfix, from userid 65534) id 6D5873A06B5; Wed, 15 Nov 2006 00:05:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on verksam.search.ch X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.0 Received: from [192.168.1.72] (ultrafilter-i [192.168.85.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by verksam.search.ch (Postfix) with ESMTP id 0DEFD3A0699; Wed, 15 Nov 2006 00:05:39 +0100 (CET) Message-ID: <455A4BC2.8010108@cschneid.com> Date: Wed, 15 Nov 2006 00:05:38 +0100 User-Agent: Thunderbird 1.5.0.7 (X11/20060911) MIME-Version: 1.0 To: Ilia Alshanetsky Cc: internals@lists.php.net References: <016901c707e3$08aaa440$0201a8c0@pc1> <28.46.24214.5603A554@pb1.pair.com> <44E9C030-F0CA-4E7E-A79C-87417D9BB4A5@prohost.org> In-Reply-To: <44E9C030-F0CA-4E7E-A79C-87417D9BB4A5@prohost.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at search.ch Subject: Re: [PHP-DEV] Binary strings from 6 in 5.2? From: cschneid@cschneid.com (Christian Schneider) Ilia Alshanetsky wrote: > Just because behavior of something had changed in php6 does not mean it > should change in php5 as well. It is the job of new releases to be > backwards compatible, not old releases to be forward compatible. While I agree not to clutter PHP5 too much I can see the point in adding some stuff here. It would have been easier to prepare PHP4 code to the PHP5 clone migration if a clone functionality would have been made available early in PHP4 when it was clear what the PHP5 way of cloning would be. Now I'm stuck with this ugly work-around if I want to be cross-version compatible: function &cloneobj(&$object) { $result = (is_object($object) && version_compare(zend_version(), 2, '>=')) ? clone($object) : $object; return $result; # PHP internals need a tmp var to return by ref } While I'm as of yet unsure how and how often binary strings are going to be used I think it is worth considering opening up the migration path early. - Chris