Re: [PHP-DEV] [SUGGEST] - passthru

2010-05-18 Thread Mathias Grimm
php test source: insert(new SonType(),1,2,3); php test result: TEST 1 1 2 3 TEST 2 Array ( [0] => SonType Object ( ) [1] => 1 [2] => 2 [3] => 3 ) On Tue, May 18, 2010 at 8:50 PM, Mathias Grimm wrote: > ok, sorry! > the name isn't important at this moment,can b

Re: [PHP-DEV] Re: Jsonable interface

2010-05-18 Thread Mathias Grimm
I had an php 5.3 branch, now i checkout the trunk and can see the jsonSerializable. On Tue, May 18, 2010 at 6:56 PM, Sara Golemon wrote: > I didn't say that I didn't understand the purpose of it. I said that it > provides less functionality than what we already have implemented. > > -- Mathia

Re: [PHP-DEV] SPKAC support for openssl in PHP

2010-05-18 Thread Nathan Rixham
Moving forwards a lot of authentication will be done in an HTTP friendly stateless manner, namely via HTTPS where the user is identified by client side ssl certificates. In order to give the user a certificate, you need to generate one, which you can currently do with openssl in php, and provi

Re: [PHP-DEV] SPKAC support for openssl in PHP

2010-05-18 Thread Sriram Natarajan
I am curious as to why you need this feature within PHP. I would expect that web server administrators typically need such feature but I am missing the context of it within PHP script engine. - Sriram On Tue, May 18, 2010 at 2:05 AM, Nathan Rixham wrote: > Hi All, > > Wondering if there is any s

Re: [PHP-DEV] [SUGGEST] - passthru

2010-05-18 Thread Mathias Grimm
ok, sorry! the name isn't important at this moment,can be anyone, can be pervade for example. i'm suggesting new feature, the name can be decided later On Tue, May 18, 2010 at 8:13 PM, Stas Malyshev wrote: > We already have function with this name: http://us.php.net/passthru > > -- > Stanislav

Re: [PHP-DEV] [SUGGEST] - passthru

2010-05-18 Thread Stas Malyshev
Hi! i suggest the passthru functionality to pass parameter to other method without typing all parameters,like call_user_func_array. foo(passthru()); = call_user_func_array('foo', func_get_args()); We already have function with this name: http://us.php.net/passthru -- Stanislav Malyshev, Soft

[PHP-DEV] [SUGGEST] - passthru

2010-05-18 Thread Mathias Grimm
i suggest the passthru functionality to pass parameter to other method without typing all parameters,like call_user_func_array. foo(passthru()); = call_user_func_array('foo', func_get_args()); // case 1: function a($a,$b,$c) { //... } function aa() { a(passthru()); // like call_user_func_array

Re: [PHP-DEV] Re: Jsonable interface

2010-05-18 Thread Sara Golemon
I didn't say that I didn't understand the purpose of it. I said that it provides less functionality than what we already have implemented. Mathias Grimm wrote: _json function to override properties and jsonIgore properties when call json_encode($obMyClass) the __json and __jsonIgore will be c

Re: [PHP-DEV] openssl_(en|de)crypt missing IV

2010-05-18 Thread Pierre Joye
On Tue, May 18, 2010 at 11:37 PM, Sara Golemon wrote: >>> The only BC break is the warning raised when using openssl_encrypt() >>> without >>> an IV.  Given the extremely bad practice using a NULL IV represents, I >>> think >>> this is a reasonable course of action. >> >> It changes the signature

Re: [PHP-DEV] openssl_(en|de)crypt missing IV

2010-05-18 Thread Sara Golemon
The only BC break is the warning raised when using openssl_encrypt() without an IV. Given the extremely bad practice using a NULL IV represents, I think this is a reasonable course of action. It changes the signature making the fifth argument a complete different thing. I strongly disagree with

Re: [PHP-DEV] Re: Jsonable interface

2010-05-18 Thread Mathias Grimm
_json function to override properties and jsonIgore properties when call json_encode($obMyClass) the __json and __jsonIgore will be called. if a class is jsonable, this means that all properties will be encoded, except properties on the ignore list > This seems to be an attempt to solve a subse

Re: [PHP-DEV] openssl_(en|de)crypt missing IV

2010-05-18 Thread Pierre Joye
On Tue, May 18, 2010 at 11:17 PM, Sara Golemon wrote: >>> Fixing this is a simple matter, but I wanted to bounce approaches for BC >>> (or >>> lack thereof) off everyone else since this version of openssl_encrypt() >>> is >>> already "in the wild". >> >>> I think it's worth a BC break.  Comments?

[PHP-DEV] Re: Jsonable interface

2010-05-18 Thread Sara Golemon
Mathias Grimm wrote: If php have annotations feature its be very simple. Transient private $dtCreated;// or JsonIgnore or JsonTransient [*snip*] This seems to be an attempt to solve a subset of the problem solved by JSONSerializable, but from a negation rather than a explicit orientatio

Re: [PHP-DEV] openssl_(en|de)crypt missing IV

2010-05-18 Thread Sara Golemon
Fixing this is a simple matter, but I wanted to bounce approaches for BC (or lack thereof) off everyone else since this version of openssl_encrypt() is already "in the wild". I think it's worth a BC break. Comments? To break BC is a no go, even if your arguments are appealing (even in a majo

[PHP-DEV] Jsonable interface

