Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces)

2011-06-29 Thread Martin Scotta
On Wed, Jun 29, 2011 at 5:25 PM, Paul Dragoonis wrote: > On Wed, Jun 29, 2011 at 9:22 PM, David Zülke > wrote: > > On 29.06.2011, at 22:20, Paul Dragoonis wrote: > > > >> On Wed, Jun 29, 2011 at 8:49 PM, Ralph Schindler > wrote: > >>> Correct. > >>> > >>> I was hasty in that example, the first

Re: [PHP-DEV] Inline Lambda Functions

2011-06-29 Thread Martin Scotta
ay_filter() with an appropriate > callback? Should handle it like you describe plinq does it, right? > > > Jarrod I think is a very good idea. Which you think the syntax will be for... * multiples arguments * multiples sentences * no return value closures could be kind of wordy but they are very clear about those. Martin Scotta > Regards, > Stefan >

Re: [PHP-DEV] Variable scopes for language constructs (foreach, ...)

2011-06-23 Thread Martin Scotta
Martin Scotta On Thu, Jun 23, 2011 at 12:27 PM, Stefan Neufeind wrote: > On 06/23/2011 05:17 PM, Anthony Ferrara wrote: > > Personally, I don't care for the concept of a block scope. I do > > understand that it can have benefits and make certain tasks easier. > &g

Re: [PHP-DEV] Variable scopes for language constructs (foreach, ...)

2011-06-23 Thread Martin Scotta
Martin Scotta On Thu, Jun 23, 2011 at 12:12 PM, Paul Dragoonis wrote: > On Thu, Jun 23, 2011 at 4:09 PM, Ferenc Kovacs wrote: > > > On Thu, Jun 23, 2011 at 5:03 PM, Stefan Neufeind > wrote: > > > > > Hi, > > > > > > I've lately discu

Re: [PHP-DEV] Variable scopes for language constructs (foreach, ...)

2011-06-23 Thread Martin Scotta
Martin Scotta On Thu, Jun 23, 2011 at 12:09 PM, Ferenc Kovacs wrote: > On Thu, Jun 23, 2011 at 5:03 PM, Stefan Neufeind wrote: > > > Hi, > > > > I've lately discussed with a colleague which scopes of variables exist > > for PHP or would probably make se

Re: [PHP-DEV] Callable type

2011-06-08 Thread Martin Scotta
Martin Scotta On Wed, Jun 8, 2011 at 10:31 AM, Anthony Ferrara wrote: > > No default values, other then NULL allowed. > > Otherwise we would need to support array("classname", "methodname") > > too, and then people would want default array values

Re: [PHP-DEV] Callable type

2011-06-08 Thread Martin Scotta
Martin Scotta On Wed, Jun 8, 2011 at 5:47 AM, Alexey Shein wrote: > 2011/6/8 Hannes Magnusson : > > We have the situation in the docs that parameters declared as arrays > > do not follow the typehinting rules, but parameters as class names do. > > Re-using the callback fr

Re: [PHP-DEV] Callable type

2011-06-07 Thread Martin Scotta
callback is callable, the opposite could not be true. a string --or a closure-- is callable, but the string is not a callback IMHO callable fits better. Martin Scotta On Tue, Jun 7, 2011 at 4:28 PM, David Zülke wrote: > On 07.06.2011, at 21:12, Stas Malyshev wrote: > > > Hi! &g

Re: [PHP-DEV] Implementation help needed: Currying RFC

2011-06-07 Thread Martin Scotta
Martin Scotta On Tue, Jun 7, 2011 at 10:43 AM, John Crenshaw wrote: > >$apos = curry strpos(..., 'a')); > >$apos(); // runtime error wrong param count? > >$apos("bar"); // fine > >$apos("bar", "foo"); //

Re: [PHP-DEV] Bundling "modern" extensions

2011-06-07 Thread Martin Scotta
Martin Scotta On Tue, Jun 7, 2011 at 6:32 AM, David Muir wrote: > On 07/06/11 15:49, Reindl Harald wrote: > > > > Am 07.06.2011 04:42, schrieb Martin Scotta: > >> On Mon, Jun 6, 2011 at 8:15 PM, Reindl Harald >wrote: > >> > >>> Am 06.06.2011 23

Re: [PHP-DEV] Bundling "modern" extensions

2011-06-07 Thread Martin Scotta
Martin Scotta On Tue, Jun 7, 2011 at 10:36 AM, Ferenc Kovacs wrote: > On Tue, Jun 7, 2011 at 3:10 PM, Reindl Harald >wrote: > > > > > > > Am 07.06.2011 15:08, schrieb Ferenc Kovacs: > > > On Tue, Jun 7, 2011 at 3:04 PM, Reindl Harald > >wrote: >

Re: [PHP-DEV] Callable typehint

2011-06-06 Thread Martin Scotta
Martin Scotta On Mon, Jun 6, 2011 at 8:02 PM, Stas Malyshev wrote: > Hi! > > > The point, though, is that with such a typehint available, we can reduce >> boilerplate code like the following: >> > > Sure. How about reducing boilterplate code like this: >

Re: [PHP-DEV] Bundling "modern" extensions

2011-06-06 Thread Martin Scotta
Martin Scotta On Mon, Jun 6, 2011 at 8:15 PM, Reindl Harald wrote: > > Am 06.06.2011 23:40, schrieb Martin Scotta: > > > It'd be very nice if some extension could be enabled just by dropping the > > "extension file" on the path. > > So developers c

Re: [PHP-DEV] RFC: Short syntax for Arrays (redux)

2011-06-06 Thread Martin Scotta
Martin Scotta On Mon, Jun 6, 2011 at 3:03 PM, Matthew Weier O'Phinney < weierophin...@php.net> wrote: > On 2011-06-01, Sean Coates wrote: > > > Now, the only reason I would personally support the array shortcut is > > > if it was an implementation of JSON.

Re: [PHP-DEV] Bundling "modern" extensions

2011-06-06 Thread Martin Scotta
Martin Scotta On Mon, Jun 6, 2011 at 2:01 PM, Pierre Joye wrote: > On Mon, Jun 6, 2011 at 6:53 PM, Matthew Weier O'Phinney > wrote: > > > My point is that perhaps PHP has missed the boat a bit by moving > > everything into extensions. Perhaps if an extension is pa

Re: [PHP-DEV] Voting does not belong on the wiki! (Was: [PHP-DEV] 5.4 moving forward)

2011-06-03 Thread Martin Scotta
Martin Scotta On Fri, Jun 3, 2011 at 5:16 AM, Pierre Joye wrote: > hi Derick, > > On Fri, Jun 3, 2011 at 9:45 AM, Derick Rethans wrote: > > On Thu, 2 Jun 2011, Stas Malyshev wrote: > > > >> I'd like to set up a vote for the undecided TODO features on >

Re: [PHP-DEV] RFC: Short syntax for Arrays (redux)

2011-06-02 Thread Martin Scotta
Could we first go out with fully JSON compatible version for 5.4? and then later decide the => stuff based on how that worked. Native JSON is a big stuff for userland, and I'm pretty sure it will bring a hole of core version upgrades. Martin Scotta On Wed, Jun 1, 2011 at 7:09 PM, Sea

Re: [PHP-DEV] Fwd: What's up with Quercus?

2011-05-28 Thread Martin Scotta
Martin Scotta On Sat, May 28, 2011 at 11:31 PM, Stas Malyshev wrote: > Hi! > > > annotations have been a central part of the last 100 or so JSRs and I've >> only seen one or two informed objections, it's fairly obvious the list has >> had very little experie

Re: [PHP-DEV] Inconsistencies with constructors in SPL

