The PHP function's library

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
smart1
Forum Newbie
Posts: 2
Joined: Sat Feb 15, 2003 11:00 pm
Location: Austin
Contact:

The PHP function's library

Post by smart1 »

Ok, this is a 2 part question. First some background. I'm a CS student at the University of Texas at Austin. UT has an excellent CS program, so sorry if my questions might seem absurd. But, I've learned a lot of Java up till now, and I'm very used to using the methods / classes provided in the JSL.

However, I'm now doing a PHP Internship / Contract work. So, I'm trying to figure out the complications of searching through a SQL database.
So, questions:

1) I'm going to be dealing with many user defined classes, as I want to use OOP for the experience of it. Therefore, I plan to have all my data stored within some type of storage class (maybe a double ended queue). Would it be quicker / better to use the mySQL database for searching data types within the mySQL DB, or would it be faster to store the storage objects (PHP object types) in the database for access later? I'm pretty confused over this, but I want to implement the best / fasted solution even if that means going to a lower level of abstraction. I have no fear. ;)

This leads me to question 2.

2) Java has a Java Standard Library. Does PHP have a similar library and a documented class library? (Or something similar to that effect).

Thanks!
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

(1)

A bit out of my depth here but I can maybe recommend an empirical solution.

Mysql control center (mysql.com) is a database manager which also shows how long it takes to execute queries. On my desktop most seem to take about 0.05s.

Also, I think you can time php scripts with the microtime() fn.

So, you can maybe set up different solutions and compare directly.
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

Go to website such as PHP classes and you will be able to download PHP classes for various things that people have already made.

It would be better to use DB if you're dealing with a lot of data but how do you mean by sotring data in PHP object types?
Post Reply