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

2006-05-17 Thread Jason Garber
Hello Hannes, Nothing is wrong, I presume. Ignorance on my part. Thanks. -- Best regards, Jasonmailto:[EMAIL PROTECTED] Wednesday, May 17, 2006, 7:50:47 AM, you wrote: HM> Hi Jason >> I've put together a simple test framework and a 18 test cases to HM> Wha

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

2006-05-16 Thread Jason Garber
Hello Marcus, I've put together a simple test framework and a 18 test cases to start with. It's a stand-alone system that should work correctly on PHP 5 installs. Both CLI mode and Web Server mode work fine. NOTE: The tests I wrote are only testing standard functionality. We need to a

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

2006-05-16 Thread Jason Garber
Hello Christian, CS> Does anyone apart from me wonder why we need to bloat the language for CS> an obscure feature like this? Please take a step back, take a deep CS> breath, count to 10 and that's *really* what the PHP community has been CS> waiting for. Please consider that not everyone does t

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

2006-05-16 Thread Jason Garber
Hello Marcus, Is this correct? private readable $abc; - doesn't make sense. protected readable $abc; - sub-class can read, not write - not visible outside class public readable $abc; - sub-class can read, and write - outside class can read, not write If not, please cl

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

2006-05-16 Thread Jason Garber
Hello Andi, Your request for edge condition research is an excellent one. We've just been through a hellish couple weeks of QA failures (at my company) which just *underscore* your point. The last thing any of us needs is a broken PHP. That being said, is there anything I can do to he

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

2006-05-15 Thread Jason Garber
things would be finding an acceptable ZS> name, since 'readonly' implies something which this variable isn't ZS> (it's very much writable, from the right places). Maybe something ZS> like 'visible' (of course preferably we need to find something that ZS> be

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

2006-05-13 Thread Jason Garber
Hello Marcus, class x { public readonly $xyz; protected readonly $abc; } Definitions: - public readonly- outside class can only read, not write. - protected readonly - subclass can only read, not write. - private readonly - does not make sense - do not support. Ho

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

2006-05-12 Thread Jason Garber
. I'm not talking about adding hundreds of new features, or turning PHP into the next java. It's about real business cases. It's not about what YOU WOULD NOT use, it's about what a lot of people need. -- Best regards, Jason Garber mailto:[EMAIL

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

2006-05-11 Thread Jason Garber
Best regards, Jason Garber mailto:[EMAIL PROTECTED] IonZoft, Inc. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Passing functions to function by reference

2006-04-26 Thread Jason Garber
Hello Rasmus, RL> In 5.1 this now throws an E_STRICT instead of a warning. It is still a RL> bad idea to pass a tempvar by reference, so yes, you should strive to RL> write E_STRICT clean code. At the possible expense of being blamed and flamed, I'll say it... ifsetor($var, 'default') would go

Re: [PHP-DEV] Re: Adieu register_globals

2006-03-06 Thread Jason Garber
Hello Zeev, I'd be happy to do this. Do you want this placed in a function or just sample code to post somewhere? -- Best regards, Jasonmailto:[EMAIL PROTECTED] Monday, March 6, 2006, 6:38:34 PM, you wrote: ZS> A part of the decision was to supply the few line

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

2006-01-12 Thread Jason Garber
Hello Andi, I think the "sexy" syntax is a significant plus, even if associative arrays were used in the implementation. Is it a complex thing to implement? -- Best regards, Jasonmailto:[EMAIL PROTECTED] Thursday, January 12, 2006, 6:44:59 PM, you wrote: AG>

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

2006-01-12 Thread Jason Garber
Hello Jared, JW> PHP is all about using a simple means to an end and getting the job JW> done. Named parameters makes coding easier, not harder. Well stated. -- Best regards, Jasonmailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List T

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

2006-01-11 Thread Jason Garber
Hello Aidan, I think named parameters would be a useful feature... I'll leave it at that. Here is a coding idea for you, in case you hadn't considered it... function highlight($text=NULL, $needle=NULL, $strip_links=NULL, ...) { is_null($text) && $text = SOME DEFAULT VALUE; i

Re: [PHP-DEV]

2005-11-30 Thread Jason Garber
Hello Mike, Same at my company. mailto:[EMAIL PROTECTED] Wednesday, November 30, 2005, 4:31:58 AM, you wrote: MH> Just FYI, the lack of tags on all development projects at my company. MH> Mike MH> On Mon, 28 Nov 2005 20:29:42 +0100 MH> Marcus Boerger <[EMAIL PROTECTED]> wrote: >> Hello

Re: [PHP-DEV] Re: Basic Namespace Requirements

2005-11-28 Thread Jason Garber
Hello Sara, Please explain what the difference is between nested classes, and this type of namespacing? If you scrapped namespace constants and functions, then all we have left is classes. If it was looked at as nested classes, then we get all the functionality with all the simplicity

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

2005-11-28 Thread Jason Garber
Hello Zeev, I would like to point out that PHP has been changing over the last few years from a language that Rasmus used for his online resume to an enterprise grade application development language. I've personally watched it go from PHP3 -> PHP4 -> PHP5, and *much* anticipate the fut

Re: [PHP-DEV] namespace separator ideas

2005-11-26 Thread Jason Garber
Hello, I as a userland library author, would appreciate namespaces quite a bit. Here is an idea: namespace1..class() $x = new MyApp..MemberOrder(); -- Best regards, Jasonmailto:[EMAIL PROTECTED] Saturday, November 26, 2005, 3:52:35 PM, you wrote: GB>

[PHP-DEV] PHP Macros

2005-11-15 Thread Jason Garber
of one, it will do a little token-replacing before compiling it... Is it technically doable? Thanks guys. -- Best regards, Jason Garber mailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] In regards to E_STRICT and PHP5

2005-06-16 Thread Jason Garber
: RL> Jason Garber wrote: >> Hello boots, >> >> if(AppDevLevel == 'Production') >> { >> error_reporting(E_ALL); >> } >> else >> { >> error_reporting(E_ALL | E_STRICT); >> } >> >> Why do

Re: [PHP-DEV] In regards to E_STRICT and PHP5

2005-06-16 Thread Jason Garber
Hello boots, if(AppDevLevel == 'Production') { error_reporting(E_ALL); } else { error_reporting(E_ALL | E_STRICT); } Why don't you implement something like this in your application - then you CAN control what error level is used at the client site. -- Best regards,

Re: [PHP-DEV] PHP 5.1

2005-06-13 Thread Jason Garber
Hello Noah, In general, the people who advocate writing this construct differently, are missing the point. ifsetor is NOT input filtering, it is not a complex, general purpose do-everything construct, it is a simple replacement for $x = (isset($ANY_var) ? $ANY_var : 'Default Value');

Re: [PHP-DEV] PHP 5.1

2005-06-07 Thread Jason Garber
Hello, I don't know if chiming in at this point has any merit, but here is what I see. We have many, many people in favor of goto and ifsetor. They see much legit use for those constructs. Then, we have others who say that it will result in spaghetti code. This is a completely inval

Re: [PHP-DEV] PHP 5.1

2005-06-06 Thread Jason Garber
er. Thanks. -- Best regards, Jason mailto:[EMAIL PROTECTED] Monday, June 6, 2005, 1:22:11 PM, you wrote: SC> Jason Garber wrote: >> If there was any way to accommodate this with userland PHP code, I >> would have already done it. However it

Re: [PHP-DEV] PHP 5.1

2005-06-06 Thread Jason Garber
Hello Andi, I have to strongly disagree with your ifsetor() comment. the use for ifsetor is in no way eliminated with filtering. I write very clean code and have taught all my developers to write very clean code. We run the latest stable PHP version with maximum error reporting. We d

Re: [PHP-DEV] make new return a reference to existent object

2005-05-09 Thread Jason Garber
Hello, -1 New implies "new". Use a factory. Maybe we should add an old construct: $object = old MyClass(); Just kidding :) -- Best regards, Jasonmailto:[EMAIL PROTECTED] Monday, May 9, 2005, 10:30:56 AM, you wrote: LP> I would like (for code cle

Re: [PHP-DEV] Re: Before March 1st aka PHP 5.1 beta

2005-02-17 Thread Jason Garber
Hello, Speaking of these matters, how about implementing functions within interfaces? -- Best regards, Jasonmailto:[EMAIL PROTECTED] Thursday, February 17, 2005, 5:46:08 PM, you wrote: RK> Okay, I'll accept the "no" of course, but I am curious.. Is it an RK> im

Re: [PHP-DEV] Before March 1st aka PHP 5.1 beta

2005-02-17 Thread Jason Garber
Hello Andi, >>4) php 5.1 is aiming to increase performance and security => ifsetor >> >> It is nice and easy and fast...only it's name. Well guys come on that's >> the stupiest reason to reject. The name is selfspeaking, you're all only >> not so used to its name as you are with foreach for

Re: [PHP-DEV] PHP 5.1

2005-02-02 Thread Jason Garber
Hello Andi, >>However i'd like to see the 'ifsetor' or '?:' operator since it makes >>many things much faster and easier to read. AG> I am not sure if the security filter functions aren't enough because they AG> will be used to gather and verify input which is the main purpose of ifsetor. AG> Al

[PHP-DEV] Isset question

2004-12-07 Thread Jason Garber
ariable that is set to NULL? Is there any way to tell if a variable isset and is_null without generating an error? It doesn't seem that this behavior is consistent with the meaning of isset(), or the errors that are generated when a variable is not set. Thanks. -- Best

Re: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] SimpleXML marked as EXPERIMENTAL

