php-general Digest 29 Jan 2010 11:30:34 -0000 Issue 6564

Topics (messages 301636 through 301648):

Good source for sample data?
        301636 by: Brian Dunning
        301637 by: Shawn McKenzie
        301638 by: Nathan Rixham
        301639 by: TG
        301640 by: james stojan

exception throw from __autoload could not be catched on php 5.3.1
        301641 by: Eric Lee
        301642 by: Ashley Sheridan
        301643 by: Ashley Sheridan
        301644 by: Ryan
        301645 by: Eric Lee
        301646 by: Eric Lee

Re: Do you use a public framework or roll your own?
        301647 by: Michael A. Peters
        301648 by: Tom Sparks

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hey all -

I need a few million sample contact records - name, company, address, email, 
web, phone, fax. ZIP codes and area codes and street addresses should be 
correct and properly formatted, but preferably not real people or companies or 
email addresses. But they'd work if you did address validation or mapping. 
Anyone have a suggestion?

- Brian

--- End Message ---
--- Begin Message ---
Brian Dunning wrote:
> Hey all -
> 
> I need a few million sample contact records - name, company, address, email, 
> web, phone, fax. ZIP codes and area codes and street addresses should be 
> correct and properly formatted, but preferably not real people or companies 
> or email addresses. But they'd work if you did address validation or mapping. 
> Anyone have a suggestion?
> 
> - Brian

It should be easy to code a routine to generate random data.  Maybe 20 -
30 lines of code.  Obviously you may have a name like Dgidfgq Xcvbop and
company Wsdkn, but it shouldn't matter if testing is your purpose.

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Brian Dunning wrote:
> Hey all -
> 
> I need a few million sample contact records - name, company, address, email, 
> web, phone, fax. ZIP codes and area codes and street addresses should be 
> correct and properly formatted, but preferably not real people or companies 
> or email addresses. But they'd work if you did address validation or mapping. 
> Anyone have a suggestion?
> 
> - Brian

get the data from a "whats near X" API and obscure the personally
identifiable data with dummy values.
?

--- End Message ---
--- Begin Message ---
I remembered a coworker found an online resource that generated sample data 
for you.  I hit google and I think I found it:

http://www.generatedata.com/

I I found it on a list of resources for data generation:

http://www.webresourcesdepot.com/test-sample-data-generators/


I've never used any of these, but once again.. Google is your friend.

-TG

----- Original Message -----
From: Brian Dunning <br...@briandunning.com>
To: php-gene...@lists.php.net, my...@lists.mysql.com
Date: Thu, 28 Jan 2010 15:52:41 -0800
Subject: [PHP] Good source for sample data?

> Hey all -
> 
> I need a few million sample contact records - name, company, address, 
email, web, phone, fax. ZIP codes and area codes and street addresses 
should be correct and properly formatted, but preferably not real people 
or companies or email addresses. But they'd work if you did address 
validation or mapping. Anyone have a suggestion?
> 
> - Brian
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
Fakenamegenerator.com is pretty good for these kinds of records, alot of
variety and can change order/formating for them but they do limit free
orders to 50k records.

http://www.fakenamegenerator.com/order.php

On Thu, Jan 28, 2010 at 8:06 PM, TG <tg-...@gryffyndevelopment.com> wrote:

> I remembered a coworker found an online resource that generated sample data
> for you.  I hit google and I think I found it:
>
> http://www.generatedata.com/
>
> I I found it on a list of resources for data generation:
>
> http://www.webresourcesdepot.com/test-sample-data-generators/
>
>
> I've never used any of these, but once again.. Google is your friend.
>
> -TG
>
> ----- Original Message -----
> From: Brian Dunning <br...@briandunning.com>
> To: php-gene...@lists.php.net, my...@lists.mysql.com
> Date: Thu, 28 Jan 2010 15:52:41 -0800
> Subject: [PHP] Good source for sample data?
>
> > Hey all -
> >
> > I need a few million sample contact records - name, company, address,
> email, web, phone, fax. ZIP codes and area codes and street addresses
> should be correct and properly formatted, but preferably not real people
> or companies or email addresses. But they'd work if you did address
> validation or mapping. Anyone have a suggestion?
> >
> > - Brian
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi php-dev pros,

I got an issue about catching exception throw from __autoload on php 5.3.1.

The manual state that exception throw from __autoload could be catched with
try.. catch statement same as the normal flow.

But I'can archive that even I have copied the same sample code from the
manual.

Here are the code segment.