2011-05-17 Thread Martin Scotta
Martin Scotta On Mon, May 16, 2011 at 4:10 PM, Anthony Ferrara wrote: > Personally, I really don't care for something like this. Would it be > caught by a __call declaration if one existed (since it is a call to > an undefined method)? Would you expect it to? > Alt

Re: [PHP-DEV] 5.4 again

2011-05-11 Thread Martin Scotta
Martin Scotta On Wed, May 11, 2011 at 2:18 PM, Arvids Godjuks wrote: > Well, maybe it's time to make some decisions and start to spin the wheels? > > I's quite obvious that annotations are out for next release until they are > a > docbook/phpDoc style. Personall

Re: [PHP-DEV] annotations again

2011-05-10 Thread Martin Scotta
Martin Scotta On Tue, May 10, 2011 at 5:02 AM, Lars Schultz wrote: > Am 10.05.2011 09:44, schrieb Ferenc Kovacs: > > On Tue, May 10, 2011 at 9:01 AM, Chad Fulton >> wrote: >> >> On Mon, May 9, 2011 at 10:46 PM, Lester Caine >>> wrote: >>> &

Re: [PHP-DEV] annotations again

2011-05-10 Thread Martin Scotta
On Tue, May 10, 2011 at 5:45 AM, Rasmus Lerdorf wrote: > On 05/10/2011 01:10 AM, Jordi Boggiano wrote: > >> On Tue, May 10, 2011 at 10:02 AM, Lars Schultz >> >>> To explain what I mean, I'll use the example provided in the RFC. Could >>> >>> anyone please explain the advantages of having "passive

Re: [PHP-DEV] 5.4 again

2011-05-09 Thread Martin Scotta
Martin Scotta On Mon, May 9, 2011 at 11:44 AM, guilhermebla...@gmail.com < guilhermebla...@gmail.com> wrote: > Hi, > > I'd love if you ever discuss these items for 5.4: > > - ReflectionNamespace > > Currently it's impossible to grab a docblock that docume

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-29 Thread Martin Scotta
Martin Scotta On Thu, Apr 28, 2011 at 5:15 PM, Peter Lind wrote: > 2011/4/28 Martin Scotta : > > * snip * > > > IMHO I would not trust on any return value, as PHP did not ensure > anything > > about them. > > Even more, I do not write code that depend on r

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-28 Thread Martin Scotta
Martin Scotta 2011/4/28 Johannes Schlüter > On Thu, 2011-04-28 at 20:04 +0200, Ferenc Kovacs wrote: > > > Why I need being "saved" from documenting my code properly? Anyway, the > > > function code defines the behavior, declaration of return type just > en

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-28 Thread Martin Scotta
Martin Scotta On Thu, Apr 28, 2011 at 2:51 PM, Matt Wilson wrote: > Here's my issue: > > We're borrowing a feature from strongly typed languages and forcing it on a > loosely typed language. I'm fine with this, if we're true to the concept. > > In a regu

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-28 Thread Martin Scotta
Martin Scotta On Thu, Apr 28, 2011 at 12:58 PM, Ben Schmidt wrote: > FWIW, I don't see much point in this either, as far as error reporting is > concerned. I think type checking for parameters can provide cheap and useful > validation, as parameters passed in are outside

Re: [PHP-DEV] [RFC] Return type-hint

2011-04-28 Thread Martin Scotta
Hey All, I'm really interested on this topic. What would be the result of this? function Foo foo($something) { if ( $something ) { return new Foo; } // no return implies return null } How do you force to return a Type with null allowed? Martin Scotta On Thu, A

Re: [PHP-DEV] Call non-static method staticly raise E_STRICT, but why call a static method instancely won't

