+1 for the consistency of it. It's surprising that:
if ($foo)
return $bar;
else
return 42;
works and:
try
maybe_dangerous();
catch(Dynamite $e)
handle_error();
does not.
On Thu, Jul 19, 2012 at 12:11 PM, Peter Beverloo wrote:
> On Thu, Jul 19, 2
> Wearing my package maintainer hat and given that Alan's points above are
> true, I would very much like for is_a's behaviour to be reverted to
> pre-5.3.8 state as well. I also believe that reverting would cause less
> damage than keeping current behaviour.
The hugest of +1's!
--
PHP Internals
Will this work:
array('foo', 'bar')('arg1', 'arg2')
?
On Wed, Jun 8, 2011 at 3:48 PM, Christian Kaps
wrote:
> On Wed, 8 Jun 2011 15:39:59 +0200, Jordi Boggiano wrote:
>>
>> On Wed, Jun 8, 2011 at 2:46 PM, Felipe Pena wrote:
>>>
>>> class foo {
>>> public function __construct() {
>>>
On Fri, Jun 10, 2011 at 12:50 PM, Lars Strojny wrote:
> Please change your tone.
+1!
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
I compiled trunk on Ubuntu 11.04 desktop yesterday with default
settings and was surprised and confused when it worked even after I
forgot to use the older autoconf binary. Nice job!
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
> Am 02.06.2011 14:56, schrieb Rune Kaagaard:
>>> this conversion should never happen and throw a fatal error since this
>>> action is destructive to data and never useful nor will warnings/notices
>>> helps in the real world
I agree totally that such a conversion sh
> this conversion should never happen and throw a fatal error since this
> action is destructive to data and never useful nor will warnings/notices
> helps in the real world
Unlike i.e. Python its really not the PHP way to go fatal on the
developer during weird type conversions. I'm also +1 on the
Big +1 on the patch. The ":" although a better choice would be
asymmetric to how its done inside array().
On Wed, Jun 1, 2011 at 11:50 AM, dukeofgaming wrote:
> After that argument, I think I'm against ":" now too. +1 to "=>"
>
> Could "{ }" be implemented for objects too then?.
>
> Regards,
>
>
I don't think this problems calls for a more flexible solution. On the
other hand I think the flexibility _is_ the problem. Today if I want
to write compatible php code I can neither use:
...
or
wrote:
> I like the idea of having an option for no tags needed, since its a .php
> file (or w
Hey again
Updated here as always https://gist.github.com/909711. I've tried to
write down the goal of this new feature. Which patterns do we want to
make easier to write?
Do you agree with the goals I've set?
+1 From me of course :)
Also added a proposal that would make userland implementations
Hi guys
Below is a discussion about some of the issues being raised. Again a
nicely formatted version of the whole thing is here:
https://gist.github.com/909711.
## Discussion ##
### About changing the beviour of the ternary shortcut ###
@Jordi, others
Some suggest adding an implicit `isset` a
Dear Internals
I'm very happy that this is getting some attention again. Please allow
me to give my 2 cents too. The text below can also be seen nicely
formatted at https://gist.github.com/909711.
## Intro ##
Isset and IsNotEmpty operators have for sure been a hot topic for several years
now and
> Having an EBNF would be useful in cases where we want to write
> something like Ruby's CoffeeScript. After looking at PHP's grammar
> file, it's about 1,000 lines long. Since this is used to generate the
> parser, isn't it possible to strip out the C macros to create an EBNF
> that catches all ed
>>
>> ClassMemberDeclaration ::= ConstDeclaration | PropertyDeclaration |
>> MethodDeclaration
>> ConstDeclaration ::= [DocBlockStatement] "const" identifier "=" Literal ";"
>> PropertyDeclaration ::= [DocBlockStatement] Qualifier Variable [&quo
> There has never been a language grammar, so there's been nothing to refer to
> at all. As for why no one's made one more recently, for fun I snagged the .l
> and .y files from trunk and W3C's version of EBNF from XML. In two hours of
> hacking away, I managed to come up with this sort-of begin
ill I have to ask if I'm the only one thinking about this or is
there something I'm being completely ignorant about?
Happy newyear!
Rune Kaagaard
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
You can pry T_PAAMAYIM_NEKUDOTAYIM from my cold dead fingers!
On 4/27/10, mathieu.suen wrote:
> OMG More than 100 token
> I am pretty sure that more than 50% are syntactic sugar.
>
>
>
>
> Davey Shafik wrote:
>> From the manual:
>>
>> T_PAAMAYIM_NEKUDOTAYIM :: ::. Also defined as T_DOU
The files you want to change in PHP core are the lexer
(http://code.google.com/p/php-alternative-syntax/source/browse/trunk/php-5.3.0/Zend/zend_language_scanner.l)
and the scanner
(http://code.google.com/p/php-alternative-syntax/source/browse/trunk/php-5.3.0/Zend/zend_language_parser.y)
and then re
still baffles me. I changed the
"return" keyword to "<-", and I would like to automatically add a
return on the last line of a function. So that the following PHP code:
would return an int with a value of 4.
How should I attack this problem?
Thx a lot!
Rune Kaagaard
Denmark
--
Dear Etienne
Wauw did not know Backus–Naur Form before. That looks like a great
first step. Thx for showing me that!
Cheers
Rune Kaagaard
Denmark
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Dear Etienne
Wauw did not know Backus–Naur Form before. That looks like a great
first step. Thx for showing me that!
Cheers
Rune Kaagaard
Denmark
On 10/14/09, Etienne Kneuss wrote:
> Hello,
>
> On Wed, Oct 14, 2009 at 1:37 PM, Etienne Kneuss wrote:
>> Hello,
>>
>> o
best method to attack the problem I would
be very grateful!
Cheers
Rune Kaagaard
Denmark
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
I have been stuck the last couple of hours trying to make support
for a one line function declaration without the '{}'. Example:
def double($x) = return 2 * $x;
I cant seem to find out what token to use for a new line? Any thoughts?
Thx a lot from confused guy
Rune Kaagaard
Denmark
--
rn $y
}
but got completely stuck.
I realised all of a sudden that I really don't understand anything
about what is going on in these files. Not even enough to ask good
questions. What should I do/read/study/buy/etc...
Thx in advance from a very confused dude that is in way over h
24 matches
Mail list logo