Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67243 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17444 invoked from network); 1 May 2013 12:12:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 May 2013 12:12:18 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.220.169 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.220.169 mail-vc0-f169.google.com Received: from [209.85.220.169] ([209.85.220.169:63401] helo=mail-vc0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/F3-18873-0A601815 for ; Wed, 01 May 2013 08:12:17 -0400 Received: by mail-vc0-f169.google.com with SMTP id gd11so1239990vcb.28 for ; Wed, 01 May 2013 05:12:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=e9ukdVp6+10etOqAY/PCnjHhBDDEfKErStqb0mLvDGQ=; b=AApfE9QDpD6D7EOMmHjJOcrpzJjmzIP+QR2C65zbs2Xs6dT5YxOgv4z3GnVKmkRufh rVgPozhl6UTp+g040EmBrjYMssJnXtuEHp8EyVZSeogr3siNwlCLEBTE6iZzFyOxHf/o o25jIQaS8gOO7EK48c++/qZSexDposvKBzq8F5CViRcAFjQ+FYeTl3f4YL53JmU3M4ch E5zQpgTccFMgMB4vG0OhGB4gOodUOoCxTGO1lGzyayqAEjihYteDSZhlO0eSfXJcOO3+ j9CjNKYph4Kazyk8+Yi1inZH7M0G2tI3n1u34YAko/vQ0ySJx5w19UF40NTDozOBmor+ yCyA== MIME-Version: 1.0 X-Received: by 10.59.2.199 with SMTP id bq7mr731675ved.51.1367410333988; Wed, 01 May 2013 05:12:13 -0700 (PDT) Received: by 10.58.28.134 with HTTP; Wed, 1 May 2013 05:12:13 -0700 (PDT) In-Reply-To: <5180F705.2090609@apfelbox.net> References: <6245ED6B-2BF7-47B7-80C0-D3B3D8E0B312@strojny.net> <51803086.6020002@sugarcrm.com> <518030FD.5030504@lerdorf.com> <51804FCF.8020204@sugarcrm.com> <5180F705.2090609@apfelbox.net> Date: Wed, 1 May 2013 08:12:13 -0400 Message-ID: To: Jannik Zschiesche Cc: Lazare Inepologlou , Stas Malyshev , Rasmus Lerdorf , PHP internals Content-Type: multipart/alternative; boundary=047d7bb04ce6384cd204dba707af X-Gm-Message-State: ALoCoQkwoubvERYNBGAnvwldVUeuLLjEZpeTkWb9GHf0zCe+S+mEEFG7+1a5REyaOv7tOYCaCB8E Subject: Re: [PHP-DEV] property de-referencing From: rasmus@mindplay.dk (Rasmus Schultz) --047d7bb04ce6384cd204dba707af Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > > This won't work, because Task::$task is a protected property It will work for code that's properly documented with @property annotations= . On Wed, May 1, 2013 at 7:05 AM, Jannik Zschiesche wrote= : > Hi, > > Lazare Inepologlou > Mittwoch, 1. Mai 2013 10:55 > Hello, > > 2013/5/1 Stas Malyshev > > > > The result is the same with "new ReplectionMethod('foo','bar')". The adde= d > value is that it can be statically checked. > > well... yes and no. > > Take the Symfony2 example: > you want to reference ^$task->task with autocompletion in your IDE? > > This won't work, because Task::$task is a protected property. Symfony2 > does the magic for you and automagically accesses the getters and setters= . > This probably won't work with property references, since you can't get th= e > getters and setters for it (except relying on the name of the property as > string and manipulating it). > > Soo... I guess, for this feature, to be useful, we need object accessors > first (which were recently rejected by vote)? > > > Cheers > Jannik > > > Lazare INEPOLOGLOU > Ing=E9nieur Logiciel > > Stas Malyshev > Mittwoch, 1. Mai 2013 01:12 > Hi! > > > PHP has functions that can be result of __call or arbitrary code that > implements fcall handler in an extension. What would be returned then? > Lazare Inepologlou > Mittwoch, 1. Mai 2013 00:20 > 2013/4/30 Rasmus Lerdorf > > In C#, they had the intention to introduce the operator infoof(...) to ge= t > the reflection, not only of properties, but of virtually everything in th= e > language. They abandoned the idea because it is really hard to do that fo= r > overloaded functions and they did not want to do all that work for a half > baked feature: > > > http://blogs.msdn.com/b/ericlippert/archive/2009/05/21/in-foof-we-trust-a= -dialogue.aspx > > However, PHP does not have overloaded functions, which makes things > significantly easier, so maybe it is worth examining the idea. > > > Lazare INEPOLOGLOU > Ing=E9nieur Logiciel > > Rasmus Lerdorf > Dienstag, 30. April 2013 23:00 > > It is certainly not worth overloading the XOR operator for. > > -Rasmus > > > Stas Malyshev > Dienstag, 30. April 2013 22:58 > Hi! > > > You probably have use case for that, and it should be pretty easy to > write a class that does that, but why it should be in the language? It > certainly doesn't look like something sizeable portion of PHP devs would > do frequently. > > --047d7bb04ce6384cd204dba707af--