On 2012-09-06 10:39, Stas Malyshev wrote:
Hi!
... and no real
benefit for average PHP user.
Well, apart from perhaps leaving them with a simpler language that
doesn't have the inconsistencies and corner cases that currently exist
(and documented ad nauseum) not because of any design decision
On 2012-09-05 07:57, Nikita Popov wrote:
Hey folks!
Some people asked me what the advantages of using an AST-based
parsing/compilation process are, so I put together a few quick notes
in an RFC:
https://wiki.php.net/rfc/ast_based_parsing_compilation_process
It would be nice to get a few
is _also_ an r_variable, so does that mean I
can't write $a-b-c = 1;?
Morgan L. Owens
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
) and '$a-b-c' (26 nodes, including
base_variable_with_function_calls)).
Morgan L. Owens
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 2012-09-01 21:23, Sherif Ramadan wrote:
$array[0] = 'first element';
$array[9] = 'second element';
var_dump($array);
/*
array(2) {
[9]=
string(14) second element
[0]=
string(13) first element
}
*/
Just correcting this as it was a copy/paste fail... The above code
would
On 2012-09-01 20:17, Kris Craig wrote:
This discussion kinda reminds me of some of the debates over AUTO_INCREMENT
behavior in the MySQL community. Specifically, they end up having to
tackle the same funcamental, conceptual dilemma: If I
assign/insert/whatever an arbitrary value to a
On 2012-08-30 20:39, Derick Rethans wrote:
On Wed, 29 Aug 2012, Gustavo Lopes wrote:
On Wed, 29 Aug 2012 22:10:52 +0200, Derick Rethans der...@php.net wrote:
Nothing in the core throws an exception, why would this?!
This is not accurate. All the iterators throw exceptions on similar
On 2012-08-23 02:03, Lester Caine wrote:
I accept your point about not caring about how the data was created, but
on the other side, if the data creation is handling a lot more data than
the consumer needs there is an amount of processing time that is wasted.
The quick way of doing something
On 2012-08-23 00:10, Lester Caine wrote:
Then the next example is an 'iterator' ... which you are right ... I do
not appreciate either, because they require an insane amount of overhead
for what would be easy if the first example had been done right! I did
try them, in the past, but the
On 2012-08-22 19:45, Lester Caine wrote:
Personally I'm looking for a 'Official Userland Library' that provides
EXAMPLES of how to do operations rather than yet another downloadable
library.
This is also the sort of thing I would like to see. The examples within
the manual are written for
On 2012-08-22 19:45, Lester Caine wrote:
Personally I'm looking for a 'Official Userland Library' that provides
EXAMPLES of how to do operations rather than yet another downloadable
library.
This is also the sort of thing I would like to see. The examples within
the manual are written for
On 2012-08-22 04:35, Lester Caine wrote:
John LeSueur wrote:
Again, the case you've cited is probably not a case where generators
give much
advantage. But anytime the logic to produce some data becomes more
complicated
(Imagine that you needed to skip some of the lines in the .csv file
based on
Oh, yes...
On 2012-08-22 04:35, Lester Caine wrote:
and doesn't seem to
provide any outstanding advantages?
As I wrote in an earlier post:
On 2012-08-09 15:30, Morgan L. Owens wrote:
I for one am lazy, and would much prefer writing:
?php
function append_iterator($first, $second
On 2012-08-21 01:10, Lester Caine wrote:
For the third one ... I'm still waiting for some clarification on how
yield is SUPPOSED to work anyway? If you are using a 'generator' to
return a sequence of data elements, then just what does happen between
each call to the generator ... DOES the
On 2012-08-19 04:08, Levi Morrison wrote:
On Sat, Aug 18, 2012 at 12:42 AM, Alexey Zakhlestin indey...@gmail.com wrote:
On 16.08.2012, at 0:18, Rasmus Schultz ras...@mindplay.dk wrote:
How come there is no straight-foward obvious way to simply remove a given
value from an array?
Well, this
Rasmus Schultz wrote:
I disagree - this is (or should be) a simple, atomic operation...
yet, you've got a function-call, an intermediary variable, a boolean
test, and an unset statement repeating the name of the array you're
deleting from.
This should be a simple statement or
On 2012-08-19 10:25, Andrew Faulds wrote:
On 18/08/12 14:52, Morgan L. Owens wrote:
How simple is it? Does it:
1) Remove one occurrence of the element (presumably the first) or all?
2) Reindex the array (as someone else argued was necessary to make it
properly indexed afterwards) or not?
3
On 2012-08-16 17:55, Sherif Ramadan wrote:
That doesn't make any sense. What if the values are present more than
once? array_flip will cause the keys to be overwritten.
Not to mention converting all of the array's elements to strings and/or
integers.
Now your array is something completely
On 2012-08-16 08:27, Nikita Popov wrote:
On Wed, Aug 15, 2012 at 10:22 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
Hi!
How come there is no straight-foward obvious way to simply remove a given
value from an array?
Just look at the number of horrible ways people solve this obvious problem:
Mike Ford wrote:
The signposting needn't even be as in-your-face as a generator
keyword (either instead of or in addition to function): I could get
behind a variation such as:
function f($x, $y) yields { ... yield $z; ... }
Or even (stretching a bit to re-use an existing keyword!):
hakre wrote:
Also, currently yield looks very similar to return and I think this
is a nice thing as it is similar semantically. yield($foo) would
give it different semantics, imho.
I love this point a lot. Return is very common and yield is some
kind of return.
I agree also: yield behaves
On 2012-08-09 14:25, Larry Garfield wrote:
On 07/27/2012 07:23 AM, Lester Caine wrote:
Nikita - I am looking for a well reasoned argument as to why generator
has to be added at all! 'Just because it can be' is not a valid
argument, but perhaps you could add to the RFC the performance
On 2012-08-09 08:42, Nikita Popov wrote:
Without parenthesis their behavior in array definitions and nested
yields is ambigous:
array(yield $key = $value)
// can be either
array((yield $key) = $value)
// or
array((yield $key = $value))
yield yield $key = $value;
// can be either
yield (yield
On 2012-08-02 19:56, Peter Cowburn wrote:
On 2 August 2012 07:35, Adam Harvey ahar...@php.net wrote:
Thoughts? (Do we even want to auto-fill this from $OLDRELEASES, or
would we rather have a manual array?) Specific notes on
vulnerabilities to add to branches? Better versions of the copy in the
On 2012-08-02 20:42, Peter Cowburn wrote:
On 2 August 2012 09:36, Morgan L. Owens pack...@nznet.gen.nz wrote:
Just as each release announcement dated with detailed kept on a distinct
page (linked in that list), all that's needed there is a date when support
ended, with (any available
On 2012-07-21 12:19, Stas Malyshev wrote:
Hi!
So when I have a function that has a two- or multi-part result then -
instead of having one part as the return value and the others by
reference - in Python I'd return a tuple.
PHP functions can return arrays and some do - e.g. pathinfo(). But
On 2012-07-21 10:28, Stas Malyshev wrote:
Hi!
If I understand this correctly, this is like what Python let's you do
with tuples. It's handy for getting vector components, hostnames and
port numbers, etc. (I apologise for the Python comparison, it is just
the language where I usually encounter
On 2012-07-15 09:48, Stas Malyshev wrote:
Hi!
And I actually know of websites using the functions to display the logo..
Is there some way we could provide a BC function for it somehow?
Maybe rather then removing the functions, make then return the data uris?
Having the functions to get the
On 2012-07-14 04:12, jpauli wrote:
On Fri, Jul 13, 2012 at 5:33 PM, Anthony Ferrara ircmax...@gmail.com wrote:
4. Rewrite the entire parser completely. I keep hearing about how bad PHP's
parser is, and how it's growing out of control. Perhaps this is a good time
to rewrite it (perhaps changing
On 2012-06-26 07:22, Ben Ramsey wrote:
However, in Prototype.js and Underscore.js, pluck seems behave more like
array_map() in PHP:
http://api.prototypejs.org/language/Enumerable/prototype/pluck/
http://documentcloud.github.com/underscore/#pluck
Nevertheless, it would technically have the
On 2012-06-25 04:19, Ralph Schindler wrote:
The term 'column' makes a lot of sense for PDO working with database
columns, but there is no concept of a 'column' in the array structure or
PHP as a whole, outside of database related functions.
In the case of this addition, I do indeed like
On 2012-06-15 04:00, Ángel González wrote:
On 13/06/12 05:26, Morgan L. Owens wrote:
After reading the performance improvements RFC about interned strings,
and its passing mention of a special data structure (e.g.
zend_string) instead of char*, I've been thinking a little bit about
On 2012-06-08 08:18, Johannes Schlüter wrote:
On Thu, 2012-06-07 at 12:53 -0700, Adi Mutu wrote:
Ok Johannes, thanks for the answer. I'll try to look deeper.
I basically just wanted to know what happens when you concatenate two
strings? what emalloc/efree happens.
This depends. As always. As
Wez Furlong wrote:
On Apr 9, 2005 6:07 AM, Morgan L. Owens [EMAIL PROTECTED] wrote:
Really?
Can you guarantee that your user-space code to sniff out the path is
going to work 100% of the time on all platforms?
Who said user-space? I meant in the implementation of fopen().
fopen
Wez Furlong wrote:
Really?
Can you guarantee that your user-space code to sniff out the path is
going to work 100% of the time on all platforms?
Who said user-space? I meant in the implementation of fopen().
It's not just 1 letter. There are 3 letter special device names too.
Natch; yeah.
If there's something that looks like a scheme (i.e., a well-formed
sequence of
characters followed by ':'),
see if it's registered;
if it is,
the appropriate wrapper should be used.
Otherwise,
on platforms where ':' has significance,
try it again as a file path.
Otherwise, it fails due
It was suggested I post this here.
In PHP, the character sequence :// separates the protocol name from
the protocol-specific part of a stream name. Clearly, the intention is
that these stream names are URLs (i.e., URIs that actually provide a
location for the identified resource). However, the
37 matches
Mail list logo