Re: [PHP-DEV] [RFC][DISCUSSION] Argon2 Password Hash

2016-08-07 Thread Jared Williams
R. Portwood II* Argon2 also supports keyed hashes and associated data, but seen no mention of either. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] New HashTable implementation?

2016-04-29 Thread Jared Williams
r/blob/master/doc/fasthash64 > > Have you taken a look a go's internal hashing function? On platforms supporting AES-NI they use the AESENC instruction to get a fast hash, but with also some protection against collision attacks.  https://github.com/golang/go/blob/0104a31b8fbcbe52728a08867b26415d282c3 5d2/src/runtime/asm_amd64.s#L870 Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC][Discussion] Parser extension API

2015-02-18 Thread Jared Williams
> > Nikita Wouldn't the trick be to have $col1 be an object instance that uses operator overloading? So instead of solving the expression, operators would return the AST. Was possible with the operator extension Some old experimental code from 2006 echo query($connection, array($catalog->Person->id, $catalog->Titles->title. ' ' . $catalog->Person->name), new SqlJoin(SqlJoin::TYPE_INNER, $catalog->Person, $catalog->Titles, $catalog->Person->titleId == $catalog->Titles->id), $catalog->Person->id == 1); outputs SELECT Person.id, Titles.title || ' ' || Person.name FROM Person INNER JOIN Titles ON Person.titleId = Titles.id WHERE Person.id = 1 Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Bug #64910: Line number of $e = new Exception vs. line number of throw $e

2013-05-23 Thread Jared Williams
xception($message, $errno, $exception); case 2013: // Connection dropped. case 2006: // Gone away return new ConnectionDroppedException($message, $errno, $exception); /* */ default: return new DatabaseException($message, $errno, $exception); } } So

RE: [PHP-DEV] __init magic method

2013-01-23 Thread Jared Williams
. > I'd say, that using static at all isn't elegant. There is always a way to avoid it. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: Arrays which have properties of sets

2012-10-07 Thread Jared Williams
u can use as keys. See SPL's SplObjectStorage. That allows object instances as keys. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Foreach list behaviour

2012-09-02 Thread Jared Williams
expected format, so should be some sort of error happening. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] [VOTE] Generators

2012-08-29 Thread Jared Williams
> -Original Message- > From: Hannes Magnusson [mailto:hannes.magnus...@gmail.com] > Sent: 29 August 2012 22:50 > To: Derick Rethans > Cc: Nikita Popov; Jared Williams; PHP internals > Subject: Re: [PHP-DEV] [VOTE] Generators > > On Wed, Aug 29, 2012 at

RE: [PHP-DEV] [VOTE] Generators

2012-08-29 Thread Jared Williams
) { foreach($keys as $key) yield $key => $row[$key]; } $row = []; $it = bind(['a', 'b'], $row); foreach($it as $key => &$ref) echo $key; echo "\n"; foreach($it as $key => &$ref) echo $key; Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] [RFC] Generators

2012-08-20 Thread Jared Williams
of the > > yield keyword, but parsers will thank knowing about it from > the start > > rather than realising at mid-parsing that the function is a > completely > > different beast. > No, parsers don't care about this. It's trivial to detect in > both cases. > > Nikita > > -- > PHP Internals - PHP Runtime Development Mailing List To > unsubscribe, visit: http://www.php.net/unsub.php > Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] [RFC] Generators

2012-08-19 Thread Jared Williams
it not? Given that generator functions currently return an instance of class Generator. Also anonymous generators would be quite strange $f = Generator function() { yield 'a'; }; Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] [RFC] Generators

2012-08-13 Thread Jared Williams
aps that example does > > not explain your true need very well. > > > > Well, there's one thing that should be made clear. There's > nothing (and I mean that) that generators provide that you > can't do already. You can build iterators that do exactly the > same thing. Not true. Iterator::current() cannot return references, but generators can yield them. Eg function &map(array &$row, array $order) { foreach($order as $index) yield $row[$index]; } foreach(map($row, [1,3,5,7,9]) as &$ref) > > Anthony > Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: Generators in PHP

2012-07-25 Thread Jared Williams
> -Original Message- > From: Nikita Popov [mailto:nikita@gmail.com] > Sent: 22 July 2012 16:53 > To: Jared Williams > Cc: Nikita Popov; PHP internals > Subject: Re: [PHP-DEV] Re: Generators in PHP > > On Sat, Jul 21, 2012 at 6:31 PM, Jared Williams >

