Re: [PHP-DEV] Re: Named arguments revisited

2006-01-13 Thread jared
see for not implementing named parameters and that's time. Actually defending a design decision of rejecting it quite frankly astonishes me. Jared > Guys, > > It's not going to happen. Please move on. We've discussed it lots of > times in the past. Many times we've c

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] 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] 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] 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] 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] 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] 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] [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] [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-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] [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] [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

[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] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-03-25 Thread Jared Williams
e we had parameter binding. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-03-25 Thread Jared Williams
> Am 25.03.2005 um 14:36 schrieb Jared Williams: > > Can I just point out that you've just negated the whole reason for > > having parameters in the first place, imo. > > huh? just 'cuase you dislike my php-code you question the > "value" of bi

RE: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-03-25 Thread Jared Williams
> jared, i fail to understand your "contribution" to the real > subject ("do we need a colon in from of every bound variable or not"). I was pointing out your design was flawed. Which if was made more secure, like the following, the colons become less of an issue.

RE: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-03-25 Thread Jared Williams
> > my point is that on internals@ we usually discuss developing > php and not developing *with* php - > Poor practices and insecure code should never go unchallenged anywhere, unless its cleared marked as such. Jared -- PHP Internals - PHP Runtime Development Mailing List To

RE: [PHP-DEV] why does PHP accept [new] session ids from client?

2005-03-31 Thread Jared Williams
to have. Also having the session cookie sent with the HttpOnly flag, to prevent it getting leaked on supporting client(s) (IE supports it since 6sp1, mozilla have been discussing implementing it since 2002, https://bugzilla.mozilla.org/show_bug.cgi?id=178993) via XSS. I thought I read sometime bac

RE: [PHP-DEV] Re: cvs: php-src /ext/spl php_spl.c

2005-04-05 Thread Jared Williams
f: > - limiting the number of namespace clashes with user code > - makes it clear what extensions may/are colliding and what > steps need to be taken to fix the situation > I'd prefered explicit importing of classes. To bring in the File class (and any dependancies) into the gl

RE: [PHP-DEV] PDO proposal: add PDOStatement::nextResult() method to support stored procedures

2005-04-09 Thread Jared Williams
li_next_result(), but this is used to retrieve the > results of a multi-query... a very different thing, and not > something I advocate adding to PDO. They might have trouble > disambiguating that from the stored procedure case when MySQL > 5 reaches production status. > Doesn&#x

[PHP-DEV] HTTP streams, status codes & WebDAV

2005-04-18 Thread Jared Williams
TP stream wrapper isn't treating it as such, throwing an error, and failing to open. Is this a bug? Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] annoying DOM limitation

2005-05-13 Thread Jared Williams
_NS, 'xmlns:xlink', NS_XLINK); echo $document->saveXML(); Haven't encountered any problems with this method, seems to produce XML (SVG in this case) fine. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] PHP 5.1

2005-06-06 Thread Jared Williams
useful when developing in PHP, but quite a few use goto, so porting to PHP output becomes non-trivial. > JC>>have a limited but practical purpose. +1 to a limited goto. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] PHP 5.1

2005-06-07 Thread Jared Williams
e. > > If you want to build a full-blown parser, PHP is not your > language. If you need a code generator, you have a problem. Why not? Applications like phpMyAdmin attempt to parse SQL. Why can't they use the right tool for the job? Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] PHP 5.1

2005-06-07 Thread Jared Williams
d a linear search of case values, so took n/2 comparisons (where n is number of cases) on average to find the correct block to execute in a switch statement, wheras using goto doesn't have to perform any. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] 5.1.0RC5-dev stability issue

2005-11-06 Thread Jared Williams
Just asking how to gather more information, as I presume just the above is not helpful in tracking the problem causing this. Jared PHP Version => 5.1.0RC5-dev System => Windows NT WIN2KS 5.0 build 2195 Build Date => Nov 5 2005 12:32:41 Configure Command => cscript /nologo configure.js

RE: [PHP-DEV] 5.1.0RC5-dev stability issue

2005-11-07 Thread Jared Williams
Ok, its just that 5.1.0 RC1 was quite stable. Can no longer find it to download to check though. Jared > -Original Message- > From: Wez Furlong [mailto:[EMAIL PROTECTED] > Sent: 07 November 2005 02:37 > To: [EMAIL PROTECTED] > Cc: internals@lists.php.net > Sub

RE: [PHP-DEV] 5.1.0RC5-dev stability issue

2005-11-07 Thread Jared Williams
have any external dependancies afaik. And they're all packaged within the same zip. Jared > On Mon, 7 Nov 2005, Jared Williams wrote: > > > > > > > Ok, its just that 5.1.0 RC1 was quite stable. Can no longer > find it to download to check though. > > > >

RE: [PHP-DEV] Reflection API idea

2005-11-23 Thread Jared Williams
Hi, This has been do-able in PHP5 for somewhile, (wrote a reflection browser while ago to show such things) http://www.ren.dotgeek.org/classbrowser/?class=DOMCdataSection Jared > Here's an idea for the maintainer of the Reflection API, to > be able to view the class

RE: [PHP-DEV] Reflection API idea

2005-11-23 Thread Jared Williams
how to create file packages on SF) http://cvs.sourceforge.net/viewcvs.py/phpclassbrowser/classbrowser/ Need to update it sometime one of the parameter required column needs to go now as bug #29523 is fixed. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscrib

RE: [PHP-DEV] Re: PHP 5.1 (Or How to break tousands of apps out there)

2005-11-25 Thread Jared Williams
Hi, As a QFE, does changing ini setting disable_class to include date fix this? Appears can declare a date class fine. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: PHP 5.1 (Or How to break tousands of apps out there)

2005-11-25 Thread Jared Williams
> Hi, > > As a QFE, does changing ini setting disable_class to include > date fix this? Appears can declare a date class fine. > Er, I meant disable_classes of course ;) Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] namespace separator ideas

2005-11-26 Thread Jared Williams
->, as this has the same advantage as :: of "rhyming" > with current syntax. Hi, I was thinking -> too.. Had ideas of namespaces being object instances in their own right.. namespace foo { const ACONST = '1'; class bar {} } echo $foo->bar; // some mangled internal class name (foo_bar_123 or something) to make it unique $a = new $foo->bar(); $ref = new ReflectionClass($foo->bar); Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: Labeled Breaks (not the G-word)

2005-11-27 Thread Jared Williams
; similar to continue's semantics. > I got a horrid thought that people will end up trying to get around the limitation, abusing the forward only goto and other language constructs to get it todo backward jumps, and you'll have even worse code than with a backward jumping goto. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Re: namespace separator poll, update

2005-11-27 Thread Jared Williams
-Sara > > I think we should use a non breaking space ( \xA0 ) as the > separator, after all namespace class->method() looks great in > an email, why not in code? > > ;) > I say it should be an ini setting, and then everyone can have whatever they want.. ;) Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Named arguments revisited

2005-11-29 Thread Jared White
owhow to jump in and help implement this, I would, but I'm a lousy C programmer. :( But I definitely want to lend my support to anyone interested in working on this. Please, please don't give up on this feature! Thanks so much, Jared -- PHP Internals - PHP Runtime Development Mail

Re: [PHP-DEV] Named arguments revisited

2005-11-30 Thread Jared White
> "myCycle", "values" => "#ee;#d0d0d0", "print" => false, "reset" => true", "delimiter" => ";")); But not only is that a lot more verbose and messy, but it provides no language features in the function/meth

Re: [PHP-DEV] Named arguments revisited

2005-12-01 Thread Jared White
tion you don't know what those parameters are for unless you know the function/method API ahead of time. Sure, as you pointed out there are some juicy features you get with named parameters if you implement them throughly, but I still say its main selling point is that the calling code is its own API documentation. Regards, Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Named arguments revisited

