Re: [nyphp-talk] Best way to copy array by value

2007-02-25 Thread Chris Shiflett
Aaron Fischer wrote: > I need to copy an array by value, not by reference. PHP copies on demand, so as soon as you change one, it does what you'd expect. Chris -- Chris Shiflett http://shiflett.org/ ___ New York PHP Community Talk Mailing List http://

Re: [nyphp-talk] Best way to copy array by value

2007-02-25 Thread inforequest
Daniel Convissor danielc-at-analysisandsolutions.com |nyphp dev/internal group use| wrote: Aaron: On Sun, Feb 25, 2007 at 03:47:45PM -0500, Aaron Fischer wrote: I need to copy an array by value, not by reference. Is there a best way to do this? Right now I found serialize/unserialize wh

Re: [nyphp-talk] Best way to copy array by value

2007-02-25 Thread Daniel Convissor
Aaron: On Sun, Feb 25, 2007 at 03:47:45PM -0500, Aaron Fischer wrote: > I need to copy an array by value, not by reference. Is there a best > way to do this? Right now I found serialize/unserialize which seems > to do the trick. What ARE you talking about? Copying by value is the default b

[nyphp-talk] New Term: Definition-Oriented Programming

2007-02-25 Thread Kenneth Downs
In discussing Andromeda and other frameworks here and elsewhere, I often run into difficulties because Andromeda does not follow the assumptions of MVC frameworks, and does not use ORM, along with many other differences. After working on this for 2.5 years, I'm fairly confident that the Androm

Re: [nyphp-talk] Best way to copy array by value

2007-02-25 Thread Chris Merlo
On 2/25/07, Aaron Fischer <[EMAIL PROTECTED]> wrote: I need to copy an array by value, not by reference. Is there a best way to do this? That depends on what the array contains. If it contains primitives (numbers, chars, or booleans), you can just write a loop. If it contains objects, just

[nyphp-talk] Best way to copy array by value

2007-02-25 Thread Aaron Fischer
I need to copy an array by value, not by reference. Is there a best way to do this? Right now I found serialize/unserialize which seems to do the trick. Python has a function called deepcopy: http://docs.python.org/lib/module-copy.html For Java, it appears you can use a handmade function o

Re: [nyphp-talk] PHP and running background tasks...

2007-02-25 Thread Paul Houle
Brian Dailey wrote: From the last link: "Note that you should never attempt to use these process control forking functions when using a webserver; you should only fork applications when using the PHP command line client." Another strategy is to write a long-running service task in a cron job