2011-04-25 Thread Martin Scotta
Martin Scotta On Mon, Apr 25, 2011 at 4:52 AM, Alessandro Nadalin < alessandro.nada...@gmail.com> wrote: > 2011/4/24 Etienne Kneuss : > > Hi, > > > > On Apr 24 22:13:47, Ángel González wrote: > >> reeze wrote: > >> > Hi, > >> > I

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-22 Thread Martin Scotta
what about something like this? $_GET += array( 'key' => 42, 'other' => 'blablah' ); echo $_GET [ 'key' ]; and it's already available on you current instalation :) Martin Scotta On Fri, Apr 22, 2011 at 11:27 PM, Ben Schmidt wrote: >

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-14 Thread Martin Scotta
good data abstractions the usage of array_key_exists/isset/empty is barely reduced to the minimum. Martin Scotta On Thu, Apr 14, 2011 at 10:12 AM, Ben Schmidt wrote: > There are two issues here. >>>>> >>>>>1. Suppression of notice. I agree, it is best

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-14 Thread Martin Scotta
Martin Scotta On Thu, Apr 14, 2011 at 8:58 AM, Ben Schmidt wrote: > 1. Suppression of notice. I agree, it is best done only for array >>> keys. It's not hard to initialise a variable with $var=null at the >>> beginning of a code block to avoid such a notice, and that

Re: [PHP-DEV] proposed access modifier "silent" ... was: Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-11 Thread Martin Scotta
It seems that there are no consensus about this feature so... *if in doubt, leave it out.* Martin Scotta On Mon, Apr 11, 2011 at 5:09 PM, Chris Stockton wrote: > Hello, > > On Mon, Apr 11, 2011 at 11:47 AM, Matthew Weier O'Phinney > wrote: > > On 2011-04-11, Stas Ma

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-08 Thread Martin Scotta
harm than good. To check if a variable was already defined is a bad programing habit, these operators will encourage that kind of things In the other hand, the isset check inside the condition ?: would silently improve not-so-well written code, and could be a good feature for the lang. Martin Scotta

Re: [PHP-DEV] Adding a more logical string slicing function to PHP