2005-12-01 Thread Jared White
On Dec 1, 2005, at 11:16 AM, Sebastian Kugler wrote: On 12/1/05, Jared White <[EMAIL PROTECTED]> wrote: I still say its main selling point is that the calling code is its own API documentation. why don't you just write something like cycle(/* name: */ "myCycle", /

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] 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] 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] [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] 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] 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-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] 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] 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] 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] 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] [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] 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] 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
> -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] 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] 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] 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] 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: Named arguments revisited

2006-01-12 Thread Jared Williams
es. One that generates a SAX stream from html, another class or two modifies SAX event stream, one removing links, and another injecting highlighting elements, and another pair of classes to reassemble the SAX event stream back into a string, one doing HTML, the other XHTML. If you have too ma

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-12 Thread Jared White
s coding easier, not harder. So why defend keeping it out of the language? Regards, Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-13 Thread Jared White
I think. (At least, it'd certainly serve my needs. :) ) Thanks Lukas, Jared On Jan 13, 2006, at 4:04 AM, Lukas Smith wrote: Hartmut Holzgraefe wrote: - all internal and PECL functions need to be recoded as the API right now doesn't know any concept of parameter names at all I

RE: [PHP-DEV] Re: Named arguments revisited

2006-01-15 Thread Jared Williams
I guess adding named arguments of internal functions would enable Reflection to properly reflect on function and method parameters of internal functions. Which would be nicer than the inconsistent state that exists now. Jared -- PHP Internals - PHP Runtime Development Mailing List To

RE: [PHP-DEV] Naming Arguments

2006-01-18 Thread Jared Williams
information in?". Perhaps some tool to generate boiler plate docbook from introspection would be enough encouragement? Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] JSON inclusion in core

2006-01-21 Thread Jared Williams
ations of doing this? Creating objects based on a string from a untrusted source seems not good idea, unless can prevent tampering (with an HMAC or something). Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] JSON inclusion in core

2006-01-21 Thread Jared Williams
t;]=> int(10) ["height"]=> int(100) ["width"]=> int(100) } ["windowB"]=> object(stdClass)#3 (4) { ["left"]=> int(120) ["right"]=> int(120) ["height"]=> int(120) ["width&

RE: [PHP-DEV] JSON inclusion in core

2006-01-21 Thread Jared Williams
> > At 04:25 AM 1/21/2006, Jared Williams wrote: > >What are the security implications of doing this? > >Creating objects based on a string from a untrusted source seems not > >good idea, unless can prevent tampering (with an HMAC or something). > > Well I think

RE: [PHP-DEV] Re: zend_hash.c fishy code

2006-01-30 Thread Jared Williams
/* rearranged */ if ((p->h == h) && (p->nKeyLength == nKeyLength) && ((nKeyLength == 0) || (!memcmp(p->arKey, arKey, nKeyLength Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Custom Streams, fclose & stream_close

2006-02-13 Thread Jared Williams
Hi, Is the PHP manual correct in that fclose() returns a bool, but a custom wrapper stream_close() is void? Would like to signal a problem if I have a problem closing a custom stream. Jared -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http

RE: [PHP-DEV] [PATCH] Custom Streams, fclose & stream_close

2006-02-15 Thread Jared Williams
ez. This should fix it, I think. :) > > > > > > Hi, > > Is the PHP manual correct in that fclose() returns > a bool, but > > a custom wrapper stream_close() is void? Would like to > signal a problem if I have a problem closing a custom stream. > &g

RE: [PHP-DEV] [PATCH] Custom Streams, fclose & stream_close

2006-02-15 Thread Jared Williams
; don't have a current cvs checkout). > > > > This should fix it, I think. :) > > Please put it online and provide a link. We blcok all > attachments which are not text/plain. http://ren.dotgeek.org/phppatches/userspace_stream_close_return.diff Jared -- 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

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] 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] 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] 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-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] 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

[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] 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

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

[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] 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 -

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
> > 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
> > > > 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] 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] 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] 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] 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] #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
> > 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] 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] 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] 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] 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] 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] 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: 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: [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

  1   2   >