+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 pe...@lvp-media.com wrote:
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
christian.k...@mohiva.com wrote:
On Wed, 8 Jun 2011 15:39:59 +0200, Jordi Boggiano wrote:
On Wed, Jun 8, 2011 at 2:46 PM, Felipe Pena felipe...@gmail.com wrote:
class foo {
public
On Fri, Jun 10, 2011 at 12:50 PM, Lars Strojny l...@strojny.net 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
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
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 should never happen. If we could
redesign
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 dukeofgam...@gmail.com wrote:
After that argument, I think I'm against : now too. +1 to =
Could { } be implemented for objects too then?.
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:
?foreach($rows as $row):? ...
or
?xml ...
in my template files. Bummer! :)
I would much prefer that
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
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`
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
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 edge
{,
SimpleArgumentDeclaration}
SimpleArgumentDeclaration ::= [TypeHint] Variable [= Literal]
TypeHint ::= ArrayTypeHint | FullyQualifiedClassIdentifier
ArrayTypeHint ::= array
Now it is easy to continue the work and add missing rules. =)
Cheers,
On Sat, Jan 1, 2011 at 12:46 PM, Rune Kaagaard rumi
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
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 mathieu.s...@easyflirt.com 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
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
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:
?php
function foo() {
$x = 2;
$x * 2;
}
?
would return an int with a value of 4.
How should I attack this problem?
Thx a lot!
Rune Kaagaard
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
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 col...@php.net wrote:
Hello,
On Wed, Oct 14, 2009 at 1:37 PM, Etienne Kneuss col...@php.net wrote:
Hello,
one
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
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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http
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 his head
Rune Kaagaard
Denmark
--
PHP Internals
24 matches
Mail list logo