Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-31 Thread Mark
On Tue, Aug 28, 2012 at 1:43 PM, Matijn Woudt tijn...@gmail.com wrote:
 On Tue, Aug 28, 2012 at 1:16 AM, Larry Garfield la...@garfieldtech.com 
 wrote:
 On 8/27/12 6:11 PM, Matijn Woudt wrote:

 You should never be calling require() yourself.  Just follow the PSR-0
 naming standard and use an autoloader, then you don't have to even think
 about it.  There are many existing autoloaders you can use, including
 Composer's, Symfony2's, and probably Zend has one as well.


 I believe there's one in PHP by default now called SPLClassLoader or
 something like that..

 - Matijn


 There was a proposal for one, but it was never added.  You still need a
 user-space class loader for PSR-0, but they're readily available.


 --Larry Garfield


 Ah thanks for the info. I heard about it way back and assumed it was
 implemented by now ;)

 - Matijn

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


I did some searching on that one since it sounds interesting. It's
laying dormant in bugzilla: https://bugs.php.net/bug.php?id=60128 (the
RFC : https://wiki.php.net/rfc/splclassloader)
Thanks for the advice so far. I will certainly implement Autoloading.
Why didn't i think of that :p Guess my PHP knowledge is a bit rusty
since i did make autoloaders before.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-28 Thread Matijn Woudt
On Tue, Aug 28, 2012 at 1:16 AM, Larry Garfield la...@garfieldtech.com wrote:
 On 8/27/12 6:11 PM, Matijn Woudt wrote:

 You should never be calling require() yourself.  Just follow the PSR-0
 naming standard and use an autoloader, then you don't have to even think
 about it.  There are many existing autoloaders you can use, including
 Composer's, Symfony2's, and probably Zend has one as well.


 I believe there's one in PHP by default now called SPLClassLoader or
 something like that..

 - Matijn


 There was a proposal for one, but it was never added.  You still need a
 user-space class loader for PSR-0, but they're readily available.


 --Larry Garfield


Ah thanks for the info. I heard about it way back and assumed it was
implemented by now ;)

- Matijn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Stuart Dallas
On 26 Aug 2012, at 19:42, Mark mark...@gmail.com wrote:

 Envision the following plugin architecture:
 
 class PluginLoader
 {
 }
 
 interface PluginInterface
 {
 .. some function definitions ..
 }
 
 class PluginOne implements PluginInterface
 {
 }
 
 class PluginTwo implements PluginInterface
 {
 }
 
 The PluginLoader is loading the plugins.
 The PluginInterface defines an interface which each plugin has to implement.
 PluginOne and PluginTwo are plugins that implement the interface.
 
 Each plugin (PluginOne and PluginTwo) are stored in their own folders.
 So the folder structure would be somewhat like this:
 |- Plugins
 |- - PluginOne
 |- - - PluginOne.php
 |- - - other possible files
 |- - PluginTwo
 |- - - PluginTwo.php
 |- - - other possible files
 |- PluginLoader.php
 |- PluginInterface.php
 
 Now making this structure isn't an issue. I can do all of that just
 fine. The place where i'm actually going to make a plugin instance is
 where things get a little more complicated. The PluginLoader simply
 reads all the dirs in the Plugins folder and tries to find a filename
 with the same dir. So if it reads the dir Plugins/PluginOne it will
 try to include the PHP file: Plugins/PluginOne/PluginOne.php. That's
 fine and working.
 
 To actually make a plugin instance i can do two things that i know of:
 1. use eval like so: eval('$obj = new '.$pluginName.'();'); and
 register it to the PluginLoader.

No need to use eval, you can simply do this:

$obj = new $pluginName();

See here: http://php.net/language.variables.variable

 2. Let the plugin itself (so in this case PluginOne.php) open itself
 and register it to the PluginLoader.
 
 With the first option i have to do eval which i try to avoid if possible.
 With the second solution the PluginLoader probably has to be a singlethon.

Why does it need to be a singleton?

 Now my question is: what is the right way of loading plugins like
 this? Is there some other option then the two i described above? My
 PHP limitations are the newest version so no limitation there :)
 I'm kinda leaning towards the second option now since that seems to be
 quite stable and not very error prone. The eval one is much easier to
 break :p

If you're happy for each plugin to be in a separate directory then what you 
have in option 1, minus the eval, will work perfectly well. I don't know what 
your use case is but if there's a chance a single plugin might want to provide 
several classes then I'd require an init.php in each plugin folder and have 
that register the class names with the class loader. It could also then pass 
along some meta information such as a description of what each class does. If 
this is for use in web requests you might want to stick to what you currently 
have as there's a lot less overhead.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Mark
On Mon, Aug 27, 2012 at 12:41 PM, Stuart Dallas stu...@3ft9.com wrote:
 On 26 Aug 2012, at 19:42, Mark mark...@gmail.com wrote:

 Envision the following plugin architecture:

 class PluginLoader
 {
 }

 interface PluginInterface
 {
 .. some function definitions ..
 }

 class PluginOne implements PluginInterface
 {
 }

 class PluginTwo implements PluginInterface
 {
 }

 The PluginLoader is loading the plugins.
 The PluginInterface defines an interface which each plugin has to implement.
 PluginOne and PluginTwo are plugins that implement the interface.

 Each plugin (PluginOne and PluginTwo) are stored in their own folders.
 So the folder structure would be somewhat like this:
 |- Plugins
 |- - PluginOne
 |- - - PluginOne.php
 |- - - other possible files
 |- - PluginTwo
 |- - - PluginTwo.php
 |- - - other possible files
 |- PluginLoader.php
 |- PluginInterface.php

 Now making this structure isn't an issue. I can do all of that just
 fine. The place where i'm actually going to make a plugin instance is
 where things get a little more complicated. The PluginLoader simply
 reads all the dirs in the Plugins folder and tries to find a filename
 with the same dir. So if it reads the dir Plugins/PluginOne it will
 try to include the PHP file: Plugins/PluginOne/PluginOne.php. That's
 fine and working.

 To actually make a plugin instance i can do two things that i know of:
 1. use eval like so: eval('$obj = new '.$pluginName.'();'); and
 register it to the PluginLoader.

 No need to use eval, you can simply do this:

 $obj = new $pluginName();

 See here: http://php.net/language.variables.variable

Ahh right, i completely forgot about that option. That might just work
the way i want it :)

 2. Let the plugin itself (so in this case PluginOne.php) open itself
 and register it to the PluginLoader.

 With the first option i have to do eval which i try to avoid if possible.
 With the second solution the PluginLoader probably has to be a singlethon.

 Why does it need to be a singleton?

Well, i would then do something like this from within the included
plugin file after the class:
PluginLoader::getInstance()-registerPlugin(new PluginOne());

Or something alike.

 Now my question is: what is the right way of loading plugins like
 this? Is there some other option then the two i described above? My
 PHP limitations are the newest version so no limitation there :)
 I'm kinda leaning towards the second option now since that seems to be
 quite stable and not very error prone. The eval one is much easier to
 break :p

 If you're happy for each plugin to be in a separate directory then what you 
 have in option 1, minus the eval, will work perfectly well. I don't know what 
 your use case is but if there's a chance a single plugin might want to 
 provide several classes then I'd require an init.php in each plugin folder 
 and have that register the class names with the class loader. It could also 
 then pass along some meta information such as a description of what each 
 class does. If this is for use in web requests you might want to stick to 
 what you currently have as there's a lot less overhead.

Yeah, if i extend it more that will certainly be an requirement.

 -Stuart

 --
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/

Thank you for your advice, really appreciated.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Stuart Dallas
On 27 Aug 2012, at 14:29, Mark mark...@gmail.com wrote:

 On Mon, Aug 27, 2012 at 12:41 PM, Stuart Dallas stu...@3ft9.com wrote:
 On 26 Aug 2012, at 19:42, Mark mark...@gmail.com wrote:
 
 2. Let the plugin itself (so in this case PluginOne.php) open itself
 and register it to the PluginLoader.
 
 With the first option i have to do eval which i try to avoid if possible.
 With the second solution the PluginLoader probably has to be a singlethon.
 
 Why does it need to be a singleton?
 
 Well, i would then do something like this from within the included
 plugin file after the class:
 PluginLoader::getInstance()-registerPlugin(new PluginOne());
 
 Or something alike.

I'm not sure I see what PluginLoader is doing? It makes more sense to me if you 
register like so:

PluginLoader::getInstance()-registerPlugin('PluginOne');

Then you get an instance of the plugin:

$plugin = PluginLoader::getInstance()-factory('PluginOne');

Tho, even then I don't see what the PluginLoader is adding to the party.

 Thank you for your advice, really appreciated.


No probs.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Mark
On Mon, Aug 27, 2012 at 3:46 PM, Stuart Dallas stu...@3ft9.com wrote:
 On 27 Aug 2012, at 14:29, Mark mark...@gmail.com wrote:

 On Mon, Aug 27, 2012 at 12:41 PM, Stuart Dallas stu...@3ft9.com wrote:
 On 26 Aug 2012, at 19:42, Mark mark...@gmail.com wrote:

 2. Let the plugin itself (so in this case PluginOne.php) open itself
 and register it to the PluginLoader.

 With the first option i have to do eval which i try to avoid if possible.
 With the second solution the PluginLoader probably has to be a singlethon.

 Why does it need to be a singleton?

 Well, i would then do something like this from within the included
 plugin file after the class:
 PluginLoader::getInstance()-registerPlugin(new PluginOne());

 Or something alike.

 I'm not sure I see what PluginLoader is doing? It makes more sense to me if 
 you register like so:

 PluginLoader::getInstance()-registerPlugin('PluginOne');

 Then you get an instance of the plugin:

 $plugin = PluginLoader::getInstance()-factory('PluginOne');

 Tho, even then I don't see what the PluginLoader is adding to the party.

Well, i'm making the classes up as i type. I don't actually have a
PluginLoader yet. Or rather, i'm just beginning to make it right now.
What it's doing is very simple. Read through the directory of the
plugins and load every single plugin it finds in memory. Then every
plugin registers the mime types it can handle. That information is
stored in the PluginLoader upon which some other place can call:
PluginLoader::pluginForMime(text/html). Though i still have to take
a good look at that.

But you're right, i can use the factory pattern here.

 Thank you for your advice, really appreciated.


 No probs.

 -Stuart

 --
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Stuart Dallas
On 27 Aug 2012, at 14:52, Mark mark...@gmail.com wrote:

 On Mon, Aug 27, 2012 at 3:46 PM, Stuart Dallas stu...@3ft9.com wrote:
 On 27 Aug 2012, at 14:29, Mark mark...@gmail.com wrote:
 
 On Mon, Aug 27, 2012 at 12:41 PM, Stuart Dallas stu...@3ft9.com wrote:
 On 26 Aug 2012, at 19:42, Mark mark...@gmail.com wrote:
 
 2. Let the plugin itself (so in this case PluginOne.php) open itself
 and register it to the PluginLoader.
 
 With the first option i have to do eval which i try to avoid if possible.
 With the second solution the PluginLoader probably has to be a singlethon.
 
 Why does it need to be a singleton?
 
 Well, i would then do something like this from within the included
 plugin file after the class:
 PluginLoader::getInstance()-registerPlugin(new PluginOne());
 
 Or something alike.
 
 I'm not sure I see what PluginLoader is doing? It makes more sense to me if 
 you register like so:
 
 PluginLoader::getInstance()-registerPlugin('PluginOne');
 
 Then you get an instance of the plugin:
 
 $plugin = PluginLoader::getInstance()-factory('PluginOne');
 
 Tho, even then I don't see what the PluginLoader is adding to the party.
 
 Well, i'm making the classes up as i type. I don't actually have a
 PluginLoader yet. Or rather, i'm just beginning to make it right now.
 What it's doing is very simple. Read through the directory of the
 plugins and load every single plugin it finds in memory. Then every
 plugin registers the mime types it can handle. That information is
 stored in the PluginLoader upon which some other place can call:
 PluginLoader::pluginForMime(text/html). Though i still have to take
 a good look at that.
 
 But you're right, i can use the factory pattern here.


Ahh, I see. Personally I'd go with the following (pseudocode)...

Inside the PluginLoader constructor (or other method)
  foreach (plugindir)
require plugindir/plugindir.php
$plugindir::init($this)