2011-04-02 Thread Martin Scotta
erextends Scalar, Numeric { } interface Float extends Number { } interface Integer extends Number { } ( http://graph.gafol.net/etSevVPSJ ) This way the core will know which methods are allowed to call on each $var Advantages: * cannnot create instances * cannot extends these interfaces (private to core) * very very fine type hint * core implementation is not exposed Martin Scotta

Re: [PHP-DEV] Adding a more logical string slicing function to PHP

2011-03-31 Thread Martin Scotta
hem as a regular strings or by calling methods on it. Martin Scotta On Thu, Mar 31, 2011 at 12:52 PM, Rasmus Lerdorf wrote: > On 03/31/2011 08:45 AM, Philip Olson wrote: > > > - Intuitive name > > Argh! Everyone should be forced to learn a bit of C. Like many PHP > funct

Re: [PHP-DEV] Adding a more logical string slicing function to PHP

2011-03-31 Thread Martin Scotta
Martin Scotta On Thu, Mar 31, 2011 at 12:05 PM, Rasmus Lerdorf wrote: > On 03/31/2011 07:41 AM, Philip Olson wrote: > > > > On Mar 30, 2011, at 1:42 PM, Martin Jansen wrote: > > > >> On 30.03.11 21:36, Dan Birken wrote: > >>> As for adding other stri

Re: [PHP-DEV] Adding a more logical string slicing function to PHP

2011-03-30 Thread Martin Scotta
. how about Java? string.endsWith(str); I don't speak Ruby or Python... how do you do this in such languages? Martin Scotta On Wed, Mar 30, 2011 at 10:05 AM, Hannes Landeholm wrote: > PHP's substr() is awesome and that comes from a person that code in at > least > 5 differe

[PHP-DEV] application variables

2011-03-16 Thread Martin Scotta
, Martin Scotta

[PHP-DEV] preg_replace does not replace all occurrences

2011-03-14 Thread Martin Scotta
I chose the simplest example to show the preg_replace behavior, there are better (and safer) ways to scape slash characters. Anyways, *is this the expected preg_replace behavior?* Martin

Re: [PHP-DEV] EOL removed after ?>

2011-03-10 Thread Martin Scotta
ok, I think I got it. so you think it's safe to include an empty new line after a line that ends with ?> ? Martin Scotta On Thu, Mar 10, 2011 at 1:59 PM, Hannes Landeholm wrote: > http://brian.moonspot.net/php-history-newline-closing-tag > > ~Hannes > > On 10 March 20

[PHP-DEV] EOL removed after ?>

2011-03-10 Thread Martin Scotta
hi all, 11 22 33 11 22 33 First try works... but second fails output: 1 1 2 2 3 3 1 12 2 3 3 is this the expected behavior? Martin Scotta

Re: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread Martin Scotta
On Wed, Mar 9, 2011 at 3:23 PM, Chad Fulton wrote: > Hello, > > On Wed, Mar 9, 2011 at 10:02 AM, Jarrod Nettles > wrote: > > Interesting question. My gut tells me not (as does three years of C# > experience). I’m sure that everyone will have a different opinion on this > but to me it seems taboo

Re: [PHP-DEV] Class Access Modifiers

2011-03-09 Thread Martin Scotta
ass "Prot" So... does it mean that class "Priv" cannot be used outside "A"? no, you can always return a reference. namespace A { class F { static function getE() { return new E; } } private class E { } } var_dump( \A\F::getE() ); // object \A\E Martin

Re: [PHP-DEV] Make set_time_limit() timeout a catchable fatal error

2011-03-09 Thread Martin Scotta
e able to recover themselves... and if they don't catch the error... then die. it would be nice if all errors could be changed into exceptions. Martin Scotta On Wed, Mar 9, 2011 at 10:56 AM, Hannes Landeholm wrote: > I second making time limit reached catchable. All non catchable fatal

Re: [PHP-DEV] Class Access Modifiers

2011-03-03 Thread Martin Scotta
I'm writing a RFC about improvements on the current OO Model. do you want to add this? http://wiki.php.net/rfc/object-model-improvements Martin Scotta On Thu, Mar 3, 2011 at 2:21 PM, Jarrod Nettles wrote: > Has there been any discussion on access modifiers for classes? I looked &

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-23 Thread Martin Scotta
fine or constants? so you need classes.. do they fit well? I don't think so $h = new Hydrogen(); // What would mean this? $h = Element::Hydrogen(); // probably with a static method $h = Element::Hydrogen; // class constant? lack of objects support Martin Scotta On Wed, Feb 23, 2011 at 10:49 AM,

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-23 Thread Martin Scotta
Martin Scotta On Wed, Feb 23, 2011 at 7:12 AM, Ben Schmidt wrote: > Are you suggesting this as an enum member function, or just a regular >>> function in any old class? >>> >> >> "Enum member funcion"? How much it should be like a class before you >

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-22 Thread Martin Scotta
answered this clearly. I don't think type hinting > is worth the implementation overhead (loss of efficiency) it would require. > > Ben. > > > Martin Scotta > > > On 23/02/11 1:11 AM, Jarrod Nettles wrote: > >> Apologies - I wasn't suggesting we implem

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-18 Thread Martin Scotta
ide some helpful methods out the box, like __toString, or fromString enum MySqlEnum { A_CONSTANT, ANOTHER_ONE; } $foo = MySqlEnum::A_CONSTANT; var_dump( (string) $foo ); // string "A_CONSTANT" var_dump( MySqlEnum::ANOTHER_ONE === MySqlEnum::fromString('ANOTHER_ONE')); MySqlEnum:

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-17 Thread Martin Scotta
construct" per file) and thus will need to support autoloading. The > only way to achieve this will be by passing a fully qualified name into the > registered autoloaders. > > /Framework/Web/Mvc/HttpVerbsEnum > > > -Original Message- > From: Martin Scotta [mailto:mar

Re: [PHP-DEV] Re: Clarification on the Enum language structure

2011-02-14 Thread Martin Scotta
On Mon, Feb 14, 2011 at 12:45 PM, Thomas Gutbier < thomas.gutb...@anthrotec.de> wrote: > Jarrod Nettles wrote: > >> So, my proposed syntax would look something more like this. >> > > I think also and was wondering about the current rfc for a few weeks. > Im not a core developer but I want to outli

Re: [PHP-DEV] [citations for] Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-20 Thread Martin Scotta
Martin Scotta On Wed, Jan 19, 2011 at 9:19 PM, Stas Malyshev wrote: > Hi! > > > Many PHP features should be language constructs, but they were made as >> language hacks. >> >> __construct is evil, as like any other language hack >> > > Construct

Re: [PHP-DEV] [citations for] Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-19 Thread Martin Scotta
fail as parent::__construct will not exists. In both cases there were no API changes, only the way the objects are initializated was what changed. My point is that the language does not provide solid fundations (aka language constructs) for systems and libraries to evolve in a safe way. Martin Scotta

Re: [PHP-DEV] [citations for] Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-19 Thread Martin Scotta
ct. Threads are not easy, even the most experienced programmer could not get it right from the scratch. IMHO, as a simple PHP programmer, the language should provide the simplest language construct and the engine should handle all the complexity under the hood. Martin Scotta On Wed, Jan 19, 201

Re: [PHP-DEV] How deep is copy on write?

2011-01-19 Thread Martin Scotta
hValues($anInteger, $aBool, $aString) { var_dump($anInteger, $aBool, $aString); } function withObject(ParamOject $o) { var_dump( $o->theInteger(), $o->theBool(), $o->theString() ); } Martin Scotta On Wed, Jan 19, 2011 at 5:03 AM, Hannes Landeholm wrote: > Using references does

Re: [PHP-DEV] PHP development environment

2011-01-14 Thread Martin Scotta
Yes, my question was about the internal development of PHP. How do you guys develop the core of PHP? Which IDE or text editor do you use? How do you launch the compiler? Are you able to debug the PHP core while it's running some PHP script? Martin Scotta On Fri, Jan 14, 2011 at 11:

[PHP-DEV] PHP development environment

2011-01-14 Thread Martin Scotta
Hi all, I'm just starting with the internal PHP development. Do you have some sort of common development environment? Eclipse project or the like? I'm using Ubuntu but also have a WXP, just for the sake of. how do you develop PHP ? Martin Scotta

Re: [PHP-DEV] RFC: about class names as values

2011-01-13 Thread Martin Scotta
Hi all, I don't know how the internal development process of PHP works. First at all: was this feature approved? if that is a "yes"... is this feature going to be scheduled for some release? Is it supposed that I will submit a patch? Thanks you all, Martin Scotta On Sun, Ja

Re: [PHP-DEV] RFC: about class names as values

2011-01-07 Thread Martin Scotta
, '\A\B\C\Foo' refers to the same class that 'A\B\C\Foo', but the string comparison will return false Regards, Martin Scotta On Thu, Jan 6, 2011 at 11:47 AM, Michael Morris wrote: > +1 to this. In a similar vein (and similar reasons) consider ::PARENT as > well. Sin

Re: [PHP-DEV] RFC: about class names as values

2011-01-06 Thread Martin Scotta
just for consistency but, as I previously said, I'm not sure about this one. Martin Scotta 2011/1/5 John LeSueur > > > 2011/1/5 Johannes Schlüter > >> On Wed, 2011-01-05 at 21:53 -0300, Martin Scotta wrote: >> > $obj = newInstance( MyClass ); // notice.

[PHP-DEV] RFC: about class names as values

2011-01-05 Thread Martin Scotta
S" is currently a reserved word is guarantied that nobody is using as it today. What do you think about? Martin Scotta