Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68298 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37448 invoked from network); 24 Jul 2013 11:03:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2013 11:03:19 -0000 Authentication-Results: pb1.pair.com header.from=igor@wiedler.ch; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=igor@wiedler.ch; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain wiedler.ch from 217.26.49.185 cause and error) X-PHP-List-Original-Sender: igor@wiedler.ch X-Host-Fingerprint: 217.26.49.185 mxout006.mail.hostpoint.ch Received: from [217.26.49.185] ([217.26.49.185:63381] helo=mxout006.mail.hostpoint.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/D3-07084-374BFE15 for ; Wed, 24 Jul 2013 07:03:17 -0400 Received: from [10.0.2.45] (helo=asmtp012.mail.hostpoint.ch) by mxout006.mail.hostpoint.ch with esmtp (Exim 4.72 (FreeBSD)) (envelope-from ) id 1V1wqa-000NAG-Fk; Wed, 24 Jul 2013 13:03:08 +0200 Received: from [84.73.218.139] (helo=[10.0.1.97]) by asmtp012.mail.hostpoint.ch with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1V1wqa-0001mF-AS; Wed, 24 Jul 2013 13:03:08 +0200 X-Authenticated-Sender-Id: igor@wiedler.ch Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) In-Reply-To: Date: Wed, 24 Jul 2013 13:03:09 +0200 Cc: Stas Malyshev , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: <60BF8DD5-FEEA-47D9-834F-6C7FDEF3B879@wiedler.ch> <51EF593D.5080005@sugarcrm.com> To: Yasuo Ohgaki X-Mailer: Apple Mail (2.1508) Subject: Re: [PHP-DEV] [RFC] Importing namespaced functions From: igor@wiedler.ch (Igor Wiedler) Hi Yasuo, Monkey patching could be a very useful feature, especially for functions = in a testing context. But I agree with Stas that it's not really related to importing = function/class symbols. Perhaps you should create a separate RFC for it. On Jul 24, 2013, at 7:28 AM, Yasuo Ohgaki wrote: > RunKit is nice, but it's not a standard module and I suppose it will=20= > not be standard. >=20 > This might be a poor example of usefulness of overriding existing=20 > class/method, but proposed feature may be used for monkey patch > for instance. >=20 > http://en.wikipedia.org/wiki/Monkey_patch >=20 > There are issues as discussed in Wiki. So not having such > feature is valid option, but it's nice to have feature. Make strlen() > return number of chars instead of bytes, etc. >=20 > I don't have concrete idea right now. If there is cleaver way that > avoids disadvantages, I would like to see such feature by default=20 > since almost all PHP competitors have this. >=20 > Any ideas that satisfy most of us?