The static init() method calls PluginLoader::registerPlugin('mime/type', 
'PluginClassName'). Then pluginForMime does a lookup for the mime type and 
returns an object of the corresponding type. That way a single plugin can 
support multiple mime types.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Mark
On Mon, Aug 27, 2012 at 4:26 PM, Stuart Dallas stu...@3ft9.com wrote:
 On 27 Aug 2012, at 14:52, Mark mark...@gmail.com wrote:

 On Mon, Aug 27, 2012 at 3:46 PM, Stuart Dallas stu...@3ft9.com wrote:
 On 27 Aug 2012, at 14:29, Mark mark...@gmail.com wrote:

 On Mon, Aug 27, 2012 at 12:41 PM, Stuart Dallas stu...@3ft9.com wrote:
 On 26 Aug 2012, at 19:42, Mark mark...@gmail.com wrote:

 2. Let the plugin itself (so in this case PluginOne.php) open itself
 and register it to the PluginLoader.

 With the first option i have to do eval which i try to avoid if possible.
 With the second solution the PluginLoader probably has to be a 
 singlethon.

 Why does it need to be a singleton?

 Well, i would then do something like this from within the included
 plugin file after the class:
 PluginLoader::getInstance()-registerPlugin(new PluginOne());

 Or something alike.

 I'm not sure I see what PluginLoader is doing? It makes more sense to me if 
 you register like so:

 PluginLoader::getInstance()-registerPlugin('PluginOne');

 Then you get an instance of the plugin:

 $plugin = PluginLoader::getInstance()-factory('PluginOne');

 Tho, even then I don't see what the PluginLoader is adding to the party.

 Well, i'm making the classes up as i type. I don't actually have a
 PluginLoader yet. Or rather, i'm just beginning to make it right now.
 What it's doing is very simple. Read through the directory of the
 plugins and load every single plugin it finds in memory. Then every
 plugin registers the mime types it can handle. That information is
 stored in the PluginLoader upon which some other place can call:
 PluginLoader::pluginForMime(text/html). Though i still have to take
 a good look at that.

 But you're right, i can use the factory pattern here.


 Ahh, I see. Personally I'd go with the following (pseudocode)...

 Inside the PluginLoader constructor (or other method)
   foreach (plugindir)
 require plugindir/plugindir.php
 $plugindir::init($this)

 The static init() method calls PluginLoader::registerPlugin('mime/type', 
 'PluginClassName'). Then pluginForMime does a lookup for the mime type and 
 returns an object of the corresponding type. That way a single plugin can 
 support multiple mime types.

 -Stuart

 --
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/

That sounds sane and i probably go for that :)
Thanks for clarifying it a little.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Larry Garfield

On 8/27/12 4:09 PM, Mark wrote:

On Mon, Aug 27, 2012 at 4:26 PM, Stuart Dallas stu...@3ft9.com wrote:



2. Let the plugin itself (so in this case PluginOne.php) open itself
and register it to the PluginLoader.

With the first option i have to do eval which i try to avoid if possible.
With the second solution the PluginLoader probably has to be a singlethon.


Why does it need to be a singleton?


Well, i would then do something like this from within the included
plugin file after the class:
PluginLoader::getInstance()-registerPlugin(new PluginOne());

Or something alike.


I'm not sure I see what PluginLoader is doing? It makes more sense to me if you 
register like so:

PluginLoader::getInstance()-registerPlugin('PluginOne');

Then you get an instance of the plugin:

$plugin = PluginLoader::getInstance()-factory('PluginOne');

Tho, even then I don't see what the PluginLoader is adding to the party.


Well, i'm making the classes up as i type. I don't actually have a
PluginLoader yet. Or rather, i'm just beginning to make it right now.
What it's doing is very simple. Read through the directory of the
plugins and load every single plugin it finds in memory. Then every
plugin registers the mime types it can handle. That information is
stored in the PluginLoader upon which some other place can call:
PluginLoader::pluginForMime(text/html). Though i still have to take
a good look at that.

But you're right, i can use the factory pattern here.



Ahh, I see. Personally I'd go with the following (pseudocode)...

Inside the PluginLoader constructor (or other method)
   foreach (plugindir)
 require plugindir/plugindir.php
 $plugindir::init($this)

The static init() method calls PluginLoader::registerPlugin('mime/type', 
'PluginClassName'). Then pluginForMime does a lookup for the mime type and 
returns an object of the corresponding type. That way a single plugin can 
support multiple mime types.

-Stuart

--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


That sounds sane and i probably go for that :)
Thanks for clarifying it a little.


You should never be calling require() yourself.  Just follow the PSR-0 
naming standard and use an autoloader, then you don't have to even think 
about it.  There are many existing autoloaders you can use, including 
Composer's, Symfony2's, and probably Zend has one as well.


Also, the key question is how you'll be mapping your situation to the 
plugin you need.  If it's fairly hard-coded (i.e., mime type of foo = 
class Bar), then just use a simple dependency injection container like 
Pimple.  If it's more complex and situational, then yes a factory is the 
easiest approach.


--Larry Garfield

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Matijn Woudt
On Tue, Aug 28, 2012 at 12:58 AM, Larry Garfield la...@garfieldtech.com wrote:
 On 8/27/12 4:09 PM, Mark wrote:

 On Mon, Aug 27, 2012 at 4:26 PM, Stuart Dallas stu...@3ft9.com wrote:


 2. Let the plugin itself (so in this case PluginOne.php) open itself
 and register it to the PluginLoader.

 With the first option i have to do eval which i try to avoid if
 possible.
 With the second solution the PluginLoader probably has to be a
 singlethon.


 Why does it need to be a singleton?


 Well, i would then do something like this from within the included
 plugin file after the class:
 PluginLoader::getInstance()-registerPlugin(new PluginOne());

 Or something alike.


 I'm not sure I see what PluginLoader is doing? It makes more sense to
 me if you register like so:

 PluginLoader::getInstance()-registerPlugin('PluginOne');

 Then you get an instance of the plugin:

 $plugin = PluginLoader::getInstance()-factory('PluginOne');

 Tho, even then I don't see what the PluginLoader is adding to the
 party.


 Well, i'm making the classes up as i type. I don't actually have a
 PluginLoader yet. Or rather, i'm just beginning to make it right now.
 What it's doing is very simple. Read through the directory of the
 plugins and load every single plugin it finds in memory. Then every
 plugin registers the mime types it can handle. That information is
 stored in the PluginLoader upon which some other place can call:
 PluginLoader::pluginForMime(text/html). Though i still have to take
 a good look at that.

 But you're right, i can use the factory pattern here.



 Ahh, I see. Personally I'd go with the following (pseudocode)...

 Inside the PluginLoader constructor (or other method)
foreach (plugindir)
  require plugindir/plugindir.php
  $plugindir::init($this)

 The static init() method calls PluginLoader::registerPlugin('mime/type',
 'PluginClassName'). Then pluginForMime does a lookup for the mime type and
 returns an object of the corresponding type. That way a single plugin can
 support multiple mime types.

 -Stuart

 --
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/


 That sounds sane and i probably go for that :)
 Thanks for clarifying it a little.


 You should never be calling require() yourself.  Just follow the PSR-0
 naming standard and use an autoloader, then you don't have to even think
 about it.  There are many existing autoloaders you can use, including
 Composer's, Symfony2's, and probably Zend has one as well.


I believe there's one in PHP by default now called SPLClassLoader or
something like that..

- Matijn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to make a dynamic plugin architecture?

2012-08-27 Thread Larry Garfield

On 8/27/12 6:11 PM, Matijn Woudt wrote:


You should never be calling require() yourself.  Just follow the PSR-0
naming standard and use an autoloader, then you don't have to even think
about it.  There are many existing autoloaders you can use, including
Composer's, Symfony2's, and probably Zend has one as well.



I believe there's one in PHP by default now called SPLClassLoader or
something like that..

- Matijn


There was a proposal for one, but it was never added.  You still need a 
user-space class loader for PSR-0, but they're readily available.


--Larry Garfield

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-29 Thread Marc Guay
 You mean everyone finally RTFM?

There's a manual?  GoDaddy told me to just ask all of my questions here!


(No insult meant, in case it's not obvious.)

Happy Fridays
Marc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-28 Thread tamouse mailing lists
On Wed, Jun 27, 2012 at 9:42 AM, Tedd Sperling t...@sperling.com wrote:
 On Jun 26, 2012, at 3:21 PM, Al n...@ridersite.org wrote:

 No postings for days.


 Maybe everyone learned it -- no new questions.

 Cheers,

 tedd

We now all have php.net open all the time so no more questions need to
be asked! :

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-28 Thread Daniel Fenn
Or everyone is on holiday for php :P






On Fri, Jun 29, 2012 at 10:43 AM, tamouse mailing lists
tamouse.li...@gmail.com wrote:
 On Wed, Jun 27, 2012 at 9:42 AM, Tedd Sperling t...@sperling.com wrote:
 On Jun 26, 2012, at 3:21 PM, Al n...@ridersite.org wrote:

 No postings for days.


 Maybe everyone learned it -- no new questions.

 Cheers,

 tedd

 We now all have php.net open all the time so no more questions need to
 be asked! :

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




Re: [PHP] What's happened to our newsgroup?

2012-06-28 Thread Jay Blanchard

[snip]
We now all have php.net open all the time so no more questions need to 
be asked! :

[/snip]

You mean everyone finally RTFM?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-27 Thread Tedd Sperling
On Jun 26, 2012, at 3:21 PM, Al n...@ridersite.org wrote:

 No postings for days.
 

Maybe everyone learned it -- no new questions.

Cheers,

tedd

_
t...@sperling.com
http://sperling.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Govinda

 No postings for days.

everyone RTFM? 
:-)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Steven Staples

 -Original Message-
 From: Govinda [mailto:govinda.webdnat...@gmail.com]
 Sent: June 26, 2012 3:25 PM
 To: PHP-General List
 Subject: Re: [PHP] What's happened to our newsgroup?
 
 
  No postings for days.
 
 everyone RTFM?
 :-)
 
 

Maybe they joined the British mailing list?


Steven Staples


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread TR Shaw

On Jun 26, 2012, at 3:28 PM, Steven Staples wrote:

 
 -Original Message-
 From: Govinda [mailto:govinda.webdnat...@gmail.com]
 Sent: June 26, 2012 3:25 PM
 To: PHP-General List
 Subject: Re: [PHP] What's happened to our newsgroup?
 
 
 No postings for days.
 
 everyone RTFM?
 :-)
 
 
 
 Maybe they joined the British mailing list?
 

Maybe its just the summer.

Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Larry Martell
On Tue, Jun 26, 2012 at 1:30 PM, TR Shaw ts...@oitc.com wrote:

 On Jun 26, 2012, at 3:28 PM, Steven Staples wrote:


 -Original Message-
 From: Govinda [mailto:govinda.webdnat...@gmail.com]
 Sent: June 26, 2012 3:25 PM
 To: PHP-General List
 Subject: Re: [PHP] What's happened to our newsgroup?


 No postings for days.

 everyone RTFM?
 :-)



 Maybe they joined the British mailing list?


 Maybe its just the summer.

Maybe they're working in Django now (like I am).

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Marc Guay
Everyone switched to PCP?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Ashley Sheridan
On Tue, 2012-06-26 at 15:42 -0400, Marc Guay wrote:

 Everyone switched to PCP?
 


I wonder if the thing that happened to your newsgroup has also happened
to this mailing list? :p

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




RE: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Jen Rasmussen
LOL

-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
Sent: Tuesday, June 26, 2012 3:13 PM
To: Marc Guay
Cc: php-general@lists.php.net
Subject: Re: [PHP] What's happened to our newsgroup?

On Tue, 2012-06-26 at 15:42 -0400, Marc Guay wrote:

 Everyone switched to PCP?
 


I wonder if the thing that happened to your newsgroup has also happened to this 
mailing list? :p

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




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Jason Pruim

On Jun 26, 2012, at 4:15 PM, Jen Rasmussen j...@cetaceasound.com wrote:

 LOL
 
 -Original Message-
 From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] 
 Sent: Tuesday, June 26, 2012 3:13 PM
 To: Marc Guay
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] What's happened to our newsgroup?
 
 On Tue, 2012-06-26 at 15:42 -0400, Marc Guay wrote:
 
 Everyone switched to PCP?
 
 
 
 I wonder if the thing that happened to your newsgroup has also happened to 
 this mailing list? :p

We can't talk like this! It's not even Friday yet!!! ;)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Matijn Woudt
On Tue, Jun 26, 2012 at 11:39 PM, Jason Pruim
li...@pruimphotography.com wrote:

 On Jun 26, 2012, at 4:15 PM, Jen Rasmussen j...@cetaceasound.com wrote:

 LOL

 -Original Message-
 From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
 Sent: Tuesday, June 26, 2012 3:13 PM
 To: Marc Guay
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] What's happened to our newsgroup?

 On Tue, 2012-06-26 at 15:42 -0400, Marc Guay wrote:

 Everyone switched to PCP?



 I wonder if the thing that happened to your newsgroup has also happened to 
 this mailing list? :p

 We can't talk like this! It's not even Friday yet!!! ;)



Isn't everyday friday in summer? ;)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Daniel Brown
On Tue, Jun 26, 2012 at 5:42 PM, Matijn Woudt tijn...@gmail.com wrote:

 Isn't everyday friday in summer? ;)

