Re: [PHP] IRC and English

2009-09-02 Thread Peter Ford
tedd wrote: > At 2:02 PM -0700 9/1/09, Jessi Berkelhammer wrote: >> As a monolingual North American, I am also very uncomfortable with >> this thread. >> >> A rant about abbreviations/IRC jargon is an appropriate discussion for >> list, but criticizing how non-native English speakers write English

Re: [PHP] CodeWorks 09

2009-09-02 Thread Peter Ford
Jim Lucas wrote: > Elizabeth Naramore wrote: >> Hey all, >> Just wanted to make sure you knew about php|architect's upcoming >> CodeWorks >> conference, coming to 7 cities in 14 days: >> >> - San Francisco, CA: Sept 22-23 >> - Los Angeles, CA: Sept 24-25 >> - Dallas, TX: Sept 26-27 >> - Atlanta,

Re: [PHP] CodeWorks 09

2009-09-02 Thread Luke
2009/9/2 Peter Ford > Jim Lucas wrote: > > Elizabeth Naramore wrote: > >> Hey all, > >> Just wanted to make sure you knew about php|architect's upcoming > >> CodeWorks > >> conference, coming to 7 cities in 14 days: > >> > >> - San Francisco, CA: Sept 22-23 > >> - Los Angeles, CA: Sept 24-25 >

Re: [PHP] Re: LoginShare | How to authenticate once, and login to different websites

2009-09-02 Thread Behzad
Dear paragasu, Never heard of oAuth before, but I guess that it's complex for my purpose. But I'll take a look at it, I'll use it for the next version. Thank you so much for introducing this great tool! On Wed, Sep 2, 2009 at 5:51 AM, paragasu wrote: > why not use ready available php library OAu

Re: [PHP] IRC and English (Bible)

