Re: [PHP-DEV] A new idea on PHP6.

2012-07-19 Thread D. Dante Lorenso
On 7/19/12 1:17 AM, Ronald Chmara wrote: With PHP 6, lets start with a: Pure Object Oriented PHP OMG, did you seriously just recommend POOP? LOL, I'm gonna go die now. -- Dante D. Dante Lorenso da...@lorenso.com 972-333-4139 -- PHP Internals - PHP Runtime Development Mailing List

Re: [PHP-DEV] Function proposal: varset

2011-04-20 Thread D. Dante Lorenso
On 4/20/11 9:55 AM, Mark wrote: Hi, This proposal is for the often called line like this: $var = isset($_GET['var']) ? $_GET['var'] : ''; Only a shorter and imho a cleaner solution to get the same: $var = varset($_GET['var']); The implementation for this in PHP code is this: # Arg 1 = the

[PHP-DEV] proposed access modifier silent ... was: Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-10 Thread D. Dante Lorenso
The problem with implementing ifsetor, filled, or ?? in userland is that the not set or undefined warning is fired before the variable is passed to the underlying function/method. Is it possible to add a modifier that turns off warnings for undefined variables whenever that specific method is

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-09 Thread D. Dante Lorenso
() if you wanted that type of check. The proposed filled() will suit all my needs with great satisfaction :-) -- Dante -- D. Dante Lorenso da...@lorenso.com 972-333-4139 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread D. Dante Lorenso
it. Otherwise, I need all this: $email = !empty($_REQUEST['email']) ? $_REQUEST['email'] : ( !empty($CONFIG-email_default) ? $CONFIG-email_default : ( !empty($class_email) ? $class_email : 'defa...@domain' )); Yuck. -- Dante -- D. Dante Lorenso da...@lorenso.com 972

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

2009-05-12 Thread D. Dante Lorenso
. Dante Lorenso da...@lorenso.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Making PHP upload hooks available through session variables?