2004-12-02 Thread Jason Garber
Hello Rasmus, It seems that it should be marked as a depreciated feature IN PHP5, but not excremental in PHP4. This would let everyone know what the real deal is... -- Best regards, Jasonmailto:[EMAIL PROTECTED] Thursday, December 2, 2004, 12:04:41 PM, you wr

Re: [PHP-DEV] Re: isset() and the new VM

2004-11-02 Thread Jason Garber
>> isset($arr[0]['id']) used to return false if $arr[0] is undefined, but >> with the new VM it throws a warning. Doesn't sound right to me either... -- Best regards, Jasonmailto:[EMAIL PROTECTED] SG> I'd call it bugish, since part of the point of isset() is that it

Re: [PHP-DEV] Type hints with null default values

2004-10-18 Thread Jason Garber
Hello, Consider this: public function foo(MyClass $o) If you allow null, false, or anything else, you must CHECK it before using it or you will get a "calling a method on a non-object" first. The whole point of having a type hint, from my point of view, is so the majority of time I D

Re: [PHP-DEV] [PATCH] Bug #30230 exception handler not working with objects

2004-10-14 Thread Jason Garber
Hello Andi, reset_exception_handler() :) -- Best regards, Jasonmailto:[EMAIL PROTECTED] Tuesday, October 12, 2004, 5:40:34 PM, you wrote: AG> I see Marcus has already attempted to fix this even though the bug report AG> is still open. AG> Marcus, what exactly

Re: [PHP-DEV] switch() and default:

2004-10-08 Thread Jason Garber
Hello, Ergh. I also hope that it can easily be restored to work the way it did, even if that was undocumented. The thought of looking through ~ 5,000 php scripts before our upgrade is a bit overwhelming :) -- Best regards, Jasonmailto:[EMAIL PROTECTED] Fri

Re: [PHP-DEV] Small addition to Apache 1.3.x

2004-10-06 Thread Jason Garber
Hello Manuel, After reading your motivations, it seems to me that you need mod rewrite. from: http://httpd.apache.org/docs/mod/mod_rewrite.html "Welcome to mod_rewrite, the Swiss Army Knife of URL manipulation! This module uses a rule-based rewriting engine (based on a regular

Re: [PHP-DEV] CLI Constant

2004-09-30 Thread Jason Garber
) or something like that to the language to >> facilitate this? >> -- >> Best regards, >> Jason Garber mailto:[EMAIL PROTECTED] >> IonZoft, Inc. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] CLI Constant

2004-09-30 Thread Jason Garber
7;CLI') or something like that to the language to facilitate this? -- Best regards, Jason Garber mailto:[EMAIL PROTECTED] IonZoft, Inc. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [patch] Zend/zend_objects_API.c - bug #29980 (segfault while executing __destruct())

2004-09-15 Thread Jason Garber
Hello Antony, Maybe this was assumed, but wouldn't this be a per-request flag, rather than a global flag? -- Best regards, Jasonmailto:[EMAIL PROTECTED] Tuesday, September 14, 2004, 10:18:29 AM, you wrote: AD> Sounds nice: we should not call destructors after t

Re: [PHP-DEV] unserialize() data from untrusted source

2004-09-06 Thread Jason Garber
ay, September 6, 2004, 1:28:22 AM, you wrote: MF> Jason Garber wrote: >> This is an interesting point you bring up. When we have large >> registration processes or similar multi-page forms, we write our >> data array to a hidden field using. >> >> base6