RE: [PHP-DEV] Re: Generators in PHP

2012-07-21 Thread Jared Williams
> -Original Message- > From: Nikita Popov [mailto:nikita@gmail.com] > Sent: 20 July 2012 21:46 > To: Nikita Popov > Cc: PHP internals > Subject: [PHP-DEV] Re: Generators in PHP > > On Tue, Jun 5, 2012 at 7:35 PM, Nikita Popov > wrote: > > Hi internals! > > > > In the last few day

RE: [PHP-DEV] Internal iteration API

2012-07-13 Thread Jared Williams
this approach because it reuses the existing > zend_object_iterator API. But I see that this is rather an > abuse than a use :) > > Thoughts? > > Nikita > I presume this would work with list() too? function *f() { yield 'a'; yield 'b'; } list($a, $b) = f(); Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] List comprehensions and generator expressions for PHP

2012-06-28 Thread Jared Williams
i(Memcached $memcached, array $keys) { if ($memcached->getDelayed($keys)) { while ($item = $memcached->fetch()) yield $item['key'] => $item['value']; } } foreach(getMulti($memcached, ['foo', 'bar', ... ]) as $key => $value) { doSomeWork(); } So doSomeWork would be called as soon as a single value is available, rather than having to wait til all values have returned. Should in theory work right? Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Traits and memory size

2012-04-09 Thread Jared Williams
ision to use traits or inheritance should be pretty obvious, and the amount of memory either way uses should be irrelevant. If either choice appears to be allocating too much, then it's the Zend Engine itself that should be looked at, and not rewritting PHP code. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Object oriented page templates in PHP

2012-04-09 Thread Jared Williams
method. > Plus it's probably a real pain to implement in general. > > Thoughts? > $fn = [ 'escape' => function($text) { return htmlspecialchars($text, ENT_QUOTES|ENT_HTML5, 'UTF-8'); }, ... ]; extract($fn); Do I think it's a good idea? Probably not in this case. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] fclose(), file_put_contents(), copy() all fail to return false on error

2011-10-23 Thread Jared Williams
Raised this 5 years ago.. http://marc.info/?l=php-internals&m=113998880315574&w=2 Jared > -Original Message- > From: Tom Boutell [mailto:t...@punkave.com] > Sent: 21 October 2011 20:40 > To: PHP Internals > Subject: [PHP-DEV] fclose(), file_put_contents()

RE: [PHP-DEV] Activation of IGBinary serialization extension in 5.4 by default

2011-08-19 Thread Jared Williams
.php.net/package/igbinary > [2] http://www.php.net/~pierre/vcqa/apcigninary_perf.png > > Comments please. > > Regards, > Paul Dragoonis. > I think MsgPack ( http://msgpack.org/ ) is a better option, as it is implementated in multiple languages. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Make set_time_limit() timeout a catchable fatal error

2011-03-08 Thread Jared Williams
Hi, Would pcntl_alarm() work? Jared > -Original Message- > From: Sebastian Bergmann [mailto:sebast...@php.net] > Sent: 08 March 2011 13:06 > To: internals@lists.php.net > Subject: [PHP-DEV] Make set_time_limit() timeout a catchable > fatal error > > C

RE: [PHP-DEV] rfc2616 datetime format?

2010-10-04 Thread Jared Williams
plicated. > > It is a tricky one, and let's think about whether we can come > up with something useful here. > > cheers, > Derick > Surely makes better sense to create a function/method for it specifically, rather than adding new formatting letters? Python has something like time.httpdate() Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: [PDO] Re: [PHP-DEV] [PATCH] New PDO methods for PostgreSQL driver

2010-06-13 Thread Jared Williams
d when there is enough PDO drivers that behave in exactly the same manner, and to do that, you needed specific implementations to test and compare with. If the dblib methods can't behave the same as the postgres methods, then clearly they shouldn't be named the same. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Type hinting

2010-06-09 Thread Jared Williams
gle string error message describing the error, and having to unmangle the detailed information* from that doesn't seem that great. * Which parameter, what value, what was expected. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/json/json.c ext/json/php_json.h ext/json/tests/serialize.phpt