2010-05-18 Thread Mathias Grimm
If php have annotations feature its be very simple. class MyClass implements Jsonable { private $name; private $age; Transient private $dtCreated;// or JsonIgnore or JsonTransient } all properties will be encoded, except transient. Otherwise,php can have jasonable interface and class

Re: [PHP-DEV] PHP 5 X PHP 6

2010-05-18 Thread Ferenc Kovacs
read back on the internals or just google around. for example: http://lwn.net/Articles/379909/ Tyrael On Tue, May 18, 2010 at 7:00 PM, Mathias Grimm wrote: > > > > > > > > At the moment, there is no such thing as "php 5" > > > > there is php5.3 and there is "trunk" > > > > trunk includes all cha

Re: [PHP-DEV] PHP 5 X PHP 6

2010-05-18 Thread Mathias Grimm
> > > > At the moment, there is no such thing as "php 5" > > there is php5.3 and there is "trunk" > > trunk includes all changes from php5.3 and some more > > > -- > Alexey Zakhlestin > http://www.milkfarmsoft.com/ So, the php6 is dead? PHP6 Unicode changes and other php6 features as being made

Re: [PHP-DEV] Interface and abstract method

2010-05-18 Thread Tjerk Anne Meesters
Normally, PHP won't allow access types for interface methods, but the reflection for SPL is defined inside the C code: static const zend_function_entry spl_funcs_OuterIterator[] = { SPL_ABSTRACT_ME(OuterIterator, getInnerIterator, arginfo_recursive_it_void) {NULL, NULL, NULL} }; I

Re: [PHP-DEV] Interface and abstract method

2010-05-18 Thread Richard Quadling
On 18 May 2010 16:12, mathieu.suen wrote: > Hi, > > In the SPL there is some interface that have abstract method: > > *Countable* { > /* Methods */ > abstract public int count > ( void ) > } > > While some interface have "none abstract" method. >

Re: [PHP-DEV] PHP 5 X PHP 6

2010-05-18 Thread Alexey Zakhlestin
On 18.05.2010, at 19:33, Mathias Grimm wrote: > Is the http://wiki.php.net/rfc for both php5 and php6? > > there are differents developer teams for dev 5 and 6 ? > > When something new comes to php 5, php 6 must implement it to? At the moment, there is no such thing as "php 5" there is php5.3

Re: [PHP-DEV] PHP 5 X PHP 6

2010-05-18 Thread Johannes Schlüter
On Tue, 2010-05-18 at 12:33 -0300, Mathias Grimm wrote: > Is the http://wiki.php.net/rfc for both php5 and php6? > > there are differents developer teams for dev 5 and 6 ? > > When something new comes to php 5, php 6 must implement it to? There is one development tree, currently using the versio

[PHP-DEV] Interface and abstract method

2010-05-18 Thread mathieu.suen
Hi, In the SPL there is some interface that have abstract method: *Countable* { /* Methods */ abstract public int count ( void ) } While some interface have "none abstract" method. *OuterIterator* extends Iterator

Re: [PHP-DEV] openssl_(en|de)crypt missing IV

2010-05-18 Thread Hannes Magnusson
On Tue, May 18, 2010 at 13:02, Pierre Joye wrote: > hi, > > On Tue, May 18, 2010 at 12:56 PM, Rob Richards > wrote: > >> >> Personally I would like to see the signature changed to be even more aligned >> with the ones from mcrypt - since thats what people are most used to using. > > I would like

Re: [PHP-DEV] openssl_(en|de)crypt missing IV

2010-05-18 Thread Pierre Joye
hi, On Tue, May 18, 2010 at 12:56 PM, Rob Richards wrote: > > Personally I would like to see the signature changed to be even more aligned > with the ones from mcrypt - since thats what people are most used to using. I would like to as well but we can't. To change method signatures in a way tha

Re: [PHP-DEV] openssl_(en|de)crypt missing IV

2010-05-18 Thread Rob Richards
Sara Golemon wrote: I was just looking through the implementation of openssl_encrypt() (and openssl_decrypt()) today because I need to make some encrypted payloads, but the prototype didn't have anywhere to place an initialization vector. On opening ext/openssl/openssl.c, I noticed line 4620

Re: [PHP-DEV] SPKAC support for openssl in PHP

2010-05-18 Thread Pierre Joye
hi, Can you open a feature request please? At http://bugs.php.net On Tue, May 18, 2010 at 11:05 AM, Nathan Rixham wrote: > Hi All, > > Wondering if there is any support for SPKAC [1] in the openssl extension for > PHP? > > If not is it planned, and if not can it be? KEYGEN/SPKAC support is growi

[PHP-DEV] SPKAC support for openssl in PHP

2010-05-18 Thread Nathan Rixham
Hi All, Wondering if there is any support for SPKAC [1] in the openssl extension for PHP? If not is it planned, and if not can it be? KEYGEN/SPKAC support is growing in the UA vendors and KEYGEN is part of HTML5, being the preferred way to generate client side SSL certificates since the priv

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2010-05-18 Thread Hannes Magnusson
On Tue, May 18, 2010 at 10:24, Michael Wallner wrote: > On 05/18/2010 10:12 AM, Hannes Magnusson wrote: >> >> Where is that commit? >> Most context options are quite well documented, so I'd appreciate more >> info about this. > > http://news.php.net/php.doc.cvs/6187 > Hah! Kudos. -Hannes -- PH

[PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2010-05-18 Thread Michael Wallner
On 05/18/2010 10:12 AM, Hannes Magnusson wrote: Where is that commit? Most context options are quite well documented, so I'd appreciate more info about this. http://news.php.net/php.doc.cvs/6187 Regards, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http:

[PHP-DEV] Run Time Cache RFC

2010-05-18 Thread Dmitry Stogov
Hi, I'm proposing another optimisation technique implementation for PHP which makes up to 20% speed up on synthetic tests and up to 8% speed up on real-life applications. The technique is similar to "inline caches" which is very popular in JIT compilers for object oriented languages. http: