Re: [PHP-DEV] Complete case-sensitivity in PHP

2012-04-21 Thread Robert Cummings
On 12-04-20 07:56 PM, Johannes Schlüter wrote: On Sat, 2012-04-21 at 01:16 +0200, Stefan Neufeind wrote: I think we might possibly add a special kind of deprecation where the non-matching case would still work but (if you activate those deprecation-warnings) would trigger warnings so you can

Re: [PHP-DEV] Strict typing

2010-08-10 Thread Robert Cummings
On 10-08-11 12:03 AM, Josh Davis wrote: On 11 August 2010 02:50, Stas Malyshevsmalys...@sugarcrm.com wrote: Hi! First of all, I am talking about the typehinting syntax and mechanism here. As Derick pointed out, current typehints are strict. Talking about strict vs. non-strict for class

Re: [PHP-DEV] backslash, really ... ?

2010-04-28 Thread Robert Cummings
Sylvain Rabot wrote: On Wed, 2010-04-28 at 15:29 -0700, Chad Fulton wrote: You can take a look at the RFP if you like. It discusses the pros and cons of various possible separators, and why they chose the backslash. http://wiki.php.net/rfc/namespaceseparator Thanks.

[PHP-DEV] Re: [PHP] Facebook PHP compiler

2010-02-02 Thread Robert Cummings
Cesar D. Rodas wrote: Hello, Have you guys checked this PHP to C++ converter from the Facebook People? http://developers.facebook.com/news.php?blog=1story=358 Very interesting... I heard about this a few days ago on Slashdot. Most people figured it would be a compiler of some sort, though

Re: [PHP-DEV] Why is ereg being deprecated?

2009-10-12 Thread Robert Cummings
Guilherme Blanco wrote: It was fat, slow and everything that you can do with POSIX regex you can easily do with PCRE regex, which is faster. It is a decision forever. Do not expect it to come on PHP 5.4 (?) or PHP 6. Cheers, On Mon, Oct 12, 2009 at 12:46 PM, Mark Krenz m...@suso.org wrote:

Re: [PHP-DEV] Why is ereg being deprecated?