2010-05-15 Thread Jared Williams
> -Original Message- > From: Hannes Magnusson [mailto:hannes.magnus...@gmail.com] > Sent: 15 May 2010 13:25 > To: Jared Williams > Cc: Johannes Schlüter; Pierre Joye; Stanislav Malyshev; Sara > Golemon; PHP Internals > Subject: Re: [PHP-DEV] Re: [PHP-CVS] sv

RE: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/json/json.c ext/json/php_json.h ext/json/tests/serialize.phpt

2010-05-13 Thread Jared Williams
> -Original Message- > From: Johannes Schlüter [mailto:johan...@schlueters.de] > Sent: 13 May 2010 20:47 > To: Jared Williams > Cc: 'Pierre Joye'; 'Stanislav Malyshev'; 'Sara Golemon'; 'PHP > Internals' > Subject: RE: [PHP

RE: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/json/json.c ext/json/php_json.h ext/json/tests/serialize.phpt

2010-05-13 Thread Jared Williams
ed $b = 2; private $c = 3; } $a = new A(); echo $a->toJSONString(), "\n"; Make better sense? Don't have to implement any interfaces, yet I still have freedom to override it either in a differing trait or in the class. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] What is the use of the $replacement property in the RegexIterator class.

2010-05-05 Thread Jared Williams
> > Does seem odd public property. Guessing it's a bug. http://www.php.net/~helly/classbrowser/?class=RecursiveRegexIterator Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] [RFC] Performance improvements

2010-04-13 Thread Jared Williams
igbinary could be patched to take advantage of string interning? -Jared > -Original Message- > From: Dmitry Stogov [mailto:dmi...@zend.com] > Sent: 13 April 2010 14:53 > To: internals@lists.php.net > Subject: [PHP-DEV] [RFC] Performance improvements > > Hi, >

RE: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/filter/logical_filters.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/logical_filters.c trunk/ext/filter/

2010-04-04 Thread Jared Williams
> -Original Message- > From: Rasmus Lerdorf [mailto:ras...@lerdorf.com] > Sent: 03 April 2010 02:44 > To: Jared Williams > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ > branches/PHP_5_2/NEWS > branches/PHP_5_2/ext/

RE: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/filter/logical_filters.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/logical_filters.c trunk/ext/filter/

2010-04-02 Thread Jared Williams
> -Original Message- > From: Rasmus Lerdorf [mailto:ras...@lerdorf.com] > Sent: 03 April 2010 01:20 > To: Jared Williams > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ > branches/PHP_5_2/NEWS > branches/PHP_5_2/ext/

RE: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/filter/logical_filters.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/logical_filters.c trunk/ext/filter/

2010-04-02 Thread Jared Williams
ving a mismatch in validation between client & server just a recipe for user frustration. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] php and multithreading (additional arguments)

2010-04-02 Thread Jared Williams
1306 > So any task, that require waiting on external resource could > be executed in paralel. > http://hu2.php.net/manual/en/mysqli.reap-async-query.php > its a good thing, that you can async mysql execution with mysqlnd. > > Tyrael > Curl can execute in parallel with it

RE: [PHP-DEV] array_seek function

2010-03-16 Thread Jared Williams
27;bar', 'baz'); $iterator = new ArrayIterator($input); $iterator->seek(2); echo $iterator->current(); $iterator->seek(0); echo $iterator->current(); $iterator->seek(5); // throws OutOfBoundsException Though a specific function does make sense, imo. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] function call chaining

2010-01-19 Thread Jared Williams
$foo[1](); If the closure attempts to change the value of $foo[1] then PHP complains. So was forced to assign to a temporary variable before hand. $f = $foo[1]; $f(); I guessing foo()() could also suffer from the problem? Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Intl extension class MessageFormatter instantiation returns NULL

2009-12-09 Thread Jared Williams
echo $fmt->format(array(10101)), "\n"; Best place for documentation is tests, or example code I find. http://userguide.icu-project.org/formatparse/messages/examples Jared -- 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-18 Thread Jared Williams
e is to refactor the legacy code as and when the extra flexibility is needed. Also seems like a possible whole heap of wtf?! When a seemingly absolute statement $a = new A(); gets mangled behind the scenes. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] reference caller object

2009-09-19 Thread Jared Williams
using instanceof in conditionals. http://c2.com/cgi/wiki?InstanceofInConditionals And should be refactored with... http://c2.com/cgi/wiki?ReplaceConditionalWithPolymorphism Jared -- 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 Jared Williams
ot;baz"]) == "bat") > > That isset (or some other language construct) would return > the variable if it were set and false if it was not. > > Thanks for your time, i know this has probably been talked to > death in one form or other. > > Ólafur Waage > olaf...@gmail.com > Use array_merge to provide default values... $get = array_merge($_GET, array('foo' => 'bar', 'baz' => 'bat)); If ($get['foo'] == 'bar' || $get['baz'] == 'bat') Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: Win32 PECL pre-built binaries.

2009-04-29 Thread Jared Williams
Regards, > > > > Richard Quadling. > > -- > > - > > Richard Quadling > > Zend Certified Engineer : > > http://zend.com/zce.php?c=ZEND002498&r=213474731 > > "Standing on the shoulders of some very clever giants!" > > >

RE: [PHP-DEV] json_encode()

2008-12-15 Thread Jared Williams
PHP user. Don't think that's what he said... More like... assert(is_object($foo) || is_array($foo)); // ensure strictly conforming $json = json_encode($foo); Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Upgrading to internal DateTime

2008-12-05 Thread Jared Williams
n't needed to use > DateTimeZone at all ( other than to get a list for the user > to select from ). Internally we are working UTC normalized, > and then displaying with the user offset if they select > 'local'. IS the correct thing to be setting the default for > e

RE: [PHP-DEV] alpha3 or forever hold your peace

2008-11-10 Thread Jared Williams
> -Original Message- > From: Pierre Joye [mailto:[EMAIL PROTECTED] > Sent: 10 November 2008 15:46 > To: Jared Williams > Cc: Lester Caine; PHP internals > Subject: Re: [PHP-DEV] alpha3 or forever hold your peace > > On Mon, Nov 10, 2008 at 4:43 PM, Jared Willi

RE: [PHP-DEV] alpha3 or forever hold your peace

2008-11-10 Thread Jared Williams
But where? pecl4win.php.net hasn't compiled APC since January, and certainly nothing for 5.3 And can't see anything on windows.php.net containing APC compiled for 5.3 Jared > -Original Message- > From: Lester Caine [mailto:[EMAIL PROTECTED] > Sent: 10 November 2

RE: [PHP-DEV] alpha3 or forever hold your peace

2008-11-10 Thread Jared Williams
ble to test anything on new builds since > php_interbase is not being compiled. I've not checked what > the other dozen or so extensions missing compared with > PHP5.2.x are - which is running fine. > APC is another missing extension. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Iteration tools

2008-11-04 Thread Jared Williams
at would be nice. Just written some code todo a binary search on keys, using the ArrayIterator::seek(). It was either that or use array_keys() on potentially large array. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] New string functions: str_startswith() and str_endswith()

2008-07-21 Thread Jared Williams
Surely substr_compare() does both begin & end easily enough. Though the fact that it throws warnings is annoying. Jared > -Original Message- > From: Stan Vassilev | FM [mailto:[EMAIL PROTECTED] > Sent: 21 July 2008 13:18 > To: internals > Subject: Re: [PHP-DEV] N

RE: [PHP-DEV] Re: Short syntax for array literals [...]

2008-05-28 Thread Jared Williams
soon as 6 is deemed production quality, and I suspect that may happen well (atleast hope) within the next 5 years. So makes the "won't be able to use" argument kind of pointless, anyway. If you want backwards compatibility there is or will be a whole raft things that you cannot use

RE: [PHP-DEV] APC doesn't work on Windows?

2008-05-23 Thread Jared Williams
ed. The index.php opens a frameset, with the left frame requesting browser.php, but instead the output of index.php is sent. Disable APC and the problem goes away. Haven't been enable to write a failing test case to report it. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Unable to unit test code containing *_uploaded_file()

2008-04-23 Thread Jared Williams
e only in testing code, so there > would be no need to change existing application code to add > unit tests, and what's more important it would not leak to > security risk. > > Regards, > Piotr Czachur > As of 1.0.1, SimpleTest's WebTester can upload files, I

RE: [PHP-DEV] short_open_tag

2008-03-26 Thread Jared Williams
f this can be > solved easily. > -- > Stanislav Malyshev, Zend Software Architect > [EMAIL PROTECTED] http://www.zend.com/ > (408)253-8829 MSN: [EMAIL PROTECTED] > > -- You use a class constructor to change the ini setting, and the destructor to revert it back. That way once th

RE: [PHP-DEV] short_open_tag

2008-03-23 Thread Jared Williams
> -Original Message- > From: Stefan Walk [mailto:[EMAIL PROTECTED] > Sent: 23 March 2008 11:08 > To: Jared Williams > Cc: 'PHP Internals' > Subject: Re: [PHP-DEV] short_open_tag > > Jared Williams schrieb: > > > > > > > >

RE: [PHP-DEV] short_open_tag

2008-03-22 Thread Jared Williams
> -Original Message- > From: Stefan Walk [mailto:[EMAIL PROTECTED] > Sent: 22 March 2008 22:52 > To: 'PHP Internals' > Subject: Re: [PHP-DEV] short_open_tag > > Johannes Schlüter schrieb: > > Now we have the big issue: Do we want to have short open > tags forever? > > Well, without to

RE: [PHP-DEV] [Patch] http_fopen_wrapper.c and allowing any response code w/o warning

2007-11-02 Thread Jared Williams
Yes, had fun with trying to use http php streams ... Imo, 2xx status codes should always be considered succesful. http://bugs.php.net/bug.php?id=36947 http://marc.info/?l=php-internals&m=111384113712112&w=2 J > -Original Message- > From: David Zülke [mailto:[EMAIL PROTECTED] > Sent:

RE: [PHP-DEV] Class Posing

2007-10-02 Thread Jared Williams
I think they end up using the dependency injection pattern. http://www.picocontainer.org/ java implementation with a PHP port. http://sourceforge.net/projects/phemto/ is a more lightweight PHP implementation. Its README http://phemto.cvs.sourceforge.net/phemto/phemto/README?revision=1.1.1.1&vi

RE: [PHP-DEV] Class Posing

2007-10-02 Thread Jared Williams
Ideally think I'd prefer it finer grained... interface A { } class AImpl implements A { } register('A', function() { return new AImpl(); }); register('Foo', function() { return new Bar(); }); $foo = new Foo(); $a = new A(); Would also require fun

RE: [PHP-DEV] RFC: mark functions as const for possible optimizations

2007-09-25 Thread Jared Williams
imized to be more APC friendly? Jared > -Original Message- > From: Nuno Lopes [mailto:[EMAIL PROTECTED] > Sent: 14 September 2007 18:01 > To: PHPdev > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [PHP-DEV] RFC: mark functions as const for poss

RE: [PHP-DEV] bitwise operations and Unicode strings

2007-05-30 Thread Jared Williams
ng on bitwise operations with strings, since numeric > strings behaviour is different here. I'd say more. Pear::Crypt_HMAC, for instance, does. /* Calculate the padded keys and save them */ $this->_ipad = (substr($key, 0, 64) ^ str_repeat(chr(0x36), 64)); $this->_opad =

RE: [PHP-DEV] PHP Unicode extension in PHP6

2007-05-22 Thread Jared Williams
string. In > other cases they are written in source or target character > set. For example, iso-8859-2 decoding function contains array > with iso-8859-2 hex values mapped to html codes. Code can't > use raw 8bit strings, because they might be corrupted in > misconfigured editor used by developer and it is very hard to > track such corruption. > 8bit data can come only from user input (composed emails and > preferences, html forms, one common charset) and imap server > (received emails, lots of different charsets and encodings). > Recent versions of PHP5, has a binary string introducer. echo strlen(b"\xC4\x85"); Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] gd development as part of php.net

2006-08-31 Thread Jared Williams
de, until the lead familiarised himself with Win32/VC. The intention was to get it on pecl at some point. But the lead developer has, to my understanding, been too busy. Its quite a massive API. I think there are ~477 functions wrapped an available to be used in PHP. Which obviously is going to create huge load on documentation/bugs etc. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Problems with APC

2006-08-28 Thread Jared Williams
gt; > CLI mode, with enable_cli *not* turned on). > > > > I came across this some time ago when mixing Runkit_Sandbox > with APC, > > just turn on enable_cli. It won't materially impact your > > command line > > experience. > > PHP 5.1.6 & A

RE: [PHP-DEV] Problems with APC

2006-08-28 Thread Jared Williams
t turn on enable_cli. It won't materially impact your > command line > experience. PHP 5.1.6 & APC 3.0.11-dev crashes on shutdown irrespective of apc.enable_cli. Jared apc APC Support => enabled Version => 3.0.11-dev MMAP Support => Disabled Revision => $Revision: 3

RE: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-08-02 Thread Jared Williams
> PS: An real-life example from those wo prefer the old > behavior would be > nice ;-) > > -soenke Yes, I having a hard time imaging one, other than some quick fix. I'd much rather have some decent refactoring tools. Jared -- PHP Internals - PHP Runtime Develop

RE: [PHP-DEV] testing filter ext in RC1

2006-07-29 Thread Jared Williams
Hi, Also it does seem NUL char safe? php -r "$var='3'.chr(0).'foo'; var_dump(filter_data($var, FILTER_VALIDATE_INT));" int(3) Jared > -Original Message- > From: Pierre [mailto:[EMAIL PROTECTED] > Sent: 28 July 2006 17:

RE: [PHP-DEV] testing filter ext in RC1

2006-07-28 Thread Jared Williams
> -Original Message- > From: Pierre [mailto:[EMAIL PROTECTED] > Sent: 28 July 2006 18:34 > To: [EMAIL PROTECTED] > Cc: Kevin Waterson; internals@lists.php.net > Subject: Re: [PHP-DEV] testing filter ext in RC1 > > On 7/28/06, Jared Williams <[EMAI

RE: [PHP-DEV] testing filter ext in RC1

2006-07-28 Thread Jared Williams
Hi, An empty string returns 0. php -r "$var=''; var_dump(filter_data($var, FILTER_VALIDATE_INT));" int(0) Which maybe is what was intended, but imho still should return false. Jared > -Original Message- > From: Pierre [mailto:[EMAIL PROTECTED] >

RE: [PHP-DEV] Adding pecl/zip to 5.2

2006-07-21 Thread Jared Williams
; php zip implementation named Zip. > > +1/-1/0? I would've preferred an unified package for handling multiple archives (zip/rar/tgz etc). Similar to what PDO does for databases, if it is going into core. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] RfC: rethink OO inheritance strictness

2006-07-21 Thread Jared Williams
think that this enforcements are no good idea and > I _beg_ you that we leave this "area" to interfaces. > Not sure why this is necessary, why doesn't Class C { function f() { } } Class D { private $c; function __construct(C $c) { $this->c = $c; } funct

RE: [PHP-DEV] Re: PEAR::Date broken (Was: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c php_date.h)

2006-07-19 Thread Jared Williams
ormat that JS can parse. function localizeDate(span) { var local = span.cloneNode(true); var d = new Date(local.innerText); local.innerText = d.toLocaleString(); local.className = 'date local'; if (local.innerText != span.innerText) span.parentNode.re

RE: [PHP-DEV] Re: [PHP-I18N] RFC: Error handling in HTTP input decoding

2006-07-10 Thread Jared Williams
t; > Firefox and > > Opera (afaik) have now adopted. > > As far as I know, the form actually has to have a hidden "_charset_" > input field in order for this to work, no? Yes, it has to be present. But still I think it could be a useful clue. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: [PHP-I18N] RFC: Error handling in HTTP input decoding

2006-07-10 Thread Jared Williams
d Firefox and > Opera (afaik) have now adopted. > Forgot to add that _charset_ has found its way into the Web Forms 2.0 working draft too. http://whatwg.org/specs/web-forms/current-work/#the-charset Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: [PHP-I18N] RFC: Error handling in HTTP input decoding

2006-07-10 Thread Jared Williams
ard is to have the charset parameter on the Content-Type header. Unfortunately this breaks too much server side software, so no UserAgents do it. Hence the _charset_ kludge Microsoft introduced awhile back, and Firefox and Opera (afaik) have now adopted. Jared -- PHP Internals - PHP Runtime D

RE: [PHP-DEV] RFC: Error handling in HTTP input decoding

2006-06-22 Thread Jared Williams
> -Original Message- > From: Andrei Zmievski [mailto:[EMAIL PROTECTED] > Sent: 22 June 2006 22:46 > To: PHP Internals > Cc: PHP I18N > Subject: [PHP-DEV] RFC: Error handling in HTTP input decoding > > I'd like to solicit opinions on how we should treat > conversion failures > during

RE: [PHP-DEV] Re: strlen() under unicode.semantics

2006-06-21 Thread Jared Williams
yield whatever type is appropriate to unicode.semantics. > > In other cases, such as reading from a binary mode file: > > $fp = fopen('foo.bin', 'rb'); > $str = fread($fp, 100); Hi, What happens with $fp = fopen('foo.bin', 'wb'); $written = fwrite($fp, $str); if (strlen($str) != $written) { echo 'Not written', "\n"; } Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] RFC array functions

2006-05-27 Thread Jared Williams
key($array) !== NULL") How do you disambiguate between this and $array = array('foo', 'bar'); $anotherArray = array($array); making array(0 => array(0 => 'foo', 1 => 'bar')) Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] private, protected, readonly, public

2006-05-17 Thread Jared White
rties. Makes sense to me. That being said, I think the current syntax options being discussed are somewhat cumbersome. "readable" doesn't really sit well with me. I wish I were clever enough to come up with an alternative, but I ain't. :) Take care, Jared -- PH

RE: [PHP-DEV] Flamewar Summary

2006-05-17 Thread Jared Williams
If so -1, as E_STRICT behaves differently compared to the other E_*s, otherwise 0. foo::$bar = 1; -1 Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: private, protected, readonly, public

2006-05-16 Thread Jared Williams
> > L. An abstract class need not declare the actual accessor > methods, they could be added as abstract by default: > > abstract class Bar { public $foo read getFoo write setFoo; } > Yes, full property support would be nice. Though not to keen on that syntax, but can't

RE: [PHP-DEV] xmlwriter_write_raw() not in 5.1.4 yet?

2006-05-15 Thread Jared Williams
status of this function, if it does what I > want, and what version I can start using it? > I originally requested it. http://pecl.php.net/bugs/bug.php?id=6267 . I think it'll appear in 5.2, http://oss.backendmedia.com/PhP52 . Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Stop Breaking Our Apps For the Sake of OO

2006-05-11 Thread Jared Williams
> > Jared Williams wrote: > > > > Interesting logic break too... > > > > $foo = new stdClass(); > > if ($foo == null || $foo != null) { echo 'Never gets echoed'; } > > From a pure computer science point of view, the above makes > comple

RE: [PHP-DEV] #line C macro equivalent in php ?

2006-05-11 Thread Jared Williams
simple becuase the tools in question would already do that? No such generator? ... I've have a port of Lemon that outputs PHP5, so a #line or equivalent would be nice. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Stop Breaking Our Apps For the Sake of OO

2006-05-11 Thread Jared Williams
e of those things. How to test if you're using > PHP 5.1 or PHP 5.2: > > > class Bla > { > } > > $b = new Bla; > > if( $b != null ) > { > echo "PHP 5.1"; > } > else > { > echo "PHP 5.2"; > } > ?>

RE: [PHP-DEV] Re: Stop Breaking Our Apps For the Sake of OO

2006-05-11 Thread Jared Williams
ces? That way we would notice that a test that > passed with a previous version fails with a newer one. Would have to diff the various tests too. Perhaps the tests cases should never be removed, but the expected results altered so a diff between differing test suite versions can show w

RE: [PHP-DEV] array type hint and SPL array interfaces

2006-05-09 Thread Jared Williams
like > an array, PHP should not complain, since the implementation > of the method would not notice the difference. > Or am I wrong? But the method may use an array_*() function, which would cause problems if they're handed an ArrayAccess implementation. So there is a difference. Jar

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-04 Thread Jared White
ecause someone decides it's not interesting enough or it's time to move on (*cough* named parameters *cough*). I think the concept behind filled () is sound, has merit, and is worth talking about seriously. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] PHP 5.1.3, IIS & FastCGI

2006-05-03 Thread Jared Williams
> > > > It should be already fixed in CVS. > > Please check. > > > > Ah. K :) > > Will check once the next snap is built. > > Jared > Just installed todays' 18:30 snap, and its working. Cheers. Jared -- PHP Internals - PHP Runtime De

RE: [PHP-DEV] PHP 5.1.3, IIS & FastCGI

2006-05-03 Thread Jared Williams
> > It should be already fixed in CVS. > Please check. > Ah. K :) Will check once the next snap is built. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] PHP 5.1.3, IIS & FastCGI

2006-05-03 Thread Jared Williams
2 38 6440 0:00:00.080 > 0:00:00.1000:01:56.417 > php-cgi 740 8 2 41 6380 0:00:00.110 > 0:00:00.0500:01:56.397 > php-cgi 2008 8 2 43 6380 0:00:00.110 > 0:00:00.0700:01:56.357 > Opened as bug, http://bugs.php.net/bug.php?id=37291 Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] PHP 5.1.3, IIS & FastCGI

2006-05-03 Thread Jared Williams
Mem User Time Kernel Time Elapsed Time php-cgi 1784 8 2 38 6440 0:00:00.080 0:00:00.1000:01:56.417 php-cgi 740 8 2 41 6380 0:00:00.110 0:00:00.0500:01:56.397 php-cgi 2008 8 2 43 6380 0:00:00.110 0:00:00.0700:01:56.357 Jared -

[PHP-DEV] PHP 5.1.3, IIS & FastCGI

2006-05-03 Thread Jared Williams
Hi, It seems I can not get PHP 5.1.3 & FastCGI to work. Had 5.1.3RC2 working with FastCGI. Was this a planned break, and requires some different means of getting it working? Or should I go file a bug report? Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubsc

RE: [PHP-DEV] ext/filter, add input_get_args, support of scalar orarray result

2006-05-02 Thread Jared Williams
esnotexist' => FILTER_VALIDATE_INT, > 'testscalar'=> array( > 'filter' => FILTER_VALIDATE_INT, > 'flags' => FILTER_FLAG_SCALAR, > > ), > 'testarray'=> array( > 'filter' => FILTER_VALIDATE_INT, > 'flags' => FILTER_FLAG_ARRAY, > ) > > ); Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] RE: [PHP-DOC] Re: [PHP-DEV] Summer of Code

2006-04-15 Thread Jared Williams
ity definitions into an xml file, so you could load a raw page of the manual directly into a DOMDocument and apply a xsl transform. Didn't have enough time/patience to get it working tho :) Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] RE: [PHP-DOC] Re: [PHP-DEV] Summer of Code

2006-04-15 Thread Jared Williams
, pear/gtk/smarty docs support, php 6 support, etc..) > > +1 for someone cleaning up livedocs to a ready-to-deploy state :) How about moving away from using system entities to construct the manual and using Xinclude instead? (See the mysql ref manual docbook sources) This would make t

RE: [PHP-DEV] open_basedir_for_include

2006-03-25 Thread Jared Williams
know your application should be reading and writing from and > if you happen to make a mistake in your code it will act as a > safety net. Adding the ability to include files from common > include directories without adding them to the list of real > open_basedir directories ma

RE: [PHP-DEV] phps line numbering

2006-03-17 Thread Jared Williams
> Sorry, I meant to send my first mail to the entire list about > this, but http://pastebin.com works fine here in firefox, > although Jared Williams reported back that it pastes the line > numbers for him. > Version and OS differences perhaps? I don't have a machine to

RE: [PHP-DEV] phps line numbering

2006-03-16 Thread Jared Williams
> > Jared Williams wrote: > > Replacing the list, with divs and using css generated content to > > display the line numbers, cleans up the paste output but won't get > > ... and doesn't work in IE. So no real win here. The semantic > solution would be to

RE: [PHP-DEV] phps line numbering

2006-03-15 Thread Jared Williams
sure this isn't possible in Firefox, both avoiding horizontal scrolling and paste without numbers, are mutually exclusive. Replacing the list, with divs and using css generated content to display the line numbers, cleans up the paste output but won't get the word wrap. Jared -- PHP

Re: [PHP-DEV] Give the Language a Rest motion

2006-03-09 Thread Jared White
Sure, after you folks implement named parameters. :) *ducks and tries to hide* Jared On Mar 9, 2006, at 2:57 AM, Zeev Suraski wrote: I'd like to raise a motion to 'Give the Language a Rest'. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: htt

RE: [PHP-DEV] Revisiting output control code

2006-02-27 Thread Jared Williams
/comments/flames? Sounds like should be built upon/replaced with streams. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] recover from a segfault

2006-02-24 Thread Jared Williams
amined the execution flow of > PECL functions. How about core functions too.. Using array_walk_recursive to undo magic_quotes creates a stack smashing exploit. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   >