php-general Digest 9 Jul 2006 02:54:40 -0000 Issue 4229
Topics (messages 239215 through 239220):
Re: Sanity checker?
239215 by: Robert Cummings
I cannot forget you!
239216 by: ieure.php.net
Shopping Carts
239217 by: Michael B Allen
239218 by: Jack Gates
239219 by: Micky Hulse
php_mysql.dll
239220 by: João Cândido de Souza Neto
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
On Sat, 2006-07-08 at 09:09, David Tulloh wrote:
> Ezra Nugroho wrote:
> > It was a long time since I post any question to this list, like back at
> > php 3x time. Boy, a lot has change now.
> >
> > So I actually did kick some funny bones, not quite flames yet. And
> > that's good, I don't really like that.
> >
> > <Wolf>
> > We aren't going to take the time
> > to answer a rhetorical question when you can STFW, RTFM, or RTA.
> > </Wolf>
> >
> > Who are "we"? I hope you are not talking about php community in general.
> > I would be really sad if that's true. Unfortunately, it seems like
> > that's the trend in this list. I want newbies to succeed, hence my talk
> > about such tool. O.W. newbies will go to RoR instead.
> >
> > Anyways,
> >
> > Have you ever seen things like
> >
> > for ($i = 0; $i < count($some_array); $i++) {
> > //do stuff
> > }
> >
> >
> > Do you know how slow it is if $some_array gets big compared to
> >
> > $array_count = count($some_array);
> > for ($i = 0; $i < $array_count; $i++) {
> > //do stuff
> > }
> >
> >
> > Of course you do!
> > But newbies might not....
>
> Of course! Every time you ask for the count of an array PHP loops
> through every item meaning that a doing many counts on a large array (an
> O(n^2) operation) reduces your program to a crippling crawl.
>
> Hang on a tic, that doesn't sound like the PHP that I know.
>
> PHP knows the size of the array, doing a count(array) just returns an
> existing internal number. The count() function doesn't get any slower
> with the array size and calling a simple function isn't significantly
> slower than accessing a variable. In fact, the above examples with an
> array of 100,000 elements didn't result in either script being
> consistantly faster than the other.
Ahh but, precomputing the size and assigning to a variable and using the
variable instead WILL provide a speed gain since you will save the
function call overhead for X - 1 interations. Operator performance in
PHP is MUCH faster than function performance. And with that said, it's a
good idea anyways to get into the habit of using a precomputed value
when iterating since unless you specifically know the internal design of
every function, you may just be hitting an O( n lg n ) algorithm or
worse.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
your big love, ;-)
--- End Message ---
--- Begin Message ---
I need a (free) shopping cart. The simpler the better. This one is what
I'm looking for:
http://www.zend.com/codex.php?id=112&single=1
but it doesn't use current session handling, needs validation, etc.
Any ideas?
Thanks,
Mike
--
Michael B Allen
PHP Extension for SSO w/ Windows Group Authorization
http://www.ioplex.com/
--- End Message ---
--- Begin Message ---
On Saturday 08 July 2006 18:31, Michael B Allen wrote:
> I need a (free) shopping cart. The simpler the better. This one is what
> I'm looking for:
>
> http://www.zend.com/codex.php?id=112&single=1
>
> but it doesn't use current session handling, needs validation, etc.
>
> Any ideas?
>
> Thanks,
> Mike
>
> --
> Michael B Allen
> PHP Extension for SSO w/ Windows Group Authorization
> http://www.ioplex.com/
http://www.oscommerce.com built with PHP and is free.
--
Jack Gates http://www.jlgates.com/
http://www.myenergyproducts.com/
--- End Message ---
--- Begin Message ---
Michael B Allen wrote:
Any ideas?
I plan on using this one for my next shopping-cart project:
<http://www.cubecart.com/site/home/>
"CubeCart is an eCommerce script written with PHP & MySQL. With CubeCart
you can setup a powerful online store as long as you have hosting
supporting PHP and one MySQL database"
Looks pretty good to me... A plus for me is the base template - layout
looks mostly CSS-based (tables used only where needed.) Also is free if
you keep the logo/link back to CubeCart website (~60$ otherwise.)
Another, that I have used, is:
<http://www.zen-cart.com/>
"Zen Cart™ truly is the art of e-commerce; a free, user-friendly, open
source shopping cart system. The software is being developed by group of
like-minded shop owners, programmers, designers, and consultants that
think e-commerce could be and should be done differently."
I have not used ZC for a few versions, so I am sure it has improved... I
did not think it was the greatest at templating and customizing the
backend was a bit of a chore... but the community support is really good.
Hth,
Cheers,
Micky
--- End Message ---
--- Begin Message ---
Hi everyone.
I'm having some troubles in php5 on windows trying to load php_mysql.dll.
When i try to run a page that just has <? phpinfo(); ?> it gives me the
follow error:
PHP Warning: PHP Startup: Unable to load dynamic library
'./ext/php_mysql.dll' - Não foi possível encontrar o módulo especificado. in
Unknown on line 0
Someone knows wath i ought to do for solve that?
Thanks in advantage...
--- End Message ---