Re: [PHP-DEV] unserialize() data from untrusted source

2004-09-05 Thread Jason Garber
Hello Harry, This is an interesting point you bring up. When we have large registration processes or similar multi-page forms, we write our data array to a hidden field using. base64_encode(serialize($aData)) and read it in with unserialize(base64_decode($_POST['aData'])) pa

Re: [PHP-DEV] [PATCH] #29416 - ob_include

2004-09-01 Thread Jason Garber
Hello Stuart, Patch didn't come through... -- Best regards, Jasonmailto:[EMAIL PROTECTED] Wednesday, September 1, 2004, 3:50:30 PM, you wrote: SD> Hi All, SD> This is my first attempt at submitting a patch so please be gentle :). SD> The feature requested in #2

Re: [PHP-DEV] Learning from Python: PEPping the PHP Development Process

2004-08-27 Thread Jason Garber
Hello Zeev, Makes sense to me. -- Best regards, Jasonmailto:[EMAIL PROTECTED] Friday, August 27, 2004, 3:26:25 AM, you wrote: ZS> I would like to get some feedback about my suggestion to move away from the ZS> simple 'experimental' status and dividing it into tw

Re: [PHP-DEV] Re: setcookie() and Max-Age

2004-08-19 Thread Jason Garber
Hello, +1 on the array parameter. It's flexible, easy to document (as dan put it), and should accommodate future options. Also, throwing E_NOTICES would be good to notify you if you mis-type something, and they can always be suppressed if you want to send an "unsupported" option. -- Best

Re: [PHP-DEV] Method/Function chaining?

2004-08-14 Thread Jason Garber
Hello Dan, The answer that you are looking for can be found on the Zend site: http://www.zend.com/php5/articles/engine2-php5-changes.php#Heading13 -- Best regards, Jasonmailto:[EMAIL PROTECTED] Friday, August 13, 2004, 6:59:44 PM, you wrote: DO> Hello. DO>

Re: [PHP-DEV] Modulo Function returns incorrect results

2004-08-05 Thread Jason Garber
Hello Matthew, 3/4 = (0*4)+3 --> 3%4 = 3 9/4 = (2*4)+1 --> 9%4 = 1 20/10 = (2*10)+0 --> 20%10 = 0 4 goes into 3 a total of ZERO times with a remainder of 3. 10 goes into 20 a total of TWO times with a remainder of 0. Take a look at a standard (integer) long division p

Re: [PHP-DEV] Protected methods in interfaces

2004-08-05 Thread Jason Garber
Hello Marcus, Can abstract methods be protected? -- Best regards, Jasonmailto:[EMAIL PROTECTED] Thursday, August 5, 2004, 1:32:05 PM, you wrote: MB> Hello Ferdinand, MB> Thursday, August 5, 2004, 5:01:42 PM, you wrote: >> Trying to write a singleton interface:

Re: [PHP-DEV] GOTO operator

2004-08-03 Thread Jason Garber
Hello, ALthough I'm in support of a local scoped static GOTO, I did not see myself using it much. However, I find myself this afternoon implementing a huge do { switch { case: break 2; } while (true) structure. It would be much "cleaner" to use goto in this case. -- Best regards, J

Re: [PHP-DEV] Date Support

2004-08-02 Thread Jason Garber
onths to a date? how do you get the day of week for a given date? These are the types of functions that I am thinking of. -- Best regards, Jasonmailto:[EMAIL PROTECTED] Monday, August 2, 2004, 10:40:45 PM, you wrote: GS> On Aug 2, 2004, at 10:36 PM, Jason

Re: [PHP-DEV] Date Support

2004-08-02 Thread Jason Garber
, you wrote: WF> http://pecl.php.net/package-info.php?package=Date WF> It's not in the core because it is still relatively young. WF> Maybe in a future release... WF> --Wez. WF> On Mon, 2 Aug 2004 22:36:14 -0400, Jason Garber <[EMAIL PROTECTED]> wrote: >> Hello inte

[PHP-DEV] Date Support

2004-08-02 Thread Jason Garber
3. If there is no good reason for not adding this set of functions to the PHP core, what would be the method of designing an acceptable set of functions? PHP is a feature packed language, but it's strange that this does not exist in the core. Thanks for your time. -- Best re

Re: [PHP-DEV] GOTO operator