2009-10-12 Thread Robert Cummings
Mark Krenz wrote: On Mon, Oct 12, 2009 at 05:55:25PM GMT, Carl P. Corliss [rabb...@gmail.com] said the following: Code Search of: eregi?(_replace)?\( lang:php shows ~123,000 results Code Search of: preg_(filter|grep|last_error|match_all|match|quote|replace_callback|replace|split)\( lang:php

Re: [PHP-DEV] Why is ereg being deprecated?

2009-10-12 Thread Robert Cummings
Ferenc Kovacs wrote: On Mon, Oct 12, 2009 at 11:53 PM, Ferenc Kovacs i...@tyrael.hu wrote: btw. I hate php 5.3 for the following change: # The use of {} to access string offsets is deprecated. Use [] instead. I always used the {} because the [] was deprecated for a long time, and I corrected

Re: [PHP-DEV] reference caller object

2009-09-17 Thread Robert Cummings
Sebastian Bergmann wrote: Chris Trahey schrieb: using it is current-implimentation specific (i.e. developer needs to know the format of the array returned) And adding another language feature is not something the developer needs to know? I think the concern is the overhead of capturing

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

2009-07-02 Thread Robert Cummings
Ionut G. Stan wrote: On 7/2/2009 13:56, Hannes Magnusson wrote: ?php function throw_exception($errno, $errmsg) { if (strpos($errmsg, Argument ) === 0) { throw new InvalidArgumentException($errmsg, $errno); } return false; } set_error_handler(throw_exception,

Re: [PHP-DEV] Re: Flexible type hinting

2009-07-02 Thread Robert Cummings
Ilia Alshanetsky wrote: Paul's proposal is some part does not make sense because it allows weak type hinting, which should not be used if you need type hinting. The whole idea about type hinting is definition of strict interfaces, not loosely based one. That's just my opinion, which

Re: [PHP-DEV] Re: Flexible type hinting

2009-07-02 Thread Robert Cummings
Ilia Alshanetsky wrote: On 2-Jul-09, at 9:23 AM, Robert Cummings wrote: Ilia Alshanetsky wrote: On 2-Jul-09, at 9:04 AM, Robert Cummings wrote: Ilia Alshanetsky wrote: Paul's proposal is some part does not make sense because it allows weak type hinting, which should not be used if you

Re: [PHP-DEV] Re: Flexible type hinting

2009-07-02 Thread Robert Cummings
Ilia Alshanetsky wrote: On 2-Jul-09, at 9:04 AM, Robert Cummings wrote: Ilia Alshanetsky wrote: Paul's proposal is some part does not make sense because it allows weak type hinting, which should not be used if you need type hinting. The whole idea about type hinting is definition

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

2009-05-12 Thread Robert Cummings
On Tue, 2009-05-12 at 18:23 +0100, Lewis Wright wrote: Regarding ifsetor, what's wrong with just using this: isset($myvar) OR $myvar = 'i am set'; It works in just the same way and has no problems. I agree it would be great though if there could be a function to retrieve a variable's

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

2009-05-12 Thread Robert Cummings
On Tue, 2009-05-12 at 19:35 +, Ólafur Waage wrote: On Tue, May 12, 2009 at 5:39 PM, Robert Cummings rob...@interjinn.comwrote: On Tue, 2009-05-12 at 18:23 +0100, Lewis Wright wrote: Regarding ifsetor, what's wrong with just using this: isset($myvar) OR $myvar = 'i am set

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Robert Cummings
On Thu, 2009-04-02 at 15:36 +0100, David Coallier wrote: Also I guess we'll have to attach a css file with that? Inline css at the top of the generated highlighted block maybe? I thought the purpose was to allow external styling? Cheers, Rob. -- http://www.interjinn.com Application and

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Robert Cummings
On Thu, 2009-04-02 at 16:45 +0200, Kalle Sommer Nielsen wrote: Hi Scott 2009/4/2 Scott MacVicar scott...@php.net: David Coallier wrote: 2009/4/2 Kalle Sommer Nielsen ka...@php.net: 2009/4/2 Kalle Sommer Nielsen ka...@php.net: Hi Justin Attached a patch instead, hopefully this will

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Robert Cummings
On Thu, 2009-04-02 at 09:13 -0700, Chris Stockton wrote: On Thu, Apr 2, 2009 at 8:02 AM, Robert Cummings rob...@interjinn.com wrote: Wrap the whole highlighted block in a div with a class: div class=php-highlighted-code /div Add one more INI setting to change that class. Let

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Robert Cummings
On Thu, 2009-04-02 at 17:38 +0100, Lewis Wright wrote: Why not allow a class prefix as an option to the function? Eg: 'php-highlighted-' as the prefix would produce things like 'php-highlighted-keyword'. That way there's no risk of collision and there's no need to over-complicated

Re: [PHP-DEV] Re: namespace separator and whining

2008-10-26 Thread Robert Cummings
On Mon, 2008-10-27 at 09:28 +1030, Andrew Mason wrote: So can I just confirm that what was previously ?php $x = new Framework::Utils::Foo(); $y = new Project::PEAR::Bar( 'somestring' ); ? is now ?php $x = new Framework\Utils\Foo();

Re: [PHP-DEV] Re: namespace separator and whining

2008-10-26 Thread Robert Cummings
On Sun, 2008-10-26 at 21:46 -0500, Greg Beaver wrote: Robert Cummings wrote: On Mon, 2008-10-27 at 09:28 +1030, Andrew Mason wrote: So can I just confirm that what was previously ?php $x = new Framework::Utils::Foo(); $y = new Project::PEAR::Bar

Re: [PHP-DEV] namespaces and alpha3

2008-10-14 Thread Robert Cummings
On Tue, 2008-10-14 at 20:41 +0100, Steph Fox wrote: Yeah... I never had a response to ::: so I guess that one's been dumped out of hand somewhere off-list, but darn I hate - reuse with a passion! The use of ::: is far to simple. Nobody would want an elegant intuitive operator that uses 3

Re: [PHP-DEV] Re: towards a 5.3 release

2008-09-08 Thread Robert Cummings
On Mon, 2008-09-08 at 14:39 -0400, Elizabeth M Smith wrote: Stanislav Malyshev wrote: Hi! And what happens when you have two libraries and each has their own Date implementation? How is that any different? If you could alias in functions, you'd simply alias them in differently - call

Re: [PHP-DEV] Re: towards a 5.3 release

2008-09-08 Thread Robert Cummings
On Mon, 2008-09-08 at 14:45 -0400, Robert Cummings wrote: On Mon, 2008-09-08 at 14:39 -0400, Elizabeth M Smith wrote: Stanislav Malyshev wrote: Hi! And what happens when you have two libraries and each has their own Date implementation? How is that any different? If you could alias

Re: [PHP-DEV] Re: Closing mysql_pconnects.

2008-08-29 Thread Robert Cummings
On Sat, 2008-08-30 at 04:40 +0200, Lupus Michaelis wrote: Richard Quadling a écrit : Can someone point me to where or how PHP DOESN'T close persistent connections Maybe because it is... persistent ? He's probably trying to learn how to do the same. This is internals after all and not

Re: [PHP-DEV] [PATCH] [RFC] Closures and lambda functions in PHP

2008-06-20 Thread Robert Cummings
On Fri, 2008-06-20 at 10:50 -0500, Larry Garfield wrote: On Fri, 20 Jun 2008 16:33:08 +0200, Alexander Wagner [EMAIL PROTECTED] wrote: On Friday 20 June 2008, Larry Garfield wrote: function ($x, $y) use ($a, $b, $c) {}; I am not sure if use is the clearest word to use there (wouldn't

Re: [PHP-DEV] deprecation status of $str{42} versus $str[42]

2008-06-16 Thread Robert Cummings
On Mon, 2008-06-16 at 09:20 +0300, Arvids Godjuks wrote: 2008/6/14 Chris Stockton [EMAIL PROTECTED]: I personally have always used {} for string offsets because it just felt right. [] seems like it is for arrays, for me, using it on strings makes me feel dirty. Could we maybe visit

Re: [PHP-DEV] Class Properties in Interfaces?

2008-05-14 Thread Robert Cummings
On Wed, 2008-05-14 at 14:37 +0200, Christian Schneider wrote: Richard Quadling wrote: _IF_ the property was defined in an interface, should unset be allowed to remove the property? a) Interfaces do not define attributes, they define a set of methods. b) If the above would be changed I

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Robert Cummings
On Wed, 2008-04-30 at 01:22 -0400, Nathan Nobbe wrote: On Wed, Apr 30, 2008 at 1:07 AM, Robert Cummings [EMAIL PROTECTED] wrote: We are not talking about data here. We are talking about properties. Data is assigned to a property which is akin to functionality

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Robert Cummings
On Tue, 2008-04-29 at 23:37 -0700, Stanislav Malyshev wrote: $hair = new Hair(); $hair-colour = 'brown'; You can do this without pre-defining any properties. yes but the following (as I'm you certainly know): echo $hair-colour generates an E_NOTICE if the property isn't defined.

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Robert Cummings
On Wed, 2008-04-30 at 09:39 -0600, Nathan Nobbe wrote: so really, all we would get is a group of member variables we know would be there... No, you know nothing about the existence of properties when using getters and setters. Just because you have getColour() and setColour() in no way

Re: [PHP-DEV] why interfaces ?

2008-04-30 Thread Robert Cummings
On Wed, 2008-04-30 at 10:21 -0600, Nathan Nobbe wrote: all, in recent weeks there has been a lot of arguing about what interfaces are, arent (on php-general and now on the internals list as well) etc. etc. i am quite curious, why interfaces were added to the language in the first place.

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-29 Thread Robert Cummings
On Tue, 2008-04-29 at 19:01 -0600, Nathan Nobbe wrote: On Tue, Apr 29, 2008 at 6:14 PM, Richard Quadling [EMAIL PROTECTED] wrote: 2008/4/30 Robert Cummings [EMAIL PROTECTED]: On Tue, 2008-04-29 at 20:04 +0200, John Carter -X (johncart - PolicyApp Ltd at Cisco) wrote: I

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-29 Thread Robert Cummings
On Tue, 2008-04-29 at 23:51 -0400, Nathan Nobbe wrote: On Tue, Apr 29, 2008 at 9:22 PM, Robert Cummings [EMAIL PROTECTED] wrote: That should be a matter of choice for the developer. When you say but when, down the road, some logic..., all I see is you waving your hands in the air

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-29 Thread Robert Cummings
On Wed, 2008-04-30 at 00:27 -0400, Nathan Nobbe wrote: On Wed, Apr 30, 2008 at 12:05 AM, Robert Cummings Abstract classes and interfaces are not the same. They are used for fundamentally different reasons. An interface is to enforce a contract

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-29 Thread Robert Cummings
On Tue, 2008-04-29 at 22:12 -0700, Stanislav Malyshev wrote: an interface with an interface property of x, then all implementations using that interface would know that property x exists and could use it You can use property in PHP without declaring it previously. But then you need to

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-29 Thread Robert Cummings
On Tue, 2008-04-29 at 22:21 -0700, Stanislav Malyshev wrote: But then you need to check if it exists lest you raise an E_NOTICE because it doesn't exist. Additionally, E_NOTICE is run-time, interface checking is compile-time. I don't understand what you mean here. PHP can't check

Re: [PHP-DEV] OO Parameter Checking

2008-02-29 Thread Robert Cummings
On Fri, 2008-02-29 at 18:27 +0100, Christian Schneider wrote: Marcus Boerger wrote: you still cannot ignore basic inheritance or reuse rules. Protocols have to be respected - E_FATAL, fix your code. I don't see why THIS protocol should need to be respected when PHP lacks argument

Re: [PHP-DEV] ifsetor like expression in php6

2008-01-26 Thread Robert Cummings
On Sat, 2008-01-26 at 22:13 +0100, Lars Strojny wrote: Hi, Am Samstag, den 26.01.2008, 12:17 -0500 schrieb Sam Barrow: I don't think throwing a E_NOTICE is appropriate. The isset() construct doesn't throw an E_NOTICE, this shouldn't either. As far as I understand it is just an

Re: [PHP-DEV] why we must get rid of unicode.semantics switch ASAP

2008-01-23 Thread Robert Cummings
Is it possible to take a page out of the database engine's handbook and tie a charset to a namespace like charsets are tied to tables? namespace myNamespace charset=utf8 { ... } Then when no charset is defined it defaults to current PHP semantics. Win-win? Cheers, Rob. On Wed, 2008-01-23

Re: [PHP-DEV] type hinting

2008-01-07 Thread Robert Cummings
On Mon, 2008-01-07 at 19:21 +0100, Stefan Priebsch wrote: Sam Barrow schrieb: Keep in mind that your do_whatever would actually be a trigger error with an error message including the name of the function and parameter number. I did not make the point of my code clear enough. do_whatever

Re: [PHP-DEV] type hinting

2008-01-07 Thread Robert Cummings
On Mon, 2008-01-07 at 19:45 +0100, Stefan Priebsch wrote: Robert Cummings schrieb: The onus should be on consumers of my API to use it properly, not on me to jump through hoops to make sure they gave me the correct data at every step of the way. I stopped holding hands in grade 3 or so

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 18:44 +0100, Lukas Kahwe Smith wrote: On Jan 4, 2008, at 6:37 PM, Robert Cummings wrote: On Fri, 2008-01-04 at 18:23 +0100, Pierre wrote: On Jan 4, 2008 6:20 PM, Marcus Boerger [EMAIL PROTECTED] wrote: Hello Pierre, we never accepted this as a pro argument

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 18:23 +0100, Pierre wrote: On Jan 4, 2008 6:20 PM, Marcus Boerger [EMAIL PROTECTED] wrote: Hello Pierre, we never accepted this as a pro argument. Infact we often saw the necessaity to highlight something is optional to vote against it. We do this for a reason.

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 12:41 -0500, Sam Barrow wrote: On Fri, 2008-01-04 at 12:37 -0500, Robert Cummings wrote: On Fri, 2008-01-04 at 18:23 +0100, Pierre wrote: On Jan 4, 2008 6:20 PM, Marcus Boerger [EMAIL PROTECTED] wrote: Hello Pierre, we never accepted this as a pro argument

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 12:51 -0500, Sam Barrow wrote: On Fri, 2008-01-04 at 12:48 -0500, Robert Cummings wrote: On Fri, 2008-01-04 at 12:41 -0500, Sam Barrow wrote: On Fri, 2008-01-04 at 12:37 -0500, Robert Cummings wrote: On Fri, 2008-01-04 at 18:23 +0100, Pierre wrote: On Jan 4

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 12:53 -0500, Sam Barrow wrote: On Fri, 2008-01-04 at 17:51 +, Alain Williams wrote: On Fri, Jan 04, 2008 at 12:37:19PM -0500, Robert Cummings wrote: IMHO, optionally inclusion of type hinting for functions/methods can only be a boon to code quality

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 18:46 +, Alain Williams wrote: On Fri, Jan 04, 2008 at 01:06:26PM -0500, Robert Cummings wrote: ?php echo 'Foo: '.(0 + '5five').\n; echo 'Foo: '.((int)'5five').\n; echo 'Foo: '.(intval( ' 5five' )).\n; echo 'Foo: '.(sprintf( '%d', '5five

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 10:35 -0800, Stanislav Malyshev wrote: It's funny sometimes the complaints about too complicated. I mean, if people don't want to use a complicated feature then they shouldn't. I Not an argument. don't think cutting the legs out from developers who want to use said

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 11:20 -0800, Stanislav Malyshev wrote: Ok but if someone inputs an array in the query string i have a problem Which problem? OK, you'd have string Array instead once you handle it. If it's a problem, then having Array from the start is a problem too. with that.

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 11:52 -0800, Stanislav Malyshev wrote: Good point. We were fine before OO and exceptions too weren't we. No, actually we weren't as fine. OO allowed for application frameworks and libraries to flourish. Now that we have them, we can help them become more robust by

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 11:54 -0800, Stanislav Malyshev wrote: I'd prefer that than have garbage in the database. If your application drops dead in the middle of work because some handle can't process the data your database probably won't be in the best shape anyway. Yes, it drops dead, I

Re: [PHP-DEV] type hinting

2008-01-04 Thread Robert Cummings
On Fri, 2008-01-04 at 11:27 -0800, Stanislav Malyshev wrote: This is not what we are doing. We are not changing PHP into a type-strict language. This is type hinting. This is completely different. For type hinting that you propose to work, you need to change PHP into type-strict

Re: [PHP-DEV] Thoughts on Feature Request - Arithmetic

2007-12-07 Thread Robert Cummings
On Fri, 2007-12-07 at 16:44 +0100, Derick Rethans wrote: On Fri, 7 Dec 2007, Nathan Rixham wrote: In-Built PHP Functions for parsing of basic arithmetic and if possible fraction to decimal and decimal to fraction $arithmetic_string = 3*5; echo arith($arithmetic_string); // returns

Re: [PHP-DEV] Namespace

2007-12-07 Thread Robert Cummings
On Fri, 2007-12-07 at 15:55 -0500, Sam Barrow wrote: Very good point namespace stuff ; { function myfunction() { return true ; } } That would actually work, but it's not quite the same as you have the semicolon after the namespace declaration, which looks

Re: [PHP-DEV] Namespace

2007-12-07 Thread Robert Cummings
On Fri, 2007-12-07 at 15:21 -0500, Ken Stanley wrote: I understand what you mean, but I was just trying to put a real-world face on a so-far theoretical problem. But that does raise an interesting point; we can already use braces anywhere and everywhere, and while we could easily wrap

Re: [PHP-DEV] Namespace

2007-12-07 Thread Robert Cummings
On Fri, 2007-12-07 at 14:57 -0500, Ken Stanley wrote: In regards to the braces or no braces question, I have a scenario that I would like to share that could be considered similar in nature. We use a cluster of databases where I work, and to make things easier on us, we have a method called

Re: [PHP-DEV] RFC: Dropping Namespace

2007-12-05 Thread Robert Cummings
On Wed, 2007-12-05 at 09:34 -0800, Stanislav Malyshev wrote: Namespace support is for people who didn't name their classes/functions properly. Here's a claim so weird I don't know how to parse it. I think you're confusing parsing for grokking. Namespace support is merely candy coating for

Re: [PHP-DEV] RFC: Dropping Namespace

2007-12-05 Thread Robert Cummings
On Wed, 2007-12-05 at 10:04 -0800, Stanislav Malyshev wrote: namespaces bring to the table beyond that, is the ability to shorthand the class names within the namespace... as I said candy coating. You can say it as many times as you like, it doesn't make it true. It is the capability

Re: [PHP-DEV] Garbage collector patch

2007-12-05 Thread Robert Cummings
On Wed, 2007-12-05 at 10:01 -0600, Brian Moon wrote: Dmitry Stogov wrote: In general this patch will use more memory. (4 bytes more for each heap allocated zval). The only advantage is automatic cycle collection, but most web applications doesn't make cycles. Could it be that this

Re: [PHP-DEV] RFC: Dropping Namespace

2007-12-04 Thread Robert Cummings
On Tue, 2007-12-04 at 22:26 -0600, Larry Garfield wrote: On Tuesday 04 December 2007, Derick Rethans wrote: 4. What is wrong with simple prefixes in the first place? Both PEAR_*, Zend_*, ezc*, and ezp* are perfectly acceptable markers for different 'namespaces'. We could optionally

Re: [PHP-DEV] Re: Question about superglobals

2007-11-18 Thread Robert Cummings
On Sat, 2007-11-17 at 18:03 -0800, Stanislav Malyshev wrote: You say that superglobals were not designed to be user defined, think about it, the concept of a superglobal is present in C and C++, two of the maturest and strictest languages around. Concept of inserting assembly code is in C

Re: [PHP-DEV] Re: Question about superglobals

2007-11-16 Thread Robert Cummings
On Sat, 2007-11-17 at 01:40 -0500, Sam Barrow wrote: I don't understand, people keep telling me this can cause problems so it's trash. Really? Functions and variables can cause problems too. Not to mention user input. Programming is not easy, but the more flexible it is the better. I think

Re: [PHP-DEV] [PATCH] array_get()

2007-09-12 Thread Robert Cummings
On Wed, 2007-09-12 at 13:53 -0400, Andrew Shearer wrote: Here is the patch and unit test file for array_get(): http://ashearer.com/software/array_get/2007-09-10-php6/array_get.diff http://ashearer.com/software/array_get/2007-09-10-php6/array_get.phpt And here is the backward

Re: [PHP-DEV] [PATCH] array_get()

2007-09-11 Thread Robert Cummings
On Tue, 2007-09-11 at 18:54 +0200, Marcus Boerger wrote: Hello Andrew, how about @expression?:default style? Like: $val = $myarray[$key] ?: $default; Did you mean like: @$val = $myarray[$key] ?: $default; Because that's an expensive assignment since it will hit the error handler

Re: [PHP-DEV] How to integrate PHP with my homegrown server

2007-08-24 Thread Robert Cummings
On Fri, 2007-08-24 at 11:08 -0400, Steve Francisco wrote: Hi, as an experiment I have a simple Java based server that listens on port 80 and can serve files just fine. I'd like to extend it to support PHP but am looking for guidance on how to do that. Can someone point me to instructions?

Re: [PHP-DEV] [PATCH] allowing multiple namespaces per file plus namespaces with brackets

2007-08-22 Thread Robert Cummings
On Wed, 2007-08-22 at 13:57 +0200, Marcus Boerger wrote: Hello Rasmus, the limitations given here and very good explained should imo stay. They should because that is not only easier to understand and easier for anything that has to deal with it like opcode caches and whatnot but also

Re: [PHP-DEV] [PATCH] allowing multiple namespaces per file plus namespaces with brackets

2007-08-22 Thread Robert Cummings
On Wed, 2007-08-22 at 16:15 +0200, Lukas Kahwe Smith wrote: Robert Cummings wrote: On Wed, 2007-08-22 at 13:57 +0200, Marcus Boerger wrote: Hello Rasmus, the limitations given here and very good explained should imo stay. They should because that is not only easier to understand

Re: [PHP-DEV] Renaming namespaces to packages

2007-08-20 Thread Robert Cummings
On Mon, 2007-08-20 at 12:13 +0200, Marcus Boerger wrote: Hello Dmitry, LOL, and in the future we have to rename PHP as it is no longer for homepages? I thought it was renamed already to PHP Hypertext Processor :) Cheers, Rob. --

Re: [Fwd: Re: [PHP-DEV] Renaming namespaces to packages]

2007-08-16 Thread Robert Cummings
On Thu, 2007-08-16 at 17:51 -0600, scott lewis wrote: On 16 Aug, 2007, at 1737, Stanislav Malyshev wrote: PHP users: Wait.. WTF? These don't act like namespaces - where are the braces? That's like saying BMW Z4 is not a car - it has only two seats! That doesn't change the fact that

Re: [PHP-DEV] Renaming namespaces to packages

2007-08-10 Thread Robert Cummings
On Fri, 2007-08-10 at 16:38 -0400, Cristian Rodriguez wrote: On 8/10/07, Marc Gear [EMAIL PROTECTED] wrote: You're absolutly right. Except for a little thing, those are not namespaces, but something more similar to packages. namages? packspaces? tomayto? tomahto? *teehee* Cheers,

Re: [PHP-DEV] RIP PHP 4?

2007-07-11 Thread Robert Cummings
On Wed, 2007-07-11 at 19:54 -0500, Richard Lynch wrote: On Wed, July 11, 2007 7:48 pm, Jeff Griffiths wrote: Richard Lynch wrote: On Wed, July 11, 2007 4:40 pm, Tijnema wrote: Except for the OO, I don't see anything that can't be done in PHP4, while it can be done in PHP5. Some

Re: [PHP-DEV] Simple Namespace Proposal

2007-07-11 Thread Robert Cummings
On Wed, 2007-07-11 at 20:57 -0400, David Coallier wrote: If you want to do functional programming then go ahead, if you want to do OOP, then do real OOP, not sub-oop or some php4-oop. Pray tell... what exactly is real OOP? This sounds like it might be something extremely subjective and

Re: [PHP-DEV] RIP PHP 4?

2007-07-06 Thread Robert Cummings
On Fri, 2007-07-06 at 17:51 +0300, Vesselin Kenashkov wrote: -1 Because the majority of the installation (somebody two month ago in this list mentioned that php 5 has just 10% adoption) is still php4 just makes no sense to drop the support. I see (and understand) both the desire of the

Re: [PHP-DEV] Session security

2007-05-29 Thread Robert Cummings
On Tue, 2007-05-29 at 10:16 -0700, Rasmus Lerdorf wrote: Stut wrote: Hi all, Just wanted to get your opinion on a discussion currently going on on the general list. Why does the PHP session extension not use something like the user agent to validate that a session ID has not been

Re: [PHP-DEV] Session security

2007-05-29 Thread Robert Cummings
On Tue, 2007-05-29 at 11:14 -0700, Rasmus Lerdorf wrote: Robert Cummings wrote: On Tue, 2007-05-29 at 10:16 -0700, Rasmus Lerdorf wrote: Stut wrote: Hi all, Just wanted to get your opinion on a discussion currently going on on the general list. Why does the PHP session extension

Re: [PHP-DEV] Session security

2007-05-29 Thread Robert Cummings
On Tue, 2007-05-29 at 21:11 +0100, Stut wrote: Rasmus Lerdorf wrote: Stanislav Malyshev wrote: The session store is just a session store. It is not a login/authentication mechanism and thus doesn't have any of the protections you might want to add to that. Therefore a separate

Re: [PHP-DEV] notebook onarımı, veri kurtarım ve bakım ve onarım hizmetleri

2007-05-22 Thread Robert Cummings
Hi Tijnema, You're going to get yelled at by Rasmus or someone *lol*. Unlike the generals list they have a strict ignore policy on this list for spam and off-topic posts :) Cheers, Rob. On Tue, 2007-05-22 at 15:33 +0200, Tijnema wrote: On 5/21/07, Groupe FOP, PALANCI Ýletiþim ve Biliþim

Re: [PHP-DEV] notebook onarımı, veri kurtarım ve bakım ve onarım hizmetleri

2007-05-22 Thread Robert Cummings
On Tue, 2007-05-22 at 09:43 -0400, Robert Cummings wrote: Hi Tijnema, You're going to get yelled at by Rasmus or someone *lol*. Unlike the generals list they have a strict ignore policy on this list for spam and off-topic posts :) Ugh, sorry list, I had intended to crop the recipients

Re: [PHP-DEV] dropping asp_tags in HEAD

2007-04-14 Thread Robert Cummings
On Sat, 2007-04-14 at 19:51 +0200, Edin Kadribasic wrote: Hello Marcus, I'm afraid you got it backwards. PHP source does not have to comply with XML, or for that matter any other spec. The result of the PHP code execution, should the desired output be XML, would of course have to be.

Re: [PHP-DEV] GSoC

2007-03-21 Thread Robert Cummings
On Wed, 2007-03-21 at 16:09 +0300, Antony Dovgal wrote: On 03/21/2007 03:48 PM, Robert Cummings wrote: On Wed, 2007-03-21 at 11:57 +0300, Antony Dovgal wrote: I don't think anybody sane is doing audio encoding and video resizing in PHP. PHP is about interface, clients are not going

Re: [PHP-DEV] GSoC

2007-03-21 Thread Robert Cummings
On Wed, 2007-03-21 at 11:57 +0300, Antony Dovgal wrote: I don't think anybody sane is doing audio encoding and video resizing in PHP. PHP is about interface, clients are not going to wait an hour or two for a page to load. I think this is a limitation in your grasp of where and why PHP is

RE: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-20 Thread Robert Cummings
On Tue, 2007-03-20 at 19:02 -0500, Richard Lynch wrote: Though that will probably end up with a bunch of scripters using out-of-scope vars with no clue what they just did and how morally wrong it was to use an intentionally undocumented feature. Without the right tool, the data needs will be

Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-19 Thread Robert Cummings
On Mon, 2007-03-19 at 13:15 -0700, Stanislav Malyshev wrote: I've been thinking about this on and off today too. Something along the lines of the following is more in the PHP spirit: $ver = phpversion(); $fancyVer = function () { lexical $ver; return PHP $ver; }; Where lexical is a

Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-19 Thread Robert Cummings
On Mon, 2007-03-19 at 15:20 -0500, Richard Lynch wrote: On Sun, March 18, 2007 6:41 pm, Wez Furlong wrote: We've been daydreaming about the ability to do something like this in PHP: $data = array(zoo, orange, car, lemon, apple); usort($data, function($a, $b) { return strcmp($a, $b); });

Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-19 Thread Robert Cummings
On Mon, 2007-03-19 at 13:59 -0700, Stanislav Malyshev wrote: What about just having a function that allows retrieving variables from the parent scope? mixed seek_var( $name [, $levels=1, [ $startLevel=0 ] ] ) How you are going to know where parent scope is? It can even be not

Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-19 Thread Robert Cummings
On Mon, 2007-03-19 at 17:53 -0400, Sean Coates wrote: I'm not arguing the preservation of the exact value of $rev when the anonymous function was created (as would be the case with a closure). I'm thinking of the variable being whatever is defined in the parent regardless. As in my

RE: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Robert Cummings
On Tue, 2007-02-06 at 14:08 +, Ford, Mike wrote: On 05 February 2007 17:29, Brian Moon wrote: That is why you have coding standards. Our doucment states that this should be written as: $a = array( 1 = array('pears', 'apples'), 2 = array('juice', 'oranges') ); I

RE: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Robert Cummings
On Tue, 2007-02-06 at 15:41 +, Ford, Mike wrote: On 06 February 2007 14:42, Robert Cummings wrote: On Tue, 2007-02-06 at 14:08 +, Ford, Mike wrote: On 05 February 2007 17:29, Brian Moon wrote: That is why you have coding standards. Our doucment states that this should

Re: [PHP-DEV] Removing if: endif; syntax

2007-02-05 Thread Robert Cummings
On Mon, 2007-02-05 at 18:36 +0100, Stefan Walk wrote: Please don't. ?php endif ? reads much better than ?php } ? in templates. Says you :) But I don't think it should be removed either. Editor's have no business defining what should and should not be useful in a language. Cheers, Rob. --

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Robert Cummings
On Mon, 2007-02-05 at 10:01 -0800, Stanislav Malyshev wrote: you, they don't have a clue what they are doing. $a = [1,2,3]; would not mean jack sqat to those folks. And as stated, finding docs on that How hard can that be? If one is smart enough to do computer programming, how hard

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Robert Cummings
On Mon, 2007-02-05 at 17:46 -0600, Richard Lynch wrote: On Mon, February 5, 2007 12:05 pm, Stanislav Malyshev wrote: So now we have an invisible operator with a magical symbol '[' which *sometimes* means create an array, but *sometimes* means to de-construct an array into individual

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Robert Cummings
On Sun, 2007-02-04 at 19:38 +0100, Edin Kadribasic wrote: Lukas Kahwe Smith wrote: Yes, you will come across it if its added. I find the Javascript syntax confusing to read as well. However more importantly I do not see the point in adding this sugar to save 5 chars. Nested arrays become

Re: [PHP-DEV] Is this what Stefan Esser was referring to ...?

2007-01-21 Thread Robert Cummings
On Mon, 2007-01-22 at 10:27 +1100, Rasmus Lerdorf wrote: Alain Williams wrote: On Mon, Jan 22, 2007 at 10:08:16AM +1100, Rasmus Lerdorf wrote: From a bigger perspective, the reason we prefer people to not use the PHP name for their projects, especially modified versions of PHP itself,

Re: [PHP-DEV] Comments on PHP security

2007-01-12 Thread Robert Cummings
On Fri, 2007-01-12 at 15:57 +, Tim Starling wrote: Limits, table names, and several other query parts are protected by MediaWiki's query builder. A complex select query might look like this: $result = $db-select( # Tables array( 'user', 'revision' ), # Fields array(

Re: [PHP-DEV] Run-time taint support proposal

2006-12-19 Thread Robert Cummings
On Tue, 2006-12-19 at 04:54 +, Lester Caine wrote: Richard Lynch wrote: On Sat, December 16, 2006 7:03 am, Lester Caine wrote: Of cause many of us never go near the raw database calls anyway, since we are using frameworks that carry out lot of the security checks at a generic level -

Re: [PHP-DEV] Run-time taint support proposal

2006-12-19 Thread Robert Cummings
On Tue, 2006-12-19 at 08:29 +, Lester Caine wrote: Robert Cummings wrote: On Tue, 2006-12-19 at 04:54 +, Lester Caine wrote: Richard Lynch wrote: On Sat, December 16, 2006 7:03 am, Lester Caine wrote: Of cause many of us never go near the raw database calls anyway, since we

Re: [PHP-DEV] Run-time taint support proposal

2006-12-19 Thread Robert Cummings
On Tue, 2006-12-19 at 12:08 +0200, Zeev Suraski wrote: At 23:40 16/12/2006, Ilia Alshanetsky wrote: You're not helping them, just making assumptions about how their code should work and making them adhere to them. Yes, and this is helping. Every language does that. Saying you can't make

Re: [PHP-DEV] Run-time taint support proposal

2006-12-19 Thread Robert Cummings
On Wed, 2006-12-20 at 01:33 +1100, Kevin Waterson wrote: This one time, at band camp, Zeev Suraski [EMAIL PROTECTED] wrote: - Consider making this a compile time option with significant overhead and a big DO NOT ENABLE IN PRODUCTION, so that people have an even clearer idea they

Re: [PHP-DEV] Run-time taint support proposal

2006-12-19 Thread Robert Cummings
On Tue, 2006-12-19 at 11:18 -0500, Ilia Alshanetsky wrote: Let us be done with this discussion and agree (as the Perl Ruby people have) that it is best to have a useful tool even if we can't make it 100% perfect. So you propose to give a partially working tool that promises data

Re: [PHP-DEV] Run-time taint support proposal

2006-12-19 Thread Robert Cummings
On Tue, 2006-12-19 at 17:35 +0100, Pierre wrote: Hello, On 12/19/06, Wietse Venema [EMAIL PROTECTED] wrote: Zeev Suraski: Following up on an earlier suggestion in this thread, I could see at least three modes of operation: 1) Disabled. The default setting. 2) Audit mode.

  1   2   3   >