Re: [PHP-DEV] Skipping of defaulted parameters.

2010-10-21 Thread Ionut G. Stan
On 21/Oct/10 1:17 PM, Richard Quadling wrote: On 21 October 2010 08:52, Ionut G. Stan wrote: Option 5: Implement named parameters? Come on, play fair. I know all about the named parameters and I didn't mention them. Where's the unfairness? I proposed them because the issue you

Re: [PHP-DEV] Skipping of defaulted parameters.

2010-10-21 Thread Ionut G. Stan
On 20/Oct/10 2:58 PM, Richard Quadling wrote: Hello. Take the following simple code. According to the manual A variable is considered to be null if it has not been set to any value yet [1]. By default, function arguments are passed by value [2]. When using default arguments, any defaults sho

Re: [PHP-DEV] Using child classes/interfaces as desired type hints

2010-10-07 Thread Ionut G. Stan
On 07/Oct/10 8:56 AM, Nathan Nobbe wrote: Hi, Probly rehashing an old conversation here, but I'm wondering why the following isn't supported Here's the problem: class ConcreteServer2 extends AbstractServer {} Now, ConcreteClient can't receive an instance of ConcreteServer2 as an a

[PHP-DEV] Lambdas assigned to constants. Was PHP Annotations RFC + Patch

2010-09-16 Thread Ionut G. Stan
On 16/Sep/10 8:49 PM, Stas Malyshev wrote: No, we can't have python decorators because unlike Python PHP functions and classes aren't first-class objects. In Python, this: @dec2 @dec1 def func(arg1, arg2, ...): pass means this: def func(arg1, arg2, ...): pass func = dec2(dec1(func)) However,

Re: [PHP-DEV] inheritance check too strict?

2010-08-19 Thread Ionut G. Stan
On 19/Aug/10 4:16 PM, Ryan Panning wrote: Nathan Rixham wrote: what if Bar implements Foo, or Bar extends Foo - surely that should be compatible given the inheritance chain. I ran into this exact issue and thought it was strange. Is there a reason this shouldn't be allowed? It still breaks t

Re: [PHP-DEV] Indexing an array

2010-08-07 Thread Ionut G. Stan
On 06/Aug/10 6:20 PM, Hannes Magnusson wrote: On Fri, Aug 6, 2010 at 16:33, mathieu.suen 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 don

Re: [PHP-DEV] Remove variable function and method calls

2010-07-22 Thread Ionut G. Stan
On 23/Jul/10 1:54 AM, Karoly Negyesi wrote: Hi, Given that call_user_func exists I would recommend to remove $foo() from PHP Next. Observe the "logic" in the following examples: $foo(); new $foo(); classname::$foo; classname::$foo(); How about: $lambda = function () {}; $lambda(); What sh

Re: [PHP-DEV] IRC ?

2010-04-29 Thread Ionut G. Stan
The double pound (##) means that it's not official. -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Assign array with __get

2010-03-25 Thread Ionut G. Stan
ody can be happy. I think. It's not "the way around this inconsistency" - it's how it is supposed to work. So, what's the reasoning behind this design decision? Why is it supposed to work like this and not the other way around? -- Ionut G. Stan I'm under construc

Re: [PHP-DEV] Assign array with __get

2010-03-19 Thread Ionut G. Stan
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Assign array with __get

2010-03-17 Thread Ionut G. Stan
ic of the above statements? Thanks -- Mathieu Suen -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Closure/lambda semantic comparaison

2010-03-01 Thread Ionut G. Stan
foreach($adders as $addIt) { echo $addIt(5); } Thanks for your attention -- Mathieu Suen -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] On closures and lamdba

2010-02-24 Thread Ionut G. Stan
namespaced function or class are not namespaced. namespace foo; $this_is_a_global_var = 'foo'; function namespaced_function() { global $this_is_a_globa_var; } -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] On closures and lamdba

2010-02-23 Thread Ionut G. Stan
for closing over variables (the lexical statement). Thanks, * I know it allows definition of function inside other functions, which will ultimately end up in the global scope. ** namespaced functions don't make any difference, as variables aren't namespaced. -- Ionut G. Sta

Re: [PHP-DEV] On closures and lamdba

2010-02-20 Thread Ionut G. Stan
me, I'd name the internal class used to represent lambdas Lambda. -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] __toString(), __toArray()

2010-01-13 Thread Ionut G. Stan
;int' == $type ? 15 : 0; } } $r = new Int; var_dump($r + 1); // 2 var_dump((int) $r + 1); // 16 var_dump((bool) $r + 1); // 1 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing L

Re: [PHP-DEV] Closures and $this: Please vote!

2009-12-15 Thread Ionut G. Stan
se why I'm wrong in this respect, I will refuse to implement (B). -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFC: Custom Factories (SPL)