2004-07-30 Thread Jason Garber
ofessional" functionality as well. Thanks for answering my question. -- Best regards, Jasonmailto:[EMAIL PROTECTED] Friday, July 30, 2004, 9:24:13 PM, you wrote: AG> At 09:19 PM 7/30/2004 -0400, Robert Cummings wrote: >>On Fri, 2004-07-30 at 21:16, Jason

Re: [PHP-DEV] GOTO operator

2004-07-30 Thread Jason Garber
Hello Andi, Sorry for being unclear on this, but what is the exact definition of an "execution block" in this context? Thanks! -- Best regards, Jasonmailto:[EMAIL PROTECTED] Friday, July 30, 2004, 9:08:09 PM, you wrote: AG> Hi Jason, AG> I think that in any

Re: [PHP-DEV] GOTO operator

2004-07-30 Thread Jason Garber
PG> [snip] i'm somewhat confuzzled why you, of all people, are advocating such PG> mutilation of do-while(), which is *abuse* of the construct. mutilating one PG> construct to emulate another construct, which won't be implemented because PG> it could be abused and mutilated, just doesn't compute fo

Re: [PHP-DEV] GOTO operator

2004-07-29 Thread Jason Garber
Hello, I think we should add an INI option: php_newbie true|false ;) -- Best regards, Jasonmailto:[EMAIL PROTECTED] Thursday, July 29, 2004, 8:54:34 PM, you wrote: AH> Sara Golemon wrote: >>>do { >>> .code... >>> if (something) break; >>> ...code.

Re: [PHP-DEV] GOTO operator

2004-07-29 Thread Jason Garber
Hello, After thinking about it for a bit, I'm convinced. If goto can be implemented so that it is fast, and does not adversely affect other parts of PHP, by all means, do it. Andrey, you've been very clear why you would not use it, but why do you want me not to use it? I can think of

Re: [PHP-DEV] array_intersect_key

2004-07-20 Thread Jason Garber
Hello Cristiano, First, I'd like to say that a function of this type sounds useful. It's one that I've wanted for some time, particularly for verifying that an array has the correct keys when it is passed as a function parameter. If I understand what you are doing correctly, the same

Re: [PHP-DEV] Spammer on Bugs page

2004-07-20 Thread Jason Garber
Hello, Perhaps we should implement one of the "read this obscure image and type the number into this text box" scheme into all the bug post and update forms? -- Best regards, Jasonmailto:[EMAIL PROTECTED] Tuesday, July 20, 2004, 11:57:25 AM, you wrote: US> Th

Re: [PHP-DEV] Chaining __set and __get in an expression

2004-07-20 Thread Jason Garber
Hello Curt, From http://us2.php.net/manual/en/language.operators.assignment.php "The value of an assignment expression is the value assigned. That is, the value of "$a = 3" is 3." I take this to mean that ($foo->a = 'bar') will always return 'bar' and that is a core feature of the languag

Re: [PHP-DEV] congrats and thanks

2004-07-15 Thread Jason Garber
Hello PHPers, On behalf of all 19 of us here at IonZoft, I'd like to add to this letter by saying thank you for providing the *excellent* tool that allows us to make our livelihood this way. PHP 5.0 is a unparalleled release of not only PHP, not only open source, but of great software i

Re: [PHP-DEV] New construct discussion Summary

2004-07-12 Thread Jason Garber
MR> $level = value($_POST['level'], NULL, INT); MR> switch($level){ MR> case 0: MR> echo "Welcome to level 0"; MR> break; MR> case 1: MR> echo "Welcome to level 1"; MR> break; MR> case 2: MR> echo "Welcome to level 2"; MR> break; MR> default: MR> echo "That level is in

Re: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-12 Thread Jason Garber
>> >> The problem with default() is that there will be tons of scripts out >> there >> that will be broken by this. Hence i'd like to see a more non intuitive >> name (like the ifsetor). Probably getvalue() was the best compromise so >> far. GS> what was wrong with nvl() (of oracle fame)? ifset(

Re: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-11 Thread Jason Garber
AG> How about default($var, expr)? I like it. -Jason -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re[3]: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Jason Garber
Sunday, July 11, 2004, 10:48:06 PM, you wrote: RL> On Sun, 11 Jul 2004, Jason Garber wrote: >> The concept is desirable, but can be achieved if you need it just as >> simply using already available syntax (ie a cast): >> >> $level = (integer) value($_SESSION['le

Re[2]: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-11 Thread Jason Garber
Hello, RL> $a = value($_GET['index'], $default); value() sounds like more like a "language construct" to me. I'm not sure if it accurately conveys the meaning though (not that it has stopped other functions from being added in the past :) -- Best regards, Jasonm

Re[2]: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Jason Garber
Hello Marc, MR> I don't think a function named param() really fits, but I do like the MR> idea of adding a type check (or in the case of PHP a type cast) to the MR> function. MR> $level = (int) (isset($_SESSION['level']) ? $_SESSION['level'] : MR> (isset($_REQUEST['level']) ? $_REQUEST['level']

Re: [PHP-DEV] Segmentation Fault when using interface

2004-07-09 Thread Jason Garber
Sorry, The actual bug is http://bugs.php.net/bug.php?id=29080 29081 is a duplicate -Jason At 7/9/2004 05:16 PM -0400, Jason Garber wrote: Bug #29081 Segmentation Fault when using Interface http://bugs.php.net/bug.php?id=29081 -Jason At 7/9/2004 01:30 PM +0200, you wrote: On Fri, 9 Jul 2004

Re: [PHP-DEV] Segmentation Fault when using interface

2004-07-09 Thread Jason Garber
Bug #29081 Segmentation Fault when using Interface http://bugs.php.net/bug.php?id=29081 -Jason At 7/9/2004 01:30 PM +0200, you wrote: On Fri, 9 Jul 2004, Jason Garber wrote: > Hello, > > I discovered this problem tonight while working on a new PHP 5 class that > uses an interfac

[PHP-DEV] Segmentation Fault when using interface

2004-07-09 Thread Jason Garber
] Jason]$ php -f Interface.php Hello -- Could it be a problem with the Debugger? Thanks, Jason Garber -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Need two simple string funcs for parsing

2004-07-09 Thread Jason Garber
Sure, Any recommendations? -Jason At 7/9/2004 09:12 AM +0200, Marcus Boerger wrote: Hello Jason, could you do something about your mail client? It strips off or cuts the mail id so that mail threads loose their connection for all of us. regards marcus -- PHP Internals - PHP Runtime Development Mail

Re: [PHP-DEV] what happened to that new isset() like language

2004-07-08 Thread Jason Garber
d) have a short, concise, CLEAR name Comments? Sincerely, Jason Garber At 7/8/2004 07:48 PM -0400, you wrote: Jason Garber wrote: The original reason that I asked for this functionality was to make it significantly easier to work with E_ALL error reporting. When I say easier, I mean by reducing

Re: [PHP-DEV] Need two simple string funcs for parsing

2004-07-08 Thread Jason Garber
't know what sort of Zend license I'd require to be able to distribute free pre-compiled code. http://pecl.php.net I am also an experience C/C++ programmer and can write these functions myself. Before doing so, though, I'd like to know if I should bother. Would they make it into P

Re: [PHP-DEV] what happened to that new isset() like language

2004-07-08 Thread Jason Garber
on() syntax? There has been quite a few reasons stated against the operator syntax, but I haven't heard any reason why we should not go with the function() syntax? Sincerely, Jason Garber -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] what happened to that new isset() like language

2004-07-07 Thread Jason Garber
Hi Marc, At 7/7/2004 09:06 PM -0400, Marc Richards wrote: Jason Garber wrote: Hi Marc, What we basically settled on was to use this syntax (as a new language construct): $x = ifsetor(mixed variable, mixed default); So ?: is out then? Or just delayed until it can be tackled. Who am I to say it&#

Re: [PHP-DEV] what happened to that new isset() like language construct

2004-07-07 Thread Jason Garber
iting for it also :) Sincerely, Jason Garber At 7/7/2004 08:26 PM -0400, Marc Richards wrote: On 4/15/2004 Jason Garber asked about a new language construct to simplify testing if a variable isset() and assinging a default value for those that aren't. The thread title was "Construct Requ