[[[
function __autoload($name) {
    echo "Want to load $name.\n";
    throw new Exception("Unable to load $name.");
}

try {
    $obj = new NonLoadableClass();
} catch (Exception $e) {
    echo $e->getMessage(), "\n";
}

]]]

Are there anyone experienced this or not ?

Thanks in advance !

Regards,
Eric,

--- End Message ---
--- Begin Message ---
On Fri, 2010-01-29 at 13:02 +0800, Eric Lee wrote:

> Hi php-dev pros,
> 
> I got an issue about catching exception throw from __autoload on php 5.3.1.
> 
> The manual state that exception throw from __autoload could be catched with
> try.. catch statement same as the normal flow.
> 
> But I'can archive that even I have copied the same sample code from the
> manual.
> 
> Here are the code segment.
> 
> [[[
> function __autoload($name) {
>     echo "Want to load $name.\n";
>     throw new Exception("Unable to load $name.");
> }
> 
> try {
>     $obj = new NonLoadableClass();
> } catch (Exception $e) {
>     echo $e->getMessage(), "\n";
> }
> 
> ]]]
> 
> Are there anyone experienced this or not ?
> 
> Thanks in advance !
> 
> Regards,
> Eric,


What version of PHP are you using? The example will only work on PHP
version 5.3.0 and above

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Fri, 2010-01-29 at 13:02 +0800, Eric Lee wrote:

> Hi php-dev pros,
> 
> I got an issue about catching exception throw from __autoload on php 5.3.1.
> 
> The manual state that exception throw from __autoload could be catched with
> try.. catch statement same as the normal flow.
> 
> But I'can archive that even I have copied the same sample code from the
> manual.
> 
> Here are the code segment.
> 
> [[[
> function __autoload($name) {
>     echo "Want to load $name.\n";
>     throw new Exception("Unable to load $name.");
> }
> 
> try {
>     $obj = new NonLoadableClass();
> } catch (Exception $e) {
>     echo $e->getMessage(), "\n";
> }
> 
> ]]]
> 
> Are there anyone experienced this or not ?
> 
> Thanks in advance !
> 
> Regards,
> Eric,


Sorry, ignore that, I see you're running 5.3.1, which should be fine for
running the example. I do notice that you've got [[[ and ]]] in-place of
<?php and ?>, was that intentional?

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
于 2010-1-29 13:19, Ashley Sheridan 写道:
> On Fri, 2010-01-29 at 13:02 +0800, Eric Lee wrote:
>
>   
>> Hi php-dev pros,
>>
>> I got an issue about catching exception throw from __autoload on php 5.3.1.
>>
>> The manual state that exception throw from __autoload could be catched with
>> try.. catch statement same as the normal flow.
>>
>> But I'can archive that even I have copied the same sample code from the
>> manual.
>>
>> Here are the code segment.
>>
>> [[[
>> function __autoload($name) {
>>     echo "Want to load $name.\n";
>>     throw new Exception("Unable to load $name.");
>> }
>>
>> try {
>>     $obj = new NonLoadableClass();
>> } catch (Exception $e) {
>>     echo $e->getMessage(), "\n";
>> }
>>
>> ]]]
>>
>> Are there anyone experienced this or not ?
>>
>> Thanks in advance !
>>
>> Regards,
>> Eric,
>>     
>
> Sorry, ignore that, I see you're running 5.3.1, which should be fine for
> running the example. I do notice that you've got [[[ and ]]] in-place of
> <?php and ?>, was that intentional?
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
>   
Do you have any other autoload implamentaions? try testing that code
segment in a single php file and dump phpinfo() to make sure you are on
php 5.3.1

--- End Message ---
--- Begin Message ---
On Fri, Jan 29, 2010 at 1:19 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk>wrote:

>  On Fri, 2010-01-29 at 13:02 +0800, Eric Lee wrote:
>
> Hi php-dev pros,
>
> I got an issue about catching exception throw from __autoload on php 5.3.1.
>
> The manual state that exception throw from __autoload could be catched with
> try.. catch statement same as the normal flow.
>
> But I'can archive that even I have copied the same sample code from the
> manual.
>
> Here are the code segment.
>
> [[[
> function __autoload($name) {
>     echo "Want to load $name.\n";
>     throw new Exception("Unable to load $name.");
> }
>
> try {
>     $obj = new NonLoadableClass();
> } catch (Exception $e) {
>     echo $e->getMessage(), "\n";
> }
>
> ]]]
>
> Are there anyone experienced this or not ?
>
> Thanks in advance !
>
> Regards,
> Eric,
>
>
> Sorry, ignore that, I see you're running 5.3.1, which should be fine for
> running the example. I do notice that you've got [[[ and ]]] in-place of
> <?php and ?>, was that intentional?
>

