On 10/15/2010 07:26 PM, G M wrote:
Okay so I am thinking about submitting a patch to PHP that would enable you to
call functions like this:
stuff(1, 2, 'separator' = 'br', 'clean' = true);
and define them like this:
/**
* function to do stuff
* @param integer $a
* @param integer $b
Title: Document sans nom
I consider having type in the declaration of a method a bad idea and
this thread just prove it.
You can also read this:
http://gbracha.blogspot.com/2009/09/systemic-overload.html
On 08/19/2010 10:32 AM, Johannes Schlüter wrote:
On Thu, 2010-08-19 at 01:13 -0700,
On 08/06/2010 04:42 PM, Gustavo Lopes wrote:
On Fri, 06 Aug 2010 15:33:18 +0100, mathieu.suen
mathieu.s...@easyflirt.com wrote:
Hi,
For now you can only index an array using a scalar type or a string.
Is there some rfc or work going on to enlarge the possibility so that it
is possible
On 08/06/2010 04:44 PM, Richard Quadling wrote:
On 6 August 2010 15:33, mathieu.suenmathieu.s...@easyflirt.com wrote:
Hi,
For now you can only index an array using a scalar type or a string.
Is there some rfc or work going on to enlarge the possibility so that it is
possible to have some
On 08/06/2010 07:46 PM, Stas Malyshev wrote:
Hi!
For now you can only index an array using a scalar type or a string.
Is there some rfc or work going on to enlarge the possibility so that it
is possible to have some other object like:
I think SplObjectStorage implements most common use-case
Hi,
For now you can only index an array using a scalar type or a string.
Is there some rfc or work going on to enlarge the possibility so that it
is possible to have some other object like:
- closure
- object
- etc.
Thanks
-- Mathieu Suen
On 07/23/2010 10:20 AM, Reindl Harald wrote:
Would you like to know what is really confusing?
mysql_escape_string
mysql_real_escape_string
So if you have nothing to do try to cleanup this
hint: mysql_real_escape_string never should have existed this way
and should be dprecated for some relaeses
Hi
Why not something more generic.
Someone could think of a ValueNode.
Then it could be use for object, array, any primitive type ...
I will take the ValueNode as a non terminal grammar node.
So first we could do that:
ValueNode-method();
ValueNode::sMethod();
ValueNode[];
foo(ValueNode);
On 06/04/2010 10:00 AM, Richard Quadling wrote:
On 4 June 2010 08:18, mathieu.suenmathieu.s...@easyflirt.com wrote:
Hi
Why not something more generic.
Someone could think of a ValueNode.
Then it could be use for object, array, any primitive type ...
I will take the ValueNode as a non
[] = {
SPL_ABSTRACT_ME(OuterIterator, getInnerIterator,
arginfo_recursive_it_void)
{NULL, NULL, NULL}
};
IMO the SPL_ME should be used instead, but I wouldn't be bothered about it ;-)
On Tue, May 18, 2010 at 11:12 PM, mathieu.suen
mathieu.s...@easyflirt.com wrote:
Hi,
In the SPL
Hi,
In the SPL there is some interface that have abstract method:
*Countable* {
/* Methods */
abstract public int count
http://www.php.net/manual/en/countable.count.php ( void )
}
While some interface have none abstract method.
*OuterIterator* extends Iterator
On 05/03/2010 05:42 PM, Christian Schneider wrote:
mathieu.suen wrote:
May be it could be interesting to have a syntax for returning from the
define scope.
For example.
$findedElment = $myList-selectIfAbsent($fooo, function(){
return 'No item founded'; //Retrun from the define scope
On 05/03/2010 06:03 PM, Etienne Kneuss wrote:
On Mon, May 3, 2010 at 5:54 PM, mathieu.suenmathieu.s...@easyflirt.com wrote:
I think you actually misunderstand the difference in
http://en.wikipedia.org/wiki/Closure_%28computer_science%29#Differences_in_semantics
The way I read if
On 05/03/2010 11:34 PM, Tjerk Anne Meesters wrote:
On Mon, May 3, 2010 at 11:42 PM, Christian Schneider
cschn...@cschneid.com wrote:
mathieu.suen wrote:
May be it could be interesting to have a syntax for returning from the
define scope.
For example.
$findedElment = $myList
Hi,
The statement 'return' in a closure is now returning from the scope that
evaluate the closure (evaluation scope).
It could have been in an other way.
It could mean return from the scope were the closure is create (define
scope).
May be it could be interesting to have a syntax for
Of course I am.
take a look at:
http://en.wikipedia.org/wiki/Closure_%28computer_science%29
Section: Differences in semantics
On 05/03/2010 03:27 PM, Jille Timmermans wrote:
Are you serious?
Op 3-5-2010 15:01, mathieu.suen schreef:
Hi,
The statement 'return' in a closure is now returning
I think you actually misunderstand the difference in
http://en.wikipedia.org/wiki/Closure_%28computer_science%29#Differences_in_semantics
The way I read if the difference is wether it returns from the closure
function or the surrounding function *calling* it. Not the *defining* scope.
And no,
Johannes Schlüter wrote:
On Mon, 2010-04-26 at 16:32 +0200, mathieu.suen wrote:
I am wondering why is the token name so incomprehensible ?
Like T_PAAMAYIM_NEKUDOTAYIM...
I don't mind if we change the name in the error message. Seems to be an
issue for some ... but I think you have
Steven Van Poeck wrote:
Folks, can't you just accept that T_PAAMAYIM_NEKUDOTAYIM is intended to
make you smile? There's nothing to see here, please move along.
- Martin
+1
Don' t you read what I say?
So to be clear:
I don't car the name of the token.
I care not understanding the parser
Hannes Magnusson wrote:
On Mon, Apr 26, 2010 at 16:32, mathieu.suen mathieu.s...@easyflirt.com wrote:
Hi,
I am wondering why is the token name so incomprehensible ?
Like T_PAAMAYIM_NEKUDOTAYIM...
Paamayim Nekudotayim would, at first, seem like a strange choice for
naming a double
Stefan Marr wrote:
On 27 Apr 2010, at 08:50, mathieu.suen wrote:
Then T_DOUBLE_COLON would have been perfectly clear.
Honestly, token names in error messages is so '80s.
Instead of fixing internal details, form the users point of view it might be better to not expose token names at all
27, 2010, at 2:50 AM, mathieu.suen wrote:
Hannes Magnusson wrote:
On Mon, Apr 26, 2010 at 16:32, mathieu.suen mathieu.s...@easyflirt.com wrote:
Hi,
I am wondering why is the token name so incomprehensible ?
Like T_PAAMAYIM_NEKUDOTAYIM...
Paamayim Nekudotayim would
Hi,
I am wondering why is the token name so incomprehensible ?
Like T_PAAMAYIM_NEKUDOTAYIM...
-- Mathieu Suen
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
One quick but ugly way is to add it in assembler in your C file:
__asm__(int3);
or something like this.
Sebastian Kurfürst wrote:
Hi Derick,
Try just break objectmonitor.c:80.
Thanks, just tried that, but same issue:
(gdb) break objectmonitor.c:80
No source file named
Hi,
Also $this have been wildly discuss here, but the same discussion can be
apply to static/self.
self might be simple to figure out how to bind within a closure.
It can be bind to the name of the class where the closure is define.
static is a more tricky one but it should be the same thing
There is also the improvement on the scope of $this:
*http://tinyurl.com/ybqyskx*
Frederic Hardy wrote:
Hello !
In bug report http://bugs.php.net/bug.php?id=51326, johannes say that
the next major version of PHP (5.4 / 6.0) will have better oo support
for closure.
Is there any RFC about
Auke van Slooten wrote:
Stanislav Malyshev wrote:
Hi!
IMHO __get is not consistent at the first place.
on possible example:
It is perfectly consistent. You just need to read what it actually does:
http://www.php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
Stanislav Malyshev wrote:
Hi!
IMHO __get is not consistent at the first place.
on possible example:
It is perfectly consistent. You just need to read what it actually does:
http://www.php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.members
instead of imagining
Stanislav Malyshev wrote:
Hi!
So what you're saying is that it is *consistent* with regard to the
implementation of methods/functions, i.e. __get behaves as an
ordinary method.
Yes, it does.
IMHO __get is not consistent at the first place.
on possible example:
class A
{
protected
Stefan Marr wrote:
On 25 Mar 2010, at 21:30, Stefan Marr wrote:
On 25 Mar 2010, at 16:37, Lukas Kahwe Smith wrote:
Hi,
this was just brought up on IRC. my understanding is that traits have no
concept of properties, but grafts do (all hidden internally). correct?
Right, the
Stefan Marr wrote:
On 26 Mar 2010, at 10:26, mathieu.suen wrote:
Variable has been discuss in *http://tinyurl.com/y9t7nd9
Right, and related to that we have freezable traits
http://scg.unibe.ch/scgbib?_k=NNRwidu5query=freezable+traitsdisplay=abstract
Which influenced this RFC for PHP
Etienne Kneuss wrote:
On Thu, Mar 18, 2010 at 5:47 PM, mathieu.suen
mathieu.s...@easyflirt.com wrote:
Peter Lind wrote:
On the contrary, it's quite obvious what's going on. In both examples
__get() returns an array as PHP would normally do it (i.e. NOT by
reference) which means
wrote:
On Thu, Mar 18, 2010 at 5:47 PM, mathieu.suen
mathieu.s...@easyflirt.com wrote:
Peter Lind wrote:
On the contrary, it's quite obvious what's going on. In both examples
__get() returns an array as PHP would normally do it (i.e. NOT by
reference) which means that if you try to modify
Etienne Kneuss wrote:
Hello,
On Wed, Mar 17, 2010 at 3:40 PM, mathieu.suen
mathieu.s...@easyflirt.com wrote:
Ionut G. Stan wrote:
Hi,
This is interesting and it appears the following change makes the snippet
work as expected:
public function __get($name);
I think
Peter Lind wrote:
On the contrary, it's quite obvious what's going on. In both examples
__get() returns an array as PHP would normally do it (i.e. NOT by
reference) which means that if you try to modify that you'll end up
modifying nothing much. However, in your second example, the point at
Hi,
I came across a strange behavior when using the magic method __get and
some instance variable that should be an array.
Consider the following example:
class A
{
public function __get($name)
{
$this-$name = array();
return $this-$name;
}
public function test()
.
That is something I am strongly agree with Gilad Bracha on adding new
feature into a language:
Look at the last paragraph:
http://gbracha.blogspot.com/2009/09/systemic-overload.html
On 3/17/10 3:55 PM, mathieu.suen wrote:
Hi,
I came across a strange behavior when using the magic method __get and
some
Hi,
I am proposing a comparison between PHP closure with lisp one.
First thing to compare is how scope are capture:
Suppose I want to create a function that add.
The common idiom to do it in lisp is:
(defun adder (x) #'(lambda (y) (+ x y)))
Then if I want the add3 method you can do:
(setf
Etienne Kneuss wrote:
Hello,
On Mon, Mar 1, 2010 at 1:33 PM, mathieu.suen mathieu.s...@easyflirt.com wrote:
Hi,
I am proposing a comparison between PHP closure with lisp one.
First thing to compare is how scope are capture:
Suppose I want to create a function that add.
The common idiom
Stanislav Malyshev wrote:
Hi!
My question is not so much about implementation it is about language. I
have noticed quite a few times now that PHP developers use the word
closure when I would prefer lambda.
Everybody on the internet knows that Wikipedia is the ultimate source
of knowledge,
Sebastian Bergmann wrote:
Am 08.02.2010 14:38, schrieb mathieu.suen:
I am wondering if there is some effort for having continuation in php.
Or is there already some construction for continuation?
There is http://phpcontinuation.sourceforge.net/ which I never got
around to actually
Hi,
I am wondering if there is some effort for having continuation in php.
Or is there already some construction for continuation?
Thanks
- Mathieu Suen
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Whenever you implement the Iterator interface the key method should only
return a scalar.
Is there any particular reason for this restriction.
IMHO I don't see any.
I also don't see why you can't index an array with object but it smells
something going wrong underneath.
Thanks
-
troels knak-nielsen wrote:
On Mon, Feb 8, 2010 at 2:38 PM, mathieu.suen mathieu.s...@easyflirt.com wrote:
Hi,
I am wondering if there is some effort for having continuation in php.
Or is there already some construction for continuation?
phaux (http://code.google.com/p/phaux
Hi,
I would like to know why the opcode is not optimized. Even for some very
simple optimization like constant folding.
For exemple:
line # op fetch ext return
operands
---
Sebastian Bergmann wrote:
Am 13.01.2010 12:18, schrieb mathieu.suen:
I would like to know why the opcode is not optimized.
Because any optimization, even very simple ones, impose a performance
penalty in the default execution model of PHP which does not use a
bytecode cache
Hi,
I came across this:
echo sizeof(array());
echo sizeof();
$a = ;
var_dump( empty($a));
$a = array();
var_dump(empty($a));
So funny! How something can have a size greater than 0 but still be empty?
I think PHP is reinventing the inconsistency word.
But then let assume that empty is just
Etienne Kneuss wrote:
Hello,
On Wed, Jan 13, 2010 at 2:36 PM, mathieu.suen
mathieu.s...@easyflirt.com wrote:
Hi,
I came across this:
echo sizeof(array());
echo sizeof();
$a = ;
php.net/count:
If var is not an array or an object with implemented Countable
interface, 1
48 matches
Mail list logo