RE: [PHP-DEV] keyword arguments?

2004-06-24 Thread Jason Garber
rays, it's simple to define default parameters. function foo($aArgs) { $aArgs += array('SomeID' => 0, 'DoThat' => TRUE); } Required keys can even be checked for with a quick array_diff(). For the amount of times that it would *probably* be used, I don't think it&#x

Re: [PHP-DEV] Array Question

2004-06-17 Thread Jason Garber
everything went fine as i misstyped today using 5.0.0rc3 :-) --red Adam Maccabee Trachtenberg wrote: On Thu, 17 Jun 2004, Jason Garber wrote: Is being able to have a comma at the END of an array definition a supported feature, or an undocumented feature that should not be used? If I rememb

Re: [PHP-DEV] Throw Question

2004-06-17 Thread Jason Garber
Thanks for the good explanation. ~Jason At 6/17/2004 02:10 PM +0200, Hartmut Holzgraefe wrote: Joseph Lee wrote: I guess "exit();" terminates execution within itself without returning to the caller, so that is no chance of getting a runtime error. parse error != runtime error but language construct

[PHP-DEV] Array Question

2004-06-17 Thread Jason Garber
Hello, In PHP4 and PHP5 the following syntax works fine (note the last comma): array ( 1 => 'bob', 2 => 'sam', ); Is being able to have a comma at the END of an array definition a supported feature, or an undocumented feature that should not be u