Sorry for that !   I'am too lazy !!
And that's just for easy looking the code.

I actually use this,

<?php

function __autoload($name) {
    echo "Want to load $name.\n";
    throw new Exception("Unable to load $name.");
}

try {
    $obj = new NonLoadableClass();
} catch (Exception $e) {
    echo $e->getMessage(), "\n";
}



?>


Regards,
Eric,


>
>   Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>

--- End Message ---
--- Begin Message ---
Hi all and thanks for Ryan,


I apologize ! !
I have missed out the small class_exists call before it.


Thanks.


Regards,
Eric,

2010/1/29 Ryan <ryansu...@gmail.com>

> 于 2010-1-29 13:19, Ashley Sheridan 写道:
> > On Fri, 2010-01-29 at 13:02 +0800, Eric Lee wrote:
> >
> >
> >> Hi php-dev pros,
> >>
> >> I got an issue about catching exception throw from __autoload on php
> 5.3.1.
> >>
> >> The manual state that exception throw from __autoload could be catched
> with
> >> try.. catch statement same as the normal flow.
> >>
> >> But I'can archive that even I have copied the same sample code from the
> >> manual.
> >>
> >> Here are the code segment.
> >>
> >> [[[
> >> function __autoload($name) {
> >>     echo "Want to load $name.\n";
> >>     throw new Exception("Unable to load $name.");
> >> }
> >>
> >> try {
> >>     $obj = new NonLoadableClass();
> >> } catch (Exception $e) {
> >>     echo $e->getMessage(), "\n";
> >> }
> >>
> >> ]]]
> >>
> >> Are there anyone experienced this or not ?
> >>
> >> Thanks in advance !
> >>
> >> Regards,
> >> Eric,
> >>
> >
> > Sorry, ignore that, I see you're running 5.3.1, which should be fine for
> > running the example. I do notice that you've got [[[ and ]]] in-place of
> > <?php and ?>, was that intentional?
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
> >
> Do you have any other autoload implamentaions? try testing that code
> segment in a single php file and dump phpinfo() to make sure you are on
> php 5.3.1
>

--- End Message ---
--- Begin Message ---
Michael A. Peters wrote:
Daevid Vincent wrote:
I'm not looking to start a holy war here or re-hash the tired debate. I just want some hard cold numbers to look at.

"Do you use a public framework or roll your own?"
http://www.rapidpoll.net/8opnt1e


And for those interested, here are the results of the last poll:

"To add the final ?> in PHP or not..."
http://www.rapidpoll.net/show.aspx?id=arc1opy

I'm relieved to know I'm in the majority (almost 2:1) who close their
opening PHP tags. :)



I roll my own, partially from classes I wrote and partially from classes at phpclasses.org and partially from neat stuff I find on the web.

Not sure you could call it framework though, just a loose collection of independent classes.


Just spent a couple days bringing that loose collection together along with CSS templates from http://www.freecsstemplates.org/ and now actually have my own (not quite finished) CMS.

And it looks / works a hell of a lot better than anything I've done before (er, other than it not quite being finished ...)

Making my classes work together specifically to make a generic CMS exposed a lot of bugs and poor design decisions in them that are now largely fixes (er, well, we'll see ...)

Last few days have been like an epiphany for me.

--- End Message ---
--- Begin Message ---
--- On Fri, 29/1/10, Michael A. Peters <mpet...@mac.com> wrote:
> Michael A. Peters wrote:
> > Daevid Vincent wrote:
> >>  I'm not looking to start a holy war here or
> re-hash the tired debate. I just want some hard cold numbers
> to look at.
> >> 
> >> "Do you use a public framework or roll your own?"
> >> http://www.rapidpoll.net/8opnt1e
> >> 
> >> 
> >> And for those interested, here are the results of
> the last poll:
> >> 
> >> "To add the final ?> in PHP or not..."
> >> http://www.rapidpoll.net/show.aspx?id=arc1opy

I have looked at a few open source frameworks, I have found them too hard to 
hack/edit/modify or incapable of doing what I need
so it looks like I need write my own :(

ts



      
__________________________________________________________________________________
Yahoo!7: Catch-up on your favourite Channel 7 TV shows easily, legally, and for 
free at PLUS7. www.tv.yahoo.com.au/plus7

--- End Message ---

Reply via email to