If it is, then it could be argued that every day is a Monday in
winter --- and right now, those poor folks in the southern hemisphere
(I'm looking at you, Thiago Pojda) are in a season of endless Mondays.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Simon J Welsh

On 27/06/2012, at 9:45 AM, Daniel Brown wrote:

 On Tue, Jun 26, 2012 at 5:42 PM, Matijn Woudt tijn...@gmail.com wrote:
 
 Isn't everyday friday in summer? ;)
 
If it is, then it could be argued that every day is a Monday in
 winter --- and right now, those poor folks in the southern hemisphere
 (I'm looking at you, Thiago Pojda) are in a season of endless Mondays.
 
 -- 
 /Daniel P. Brown


So glad I take Mondays off then.
---
Simon Welsh
Admin of http://simon.geek.nz/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Stefan Wixfort

On 26.06.2012 23:48, Simon J Welsh wrote:


On 27/06/2012, at 9:45 AM, Daniel Brown wrote:


On Tue, Jun 26, 2012 at 5:42 PM, Matijn Woudt tijn...@gmail.com wrote:


Isn't everyday friday in summer? ;)


If it is, then it could be argued that every day is a Monday in
winter --- and right now, those poor folks in the southern hemisphere
(I'm looking at you, Thiago Pojda) are in a season of endless Mondays.

--
/Daniel P. Brown



So glad I take Mondays off then.


Clever gi... er guy...



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread tamouse mailing lists
On Jun 26, 2012 5:31 PM, Stefan Wixfort stefan.wixf...@gmx.de wrote:

 On 26.06.2012 23:48, Simon J Welsh wrote:


 On 27/06/2012, at 9:45 AM, Daniel Brown wrote:

 On Tue, Jun 26, 2012 at 5:42 PM, Matijn Woudt tijn...@gmail.com wrote:


 Isn't everyday friday in summer? ;)


If it is, then it could be argued that every day is a Monday in
 winter --- and right now, those poor folks in the southern hemisphere
 (I'm looking at you, Thiago Pojda) are in a season of endless Mondays.

 --
 /Daniel P. Brown



 So glad I take Mondays off then.


 Clever gi... er guy...




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


Oh you know randall is all over this: http://xkcd.com/1073/


Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Matijn Woudt
On Tue, Jun 26, 2012 at 11:45 PM, Daniel Brown danbr...@php.net wrote:
 On Tue, Jun 26, 2012 at 5:42 PM, Matijn Woudt tijn...@gmail.com wrote:

 Isn't everyday friday in summer? ;)

    If it is, then it could be argued that every day is a Monday in
 winter --- and right now, those poor folks in the southern hemisphere
 (I'm looking at you, Thiago Pojda) are in a season of endless Mondays.


That sounds fair, the winters feel like endless Mondays...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re: Re: [PHP] What's Your Favorite Design Pattern?

2012-02-10 Thread Jeremiah Dodds
On Wed, Feb 8, 2012 at 12:48 PM, Paul M Foster pa...@quillandmouse.com wrote:
 Um, yeah. It's very meta.

 (That's what I love about The C Programming Language. It's a little
 over half an inch thick in paperback, explains the whole language
 clearly and concisely, and has barely been revised since 1988. I'm not
 sure you could ask for more in a technical book.)

The C Programming Language is an exemplary language book -- it's
well-laid-out, and you can pick it up as a complete novice and end up
with enough of a grounding to get you going.

I don't share quite your level of distaste for Design Patterns, or the
GoF book. I found it pretty useful to read through, and was introduced
to some interesting ways of solving problems I had seen before. Minus
Singleton ;) I also found reading through the first part of the book
to be pretty enlightening. It's more than possible that a lot of the
benefit that I got from the book came from the experience-level I was
at when I read it -- I hadn't worked on any systems that I couldn't
fit entirely in my head at the time.

Most of the problems I've had with code that uses design patterns
have been with code where the authors used the patterns in a
prescriptive manner -- like they were looking for ways to fit their
problem into a neat architecture that they didn't need and didn't
understand. I don't think they were (or are) meant to be used in that
manner, they're supposed to be part of a shared language for
high-level patterns used to solve particular families of architecture
issues when they're needed. Letting the existing names and
implementations and suggested use-cases of design patterns dictate
your codebase is a recipe for disaster.

I also happen to agree with the idea that the existence of design
patterns can be a language-deficiency smell, but hey, we don't always
get to work with the languages we prefer to work with.

Anyhow, that's my two cents.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re: Re: [PHP] What's Your Favorite Design Pattern?

2012-02-08 Thread Tim Streater
On 07 Feb 2012 at 22:31, Paul M Foster pa...@quillandmouse.com wrote: 

 Design Patterns are Way Nifty Kewl patterns of code which are supposed
 to facilitate certain types of operations. (Was that sarcasm you
 detected? Yes it was.)

 For example, the Singleton pattern. Let's say you had a configuration
 class that held the configuration values for your application, and you
 wanted to make sure there was only one object of that class
 instantiated, no matter how many times it was called in your code. You'd
 arrange the code and call the class in a certain way to ensure that only
 one object of that class resulted. To make your configuration class a
 singleton, you'd probably make the class have a *private* constructor
 (so no outside routine could call it), and then provide a method called
 get_instance() which tested for the existence of an object of that
 class. If such an instance was found, someone calling
 configuration::get_instance() would simply get the existing object
 returned to them. Otherwise, configuration::get_instance() would
 instantiate the class and then return the new object to the caller.

 As you can see, that's a peculiar way of setting up your code for a
 specific purpose. Other design patterns do other things and dictate
 setting up things in other ways.

 The definitive work on this (and where it first gained the most
 publicity) is a book called Design Patterns by four authors (Gamma,
 Helm, Johnson and Vlissides). It essentially contains a chapter about
 each (known at the time) design pattern and some pseudocode about how it
 might be constructed. I imagine the authors looked at a lot of code and
 discovered that programmers were coming up with code that, in each case
 was remarkably similar for solving certain types of programming
 problems. So they codified what that found and wrote a book about it.

 I have the book on my shelf, and it's decent technology, but you could
 spend your whole career and never use any of it, and get along just
 fine.

Mmmm. Well, at this point I feel underwhelmed - but its entirely possible that 
I'm missing something profound [1]. After looking at some of the reviews of the 
book you mention on Amazon, I might be inclined to get a simpler intro.

[1] In June 1982 (or was it '83?) I visited PARC with a small group from SLAC. 
We saw the Star or whatever it was, with bit-mapped display and mouse pointer. 
Whoosh !! (Well, to be fair, we'd gone along to look into XNS).

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: Re: [PHP] What's Your Favorite Design Pattern?

2012-02-08 Thread Paul M Foster
On Wed, Feb 08, 2012 at 02:25:00PM +, Tim Streater wrote:


[snip]

 
 Mmmm. Well, at this point I feel underwhelmed - but its entirely
 possible that I'm missing something profound [1]. 


Not really. 

 After looking at some of the reviews of the book you mention on
 Amazon, I might be inclined to get a simpler intro.

Um, yeah. It's very meta. 

(That's what I love about The C Programming Language. It's a little
over half an inch thick in paperback, explains the whole language
clearly and concisely, and has barely been revised since 1988. I'm not
sure you could ask for more in a technical book.)

 
 [1] In June 1982 (or was it '83?) I visited PARC with a small group
 from SLAC. We saw the Star or whatever it was, with bit-mapped display
 and mouse pointer. Whoosh !! (Well, to be fair, we'd gone along to
 look into XNS).
 

I remember working for Xerox (copy center employee) around that time,
and seeing all kinds of talk in the company materials about *Ethernet*.
They explained the basic protocol and compared it to token ring, and I
just thought, Hmm, yes, that seems like a pretty clever way to go about
networking.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread admin
 -Original Message-
 From: Mike Mackintosh [mailto:mike.mackint...@angrystatic.com]
 Sent: Tuesday, February 07, 2012 1:57 PM
 To: PHP General List
 Subject: [PHP] What's Your Favorite Design Pattern?
 
 I was curious to see what everyones favorite design patterns were, if
 you use any, and why/when have you used it?
 
 Choices include slots and signals (observer), singleton, mvc, hmvc,
 factory, commander etc..
 
 Thanks,
 
 --
 Mike Mackintosh
 PHP, the drug of choice - www.highonphp.com
 
 


MVC because it allows the most flexibility and I use it every day.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Adam Richardson
On Tue, Feb 7, 2012 at 1:56 PM, Mike Mackintosh 
mike.mackint...@angrystatic.com wrote:

 I was curious to see what everyones favorite design patterns were, if you
 use any, and why/when have you used it?

 Choices include slots and signals (observer), singleton, mvc, hmvc,
 factory, commander etc..


Higher-order functions:

http://programmers.stackexchange.com/questions/72557/how-do-you-design-programs-in-haskell-or-other-functional-programming-languages

Adam

-- 
Nephtali:  A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com


Re: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Fatih P.
mostly MVC, Singleton and Factory. depends on requirements.


Re: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Daniel Brown
On Tue, Feb 7, 2012 at 13:56, Mike Mackintosh
mike.mackint...@angrystatic.com wrote:
 I was curious to see what everyones favorite design patterns were, if you use 
 any, and why/when have you used it?

 Choices include slots and signals (observer), singleton, mvc, hmvc, factory, 
 commander etc..

Mine is apparently CPSV (Commentless Procedural Spaghetti Vomit),
as that's what I encounter no less than 80% of the time in the wild.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Bastien

On 2012-02-07, at 2:34 PM, Daniel Brown danbr...@php.net wrote:

 On Tue, Feb 7, 2012 at 13:56, Mike Mackintosh
 mike.mackint...@angrystatic.com wrote:
 I was curious to see what everyones favorite design patterns were, if you 
 use any, and why/when have you used it?
 
 Choices include slots and signals (observer), singleton, mvc, hmvc, factory, 
 commander etc..
 
Mine is apparently CPSV (Commentless Procedural Spaghetti Vomit),
 as that's what I encounter no less than 80% of the time in the wild.
 
 -- 
 /Daniel P. Brown
 Network Infrastructure Manager
 http://www.php.net/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

I think you should trademark that, Dan 

Bastien Koert
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Tim Streater
On 07 Feb 2012 at 19:34, Daniel Brown danbr...@php.net wrote: 

 On Tue, Feb 7, 2012 at 13:56, Mike Mackintosh
 mike.mackint...@angrystatic.com wrote:
 I was curious to see what everyones favorite design patterns were, if you use
 any, and why/when have you used it?

 Choices include slots and signals (observer), singleton, mvc, hmvc, factory,
 commander etc..

Mine is apparently CPSV (Commentless Procedural Spaghetti Vomit),
 as that's what I encounter no less than 80% of the time in the wild.

Since I have no idea what anyone is talking about, I can only conclude that 
you're playing Mornington Crescent (q.v.), on a non-standard board.

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Paul M Foster
On Tue, Feb 07, 2012 at 09:02:00PM +, Tim Streater wrote:

 On 07 Feb 2012 at 19:34, Daniel Brown danbr...@php.net wrote: 
 
  On Tue, Feb 7, 2012 at 13:56, Mike Mackintosh
  mike.mackint...@angrystatic.com wrote:
  I was curious to see what everyones favorite design patterns were, if you 
  use
  any, and why/when have you used it?
 
  Choices include slots and signals (observer), singleton, mvc, hmvc, 
  factory,
  commander etc..
 
 Mine is apparently CPSV (Commentless Procedural Spaghetti Vomit),
  as that's what I encounter no less than 80% of the time in the wild.
 
 Since I have no idea what anyone is talking about, I can only conclude that 
 you're playing Mornington Crescent (q.v.), on a non-standard board.
 
 --
 Cheers  --  Tim
 

Design Patterns are Way Nifty Kewl patterns of code which are supposed
to facilitate certain types of operations. (Was that sarcasm you
detected? Yes it was.)

For example, the Singleton pattern. Let's say you had a configuration
class that held the configuration values for your application, and you
wanted to make sure there was only one object of that class
instantiated, no matter how many times it was called in your code. You'd
arrange the code and call the class in a certain way to ensure that only
one object of that class resulted. To make your configuration class a
singleton, you'd probably make the class have a *private* constructor
(so no outside routine could call it), and then provide a method called
get_instance() which tested for the existence of an object of that
class. If such an instance was found, someone calling
configuration::get_instance() would simply get the existing object
returned to them. Otherwise, configuration::get_instance() would
instantiate the class and then return the new object to the caller.

As you can see, that's a peculiar way of setting up your code for a
specific purpose. Other design patterns do other things and dictate
setting up things in other ways.

The definitive work on this (and where it first gained the most
publicity) is a book called Design Patterns by four authors (Gamma,
Helm, Johnson and Vlissides). It essentially contains a chapter about
each (known at the time) design pattern and some pseudocode about how it
might be constructed. I imagine the authors looked at a lot of code and
discovered that programmers were coming up with code that, in each case
was remarkably similar for solving certain types of programming
problems. So they codified what that found and wrote a book about it.

I have the book on my shelf, and it's decent technology, but you could
spend your whole career and never use any of it, and get along just
fine. 

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Tommy Pham
On Tue, Feb 7, 2012 at 2:31 PM, Paul M Foster pa...@quillandmouse.com wrote:
 On Tue, Feb 07, 2012 at 09:02:00PM +, Tim Streater wrote:

 On 07 Feb 2012 at 19:34, Daniel Brown danbr...@php.net wrote:

  On Tue, Feb 7, 2012 at 13:56, Mike Mackintosh
  mike.mackint...@angrystatic.com wrote:
  I was curious to see what everyones favorite design patterns were, if you 
  use
  any, and why/when have you used it?
 
  Choices include slots and signals (observer), singleton, mvc, hmvc, 
  factory,
  commander etc..
 
     Mine is apparently CPSV (Commentless Procedural Spaghetti Vomit),
  as that's what I encounter no less than 80% of the time in the wild.

 Since I have no idea what anyone is talking about, I can only conclude that 
 you're playing Mornington Crescent (q.v.), on a non-standard board.

 --
 Cheers  --  Tim


 Design Patterns are Way Nifty Kewl patterns of code which are supposed
 to facilitate certain types of operations. (Was that sarcasm you
 detected? Yes it was.)

 For example, the Singleton pattern. Let's say you had a configuration
 class that held the configuration values for your application, and you
 wanted to make sure there was only one object of that class
 instantiated, no matter how many times it was called in your code. You'd
 arrange the code and call the class in a certain way to ensure that only
 one object of that class resulted. To make your configuration class a
 singleton, you'd probably make the class have a *private* constructor
 (so no outside routine could call it), and then provide a method called
 get_instance() which tested for the existence of an object of that
 class. If such an instance was found, someone calling
 configuration::get_instance() would simply get the existing object
 returned to them. Otherwise, configuration::get_instance() would
 instantiate the class and then return the new object to the caller.

 As you can see, that's a peculiar way of setting up your code for a
 specific purpose. Other design patterns do other things and dictate
 setting up things in other ways.


Here's a code example of the above explanation:

http://pastebin.com/mTrybi6u

HTH,
Tommy


 The definitive work on this (and where it first gained the most
 publicity) is a book called Design Patterns by four authors (Gamma,
 Helm, Johnson and Vlissides). It essentially contains a chapter about
 each (known at the time) design pattern and some pseudocode about how it
 might be constructed. I imagine the authors looked at a lot of code and
 discovered that programmers were coming up with code that, in each case
 was remarkably similar for solving certain types of programming
 problems. So they codified what that found and wrote a book about it.

 I have the book on my shelf, and it's decent technology, but you could
 spend your whole career and never use any of it, and get along just
 fine.

 Paul

 --
 Paul M. Foster
 http://noferblatz.com
 http://quillandmouse.com

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



Re: [PHP] What's the problem with this PHP code?

2011-11-04 Thread shiplu
On Fri, Nov 4, 2011 at 1:47 PM, Sophia red_an...@techno-info.com wrote:

 Here is the PHP code:


 ?php


 $panka =c:can-it-rock-
:the-boat-of-
 :love-  ;

 $pankb = preg_split(':',$panka);


It should be preg_split('/:/', $panka);



 $pankc = $pankb{1};

 echo ( . $panka . )\n( . $pankc . )\n;


 ?






 I keep getting the following error:

 Sophia-Shapiras-MacBook-Pro:**tmp red_angel$
 Sophia-Shapiras-MacBook-Pro:**tmp red_angel$ php testo.php

 Warning: preg_split(): No ending delimiter ':' found in
 /Users/red_angel/tmp/testo.php on line 8
 (   c:can-it-rock-
:the-boat-of-
 :love-  )
 ()
 Sophia-Shapiras-MacBook-Pro:**tmp red_angel$
 Sophia-Shapiras-MacBook-Pro:**tmp red_angel$




 So --- what am I missing? What am I doing wrong? I'm pulling my hair out
 over this one! Anyone have a clue what's up? I can see that the colon is
 present *multiple* times in the string that is meant to be split! How come
 PHP's preg_split() function can't see it?

 Thanks,
 Sophia

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Shiplu Mokadd.im
Follow me, http://twitter.com/shiplu
Innovation distinguishes between follower and leader


Re: [PHP] What's the problem with this PHP code?

2011-11-04 Thread tamouse mailing lists
On Fri, Nov 4, 2011 at 2:52 AM, shiplu shiplu@gmail.com wrote:
 On Fri, Nov 4, 2011 at 1:47 PM, Sophia red_an...@techno-info.com wrote:

 Here is the PHP code:


 ?php


 $panka =    c:can-it-rock-
    :the-boat-of-
 :love-  ;

 $pankb = preg_split(':',$panka);


 It should be preg_split('/:/', $panka);

Maybe just to unpack this a bit more, preg_split expects a regex in
the first parameter. When you said ':' it thought that you were
beginning a regex form with the colon and expected to find another one
to end the regex. when you do it this way, regexes have to be quoted
as well, as they are strings.





 $pankc = $pankb{1};

 echo ( . $panka . )\n( . $pankc . )\n;


 ?






 I keep getting the following error:

 Sophia-Shapiras-MacBook-Pro:**tmp red_angel$
 Sophia-Shapiras-MacBook-Pro:**tmp red_angel$ php testo.php

 Warning: preg_split(): No ending delimiter ':' found in
 /Users/red_angel/tmp/testo.php on line 8
 (   c:can-it-rock-
    :the-boat-of-
 :love-  )
 ()
 Sophia-Shapiras-MacBook-Pro:**tmp red_angel$
 Sophia-Shapiras-MacBook-Pro:**tmp red_angel$




 So --- what am I missing? What am I doing wrong? I'm pulling my hair out
 over this one! Anyone have a clue what's up? I can see that the colon is
 present *multiple* times in the string that is meant to be split! How come
 PHP's preg_split() function can't see it?

 Thanks,
 Sophia

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




 --
 Shiplu Mokadd.im
 Follow me, http://twitter.com/shiplu
 Innovation distinguishes between follower and leader


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what's wrong with this php system

2011-08-08 Thread Sharl.Jimh.Tsin
在 2011-08-08一的 14:30 +0800,smith jack写道:
 I have installed a php system on my pc, it works well, except the head
 of the page is a bit strange, there is some warning information, and
 occupies lot of space,
 what's wrong,  the error information is as follows:
 Warning: Parameter 1 to Notice::onPrint() expected to be a reference,
 value given in E:\site\admin.php on line 481
 
it is not matter of PHP,it is your php project's problem.

or you can disable the error print in php.ini file.

-- 
Best regards,
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)

Using Gmail? Please read this important notice:
http://www.fsf.org/campaigns/jstrap/gmail?10073.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's up with Quercus?

2011-05-28 Thread Nathan Nobbe
On Fri, May 27, 2011 at 11:52 PM, Arnold Hesnod ahes...@mindvox.com wrote:

 Although I've been mostly using Java and Ruby in my professional software
 development work for the past decade or so, in the past two or three years
 I've started to do more and more PHP.  I originally started using PHP
 because I needed to set-up and customize Drupal for a project.  Although as
 a programmer I've come to feel comfortable writing PHP code, I still don't
 feel like I have a good sense of where PHP is going as a platform and what's
 it's future is.  As the Drupal site has continued to grow both in terms of
 features and usage, it's become clear that this is something that I need to
 research and educate myself about.

 That led me to give a closer look at Quercus, the implementation of PHP 5
 that runs on top of the JVM.  I'd already heard about it somewhere along the
 line, but it's only in the past couple of weeks that I've actually pulled it
 down, read through the documentation and some of the source and tried it
 out.  So far I'm pretty impressed and enthusiastic about it.  The
 cancellation of PHP 6 combined with the steady trickle of PHP-related bugs
 and security vulnerabilities that have become public over the past few years
 had made me very nervous about the future of the platform.  Having an
 open-source implementation of PHP that runs on the JVM, which is like the
 gold standard for server application performance and reliability, is
 reassuring.  The fact that it makes it easy and fast to use the huge library
 of Java frameworks out there in your PHP applications doesn't hurt either.


first off quercus is not 'the' implementation of php running on the jvm,
it's 'an' implementation.  ibm project 0 is another

http://www.projectzero.org/

and there may be more.  also, java is fast, but php applications can be made
fast as well, when it comes to serving web pages.  there are times when i
would consider implementing some domain logic in something like java for
speed, but for delivering applications on the web, php is very useful and
practical in terms of performance.


 Although I've had great results so far in my experiments with Quercus, I'm
 curious to hear about other PHP developers' experiences with it.  Even
 though it seems like a significant number of people are using it for
 production applications, I'm curious why it's adoption isn't even higher
 than it is?  Given the difficulties of writing a Virtual Machine, it seems
 like leveraging the JVM is a no brainer.  Is there some technical drawback
 that I'm unaware of or is it just a case of inertia?


a lot of projects are mating their favorite language w/ the jvm which does
seem like a great idea, but one of the main drawbacks is the pace of feature
additions w/ the 'real' version of the project.  when i looked into quercus
a few years ago there wasn't support for things like spl and i'm not sure
where they stand w/ 5.3 features like closures and namespaces. not only that
but on any given minor release of php where is the parallel from quercus.
 also, the professional version of resin costs money.

these are probly the main reasons why the resin community isn't blowing up.

-nathan


Re: [PHP] What's faster using if else or arrays?

2011-04-30 Thread Stuart Dallas
On Saturday, 30 April 2011 at 03:17, Tamara Temple wrote:

 On Apr 29, 2011, at 8:32 AM, Robert Cummings wrote:
 
  On 11-04-29 08:04 AM, Steve Staples wrote:
   On Thu, 2011-04-28 at 19:19 -0400, Robert Cummings wrote:
On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote:
 Thanks switch and case seems to be more faster for the job and a 
 lot cleaner
 --Original Message--
 From: Andre Polykanine
 To: dholmes1...@gmail.com
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] What's faster using if else or arrays?
 Sent: Apr 28, 2011 6:17 PM
 
 Hello Dholmes1031,
 
 I would write it like this:
 switch($foo) {
  case 5: $dothis; break;
 case 3: $dothat; break;
 default: $donothing; break;
 }

This sounds like a job for *dun dun dun* GOTO!

Kidding, of course ;)

Cheers,
Rob.
--
   
   you should be removed and banned from this list for even just 
   THINKING
   about using a GOTO! :P
   
   (yes, there are still *SOME* (and i use that loosely) benefits to the
   GOTO command, but in reality, no.)
 
 People, people, don't you realize that break IS a goto?? It's just one 
 of limited scope.

By that logic, so is a function call.

Hey, hey... what do you call a group of gotos?

.

.

.

A CLASS!! Bwhahahahahahahahaha. Not!

Happy Saturday all :)

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's faster using if else or arrays?

2011-04-29 Thread Steve Staples
On Thu, 2011-04-28 at 19:19 -0400, Robert Cummings wrote:
 On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote:
  Thanks switch and case seems to be more faster for the job and a lot cleaner
  --Original Message--
  From: Andre Polykanine
  To: dholmes1...@gmail.com
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] What's faster using if else or arrays?
  Sent: Apr 28, 2011 6:17 PM
 
  Hello Dholmes1031,
 
  I would write it like this:
  switch($foo) {
  case 5: $dothis; break;
  case 3: $dothat; break;
  default: $donothing; break;
  }
 
 This sounds like a job for *dun dun dun* GOTO!
 
 Kidding, of course ;)
 
 Cheers,
 Rob.
 -- 

you should be removed and banned from this list for even just THINKING
about using a GOTO!  :P

(yes, there are still *SOME* (and i use that loosely) benefits to the
GOTO command, but in reality, no.)

Steve


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's faster using if else or arrays?

2011-04-29 Thread Robert Cummings

On 11-04-29 08:04 AM, Steve Staples wrote:

On Thu, 2011-04-28 at 19:19 -0400, Robert Cummings wrote:

On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote:

Thanks switch and case seems to be more faster for the job and a lot cleaner
--Original Message--
From: Andre Polykanine
To: dholmes1...@gmail.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] What's faster using if else or arrays?
Sent: Apr 28, 2011 6:17 PM