Re: [PHP-DEV] Throw Question

2004-06-16 Thread Jason Garber
That's what I figured. throw is a language construct. However, from the manual (http://php.net/exit): void exit ( int status) Note: This is not a real function, but a language construct. Why does $x || exit; work without a parse error? Thanks, Jason Garber At 6/17/2004 10:22 AM

[PHP-DEV] Throw Question

2004-06-16 Thread Jason Garber
Consider the following: $x = FALSE; $x || throw new exception('Some Assertion'); I get the following Parse Error: error: parse error, unexpected T_THROW in /home/.../Z_Record.php on line 153 However, this code produces no errors.. $x = FALSE; $x || exit; Why is this? Thanks, Jason Gar

Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-15 Thread Jason Garber
to the fullest. Sincerely, Jason Garber President IonZoft, Inc. At 6/15/2004 06:30 PM +0300, you wrote: On Tue, 15 Jun 2004 12:47:29 +0200 (CEST), Derick Rethans <[EMAIL PROTECTED]> wrote: On Tue, 15 Jun 2004, Alexander Valyalkin wrote: Today I checked file /win32/readdir.c Below you can vi

Re: [PHP-DEV] PHP5 rocks!

2004-06-08 Thread Jason Garber
To add.. The 18 of us here at IonZoft wish to thank all members of the PHP team and everyone who has helped make it happen. We have built a fast growing company totally focused on solutions based on PHP, and are very excited about the release of PHP5. Thanks! Jason Garber At 6/7/2004 09:51 PM

[PHP-DEV] Destructors

2004-05-23 Thread Jason Garber
on the $oDB object still being usable. How can this be structured to ensure that the DB object does not get released first? Thanks, Jason __________ Jason Garber President & Chief Technology Officer IonZoft, Inc. 814.742.8030 :: [EM

Re: [PHP-DEV] Re: PHP 5.0/5.1 (was: ZendEngine2 / zend_ini_parser.y zend_ini_scanner.l)

2004-05-19 Thread Jason Garber
k that earlier in July would be better, so that we don't have to wait too much longer before we branch 5.1. Maybe July 4? :) Zeev -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php ___

Re: [PHP-DEV] Re: ZendEngine2 / zend_ini_parser.y zend_ini_scanner.l

2004-05-17 Thread Jason Garber
It may be worth noting the way MySQL AB has been rolling out MySQL. They released 4.0.0 as a restructured release, did bug fixes and small changes up through 4.0.19, and are approaching the release of 4.1 with significant new features. It sounds like the same might apply here. ~Jason At 5/18/

Re: [PHP-DEV] [RFC] Type hints

2004-05-11 Thread Jason Garber
Consider this below: At 5/11/2004 03:23 PM +0300, Andi Gutmans wrote: At 11:44 AM 5/11/2004 +0200, Timm Friebe wrote: On Mon, 2004-05-10 at 18:16, Andi Gutmans wrote: > I think it's hard to put closure on this type hints issue. [...] > As no good syntax has been found for the less common case of a

Re: [PHP-DEV] [RFC] Type hints

2004-05-10 Thread Jason Garber
nt to allow NULL's not use type hints at all..." +1 ______ Jason Garber President & Chief Technology Officer IonZoft, Inc. 814.742.8030 :: [EMAIL PROTECTED] :: http://IonZoft.com __

Re: [PHP-DEV] [RFC] Type hints

2004-05-10 Thread Jason Garber
e used very simply, but still has the low-level power to accommodate all the other things that one wishes to accomplish. Let's keep it that way. __________ Jason Garber President & Chief Technology Officer IonZoft, Inc. 814.742.8030 :: [EMAIL

Re: [PHP-DEV] Implicit Arrays and E_STRICT

2004-05-07 Thread Jason Garber
I would view implicit array creation as a slightly negative thing, similar to accessing the value of a variable that does not exist. We run in E_ALL mode and write our code to avoid all E_NOTICEs. For instance, before using an array, I always initialize it using $aItems = array(); I'm in favo

Re: [PHP-DEV] constant name

2004-05-05 Thread Jason Garber
/) {=B0_=B0) () () ( )( ) ', 'barfoo'); echo constant(' (\ /) {=B0_=B0) () () ( )( ) ') . chr(10); // outputs : bar Is it a feature or a bug ? :) Mehdi Achour -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php _

