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 Whats

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

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

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 the

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

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

2006-05-15 Thread Jason Garber
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 begins with 'p'...) ZS Zeev ZS At 02:35 12/05/2006, Jason Garber wrote: Hello internals, __get() and __set() are great

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.

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

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

2006-05-11 Thread Jason Garber
, 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 a

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

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 To

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

Re: [PHP-DEV] ?xml tags (was PDM Meeting Notes)

2005-11-30 Thread Jason Garber
Hello Mike, Same at my company. ?php= would be very nice. -- Best regards, Jasonmailto:[EMAIL PROTECTED] Wednesday, November 30, 2005, 4:31:58 AM, you wrote: MH Just FYI, the lack of ?php= is the only reason we don't disable short MH tags on all development

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] 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
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
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] 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 don't you implement something like this in your application - then you CAN control what error level is used

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

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

Re: [PHP-DEV] PHP 5.1

2005-06-06 Thread Jason Garber
, 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 is an engine level function that has to be added to the core of PHP. SC For the record, I also find ifsetor useful

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

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 now. AG

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

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 Also, we

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

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's

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 DO

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]

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

[PHP-DEV] CLI Constant

2004-09-30 Thread Jason Garber
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] CLI Constant

2004-09-30 Thread Jason Garber
is being run on the command line? I've used if(defined('STDIN')) but that seems kind of kludgey. If there is no better way, perhaps we could add constant called (SAPI_TYPE = 'CLI') or something like that to the language to facilitate this? -- Best regards, Jason Garber

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

2004-09-06 Thread Jason Garber
, 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. base64_encode(serialize($aData)) and read

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

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

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 two

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

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,

[PHP-DEV] Date Support

2004-08-02 Thread Jason Garber
. 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 regards, Jason Garber

Re: [PHP-DEV] Date Support

2004-08-02 Thread Jason Garber
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 internals, Not to take away from the wonderful

Re: [PHP-DEV] Date Support

2004-08-02 Thread Jason Garber
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 Garber wrote

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 for

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
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 Garber wrote: Hello Andi

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

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 language.

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

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

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() ifsetor()

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 invalid. Aborting;

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[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, Jason

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['level'], 1); RL The problem

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

[PHP-DEV] Segmentation Fault when using interface

2004-07-09 Thread Jason Garber
) 1998-2004 Zend Technologies [EMAIL PROTECTED] 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] 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 interface. The code

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] what happened to that new isset() like language

2004-07-08 Thread Jason Garber
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 duplicate

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

2004-07-07 Thread Jason Garber
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 Request. I rember

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's

[PHP-DEV] Throw Question

2004-06-17 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 Garber -- PHP

Re: [PHP-DEV] Throw Question

2004-06-17 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 +0400

[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 used? Thanks, Jason Garber

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 constructs

Re: [PHP-DEV] Array Question

2004-06-17 Thread Jason Garber
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 remember correctly, Zeev or Andi

Re: [PHP-DEV] The open letter to Derick Rethans derick@php.net

2004-06-15 Thread Jason Garber
. 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 view its source with my

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
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 :: [EMAIL PROTECTED] :: http://IonZoft.com

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

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

2004-05-10 Thread Jason Garber
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 PROTECTED] :: http://IonZoft.com

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

2004-05-10 Thread Jason Garber
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 __ At 5/10/2004 06

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

Re: [PHP-DEV] constant name

2004-05-05 Thread Jason Garber
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 __ Jason Garber

Re: [PHP-DEV] Javascript / Php

2004-04-28 Thread Jason Garber
,, what can i do to run the javascript at server side and not on the client side -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php __ Jason Garber President Chief Technology Officer

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. ~Jason

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

2004-04-17 Thread Jason Garber
, 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 you help out? Need Consulting Services

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

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

[PHP-DEV] Construct Request

2004-04-15 Thread Jason Garber
of code, making PHP an even more easy to use language. Please evaluate this request carefully, and then let me know your thoughts on it. Sincerely, Jason Garber President and Chief Technology Officer IonZoft, Inc. :: 814.742.8030 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe

Re: [PHP-DEV] Re: Construct Request

2004-04-15 Thread Jason Garber
or may not exist. It is one of the great features of PHP - accessing an undefined variable, but one that is completely removed when E_NOTICE is turned on. What is the overhead of calling a simple UDF in php? ~Jason Garber -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe

Re: [PHP-DEV] Construct Request

2004-04-15 Thread Jason Garber
proposed a language construct. Also, I think that using an operator would add to the complexity of thoroughly understanding the PHP language, which is something that I understand we do not want to do. ~Jason Garber At 4/15/2004 02:34 PM -0400, Ilia Alshanetsky wrote: On April 15, 2004 02:15

Re: [PHP-DEV] Construct Request

2004-04-15 Thread Jason Garber
) ? $param : $default); } I tested it on 4.3.4 and 5.0 RC1, and it worked. Is passing an undefined variable as a reference parameter a legal thing to do in PHP? ~Jason At 4/15/2004 09:54 PM +0200, Derick Rethans wrote: On Thu, 15 Apr 2004, Jason Garber wrote: $_POST['CUST_ID'] = (int

Re: [PHP-DEV] Construct Request

2004-04-15 Thread Jason Garber
I wrote this (I underlined the relevant parts for you): You'll need something more clever, because an undefined key 'CUST_ID' in $_POST['CUST_ID'] will strill throw a Consider this: --- ?php error_reporting(E_ALL); function setor($param, $default) {

Re: [PHP-DEV] Construct Request

2004-04-15 Thread Jason Garber
to this side of things. But I do have quite a few personnel on payroll that I think would benefit significantly by having a this feature added, which is why I would be willing to pay for it's implementation, which in turn everyone can benefit from. Thanks again, Jason Garber President IonZoft