Hello Dholmes1031,

I would write it like this:
switch($foo) {
 case 5: $dothis; break;
case 3: $dothat; break;
default: $donothing; break;
}


This sounds like a job for *dun dun dun* GOTO!

Kidding, of course ;)

Cheers,
Rob.
--


you should be removed and banned from this list for even just THINKING
about using a GOTO!  :P

(yes, there are still *SOME* (and i use that loosely) benefits to the
GOTO command, but in reality, no.)


I've written parsers in the past that would have benefited greatly from 
GOTO. So, in reality (for me anyways), yes. Also, tracking state 
variables or using break with level parameter to escape from multi level 
loops isn't any clearer than a goto, so sometimes its succinctness adds 
clarity to the code making maintenance simpler. But obviously the above 
was in jest :)


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's faster using if else or arrays?

2011-04-29 Thread tedd

At 7:19 PM -0400 4/28/11, Robert Cummings wrote:

On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote:

Thanks switch and case seems to be more faster for the job and a lot cleaner
Hello Dholmes1031,

I would write it like this:
switch($foo) {
case 5: $dothis; break;
case 3: $dothat; break;
default: $donothing; break;
}


This sounds like a job for *dun dun dun* GOTO!

Kidding, of course ;)

Cheers,
Rob.


Rob:

Actually, goto could be used for this -- but I would rather use switch.

Cheers,

tedd

--
---
http://sperling.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's faster using if else or arrays?

2011-04-29 Thread Tamara Temple


On Apr 29, 2011, at 8:32 AM, Robert Cummings wrote:


On 11-04-29 08:04 AM, Steve Staples wrote:

On Thu, 2011-04-28 at 19:19 -0400, Robert Cummings wrote:

On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote:
Thanks switch and case seems to be more faster for the job and a  
lot cleaner

--Original Message--
From: Andre Polykanine
To: dholmes1...@gmail.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] What's faster using if else or arrays?
Sent: Apr 28, 2011 6:17 PM

Hello Dholmes1031,

I would write it like this:
switch($foo) {
case 5: $dothis; break;
case 3: $dothat; break;
default: $donothing; break;
}


This sounds like a job for *dun dun dun* GOTO!

Kidding, of course ;)

Cheers,
Rob.
--


you should be removed and banned from this list for even just  
THINKING

about using a GOTO!  :P

(yes, there are still *SOME* (and i use that loosely) benefits to the
GOTO command, but in reality, no.)