Re: [PHP-DEV] Javascript / Php

2004-04-28 Thread Jason Garber
& width == 768 but the html for that is Height == document.write(screen.width); & width == document.write(screen.height); and i wanne work with the 1024 in php and not with the html ,, what can i do to run the javascript at server side and not on the client side -- PHP Internals - PHP R

Re: [PHP-DEV] Performance Consideration of 1 class per file

2004-04-24 Thread Jason Garber
Hi, One of the questions that I have is "how long is long?". Here is an interesting example of a large system that I work on. On the first line of each script, we have a line like: require_once('izfc.core4.php'); //exists in global include path The job of that script is to find and include all

Re: [PHP-DEV] Multi-Method Dispatch in PHP 5.1?

2004-04-21 Thread Jason Garber
Just a note, Would "Object" be more appropriate than "Class"? The expected variable type is an object (defined by a class), and the gettype() function returns 'object'.. # php -r '$x=new stdclass(); var_dump(gettype($x));' string(6) "object" It may mean adding a new reserved word though. ~Jas

Re: [PHP-DEV] Re: Multi-Method Dispatch in PHP 5.1?

2004-04-20 Thread Jason Garber
If it makes any difference... I would say no way to multi method dispatch. PHP, in my understanding, was a loosely typed language, and this is straining against that very concept. In the rare case that one needs multi-method dispatch, they can use a format such as: class xyz { public fun

Re: [PHP-DEV] Re: [RFC] ifsetor operator

2004-04-17 Thread Jason Garber
2:36:55 AM, you wrote: Jason Garber wrote: In our code, you will find many blocks looking like $CUST_ID = (integer) (isset($_POST['CUST_ID']) ? $_POST['CUST_ID'] : 0); so how is that different from $CUST_ID = (integer) @$_POST['CUST_ID']; @ is damn slow -- Can y

Re: [PHP-DEV] Re: [RFC] ifsetor operator

2004-04-16 Thread Jason Garber
gan the ifsetor() discussion... ~Jason At 4/17/2004 02:44 AM +0200, Marcus Boerger wrote: Hello Alan, Saturday, April 17, 2004, 2:36:55 AM, you wrote: > Jason Garber wrote: >> In our code, you will find many blocks looking like >> >> $CUST_ID = (integer) (isset($_POST

RE: [PHP-DEV] Re: [RFC] ifsetor operator

2004-04-16 Thread Jason Garber
In our code, you will find many blocks looking like $CUST_ID = (integer) (isset($_POST['CUST_ID']) ? $_POST['CUST_ID'] : 0); $CONTACT_ID = (integer) (isset($_POST['CONTACT_ID']) ? $_POST['CONTACT_ID'] : 0); And when you want to read an element from an array that may or may not exist, you see th

Re: [PHP-DEV] Re: [RFC] ifsetor operator

2004-04-16 Thread Jason Garber
Good call. At 4/17/2004 01:17 AM +0300, Andi Gutmans wrote: I don't want to spoil the party but: a) I don't think we should add a new reserved word for this. I will try and think of an alternative which uses the existing vocabulary. b) I would not want to add this before releasing PHP 5.0.0. I th

Re: [PHP-DEV] Re: [RFC] ifsetor operator

2004-04-16 Thread Jason Garber
Chris - As Wez pointed out, this is almost ready to insert into the parser. Most of yesterdays conversation was spent hashing out the ways that this should be implemented. Remember, one of the biggest reasons for creating this function was so that E_NOTICE would not be issued when attempting

  1   2   >