2009-09-02 Thread tedd
At 9:40 AM +0100 9/2/09, Peter Ford wrote: The American standardisation of English spelling did quite enough damage to the beautiful language of Shakespeare (who couldn't even spell his own name consistently), without any more neologisms creeping in. Okay, Shakespeare... "2B || !2B" is an examp

RE: [PHP] IRC and English

2009-09-02 Thread Ford, Mike
> -Original Message- > From: Peter Ford [mailto:p...@justcroft.com] > Sent: 02 September 2009 09:40 > > Words that are two lengthy: "of", "an", "to", "it" (etc.) > Words that are too lengthy: "antidisestablishmentarianism", > "internationalisation" and that other one that begins with > "

RE: [PHP] Date +30 comparison

2009-09-02 Thread Ford, Mike
> -Original Message- > From: tedd [mailto:tedd.sperl...@gmail.com] > Sent: 01 September 2009 21:52 > > At 2:47 PM -0400 9/1/09, Andrew Ballard wrote: > >On Tue, Sep 1, 2009 at 1:27 PM, tedd > wrote: > >> First get the date to seconds, like so: > >> > >> $today_date = '8/26/2009'; > >> >

Re: [PHP] CodeWorks 09

2009-09-02 Thread Ben Dunlap
> What I would do for UK PHP events :-( Something like this perhaps? http://conference.phpnw.org.uk/phpnw09/ Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] windows 5.2.10 PHP not working with phpinfo

2009-09-02 Thread Fred Silsbee
THANKS! Here is my current situation (if you care to look at it (under the windows ) list I tried 5.3 and found out it had no php_mssql. Then I retreated to 5.2.10. Trying to get back to where I had everything worked, I downloaded 5.2.6: (1) I uninstalled cgi 1.5 (2) php.ini has: extension_d

RE: [PHP] Date +30 comparison

2009-09-02 Thread tedd
At 4:06 PM +0100 9/2/09, Ford, Mike wrote: > -Original Message- From: tedd [mailto:tedd.sperl...@gmail.com] Sent: 01 September 2009 21:52 At 2:47 PM -0400 9/1/09, Andrew Ballard wrote: >On Tue, Sep 1, 2009 at 1:27 PM, tedd wrote: >> First get the date to seconds, like so: >> >

Re: [PHP] Generic decorators and type hinting

2009-09-02 Thread Ben Dunlap
> Is there another way to cleanly wrap method calls for timing/logging > purposes? I have a possibly-evil idea that gets around type-hinting by dynamically declaring decorator classes as children of the real classes that need to be timed. You end up with as many "decorators" as you have classes th

Re: [PHP] Generic decorators and type hinting

2009-09-02 Thread David Kurtz
On Sep 2, 2009, at 12:17 PM, Ben Dunlap wrote: I've got some sample code written that first calls get_class_methods() to list the names of all the visible methods of the parent object, then constructs code to declare a child class that overrides those methods with wrapper methods, and finally ev

Re: [PHP] Generic decorators and type hinting

2009-09-02 Thread Christoph Boget
> I have a possibly-evil idea that gets around type-hinting by > dynamically declaring decorator classes as children of the real > classes that need to be timed. You end up with as many "decorators" as > you have classes that need to be timed, but if this is for dev/QA > purposes only, that might n

RE: [PHP] OO and "Singleton" class

2009-09-02 Thread Andrea Giammarchi
Maybe somebody would be interested in my solution as well: http://webreflection.blogspot.com/2009/09/php-53-singleton-fast-and-abstract.html Regards > Date: Wed, 2 Sep 2009 14:02:25 +0900 > From: koy...@hoge.org > To: php-general@lists.php.net > Subject: Re: [PHP] OO and "Singleton" class > > H

[PHP] Array references - how to unset() ?

2009-09-02 Thread Martin Zvarík
$ARR = array( 'a' => array('b' => 'blah') ); function set($key) { global $ARR; foreach ($key as $i => $k) { if ($i == 0) { $sourcevar =& $ARR[$k]; } else { $sourcevar =& $sourcevar[$k]; } } // unset($sourcevar); // w

Re: [PHP] Array references - how to unset() ?

2009-09-02 Thread Robert Cummings
Martin Zvarík wrote: $ARR = array( 'a' => array('b' => 'blah') ); function set($key) { global $ARR; foreach ($key as $i => $k) { if ($i == 0) { $sourcevar =& $ARR[$k]; } else { $sourcevar =& $sourcevar[$k]; }

Re: [PHP] Generic decorators and type hinting

2009-09-02 Thread Ben Dunlap
> code.  Instead, just use interfaces.  The only real downside is that > all the classes you want to decorate would need to implement them and > that would cause a wee bit of ugliness in the code/class declaration. Can you explain a bit more? As I understood the OP, the challenge was to take a lar

Re: [PHP] Array references - how to unset() ?

2009-09-02 Thread Martin Zvarík
Robert Cummings napsal(a): Martin Zvarík wrote: $ARR = array( 'a' => array('b' => 'blah') ); function set($key) { global $ARR; foreach ($key as $i => $k) { if ($i == 0) { $sourcevar =& $ARR[$k]; } else { $sourcevar =& $sourcevar

Re: [PHP] Array references - how to unset() ?

2009-09-02 Thread Robert Cummings
Martin Zvarík wrote: Robert Cummings napsal(a): Martin Zvarík wrote: $ARR = array( 'a' => array('b' => 'blah') ); function set($key) { global $ARR; foreach ($key as $i => $k) { if ($i == 0) { $sourcevar =& $ARR[$k]; } else { $so

RE: [PHP] Converting URL's to hyperlinks.

2009-09-02 Thread Daevid Vincent
Maybe I misunderstood the OP, but wouldn't this (or something like it) be easier and cleaner than that mess below?? $url = preg_replace("/(\...@\w+\.[a-za-z]{2,3})/i", "$1", $url); $url = preg_replace("/\s(http:\/\/)?(\w*\.?\w*\.[a-zA-Z]{2,3}.*?\s)/i", " $2", $url); > -Original Message-

Re: [PHP] Array references - how to unset() ?

2009-09-02 Thread Martin Zvarík
AHA !!! OMG... how come I did not see that!? Instead this: $array =& $array[$final]; unset($array); This: unset($array[$final]); 3 AM in the morning... that must be the reason! .) Thanks. This is possible. You're just not giving enough consideration to your exit strategy :) array

[PHP] Searching on AlphaNumeric Content Only

2009-09-02 Thread sono-io
Is there is a way to search only for the alphanumeric content of field in a db? I have an itemID field that contains item #'s that include dashes, forward slashes, etc, and I want people to be able to search for an item # even if they don't enter the punctuation exactly. Here's an exampl

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-02 Thread German Geek
Hi, It's definitely possible to do when you do it in PHP, but not sure about on the database side. You could read all records into memory and then iterate over it with something like: $toSearch = "4D24487PS" $charsToIgnore = array('-','+',...); foreach ($items as $k=>$item) { $itemVal = str_re

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-02 Thread Ben Dunlap
>        Is there is a way to search only for the alphanumeric content of > field in a db?  I have an itemID field that contains item #'s that include > dashes, forward slashes, etc, and I want people to be able to search for an > item # even if they don't enter the punctuation exactly. Not sure i