People, people, don't you realize that break IS a goto?? It's just one  
of limited scope.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's faster using if else or arrays?

2011-04-28 Thread Andre Polykanine
Hello Dholmes1031,

I would write it like this:
switch($foo) {
   case 5: $dothis; break;
case 3: $dothat; break;
default: $donothing; break;
}


-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

 Original message 
From: dholmes1...@gmail.com dholmes1...@gmail.com
To: php-general@lists.php.net
Date created: , 12:30:31 AM
Subject: [PHP] What's faster using if else or arrays?


  
I'm working on a project and I was wondering if I should use if else's or 
arrays ?? 

Example 

If($foo= 5)
{ 
$dothis
}
ElseIf($foo= 3)
{ 
$dothis
}
Else{ $donothing }

Or put it in some short of arrays and pregmatch what would be the best to use 
and easiest to read 
Sent via BlackBerry from T-Mobile

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



Re: [PHP] What's faster using if else or arrays?

2011-04-28 Thread dholmes1031
Thanks switch and case seems to be more faster for the job and a lot cleaner 
--Original Message--
From: Andre Polykanine
To: dholmes1...@gmail.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] What's faster using if else or arrays?
Sent: Apr 28, 2011 6:17 PM

Hello Dholmes1031,

I would write it like this:
switch($foo) {
   case 5: $dothis; break;
case 3: $dothat; break;
default: $donothing; break;
}


-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

 Original message 
From: dholmes1...@gmail.com dholmes1...@gmail.com
To: php-general@lists.php.net
Date created: , 12:30:31 AM
Subject: [PHP] What's faster using if else or arrays?


  
I'm working on a project and I was wondering if I should use if else's or 
arrays ?? 

Example 

If($foo= 5)
{ 
$dothis
}
ElseIf($foo= 3)
{ 
$dothis
}
Else{ $donothing }

Or put it in some short of arrays and pregmatch what would be the best to use 
and easiest to read 
Sent via BlackBerry from T-Mobile

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Sent via BlackBerry from T-Mobile

Re: [PHP] What's faster using if else or arrays?

2011-04-28 Thread Robert Cummings

On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote:

Thanks switch and case seems to be more faster for the job and a lot cleaner
--Original Message--
From: Andre Polykanine
To: dholmes1...@gmail.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] What's faster using if else or arrays?
Sent: Apr 28, 2011 6:17 PM

Hello Dholmes1031,

I would write it like this:
switch($foo) {
case 5: $dothis; break;
case 3: $dothat; break;
default: $donothing; break;
}


This sounds like a job for *dun dun dun* GOTO!

Kidding, of course ;)

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Alexandre Simon
Hello,

multiple things:
- escape your values:
  1. if some of the user input contains '\'' for instance, your query is
not well formed
  2. if some evil user want to do anything with your DB, he can do it
  = See mysql_escape_string or PDO prepared statements
- Use else part of the if statement everywhere you can to see where
the error is. Maybe you can not connect to DB for instance...

Hope you will fix your code..

Le vendredi 02 juillet 2010 à 22:05 +, Carlos Sura a écrit : 
 
 Hello, this function does not work for me... And I really don't know what am 
 I doing wrong... Any help??
 
 This function is in a class, and I call it in a form, to create a new user..
 
 
 
 $objEmploye=new Employe;
 if ( 
 $objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) == 
 true){
 echo 'Saved';
 }else{
 echo 'Error, try again';
 } 
 }else{
 
 
 function insert($field){
 if($this-con-connect()==true){
 return mysql_query(INSERT INTO employes (name,lastname, salary, 
 id, afp, isss, nit) VALUES ('.$field[0].', 
 '.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'));
 }
 }
 
 
 
 
 Thanks.
 
 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 Do you have a story that started on Hotmail? Tell us now



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Hans Åhlin
You have forgotten the ending ; in the sql query
try this
mysql_query(INSERT INTO employes (name,lastname, salary, id, afp,
isss, nit) VALUES ('.$field[0].',
'.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'););

**
 Hans Åhlin
   Tel: +46761488019
   icq: 275232967
   http://www.kronan-net.com/
   irc://irc.freenode.net:6667 - TheCoin
**



2010/7/3 Ashley Sheridan a...@ashleysheridan.co.uk:
 On Fri, 2010-07-02 at 23:19 +, Carlos Sura wrote:

 Hello Ash,

 No, I don't get an error message, the thing is, my post form, isn't 
 working... I can't post those fields in database when I fill them up in the 
 form... But, I really don't know why... Do you want my form code? all the 
 entire class.php code??

 Thank you for helping me.

 Carlos Sura.






 Subject: Re: [PHP] What's wrong in this function? Does not work for me.
 From: a...@ashleysheridan.co.uk
 To: carlos_s...@hotmail.com
 CC: php-general@lists.php.net
 Date: Sat, 3 Jul 2010 00:08:05 +0100










 On Fri, 2010-07-02 at 22:05 +, Carlos Sura wrote:


 Hello, this function does not work for me... And I really don't know what am 
 I doing wrong... Any help??

 This function is in a class, and I call it in a form, to create a new user..



     $objEmploye=new Employe;
     if ( 
 $objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) == 
 true){
         echo 'Saved';
     }else{
         echo 'Error, try again';
     }
 }else{


     function insert($field){
         if($this-con-connect()==true){
             return mysql_query(INSERT INTO employes (name,lastname, salary, 
 id, afp, isss, nit) VALUES ('.$field[0].', 
 '.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'));
         }
     }




 Thanks.

 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 Do you have a story that started on Hotmail? Tell us now




 I can't see anything wrong with that code excerpt. Are you getting a 
 specific error, and if so, what is the code on and around the line number 
 indicated in that error?






 Thanks,

 Ash

 http://www.ashleysheridan.co.uk








 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 We want to hear all your funny, exciting and crazy Hotmail stories. Tell us 
 now


 Break the code down into very simple parts with echo statements. First,
 I'd echo out the $_POST or $_GET data that you're using to see if the
 values you think are being sent are being sent. Then, move onto the next
 part of code, stepping through with echo statements to output variable
 values to ensure that your data is following the right path. This is one
 of the easiest ways to find a problem I've found, short of using an IDE
 to step through the code.

 Also, you could put the code up on something like pastebin and post a
 link to it, which will let people see what the code looks like and
 hopefully figure out where the problem is.

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




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Ashley Sheridan
On Sat, 2010-07-03 at 09:01 +0200, Alexandre Simon wrote:

 Hello,
 
 multiple things:
 - escape your values:
   1. if some of the user input contains '\'' for instance, your query is
 not well formed
   2. if some evil user want to do anything with your DB, he can do it
   = See mysql_escape_string or PDO prepared statements
 - Use else part of the if statement everywhere you can to see where
 the error is. Maybe you can not connect to DB for instance...
 
 Hope you will fix your code..
 
 Le vendredi 02 juillet 2010 à 22:05 +, Carlos Sura a écrit : 
  
  Hello, this function does not work for me... And I really don't know what 
  am I doing wrong... Any help??
  
  This function is in a class, and I call it in a form, to create a new user..
  
  
  
  $objEmploye=new Employe;
  if ( 
  $objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) == 
  true){
  echo 'Saved';
  }else{
  echo 'Error, try again';
  } 
  }else{
  
  
  function insert($field){
  if($this-con-connect()==true){
  return mysql_query(INSERT INTO employes (name,lastname, 
  salary, id, afp, isss, nit) VALUES ('.$field[0].', 
  '.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'));
  }
  }
  
  
  
  
  Thanks.

  _
  http://clk.atdmt.com/UKM/go/19780/direct/01/
  Do you have a story that started on Hotmail? Tell us now
 
 
 


As the variables aren't using the special global arrays $_POST or $_GET,
there's no indication that the values aren't being sanitised when they
go into the query.

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




Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Ashley Sheridan
On Sat, 2010-07-03 at 09:20 +0200, Hans Åhlin wrote:

 You have forgotten the ending ; in the sql query
 try this
 mysql_query(INSERT INTO employes (name,lastname, salary, id, afp,
 isss, nit) VALUES ('.$field[0].',
 '.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'););
 
 **
  Hans Åhlin
Tel: +46761488019
icq: 275232967
http://www.kronan-net.com/
irc://irc.freenode.net:6667 - TheCoin
 **
 
 
 
 2010/7/3 Ashley Sheridan a...@ashleysheridan.co.uk:
  On Fri, 2010-07-02 at 23:19 +, Carlos Sura wrote:
 
  Hello Ash,
 
  No, I don't get an error message, the thing is, my post form, isn't 
  working... I can't post those fields in database when I fill them up in 
  the form... But, I really don't know why... Do you want my form code? all 
  the entire class.php code??
 
  Thank you for helping me.
 
  Carlos Sura.
 
 
 
 
 
 
  Subject: Re: [PHP] What's wrong in this function? Does not work for me.
  From: a...@ashleysheridan.co.uk
  To: carlos_s...@hotmail.com
  CC: php-general@lists.php.net
  Date: Sat, 3 Jul 2010 00:08:05 +0100
 
 
 
 
 
 
 
 
 
 
  On Fri, 2010-07-02 at 22:05 +, Carlos Sura wrote:
 
 
  Hello, this function does not work for me... And I really don't know what 
  am I doing wrong... Any help??
 
  This function is in a class, and I call it in a form, to create a new 
  user..
 
 
 
  $objEmploye=new Employe;
  if ( 
  $objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) 
  == true){
  echo 'Saved';
  }else{
  echo 'Error, try again';
  }
  }else{
 
 
  function insert($field){
  if($this-con-connect()==true){
  return mysql_query(INSERT INTO employes (name,lastname, 
  salary, id, afp, isss, nit) VALUES ('.$field[0].', 
  '.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'));
  }
  }
 
 
 
 
  Thanks.
 
  _
  http://clk.atdmt.com/UKM/go/19780/direct/01/
  Do you have a story that started on Hotmail? Tell us now
 
 
 
 
  I can't see anything wrong with that code excerpt. Are you getting a 
  specific error, and if so, what is the code on and around the line number 
  indicated in that error?
 
 
 
 
 
 
  Thanks,
 
  Ash
 
  http://www.ashleysheridan.co.uk
 
 
 
 
 
 
 
 
  _
  http://clk.atdmt.com/UKM/go/19780/direct/01/
  We want to hear all your funny, exciting and crazy Hotmail stories. Tell 
  us now
 
 
  Break the code down into very simple parts with echo statements. First,
  I'd echo out the $_POST or $_GET data that you're using to see if the
  values you think are being sent are being sent. Then, move onto the next
  part of code, stepping through with echo statements to output variable
  values to ensure that your data is following the right path. This is one
  of the easiest ways to find a problem I've found, short of using an IDE
  to step through the code.
 
  Also, you could put the code up on something like pastebin and post a
  link to it, which will let people see what the code looks like and
  hopefully figure out where the problem is.
 
  Thanks,
  Ash
  http://www.ashleysheridan.co.uk
 
 
 


Semicolons at the end of SQL statements are not required unless you are
issuing multiple SQL statements in one string.

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




Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Hans Åhlin
Another thing is that I would use != false, so every value but false passes.

$objEmploye=new Employe;
   if ( $objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit))
== true){
   echo 'Saved';
   }else{
   echo 'Error, try again';
   }


**
 Hans Åhlin
   Tel: +46761488019
   icq: 275232967
   http://www.kronan-net.com/
   irc://irc.freenode.net:6667 - TheCoin
**



2010/7/3 Carlos Sura carlos_s...@hotmail.com:


 Hello, this function does not work for me... And I really don't know what am 
 I doing wrong... Any help??

 This function is in a class, and I call it in a form, to create a new user..



    $objEmploye=new Employe;
    if ( 
 $objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) == 
 true){
        echo 'Saved';
    }else{
        echo 'Error, try again';
    }
 }else{


    function insert($field){
        if($this-con-connect()==true){
            return mysql_query(INSERT INTO employes (name,lastname, salary, 
 id, afp, isss, nit) VALUES ('.$field[0].', 
 '.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'));
        }
    }




 Thanks.

 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 Do you have a story that started on Hotmail? Tell us now

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Ashley Sheridan
On Sat, 2010-07-03 at 16:11 +0200, Hans Åhlin wrote:

 Another thing is that I would use != false, so every value but false passes.
 
 $objEmploye=new Employe;
if ( 
 $objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit))
 == true){
echo 'Saved';
}else{
echo 'Error, try again';
}
 
 
 **
  Hans Åhlin