2009-11-19 Thread Ionut G. Stan
gt;emailer; $email = $emailer(); // ... } } -- Mathieu Suen -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFC: Custom Factories (SPL)

2009-11-19 Thread Ionut G. Stan
It will work, just in a very complicated way. Emailer would need to have access to some other global variables in order to resolve its dependencies. My point is that they are globals. On 11/19/2009 4:57 PM, Mathieu Suen wrote: Ionut G. Stan a écrit : This smells like metaclasses to me, just

Re: [PHP-DEV] RFC: Custom Factories (SPL)

2009-11-19 Thread Ionut G. Stan
l I can offer is making suggestions and fine coffee. Looking forward to hearing your comments! Robert -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Ionut G. Stan
already have is_callable in the core. -- Ionut G. Stan I'm under construction | http://igstan.blogspot.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3

2009-07-02 Thread Ionut G. Stan
t for now. -- Ionut G. Stan I'm under construction | http://igstan.blogspot.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3

2009-07-02 Thread Ionut G. Stan
ack in 2008 Felipe Pena wrote a type hinting patch for PHP that is available on wiki.php.net. -- Ionut G. Stan I'm under construction | http://igstan.blogspot.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Ionut G. Stan
t;) || (isset($_GET["baz"])&& $_GET["baz"] == "bat")) to be able to do something like this if(isset($_GET["foo"]) == "bar") or if(isset($_GET["foo"]) == "bar" || isset($_GET["baz"]) == "bat") That isse

Re: [PHP-DEV] PEAR support in 5.3

2009-03-31 Thread Ionut G. Stan
Thanks for the info Lukas Cheers On 3/31/2009 17:53, Lukas Kahwe Smith wrote: On 28.03.2009, at 16:45, Ionut G. Stan wrote: Hi, I'm playing with 5.3.0 RC1 and wanted to install PEAR. In the previous versions (for Windows at least) there was a go-pear executable which is missing no

Re: [PHP-DEV] mysqlnd problems

2009-03-30 Thread Ionut G. Stan
sword. Cheers, On Mon, Mar 30, 2009 at 10:04 AM, Ulf Wendel wrote: Ionut G. Stan schrieb: Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected in {filename} on line 18 Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to

Re: [PHP-DEV] mysqlnd problems

2009-03-30 Thread Ionut G. Stan
Thanks Andrey, your explanations cleared all my uncertainties. On 3/30/2009 13:34, Andrey Hristov wrote: Hi, Ionut G. Stan wrote: Hi Ulf, Thanks for the answer, but let me understand this better. The old mysql API did not support the auth protocol of MySQL 4.1+, but only lower, while the

Re: [PHP-DEV] mysqlnd problems

2009-03-30 Thread Ionut G. Stan
hp.ini setting. Cheers, [1] http://dev.mysql.com/doc/refman/4.1/en/old-client.html [2] http://php.net/mysqli.mysqlnd On 3/30/2009 11:04, Ulf Wendel wrote: Ionut G. Stan schrieb: Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected in {filename} on

[PHP-DEV] mysqlnd problems

2009-03-30 Thread Ionut G. Stan
atabase* and it worked - MySQL protocol_version is 10 on both Linux and Windows machines. - Linux machine MySQL version is 5.0.48 - Windows machine MySQL version is 5.0.67-community-nt Is there any other MySQL variable that I should look for? Any feedback appreciated. -- Ionut G. Stan I'm under

[PHP-DEV] PEAR support in 5.3

2009-03-28 Thread Ionut G. Stan
Hi, I'm playing with 5.3.0 RC1 and wanted to install PEAR. In the previous versions (for Windows at least) there was a go-pear executable which is missing now. So what are the plans for supporting PEAR in this new PHP version? Thanks -- Ionut G. Stan I'm under constructio

Re: [PHP-DEV] Minor problems with PHP 5.3.0 RC1 on Windows

2009-03-26 Thread Ionut G. Stan
On 3/26/2009 20:51, Daniel Convissor wrote: That was fixed yesterday (per "php.ini-production& php.ini-development last minute updates" thread). Sorry, just saw it. -- Ionut G. Stan I'm under construction | http://igstan.blogspot.com/ -- PHP Internals - PHP Runtime

[PHP-DEV] Minor problems with PHP 5.3.0 RC1 on Windows

2009-03-26 Thread Ionut G. Stan
but there is no need (causes confusion) Cheers -- Ionut G. Stan I'm under construction |http://igstan.blogspot.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Are there plans to allow anonymous functions as callbacks?

2009-03-04 Thread Ionut G. Stan
array_map() documentation) ... -- Ionut G. Stan I'm under construction | http://igstan.blogspot.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php