2008-07-31 Thread D. Dante Lorenso
Tore B. Krudtaa wrote: I would like to be able to use the upload hooks without installing the APC. I would eventually like to be able to use those upload hooks using session variables. Maybe you can avoid the problem entirely. I was using the uploadprogress PECL extension (which I believe

Re: [PHP-DEV] Making PHP upload hooks available through session variables?

2008-07-31 Thread D. Dante Lorenso
Tore B. Krudtaa wrote: To D. Dante Lorenso: Thanks for notifying me of: http://digitarald.de/project/fancyupload/ But I would still like to see the upload hooks accessible from within a standard PHP inst., which would give me more control of the upload progress as well as more control

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

2008-07-21 Thread D. Dante Lorenso
Jani Taskinen wrote: Paweł Stradomski kirjoitti: W liście Rasmus Lerdorf z dnia poniedziałek, 21 lipca 2008: It also isn't any shorter: if(str_endswith($path,'.php')) vs. if(substr($path,-4)=='.php') Only if comparing to a static string, but not for this case: if (substr($path,

[PHP-DEV] Re: Traits for PHP ... Why can't every Class be a Trait?

2008-02-21 Thread D. Dante Lorenso
All, I can imagine a case where you would want to box common functionality into a trait and be able to use that trait as a class also. Will we end up with a lot of classes like this?: class SomeClass { use SomeTrait; } What's wrong with making all 'Class'es be 'Trait's and the only thing

Re: [PHP-DEV] Re: Traits for PHP ... Why can't every Class be a Trait?

2008-02-21 Thread D. Dante Lorenso
Stefan Marr wrote: Hi, D. Dante Lorenso schrieb: All, I can imagine a case where you would want to box common functionality into a trait and be able to use that trait as a class also. Will we end up with a lot of classes like this?: class SomeClass { use SomeTrait; } What's wrong

Re: [PHP-DEV] Extending SAPI specific php.ini to include, at least, major version.

2006-06-12 Thread D. Dante Lorenso
Richard Quadling wrote: But the issue of having the same php.ini for PHP5 and PHP6 (both are php-isapi.ini) is a pain and stops me from playing with them together. Can't you just configure PHP when you compile it with the following option: ./configure ...

[PHP-DEV] extension can not receive unset values without E_NOTICE or reference creation

2006-05-26 Thread D. Dante Lorenso
All, Back on the topic of trying to write a 'filled' function in an extension, I have run into trouble. I have declared a function as follows: -- 8 8 -- static ZEND_BEGIN_ARG_INFO(all_args_prefer_ref, ZEND_SEND_PREFER_REF)

Re: [PHP-DEV] Re: extension can not receive unset values without E_NOTICE or reference creation

2006-05-26 Thread D. Dante Lorenso
Pierre wrote: On Fri, 26 May 2006 15:45:19 -0500 [EMAIL PROTECTED] (D. Dante Lorenso) wrote: Back on the topic of trying to write a 'filled' function in an extension, I have run into trouble. I have declared a function as follows: It is perfectly normal and desired. Not desired

Re: [PHP-DEV] Re: left/right order of assignment and ++ increment changed? 5.0.x --5.1.x

2006-05-25 Thread D. Dante Lorenso
Sara Golemon wrote: Seems the order or left vs right assignment evaluation has changed somehow recently in my upgrade to PHP 5.1.4. See the following code: That's is indeed a quirk of a change in the way variables are retreived/stored between 5.0 and 5.1. Is it an unexpected BC break? In

[PHP-DEV] Is PostgreSQL 8.1.3---8.1.4 necessary for 'properly' escaped coders?

2006-05-24 Thread D. Dante Lorenso
All, I use PostgreSQL 8.1.3 extensively. Currently all my PHP 5.1.4 code is using the pgsql extension to connect. My newer development code is connecting through the newer PDO/pgsql extension. Is the PostgreSQL 8.1.4 SQL injection bug fix necessary if I've been well behaved by passing

[PHP-DEV] left/right order of assignment and ++ increment changed? 5.0.x -- 5.1.x

2006-05-24 Thread D. Dante Lorenso
Internals, Seems the order or left vs right assignment evaluation has changed somehow recently in my upgrade to PHP 5.1.4. See the following code: -- 8 8 -- ?php $data = array(); $index = 0; for ($x = 0; $x 5; $x++) { $data[$index] = $index++; }

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

2006-05-18 Thread D. Dante Lorenso
Jeff Moore wrote: On May 16, 2006, at 7:28 PM, D. Dante Lorenso wrote: I'm not familiar with this OOP concept from any other language. Perhaps it exists, but if it doesn't, is there a reason why? Its hard to find a major OO language that does not have property/accessor method support. It's

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

2006-05-16 Thread D. Dante Lorenso
Marcus Boerger wrote: btw, i wonder where the people are that usually complain about my patches? Is this finally something most people like? Maybe you built a nuclear power plant. Dante -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

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

2006-05-16 Thread D. Dante Lorenso
Jason Garber wrote: 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

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

2006-05-15 Thread D. Dante Lorenso
I'm on the latest and greatest PHP 5.1.4. I can see the function I think I want in the manual: http://us3.php.net/manual/en/function.xmlwriter-write-raw.php But the manual says it's only in CVS. I confirmed that I don't have it: * Fatal error: Call to undefined function

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

2006-05-15 Thread D. Dante Lorenso
Jared Williams wrote: http://us3.php.net/manual/en/function.xmlwriter-write-raw.php Anyone know the status of this function, if it does what I want, and what version I can start using it? I originally requested it. http://pecl.php.net/bugs/bug.php?id=6267 . I think it'll appear in 5.2,

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

2006-05-12 Thread D. Dante Lorenso
Andi Gutmans wrote: I can take any feature in PHP and add features :) Is that an offer ;-)? I've got a couple you can add, lol. Dante At 01:44 PM 5/12/2006, Jason Garber wrote: Hello, PHP implements many features, and skips many features. I think the rule of thumb needs to be that

[PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-11 Thread D. Dante Lorenso
All, Is there a way to define a function in an extension which would not require a passed in variable to exist? In other words, can ZE be modified to allow extensions to not trigger E_NOTICE warnings if an unset variable is passed to a function which does not care if the var is set? I can

Re: [PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-11 Thread D. Dante Lorenso
Antony Dovgal wrote: On 12.05.2006 02:49, D. Dante Lorenso wrote: * #define ZEND_SEND_BY_REF 1 This one is what you need. I don't think it is. The variable did not exist before the function was called and should STILL not exist afterwards. I believe when you pass by reference

Re: [PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables

2006-05-11 Thread D. Dante Lorenso
Marcus Boerger wrote: no, the compiler generates code that makes the executor generate the variable and complain prior to performing the call. The executor doesn't complain about unset variables prior to calling functions by reference, so I was thinking it could be modified to also not

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

2006-05-04 Thread D. Dante Lorenso
Rasmus Lerdorf wrote: D. Dante Lorenso wrote: In my PHP zen world, empty() and filled() are friends. Ok, I've been selling 'filled()' for a while now. Can we reverse the sell and try this .. why SHOULDN'T filled() be added to the language? Because it doesn't do enough. Unlike empty(), when

Re: [PHP-DEV] Specification for function filled() :: was ifsetor/coalesce

2006-05-04 Thread D. Dante Lorenso
also might be wanted. filled() is the opposite of empty() and is not dealing with tests for 'isset()'. Another function should be proposed to solve that problem if it would still be needed after filled() is implemented. Do I have any power to call a vote on this? Dante D. Dante Lorenso

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

2006-05-03 Thread D. Dante Lorenso
D. Dante Lorenso wrote: I don't think something like this can NOT be written in userspace because the 'isset' and 'empty' checks need to be run before arguments can be passed to a user function or warnings will start flying. A function like this simplifies code which used to look like

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

2006-05-03 Thread D. Dante Lorenso
) * not have side-effect of defining values which are not already set * not trigger notices or warnings * returns value of first proper match Dante johannes On Wednesday 03 May 2006 07:56, D. Dante Lorenso wrote: All, I'm sure this has been asked somewhere, but since I see requests

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

2006-05-03 Thread D. Dante Lorenso
Enjoy. Eric Coleman Eric Coleman http://aplosmedia.com home: 412 399 1024 cell: 412 779 5176 On May 3, 2006, at 3:13 AM, D. Dante Lorenso wrote: Johannes Schlueter wrote: please search the archives for ifsetor. I have completed this search and find: http://marc.theaimsgroup.com/?r

[PHP-DEV] Specification for function filled() :: was ifsetor/coalesce

2006-05-03 Thread D. Dante Lorenso
Dear Internals, I'd like a white bikeshed, but until you can decide on a color, how about we just build the bikeshed already. Please consider the following specification: == 8 8 8 == filled (PHP 5.2.0) filled - Find first

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

2006-05-03 Thread D. Dante Lorenso
Rick Widmer wrote: D. Dante Lorenso wrote: Eric, This reply is too basic and is not the answer. The problem is more complex then you have grasped. function ifsetor() { $args = func_get_args(); $count = count( $args ); for( $i=0; $i$count; $i++ ) { if isset( $args[ $i ] )) { return

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

2006-05-03 Thread D. Dante Lorenso
Jochem Maas wrote: point 1: regardless of how people think there should be an ifsetor() in the engine - the devs don't so there wont be one. Avvhggghh! Don't you just want to scream! point 2: anything trying to implement this functionality in userspace is a hack. (to stregethen that

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

2006-05-03 Thread D. Dante Lorenso
Rasmus Lerdorf wrote: Not sure what you guys are talking about. ?: is on the roadmap. -Rasmus Ok. That has some signs of hope. What is ?: exactly, though. I searched '?:' and yeah, good luck with that in documentation. It doesn't smell like it supports all the specifics that 'filled()'

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

2006-05-02 Thread D. Dante Lorenso
All, I'm sure this has been asked somewhere, but since I see requests for features for 5.2 or 6.0, I'd like to add a simple item to the list which would be quite useful to me and would simplify and clean up a lot of code out there: function coalesce(...) This works much like in the SQL

[PHP-DEV] Request for Threads or SRM

2005-11-24 Thread D. Dante Lorenso
environment stand-alone servers. -- D. Dante Lorenso -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php