Tel: +46761488019
icq: 275232967
http://www.kronan-net.com/
irc://irc.freenode.net:6667 - TheCoin
 **
 
 
 
 2010/7/3 Carlos Sura carlos_s...@hotmail.com:
 
 
  Hello, this function does not work for me... And I really don't know what 
  am I doing wrong... Any help??
 
  This function is in a class, and I call it in a form, to create a new user..
 
 
 
 $objEmploye=new Employe;
 if ( 
  $objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) == 
  true){
 echo 'Saved';
 }else{
 echo 'Error, try again';
 }
  }else{
 
 
 function insert($field){
 if($this-con-connect()==true){
 return mysql_query(INSERT INTO employes (name,lastname, salary, 
  id, afp, isss, nit) VALUES ('.$field[0].', 
  '.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'));
 }
 }
 
 
 
 
  Thanks.
 
  _
  http://clk.atdmt.com/UKM/go/19780/direct/01/
  Do you have a story that started on Hotmail? Tell us now
 


Actually, removing the '== true' part would do that and result in
shorted code. The mysql_query() function returns different values
depending on the query made, but will only ever be one of 3 values:
true, false, or a mysql resource. In this code example, there is no
difference between '== true' and '!= false'.

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




Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-02 Thread Ashley Sheridan
On Fri, 2010-07-02 at 22:05 +, Carlos Sura wrote:

 
 Hello, this function does not work for me... And I really don't know what am 
 I doing wrong... Any help??
 
 This function is in a class, and I call it in a form, to create a new user..
 
 
 
 $objEmploye=new Employe;
 if ( 
 $objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) == 
 true){
 echo 'Saved';
 }else{
 echo 'Error, try again';
 } 
 }else{
 
 
 function insert($field){
 if($this-con-connect()==true){
 return mysql_query(INSERT INTO employes (name,lastname, salary, 
 id, afp, isss, nit) VALUES ('.$field[0].', 
 '.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'));
 }
 }
 
 
 
 
 Thanks.
 
 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 Do you have a story that started on Hotmail? Tell us now


I can't see anything wrong with that code excerpt. Are you getting a
specific error, and if so, what is the code on and around the line
number indicated in that error?

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




RE: [PHP] What's wrong in this function? Does not work for me.

2010-07-02 Thread Carlos Sura

Hello Ash,

No, I don't get an error message, the thing is, my post form, isn't working... 
I can't post those fields in database when I fill them up in the form... But, I 
really don't know why... Do you want my form code? all the entire class.php 
code??

Thank you for helping me.

Carlos Sura.






Subject: Re: [PHP] What's wrong in this function? Does not work for me.
From: a...@ashleysheridan.co.uk
To: carlos_s...@hotmail.com
CC: php-general@lists.php.net
Date: Sat, 3 Jul 2010 00:08:05 +0100






  
  


On Fri, 2010-07-02 at 22:05 +, Carlos Sura wrote:


Hello, this function does not work for me... And I really don't know what am I 
doing wrong... Any help??

This function is in a class, and I call it in a form, to create a new user..



$objEmploye=new Employe;
if ( 
$objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) == 
true){
echo 'Saved';
}else{
echo 'Error, try again';
} 
}else{


function insert($field){
if($this-con-connect()==true){
return mysql_query(INSERT INTO employes (name,lastname, salary, 
id, afp, isss, nit) VALUES ('.$field[0].', 
'.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'));
}
}




Thanks.
  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us now




I can't see anything wrong with that code excerpt. Are you getting a specific 
error, and if so, what is the code on and around the line number indicated in 
that error?






Thanks,

Ash

http://www.ashleysheridan.co.uk







  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now

RE: [PHP] What's wrong in this function? Does not work for me.

2010-07-02 Thread Ashley Sheridan
On Fri, 2010-07-02 at 23:19 +, Carlos Sura wrote:

 Hello Ash,
 
 No, I don't get an error message, the thing is, my post form, isn't 
 working... I can't post those fields in database when I fill them up in the 
 form... But, I really don't know why... Do you want my form code? all the 
 entire class.php code??
 
 Thank you for helping me.
 
 Carlos Sura.
 
 
 
 
 
 
 Subject: Re: [PHP] What's wrong in this function? Does not work for me.
 From: a...@ashleysheridan.co.uk
 To: carlos_s...@hotmail.com
 CC: php-general@lists.php.net
 Date: Sat, 3 Jul 2010 00:08:05 +0100
 
 
 
 
 
 
   
   
 
 
 On Fri, 2010-07-02 at 22:05 +, Carlos Sura wrote:
 
 
 Hello, this function does not work for me... And I really don't know what am 
 I doing wrong... Any help??
 
 This function is in a class, and I call it in a form, to create a new user..
 
 
 
 $objEmploye=new Employe;
 if ( 
 $objEmploye-insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) == 
 true){
 echo 'Saved';
 }else{
 echo 'Error, try again';
 } 
 }else{
 
 
 function insert($field){
 if($this-con-connect()==true){
 return mysql_query(INSERT INTO employes (name,lastname, salary, 
 id, afp, isss, nit) VALUES ('.$field[0].', 
 '.$field[1].','.$field[2].','.$field[3].','.$field[4].','.$field[5].','.$field[6].'));
 }
 }
 
 
 
 
 Thanks.
 
 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 Do you have a story that started on Hotmail? Tell us now
 
 
 
 
 I can't see anything wrong with that code excerpt. Are you getting a specific 
 error, and if so, what is the code on and around the line number indicated in 
 that error?
 
 
 
 
 
 
 Thanks,
 
 Ash
 
 http://www.ashleysheridan.co.uk
 
 
 
 
 
 
 
 
 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 We want to hear all your funny, exciting and crazy Hotmail stories. Tell us 
 now


Break the code down into very simple parts with echo statements. First,
I'd echo out the $_POST or $_GET data that you're using to see if the
values you think are being sent are being sent. Then, move onto the next
part of code, stepping through with echo statements to output variable
values to ensure that your data is following the right path. This is one
of the easiest ways to find a problem I've found, short of using an IDE
to step through the code.

Also, you could put the code up on something like pastebin and post a
link to it, which will let people see what the code looks like and
hopefully figure out where the problem is.

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




Re: [PHP] What's wrong with this code?

2010-06-05 Thread Karl DeSaulniers
Could the exit() be terminating it? Do you need this exit() as the  
else for that if statement? Try deleting just the else {}.


JAT

Karl

Sent from losPhone

On Jun 5, 2010, at 6:54 PM, David Mehler dave.meh...@gmail.com wrote:


Hello,
I've got a while loop outputting values from a database. Briefly it
looks like this:

while($row = mysql_fetch_array($result3))
{
echo tr;
echo td . $row['name'] . /td;
echo td . $row['type'] . /td;
echo td . $row['startdate'] . /td;
if (!empty($row['EndDate'])) {
echo td . $row['enddate'] . /td;
} else {
exit();
}
echo td . $row['location'] . /td;
echo td . $row['summary'] . /td;
echo td . $row['description'] . /td;
echo /tr;
}

That's not the whole code, but it is the problem code. Some output has
the ending date set, one or two records i can't remember how many i
entered with one, most do not, i want the echo to be conditional. The
output stops right before the if statement, echoes startdate and
that's it, comment out the if block and it works fine.
Thanks.
Dave.

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



Re: [PHP] What's wrong with this code?

2010-06-05 Thread David Mehler
Hi,
Thanks. I took out the entire else section including the exit call, it
now all processes, however $row['enddate'] is not displayed on the two
records where it is set.
Thanks.
Dave.


On 6/5/10, Karl DeSaulniers k...@designdrumm.com wrote:
 Could the exit() be terminating it? Do you need this exit() as the
 else for that if statement? Try deleting just the else {}.

 JAT

 Karl

 Sent from losPhone

 On Jun 5, 2010, at 6:54 PM, David Mehler dave.meh...@gmail.com wrote:

 Hello,
 I've got a while loop outputting values from a database. Briefly it
 looks like this:

 while($row = mysql_fetch_array($result3))
 {
 echo tr;
 echo td . $row['name'] . /td;
 echo td . $row['type'] . /td;
 echo td . $row['startdate'] . /td;
 if (!empty($row['EndDate'])) {
 echo td . $row['enddate'] . /td;
 } else {
 exit();
 }
 echo td . $row['location'] . /td;
 echo td . $row['summary'] . /td;
 echo td . $row['description'] . /td;
 echo /tr;
 }

 That's not the whole code, but it is the problem code. Some output has
 the ending date set, one or two records i can't remember how many i
 entered with one, most do not, i want the echo to be conditional. The
 output stops right before the if statement, echoes startdate and
 that's it, comment out the if block and it works fine.
 Thanks.
 Dave.

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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong with this code?

2010-06-05 Thread Karl DeSaulniers

So your code looks like this?

while($row = mysql_fetch_array($result3))
{
echo tr;
echo td . $row['name'] . /td;
echo td . $row['type'] . /td;
echo td . $row['startdate'] . /td;
if (!empty($row['EndDate'])) {  //This should probably be $row 
['enddate']

echo td . $row['enddate'] . /td;
}

echo td . $row['location'] . /td;
echo td . $row['summary'] . /td;
echo td . $row['description'] . /td;
echo /tr;
}


Not to mention, you have a $row['EndDate'] and a $row['enddate'].
Probably need to choose one or the other.

HTH,

Karl



On Jun 5, 2010, at 7:43 PM, David Mehler wrote:


Hi,
Thanks. I took out the entire else section including the exit call, it
now all processes, however $row['enddate'] is not displayed on the two
records where it is set.
Thanks.
Dave.


On 6/5/10, Karl DeSaulniers k...@designdrumm.com wrote:

Could the exit() be terminating it? Do you need this exit() as the
else for that if statement? Try deleting just the else {}.

JAT

Karl

Sent from losPhone

On Jun 5, 2010, at 6:54 PM, David Mehler dave.meh...@gmail.com  
wrote:



Hello,
I've got a while loop outputting values from a database. Briefly it
looks like this:

while($row = mysql_fetch_array($result3))
{
echo tr;
echo td . $row['name'] . /td;
echo td . $row['type'] . /td;
echo td . $row['startdate'] . /td;
if (!empty($row['EndDate'])) {
echo td . $row['enddate'] . /td;
} else {
exit();
}
echo td . $row['location'] . /td;
echo td . $row['summary'] . /td;
echo td . $row['description'] . /td;
echo /tr;
}

That's not the whole code, but it is the problem code. Some  
output has

the ending date set, one or two records i can't remember how many i
entered with one, most do not, i want the echo to be conditional.  
The

output stops right before the if statement, echoes startdate and
that's it, comment out the if block and it works fine.
Thanks.
Dave.

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




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong with this code?

2010-06-05 Thread Mari Masuda
Could it be that you are not using the same variable name?  In the if statement 
you are using $row['EndDate'] and when attempting to print you are using 
$row['enddate'].  I think you need to be consistent about which capitalization 
you use (and make sure it matches what is in the db).

 if (!empty($row['EndDate'])) {
 echo td . $row['enddate'] . /td;
 }



On Jun 5, 2010, at 5:43 PM, David Mehler wrote:

 Hi,
 Thanks. I took out the entire else section including the exit call, it
 now all processes, however $row['enddate'] is not displayed on the two
 records where it is set.
 Thanks.
 Dave.
 
 
 On 6/5/10, Karl DeSaulniers k...@designdrumm.com wrote:
 Could the exit() be terminating it? Do you need this exit() as the
 else for that if statement? Try deleting just the else {}.
 
 JAT
 
 Karl
 
 Sent from losPhone
 
 On Jun 5, 2010, at 6:54 PM, David Mehler dave.meh...@gmail.com wrote:
 
 Hello,
 I've got a while loop outputting values from a database. Briefly it
 looks like this:
 
 while($row = mysql_fetch_array($result3))
 {
 echo tr;
 echo td . $row['name'] . /td;
 echo td . $row['type'] . /td;
 echo td . $row['startdate'] . /td;
 if (!empty($row['EndDate'])) {
 echo td . $row['enddate'] . /td;
 } else {
 exit();
 }
 echo td . $row['location'] . /td;
 echo td . $row['summary'] . /td;
 echo td . $row['description'] . /td;
 echo /tr;
 }
 
 That's not the whole code, but it is the problem code. Some output has
 the ending date set, one or two records i can't remember how many i
 entered with one, most do not, i want the echo to be conditional. The
 output stops right before the if statement, echoes startdate and
 that's it, comment out the if block and it works fine.
 Thanks.
 Dave.
 
 --
 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
 
 
 
 -- 
 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



Re: [PHP] What's wrong with this code?

2010-06-05 Thread David Mehler
Hello everyone,
Much thanks. Sometimes when you stare at code for so long it blurs
together, that's how it is with me at least. That was my problem, case
sensitive variable.
Thanks a lot.
Dave.


On 6/5/10, Mari Masuda mari.mas...@stanford.edu wrote:
 Could it be that you are not using the same variable name?  In the if
 statement you are using $row['EndDate'] and when attempting to print you are
 using $row['enddate'].  I think you need to be consistent about which
 capitalization you use (and make sure it matches what is in the db).

 if (!empty($row['EndDate'])) {
 echo td . $row['enddate'] . /td;
 }



 On Jun 5, 2010, at 5:43 PM, David Mehler wrote:

 Hi,
 Thanks. I took out the entire else section including the exit call, it
 now all processes, however $row['enddate'] is not displayed on the two
 records where it is set.
 Thanks.
 Dave.


 On 6/5/10, Karl DeSaulniers k...@designdrumm.com wrote:
 Could the exit() be terminating it? Do you need this exit() as the
 else for that if statement? Try deleting just the else {}.

 JAT

 Karl

 Sent from losPhone

 On Jun 5, 2010, at 6:54 PM, David Mehler dave.meh...@gmail.com wrote:

 Hello,
 I've got a while loop outputting values from a database. Briefly it
 looks like this:

 while($row = mysql_fetch_array($result3))
 {
 echo tr;
 echo td . $row['name'] . /td;
 echo td . $row['type'] . /td;
 echo td . $row['startdate'] . /td;
 if (!empty($row['EndDate'])) {
 echo td . $row['enddate'] . /td;
 } else {
 exit();
 }
 echo td . $row['location'] . /td;
 echo td . $row['summary'] . /td;
 echo td . $row['description'] . /td;
 echo /tr;
 }

 That's not the whole code, but it is the problem code. Some output has
 the ending date set, one or two records i can't remember how many i
 entered with one, most do not, i want the echo to be conditional. The
 output stops right before the if statement, echoes startdate and
 that's it, comment out the if block and it works fine.
 Thanks.
 Dave.

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



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



Re: [PHP] what's the point of _autoload?

2010-05-14 Thread Peter Lind
On 14 May 2010 15:31, Michael N. Madsen m...@criion.net wrote:
 Since php started to support oop it has moved more and more features in that
 direction.
 This is good for me because I love oop. Then came _autoload() and I was
 rejoiced only to find that this (no fun)ction can't be used to it's fullest
 potential in oop unless I have all the files in the same directory. This is
 where you correct me and tell me how I can have a file structure in more
 then one level and still get the ripe juices of _autoload() (Please, I beg
 you!)

 I have looked at the comments on the doc page of the function and every
 single one comes with the addition of many, often complex lines of code that
 will only add more load on the server. If _autoload can't figure out the
 correct path to the file which defines the class, then what is the point
 from an oop pov?

__autoload() is triggered when a class referenced isn't already
loaded. It gives you the chance to load the class by requiring the
needed file - but there's no way PHP has any idea of how many files
you have in your project, so YOU have to tell PHP which file to load.
 This, to most people, means coming up with a meaningful way of naming
files and classes so you can parse the class name and then know where
to grab the file from (Zend naming for instance:
Zend_Db_Table_Abstract gets parsed to Zend/Db/Table/Abstract.php). So
no, you don't have to stress the server a lot - but you do have to do
some manual work.

Regards
Peter

-- 
hype
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
/hype

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what's the point of _autoload?

2010-05-14 Thread Nathan Nobbe
On Fri, May 14, 2010 at 7:31 AM, Michael N. Madsen m...@criion.net wrote:

 Since php started to support oop it has moved more and more features in
 that direction.
 This is good for me because I love oop. Then came _autoload() and I was
 rejoiced only to find that this (no fun)ction can't be used to it's fullest
 potential in oop unless I have all the files in the same directory. This is
 where you correct me and tell me how I can have a file structure in more
 then one level and still get the ripe juices of _autoload() (Please, I beg
 you!)


umm ok ill correct you.., theres no requirement to have files in a single
directory.  php gives you the name of a class and you are responsible for
finding the file where the class lives and load it.


 I have looked at the comments on the doc page of the function and every
 single one comes with the addition of many, often complex lines of code that
 will only add more load on the server.


actually, autoloading typically reduces load on the server b/c only the
files you actually need for a given request are loaded on demand.  this in
contrast to requires/includes for every possible class that could
potentially be needed to fulfill a given request.


 If _autoload can't figure out the correct path to the file which defines
 the class, then what is the point from an oop pov?


see above; its a speed boost, and typically folks prefer not to bother
include/require files atop ever class the define; those are the 2 main
benefits.

-nathan


Re: [PHP] What's your game? (X-PHP)

2010-04-27 Thread Richard Quadling
On 26 April 2010 19:54, Williams, Dewey willi...@uncc.edu wrote:
 The only online games I play are Guild Wars and - now - Dungeons and
 Dragons Online (FREE!).  I haven't played vgaplanets in ages - too few
 servers to get a decent game. Not certain I can even install my original
 3.5 inch disk anymore!

 Dewey Williams

 -Original Message-
 From: tedd [mailto:t...@sperling.com]
 Sent: Sunday, April 25, 2010 9:16 AM
 To: php-general@lists.php.net
 Subject: [PHP] What's your game? (X-PHP)

 Hi gang:

 Considering we recently had several people mention what games they
 play, it might be interesting to see what everyone plays.

 As for me, I currently play Modern Warfare 2 on XBOX. It's the most
 recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
 etc.).

 My gamer tag is special tedd

 What's your game?

 Cheers,

 tedd


 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com

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



