Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69676 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34974 invoked from network); 18 Oct 2013 12:42:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Oct 2013 12:42:06 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.43 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.43 mail-wg0-f43.google.com Received: from [74.125.82.43] ([74.125.82.43:33992] helo=mail-wg0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/22-23638-C9C21625 for ; Fri, 18 Oct 2013 08:42:05 -0400 Received: by mail-wg0-f43.google.com with SMTP id b13so3701467wgh.22 for ; Fri, 18 Oct 2013 05:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=5MDBNRQy3r4hVGeQAlNTifkRBz11J+hzAM4W4iJgOGM=; b=LdaxgU+yog5DqCaX6aSPEBMLPXfmUWW9ARY612tt0qDTDZvb4WIJ6VmX25Rk6urJg4 ++XCVxSNyOMuwCxYqWiX7LQhWkYJs1hdI/WK1EZ8HCkq27ZNep2B3QnCWWYUAqhLRXKl OdhxlWc2l3sQieTHbS6g0oJu0P/pqAXnsi3DMjq0ooXjLHcVpxVJaVWgEIHmhwVLK2wb XWOlzqu7PZVhdLfQNjj4TT0dBaDmLEqcjZjoc7fNSdl1gbU7MA0KRHGBRnh19ouVU3fq itY/kqekj17ERHyN/g06D9uc0qE++ofTwjgIFnTbnZiPvhrQ7cD5Ofadc49qLOthiFnJ wQXA== X-Received: by 10.194.104.66 with SMTP id gc2mr156946wjb.75.1382100122133; Fri, 18 Oct 2013 05:42:02 -0700 (PDT) Received: from [192.168.0.2] (cpc19-brig17-2-0-cust25.3-3.cable.virginmedia.com. [81.101.201.26]) by mx.google.com with ESMTPSA id eq12sm3110211wic.7.2013.10.18.05.42.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 05:42:01 -0700 (PDT) Message-ID: <52612C92.7060108@gmail.com> Date: Fri, 18 Oct 2013 13:41:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: PHP Internals References: <525C631E.1050008@gmail.com> <1381853515.3980.195.camel@guybrush> <526002B4.9010808@gmail.com> <526022E1.1040406@gmail.com> <52602B7A.3080509@gmail.com> <5260550C.1040406@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Proposal to deprecate create_function() From: rowan.collins@gmail.com (Rowan Collins) On 18/10/2013 06:25, Pierre Joye wrote: >> Well, to an extent - it is not true that any PHP script which works in PHP >> >5.2 will work in PHP 5.5, let alone work identically. For instance, >> >call-time pass-by-reference causes a fatal error in PHP >= 5.4; unlike calls >> >to create_function, it's tricky to search for code that used that, and to be >> >confident of the implications of changing it. > Comparing a widely used feature, working well with something that > never really worked (and why we have removed it) is hardly a good > argument to remove create_function :-) Absolutely, every proposal has to be evaluated on its merits, and that was just an example of a different situation where different conclusions were reached. But "it works" seems a little too superficial to me, and I wanted to tease out the details of this particular case. To continue with the call-time pass-by-reference example, it was perfectly possible to write code which relied on that feature; it just wasn't a terribly good idea. In fact, I came upon this manual page the other day: http://php.net/debug_zval_dump The examples rely on the fact that the caller can decide whether something is passed by value or reference. In PHP >=5.4, that function is slightly more useless than it was before. -- Rowan Collins [IMSoP]