I also like Ico and Shadow Of The Colossus, both on PS2.

I bought the PS2 because of Ico.

I'll probably buy a PS3 because of the next game they are making in
the same style.




-- 
-
Richard Quadling
Standing on the shoulders of some very clever giants!
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-27 Thread Programming Guides
On Tue, Apr 27, 2010 at 7:37 AM, Richard Quadling
rquadl...@googlemail.comwrote:

 On 26 April 2010 19:54, Williams, Dewey willi...@uncc.edu wrote:
  The only online games I play are Guild Wars and - now - Dungeons and
  Dragons Online (FREE!).  I haven't played vgaplanets in ages - too few
  servers to get a decent game. Not certain I can even install my original
  3.5 inch disk anymore!
 
  Dewey Williams
 
  -Original Message-
  From: tedd [mailto:t...@sperling.com]
  Sent: Sunday, April 25, 2010 9:16 AM
  To: php-general@lists.php.net
  Subject: [PHP] What's your game? (X-PHP)
 
  Hi gang:
 
  Considering we recently had several people mention what games they
  play, it might be interesting to see what everyone plays.
 
  As for me, I currently play Modern Warfare 2 on XBOX. It's the most
  recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
  etc.).
 
  My gamer tag is special tedd
 
  What's your game?
 
  Cheers,
 
  tedd
 
 
  --
  ---
  http://sperling.com  http://ancientstones.com  http://earthstones.com
 
  --
  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
 
 

 I also like Ico and Shadow Of The Colossus, both on PS2.

 I bought the PS2 because of Ico.

 I'll probably buy a PS3 because of the next game they are making in
 the same style.




 --
 -
 Richard Quadling
 Standing on the shoulders of some very clever giants!
 EE : http://www.experts-exchange.com/M_248814.html
 EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
 Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
 ZOPA : http://uk.zopa.com/member/RQuadling

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


I've played and still play StarCraft: Brood War a lot. StarCraft 2 is now
available for pre-order and the beta is active. I'm looking forward to it
but I'm not looking forward to how much time I'll sink into it :)

-- 
Viktor
http://programming-guides.com


Re: [PHP] What's your game? (X-PHP)

2010-04-27 Thread Dan Joseph
On Tue, Apr 27, 2010 at 9:24 AM, Programming Guides 
programming.gui...@gmail.com wrote:

 I've played and still play StarCraft: Brood War a lot. StarCraft 2 is now
 available for pre-order and the beta is active. I'm looking forward to it
 but I'm not looking forward to how much time I'll sink into it :)

 --
 Viktor
 http://programming-guides.com



I am amazed at how long Starcraft has lasted, and how popular it still is.
Is the MMORPG version Starcraft 2?  Or is that yet another one?


-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code NEWTHINGS for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry


Re: [PHP] What's your game? (X-PHP)

2010-04-27 Thread Programming Guides
On Tue, Apr 27, 2010 at 8:27 AM, Dan Joseph dmjos...@gmail.com wrote:

 On Tue, Apr 27, 2010 at 9:24 AM, Programming Guides 
 programming.gui...@gmail.com wrote:

  I've played and still play StarCraft: Brood War a lot. StarCraft 2 is now
  available for pre-order and the beta is active. I'm looking forward to it
  but I'm not looking forward to how much time I'll sink into it :)
 
  --
  Viktor
  http://programming-guides.com
 


 I am amazed at how long Starcraft has lasted, and how popular it still is.
 Is the MMORPG version Starcraft 2?  Or is that yet another one?


 --
 -Dan Joseph

 www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
 Code NEWTHINGS for 10% off initial order

 http://www.facebook.com/canishosting
 http://www.facebook.com/originalpoetry


It's not an MMO; it's still an RTS. It's just new graphics, new interface,
some rebalancing and a continuation of the storyline.

-- 
http://programming-guides.com


RE: [PHP] What's your game? (X-PHP)

2010-04-27 Thread Tommy Pham
 -Original Message-
 From: Programming Guides [mailto:programming.gui...@gmail.com]
 Sent: Tuesday, April 27, 2010 6:35 AM
 To: Dan Joseph
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] What's your game? (X-PHP)
 
 On Tue, Apr 27, 2010 at 8:27 AM, Dan Joseph dmjos...@gmail.com wrote:
 
  On Tue, Apr 27, 2010 at 9:24 AM, Programming Guides 
  programming.gui...@gmail.com wrote:
 
   I've played and still play StarCraft: Brood War a lot. StarCraft 2
   is now available for pre-order and the beta is active. I'm looking
   forward to it but I'm not looking forward to how much time I'll sink
   into it :)
  
   --
   Viktor
   http://programming-guides.com
  
 
 
  I am amazed at how long Starcraft has lasted, and how popular it still
is.
  Is the MMORPG version Starcraft 2?  Or is that yet another one?
 
 
  --
  -Dan Joseph
 
  www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.
  Promo Code NEWTHINGS for 10% off initial order
 
  http://www.facebook.com/canishosting
  http://www.facebook.com/originalpoetry
 
 
 It's not an MMO; it's still an RTS. It's just new graphics, new interface,
some
 rebalancing and a continuation of the storyline.
 
 --
 http://programming-guides.com

From the previews/trailers I've seen, there is no 4th race that was in the
final (bonus ?) mission in the Starcraft+Broodwar.  In that mission, there
was an experiment done on all 3 races.  IIRC, the 4th race is supposed to be
a combination of all the good from other 3 races.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-26 Thread Richard Quadling
On 25 April 2010 14:16, tedd t...@sperling.com wrote:
 What's your game?

My wife and I play enjoy Baulder's Gate on the PS2 and I like the Lego
(Star Wars, Batman, etc.) games on the PSP.

The kids like to play Ice Age and Cars but crash a lot and end up
shouting at each other.


-- 
-
Richard Quadling
Standing on the shoulders of some very clever giants!
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-26 Thread Kevin Kinsey

Richard Quadling wrote:

On 25 April 2010 14:16, tedd t...@sperling.com wrote:

What's your game?


Ooh, do we *have* to tell?

I've got interest in the AOE stuff, but haven't played in
a while.  Haven't purchased AOE3.  If I'm *really* bored,
I've got freecell.exe running on every O.S. I run

I'm also a Player Moderator in a large MMORPG, but
I'm not sure I should say which one ... Mods there
are big targets; suffice it to say it's a love/hate
relationship, and I either need counseling or to go
work on my combat skills RIGHT AWAY!!!

KDK

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-26 Thread Dan Joseph
On Sun, Apr 25, 2010 at 9:16 AM, tedd t...@sperling.com wrote:

 My gamer tag is special tedd


Hey Tedd, I'm 'jakmo' on Live.  I'll have to give you an add next time I
jump on.

I've been playing Dragon Age and Lost Odyssey.  Both are great.

-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code NEWTHINGS for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry


Re: [PHP] What's your game? (X-PHP)

2010-04-26 Thread Dan Joseph
On Mon, Apr 26, 2010 at 7:48 AM, Richard Quadling
rquadl...@googlemail.comwrote:

 On 25 April 2010 14:16, tedd t...@sperling.com wrote:
  What's your game?

 My wife and I play enjoy Baulder's Gate on the PS2 and I like the Lego
 (Star Wars, Batman, etc.) games on the PSP.

 The kids like to play Ice Age and Cars but crash a lot and end up
 shouting at each other.

Ice Age was a fine game!  I played that one a few years ago.  I'd like to
see another Diablo styled game come out in the modern setting.

-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code NEWTHINGS for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry


Re: [PHP] What's your game? (X-PHP)

2010-04-26 Thread Ashley Sheridan
On Mon, 2010-04-26 at 12:41 -0400, Dan Joseph wrote:

 On Mon, Apr 26, 2010 at 7:48 AM, Richard Quadling
 rquadl...@googlemail.comwrote:
 
  On 25 April 2010 14:16, tedd t...@sperling.com wrote:
   What's your game?
 
  My wife and I play enjoy Baulder's Gate on the PS2 and I like the Lego
  (Star Wars, Batman, etc.) games on the PSP.
 
  The kids like to play Ice Age and Cars but crash a lot and end up
  shouting at each other.
 
 Ice Age was a fine game!  I played that one a few years ago.  I'd like to
 see another Diablo styled game come out in the modern setting.
 


Diablo 3 is out soon...

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




Re: [PHP] What's your game? (X-PHP)

2010-04-26 Thread Dan Joseph
On Mon, Apr 26, 2010 at 12:36 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:



 Diablo 3 is out soon...


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



oh cool, I did not realize.. have they set a release date yet?  I didn't see
one on gamestop.com...


-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code NEWTHINGS for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry


Re: [PHP] What's your game? (X-PHP)

2010-04-26 Thread Ashley Sheridan
On Mon, 2010-04-26 at 12:48 -0400, Dan Joseph wrote:

 On Mon, Apr 26, 2010 at 12:36 PM, Ashley Sheridan
 a...@ashleysheridan.co.ukwrote:
 
 
 
  Diablo 3 is out soon...
 
 
Thanks,
  Ash
  http://www.ashleysheridan.co.uk
 
 
 
 oh cool, I did not realize.. have they set a release date yet?  I didn't see
 one on gamestop.com...
 
 


Not yet, but there's trailers on YouTube and it looks good so far. A few
more classes, different mobs, it looks good!

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




Re: [PHP] What's your game? (X-PHP)

2010-04-26 Thread Dan Joseph
On Mon, Apr 26, 2010 at 12:52 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:

 Not yet, but there's trailers on YouTube and it looks good so far. A few
 more classes, different mobs, it looks good!



The screenshots look great as well.  I am going to check YouTube for
trailers.  Maybe after they get Starcraft going they'll get this out.

-- 
-Dan Joseph

www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month.  Promo
Code NEWTHINGS for 10% off initial order

http://www.facebook.com/canishosting
http://www.facebook.com/originalpoetry


RE: [PHP] What's your game? (X-PHP)

2010-04-26 Thread Bob McConnell
The last game I played was catch. My oldest grandson and I borrowed his
cousin's Harlem Globetrotters miniature basketball. I taught him how to
use spin to deflect the ball path when it bounced.

I actually don't recall the last time I played an electronic game.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] What's your game? (X-PHP)

2010-04-26 Thread Williams, Dewey
The only online games I play are Guild Wars and - now - Dungeons and
Dragons Online (FREE!).  I haven't played vgaplanets in ages - too few
servers to get a decent game. Not certain I can even install my original
3.5 inch disk anymore!

Dewey Williams

 -Original Message-
 From: tedd [mailto:t...@sperling.com]
 Sent: Sunday, April 25, 2010 9:16 AM
 To: php-general@lists.php.net
 Subject: [PHP] What's your game? (X-PHP)
 
 Hi gang:
 
 Considering we recently had several people mention what games they
 play, it might be interesting to see what everyone plays.
 
 As for me, I currently play Modern Warfare 2 on XBOX. It's the most
 recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
 etc.).
 
 My gamer tag is special tedd
 
 What's your game?
 
 Cheers,
 
 tedd
 
 
 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
 --
 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



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread David McGlone
On Sunday 25 April 2010 09:16:23 tedd wrote:
 Hi gang:

 Considering we recently had several people mention what games they
 play, it might be interesting to see what everyone plays.

 As for me, I currently play Modern Warfare 2 on XBOX. It's the most
 recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
 etc.).

 My gamer tag is special tedd

 What's your game?

Command and Conquer Yuri's Revenge, Diablo II and occasionally Starcraft.

-- 
Blessings,
David M.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Jim Lucas

tedd wrote:

Hi gang:

Considering we recently had several people mention what games they play, 
it might be interesting to see what everyone plays.


As for me, I currently play Modern Warfare 2 on XBOX. It's the most 
recent in a long line of war games (i.e., Call of Duty, Ghost Recon, etc.).


My gamer tag is special tedd

What's your game?

Cheers,

tedd




Battlefield 2142  Call Sign: ChefLord

--
Jim Lucas

A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Robert Cummings

tedd wrote:

Hi gang:

Considering we recently had several people mention what games they 
play, it might be interesting to see what everyone plays.


As for me, I currently play Modern Warfare 2 on XBOX. It's the most 
recent in a long line of war games (i.e., Call of Duty, Ghost Recon, 
etc.).


My gamer tag is special tedd

What's your game?


My games tend to focus on something the kids can have fun with too:

Mario Kart Wii (I love the kart franchise)
Super Mario Bros Wii (8 star coins to go in world 9)
Battle for Wesnoth
The Wii lego games (Indiana Jones, Batman, etc),

The last couple of days I've been giving Lord of Ultima a try since it's 
completely browser based (Javascript/HTML) and that piqued my interest. 
While it's well done as a web game, it's a bit too dependent on waiting 
for stuff to complete so it gets tedious. Still... it's an example of 
what can be done.


Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Nathan Rixham
Robert Cummings wrote:
 tedd wrote:
 Hi gang:

 Considering we recently had several people mention what games they
 play, it might be interesting to see what everyone plays.

 As for me, I currently play Modern Warfare 2 on XBOX. It's the most
 recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
 etc.).

 My gamer tag is special tedd

 What's your game?
 
 My games tend to focus on something the kids can have fun with too:
 
 Mario Kart Wii (I love the kart franchise)

^^ do you play online? I'll kick your ass :p lol-ol-ol

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Hans Åhlin
Lineage II
Comanche 4
Unreal Tournament
Blood Rayne 1 and 2
Battlefield 2, 2142
Warhammer 40k
Fallout 1, 2 and 3

My game list at CheatHappens.com
http://www.cheathappens.com/show_user.asp?userID=553587

**
 Hans Åhlin
   Tel: +46761488019
   http://www.kronan-net.com/
   irc://irc.freenode.net:6667 - TheCoin
**



2010/4/25 tedd t...@sperling.com:
 Hi gang:

 Considering we recently had several people mention what games they play, it
 might be interesting to see what everyone plays.

 As for me, I currently play Modern Warfare 2 on XBOX. It's the most recent
 in a long line of war games (i.e., Call of Duty, Ghost Recon, etc.).

 My gamer tag is special tedd

 What's your game?

 Cheers,

 tedd


 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Robert Cummings
I do, though I can't find the disc right now... Keiran (19 months) was 
last seen toddling around with it about 2 weeks ago :/


When I find it I'll send you my player code.




Nathan Rixham wrote:

Robert Cummings wrote:

tedd wrote:

Hi gang:

Considering we recently had several people mention what games they
play, it might be interesting to see what everyone plays.

As for me, I currently play Modern Warfare 2 on XBOX. It's the most
recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
etc.).

My gamer tag is special tedd

What's your game?

My games tend to focus on something the kids can have fun with too:

Mario Kart Wii (I love the kart franchise)


^^ do you play online? I'll kick your ass :p lol-ol-ol



--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread shiplu
King Of Fighters (Series),
Tom Raider (Series),
Grand Theft Auto (Series),
Max Payne, Max Payne II,
Prince Of Persia (Series),

Sudoku

Shiplu Mokaddim
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Ashley Sheridan
On Sun, 2010-04-25 at 13:56 -0400, Robert Cummings wrote:

 tedd wrote:
  Hi gang:
  
  Considering we recently had several people mention what games they 
  play, it might be interesting to see what everyone plays.
  
  As for me, I currently play Modern Warfare 2 on XBOX. It's the most 
  recent in a long line of war games (i.e., Call of Duty, Ghost Recon, 
  etc.).
  
  My gamer tag is special tedd
  
  What's your game?
 
 My games tend to focus on something the kids can have fun with too:
 
 Mario Kart Wii (I love the kart franchise)
 Super Mario Bros Wii (8 star coins to go in world 9)
 Battle for Wesnoth
 The Wii lego games (Indiana Jones, Batman, etc),
 
 The last couple of days I've been giving Lord of Ultima a try since it's 
 completely browser based (Javascript/HTML) and that piqued my interest. 
 While it's well done as a web game, it's a bit too dependent on waiting 
 for stuff to complete so it gets tedious. Still... it's an example of 
 what can be done.
 
 Cheers,
 Rob.
 -- 
 http://www.interjinn.com
 Application and Templating Framework for PHP
 


Hehe, I love the Mario Kart genre too! Got that on the Wii and the Super
Mario Bros. Also go Lego Star Wars, because who doesn't like Lego or
Star Wars?!

On the PC, I used to play all the typical ones. Diablo 1  2, Baldurs
Gate 1  2, Icewind Dale 1  2, Might  Magic 7-9 (7 is still my
favourite despite 9 going fully 3D) Nowadays though it's just World of
Warcraft. I figure I pay the subscription, so if I'm gonna play a game,
I may as well get my moneys worth!

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




Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Jason Pruim


On Apr 25, 2010, at 9:16 AM, tedd wrote:


Hi gang:

Considering we recently had several people mention what games they  
play, it might be interesting to see what everyone plays.


As for me, I currently play Modern Warfare 2 on XBOX. It's the  
most recent in a long line of war games (i.e., Call of Duty, Ghost  
Recon, etc.).


My gamer tag is special tedd

What's your game?


Personally I've played everything from those little mini facebook app  
games (Farmville, Mafia Wars) to the grand theft auto series on my  
ps2, but for christmas my wife surprised me with a wii... So now on my  
brand new game console I am playing Mario Brother 1  3 (Still need to  
get 2) :P But I'm also playing Mario Cart on it, and lego star wars  
plus a ton of kids games that my oldest loves for me to play with him  
on :)




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Danilo Moncastro Sabbagh
Is anyone up for a vgaplanets match? 

Danilo Moncastro Sabbagh
cel: +55 31 88613128
gtalk: torea...@gmail.com


Em 25/04/2010, às 17:13, Jason Pruim escreveu:

 
 On Apr 25, 2010, at 9:16 AM, tedd wrote:
 
 Hi gang:
 
 Considering we recently had several people mention what games they play, it 
 might be interesting to see what everyone plays.
 
 As for me, I currently play Modern Warfare 2 on XBOX. It's the most recent 
 in a long line of war games (i.e., Call of Duty, Ghost Recon, etc.).
 
 My gamer tag is special tedd
 
 What's your game?
 
 Personally I've played everything from those little mini facebook app games 
 (Farmville, Mafia Wars) to the grand theft auto series on my ps2, but for 
 christmas my wife surprised me with a wii... So now on my brand new game 
 console I am playing Mario Brother 1  3 (Still need to get 2) :P But I'm 
 also playing Mario Cart on it, and lego star wars plus a ton of kids games 
 that my oldest loves for me to play with him on :)
 
 
 
 -- 
 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



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread sean greenslade
On Sun, Apr 25, 2010 at 4:13 PM, Jason Pruim li...@pruimphotography.comwrote:


 On Apr 25, 2010, at 9:16 AM, tedd wrote:

  Hi gang:

 Considering we recently had several people mention what games they play,
 it might be interesting to see what everyone plays.

 As for me, I currently play Modern Warfare 2 on XBOX. It's the most
 recent in a long line of war games (i.e., Call of Duty, Ghost Recon, etc.).

 My gamer tag is special tedd

 What's your game?


 Personally I've played everything from those little mini facebook app games
 (Farmville, Mafia Wars) to the grand theft auto series on my ps2, but for
 christmas my wife surprised me with a wii... So now on my brand new game
 console I am playing Mario Brother 1  3 (Still need to get 2) :P But I'm
 also playing Mario Cart on it, and lego star wars plus a ton of kids games
 that my oldest loves for me to play with him on :)




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


Warsow is my game. I love it.

http://www.warsow.net

I play as radonWarrior.



-- 
--Zootboy


Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread David McGlone
On Sunday 25 April 2010 09:16:23 tedd wrote:

apologies if this made it to the list earlier this morning when I initially 
sent it. I didn't see my reply so I'm going to try again here.

 Hi gang:

 Considering we recently had several people mention what games they
 play, it might be interesting to see what everyone plays.

 As for me, I currently play Modern Warfare 2 on XBOX. It's the most
 recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
 etc.).

 My gamer tag is special tedd

 What's your game?

Command and Conquer Yuri's Revenge, Diablo II and occasionally Starcraft.

-- 
Blessings,
David M.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to extract HTML out of $var?

2010-01-15 Thread Bruno Fajardo
2010/1/15 alexus ale...@gmail.com:
 What's the best way to extract HTML out of $var?

 example of $var

 $var = a href=http://http://stackoverflow.com/Stack Overflow/a
 I want

 $var2 = http://starckoverflow.com/;
 example: preg_match();

 what else?

Hi,
If you simply wants to remove all tags from the string, try using the
strip_tags function (http://php.net/strip_tags).


 --
 http://alexus.org/

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



Re: [PHP] What's the best way to extract HTML out of $var?

2010-01-14 Thread John Meyer
On 1/14/2010 7:15 PM, alexus wrote:
 What's the best way to extract HTML out of $var?
 
 example of $var
 
 $var = a href=http://http://stackoverflow.com/Stack Overflow/a
 I want
 
 $var2 = http://starckoverflow.com/;
 example: preg_match();
 
 what else?
 

Actually what it looks like you want are the URLs, not the HTML. This
regular expression will match them up for you:

https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to rotate, resize, and thumbnail?

2009-01-17 Thread Ashley Sheridan
On Fri, 2009-01-16 at 20:38 -0500, Al wrote:
 
 port23user wrote:
  I have a site (done in CodeIgniter) where users can upload pictures.  When
  they upload a picture, I want to rotate it (rotating is optional, depending
  on how much cpu/ram I end up needing), resize it, and create a thumbnail. 
  Right now I'm doing it all in that order using GD, but I'm not sure if it's
  as efficient as it could be.  What's the best way to make this process
  faster?
 
 Imagick class.  Has more image manipulating functions than you'll ever use. 
 You 
 name, and there's function to do it.
 
GD is faster than ImageMagik, so if you can do it with that, keep on.
ImageMagick is only useful for the extra functionality it brings to the
table.


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's the best way to rotate, resize, and thumbnail?

2009-01-17 Thread Kevin Waterson
This one time, at band camp, Al n...@ridersite.org wrote:

 Imagick class.  Has more image manipulating functions than you'll ever use. 
 You 
 name, and there's function to do it.

http://www.phpro.org/examples/Create-Thumbnail-With-GD.html
http://www.phpro.org/examples/GD-Thumbnail-Based-On-Image-Type.html
http://www.phpro.org/examples/Imagick-Thumbnail-From-Center.html

but _do_ checkout imagick it has all the good toys
http://www.phpro.org/tutorials/Imagick.html

Kevin

http://phpro.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   >