[PHP] Classes and Functions

2009-11-01 Thread Daniel Kolbo
Hello, Is there a way to see what objects and functions a script loaded/required/used? I could recursively loop through the globals, but if objects were unset, then i may miss some. I could make a 'tracking' object and every time i load/include a file (which contains a class def or a function

Re: [PHP] Classes and Functions

2009-11-01 Thread Mathieu Rochette
On Sun, Nov 1, 2009 at 9:50 PM, Daniel Kolbo kolb0...@umn.edu wrote: Hello, Is there a way to see what objects and functions a script loaded/required/used? I don't think it's possible to that in PHP code. I could recursively loop through the globals, but if objects were unset, then i may

Re: [PHP] Classes and Functions

2009-11-01 Thread Larry Garfield
On Sunday 01 November 2009 2:50:55 pm Daniel Kolbo wrote: Hello, Is there a way to see what objects and functions a script loaded/required/used? I could recursively loop through the globals, but if objects were unset, then i may miss some. I could make a 'tracking' object and every time i

Re: [PHP] Classes and Functions

2005-11-03 Thread Jochem Maas
Robert Cummings wrote: On Thu, 2005-11-03 at 12:15, Jasper Bryant-Greene wrote: On Wed, 2005-11-02 at 19:05 -0500, Unknown Unknown wrote: Oh thanks again and what does RTFM mean? Read The [insert your favourite word beginning with F here] Manual. Fondu?? *licks lips* you missed an

RE: [PHP] Classes and Functions

2005-11-03 Thread Shaw, Chris - Accenture
STFW -Original Message- From: Unknown Unknown [mailto:[EMAIL PROTECTED] Sent: 03 November 2005 00:05 To: Jasper Bryant-Greene Cc: php-general@lists.php.net Subject: Re: [PHP] Classes and Functions Oh thanks again and what does RTFM mean

[PHP] Classes and Functions and If's (Problems Again)

2005-11-03 Thread Unknown Unknown
Hi everyone, i have some code that proccesses a login form. i have an object $DB which works only in SOME areas, this is the code: ?php require_once(Include.php); global $DB; $Username= $_REQUEST['Username']; $Password= $_REQUEST['Password']; $SQL= SELECT * FROM members WHERE Username='$Username'

Re: [PHP] Classes and Functions and If's (Problems Again)

2005-11-03 Thread Jasper Bryant-Greene
On Thu, 2005-11-03 at 18:37 -0500, Unknown Unknown wrote: Hi everyone, i have some code that proccesses a login form. i have an object $DB which works only in SOME areas, this is the code: ?php require_once(Include.php); global $DB; There is no need to global $DB here. You are already in

Re: [PHP] Classes and Functions and If's (Problems Again)

2005-11-03 Thread Robin Vickery
On 11/4/05, Unknown Unknown [EMAIL PROTECTED] wrote: Hi everyone, i have some code that proccesses a login form. i have an object $DB which works only in SOME areas, this is the code: [...] $DB=membersp; $SQL=SELECT ID FROM membersonline WHERE ID='$ID' ; $DB-Query($SQL); [...] i get an

[PHP] Classes and Functions

2005-11-02 Thread Unknown Unknown
Hi everybody i have a class that i reference with: $DB= new DBInterface; outside a function it works fine, but using $DB inside a function changes the data type i think... i get an error saying i'm using a method on a non-object... any help appreciatted

Re: [PHP] Classes and Functions

2005-11-02 Thread Jasper Bryant-Greene
On Wed, 2005-11-02 at 18:56 -0500, Unknown Unknown wrote: Hi everybody i have a class that i reference with: $DB= new DBInterface; outside a function it works fine, but using $DB inside a function changes the data type i think... i get an error saying i'm using a method on a non-object...

Re: [PHP] Classes and Functions

2005-11-02 Thread Manish Marathe
On 11/2/05, Unknown Unknown [EMAIL PROTECTED] wrote: Hi everybody i have a class that i reference with: $DB= new DBInterface; outside a function it works fine, but using $DB inside a function changes the data type i think... i get an error saying i'm using a method on a non-object... any

Re: [PHP] Classes and Functions

2005-11-02 Thread Unknown Unknown
A thanks, i tried that before didn't seem to work, now it works Thanks again!

Re: [PHP] Classes and Functions

2005-11-02 Thread Unknown Unknown
Oh thanks again and what does RTFM mean?

Re: [PHP] Classes and Functions

2005-11-02 Thread Jasper Bryant-Greene
On Wed, 2005-11-02 at 19:05 -0500, Unknown Unknown wrote: Oh thanks again and what does RTFM mean? Read The [insert your favourite word beginning with F here] Manual. -- Jasper Bryant-Greene General Manager Album Limited e: [EMAIL PROTECTED] w: http://www.album.co.nz/ b: http://jbg.name/ p:

Re: [PHP] Classes and Functions

2005-11-02 Thread Robert Cummings
On Thu, 2005-11-03 at 12:15, Jasper Bryant-Greene wrote: On Wed, 2005-11-02 at 19:05 -0500, Unknown Unknown wrote: Oh thanks again and what does RTFM mean? Read The [insert your favourite word beginning with F here] Manual. Fondu?? *licks lips* Cheers, Rob. --

[PHP] Classes or functions

2005-10-19 Thread Khorosh Irani
What this methods are better for php4? classes or functions Does it better to use classes whennbsp;I can write the codes with functions? Excuseme for my bad english

[PHP] Classes or functions

2005-10-19 Thread Khorosh Irani
What this methods are better for php4? classes or functions Does it better to use classes when I can write the codes with functions? Excuseme for my bad english

Re: [PHP] Classes or functions

2005-10-19 Thread Brent Baisley
It's really a matter of comfort level and opinion. There can be strong arguments either way. Using just functions will be faster, although the speed difference may be minimal and not noticeable. Using just functions can be easier and quicker to develop, especially for small projects.

Re: [PHP] Classes and Functions

2004-12-12 Thread Rory Browne
your question is hard to answer. The difference between classes and functions is like the difference between a toolbox, and a spanner. A class is a container, that contains functions, and variables, or as they are called in Object-Oriented-Speak(methods, and properties). A method is a function

[PHP] Classes and Functions

2004-12-11 Thread R. Van Tassel
Can someone give me a distinction between the two and when to use / not use them? I want to thank everyone who replied about myFor loop question. All the answers were VERY helpful! Thanks very much. ~ R. Van Tassel

Re: [PHP] Classes and Functions

2004-12-11 Thread Robby Russell
On Sat, 2004-12-11 at 13:03 -0500, R. Van Tassel wrote: Can someone give me a distinction between the two and when to use / not use them? I want to thank everyone who replied about myFor loop question. All the answers were VERY helpful! Thanks very much. You might want to pick up a

Re: [PHP] classes v. functions

2003-07-24 Thread Joel Rees
Hi, am Wednesday 23 July 2003 11:48 schrieb Joel Rees: (You know that $accesses-count and $accesses-resetCounter() are at least declared in the same class declaration. $accesses_count and accesses_resetCounter() could be declared in entirely unrelated include files for entirely

Re: [PHP] classes v. functions

2003-07-23 Thread Joel Rees
Say I have a database class with all kinds of functions for connection, data manipulation, errors, etc: $db = new db_sql; $db-connect(); $db-do_this(); $db-do_that(); How would that be different from an include file with a bunch of functions doing the same thing? As far as I'm

Re: [PHP] classes v. functions

2003-07-23 Thread Sam Baum
Hi, am Wednesday 23 July 2003 11:48 schrieb Joel Rees: (You know that $accesses-count and $accesses-resetCounter() are at least declared in the same class declaration. $accesses_count and accesses_resetCounter() could be declared in entirely unrelated include files for entirely different

Re: [PHP] classes v. functions

2003-07-23 Thread Mike Migurski
Execution speed isn't all that matters. In fact, speed is not the point at all. Then you must be an PHPNuke or Typo3-programmer, beeing lucky to get at least 1 request per second ;). Don't take it hard, but If you had ever been in computer-science [school|college|...] you would know that speed

Re[2]: [PHP] classes v. functions

2003-07-23 Thread Tom Rogers
Hi, MM troll. :) MM Execution speed is most definitely /not/ all that matters, though it MM really depends on the situation. It is often cheaper to throw MM CPU/storage/RAM at a problem than it is to spend more developer time, MM especially when one of the considerations is future maintenance or

Re: [PHP] classes v. functions

2003-07-19 Thread Tom Rogers
Hi, Saturday, July 19, 2003, 7:08:55 AM, you wrote: A This may show my ignorance or my refusal to take for granted something I A don't fully understand but I have a hard time figuring out the advantage of A using classes as opposed to just functions. I am certainly new to php and A at first

Re: [PHP] classes v. functions

2003-07-19 Thread Andu
Thanks to all for your input. Regards, Andu Novac -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] classes v. functions

2003-07-19 Thread Justin French
Whether it's the right move or not, I've put off my learning of PHP classes and OOP methods until PHP5.x, so I guess the time in near :) However, *especially* if you're the only programmer on a project, you can take the ideas benefits behind OOP (for me, having clear, clean code that can be

[PHP] classes v. functions

2003-07-18 Thread Andu
This may show my ignorance or my refusal to take for granted something I don't fully understand but I have a hard time figuring out the advantage of using classes as opposed to just functions. I am certainly new to php and at first sight classes seemed to cut a lot of corners but so do

Re: [PHP] classes v. functions

2003-07-18 Thread Chris Shiflett
--- Andu [EMAIL PROTECTED] wrote: This may show my ignorance or my refusal to take for granted something I don't fully understand but I have a hard time figuring out the advantage of using classes as opposed to just functions. They are entirely different. While OO fans will find my

Re: [PHP] classes v. functions

2003-07-18 Thread Brad Bonkoski
Chris Shiflett wrote: --- Andu [EMAIL PROTECTED] wrote: This may show my ignorance or my refusal to take for granted something I don't fully understand but I have a hard time figuring out the advantage of using classes as opposed to just functions. They are entirely different. While

Re: [PHP] classes v. functions

2003-07-18 Thread Andu
--On Friday, July 18, 2003 14:28:02 -0700 Chris Shiflett [EMAIL PROTECTED] wrote: --- Andu [EMAIL PROTECTED] wrote: This may show my ignorance or my refusal to take for granted something I don't fully understand but I have a hard time figuring out the advantage of using classes as opposed to

Re: [PHP] classes v. functions

2003-07-18 Thread Robert Cummings
On Fri, 2003-07-18 at 18:19, Andu wrote: Say I have a database class with all kinds of functions for connection, data manipulation, errors, etc: $db = new db_sql; $db-connect(); $db-do_this(); $db-do_that(); How would that be different from an include file with a bunch of functions

Re: [PHP] classes v. functions

2003-07-18 Thread Curt Zirzow
Andu [EMAIL PROTECTED] wrote: --On Friday, July 18, 2003 14:28:02 -0700 Chris Shiflett [EMAIL PROTECTED] wrote: --- Andu [EMAIL PROTECTED] wrote: This may show my ignorance or my refusal to take for granted something I don't fully understand but I have a hard time figuring out the

[PHP] Classes vs. functions?

2003-06-03 Thread Vijay Avarachen
I have been mostly using function in my php code, and lately I have been curious about classes. I have a vague idea of classes from my C++ class that I took a few years back. Can someone please explain to me when is a class useful over a set of functions? I have seen very few code with

Re: [PHP] Classes vs. functions?

2003-06-03 Thread Steven Walker
Can someone please explain to me when is a class useful over a set of functions? Almost always. Object oriented programming offers many many advantages (that I cannot get into depth on here). There are a few exceptions where you would not use classes, such as utility functions like max() and

Re: [PHP] Classes vs. functions?

2003-06-03 Thread olinux
Here is an excellent article describing classes/objects - what they are and are not. http://phpmag.net/itr/online_artikel/psecom,id,284,nodeid,114.html olinux Can someone please explain to me when is a class useful over a set of functions? __ Do you

[PHP] classes and functions in include files

2003-02-27 Thread Sunfire
just a fast question here.. and the lotic probably isnt to bright on my part and i think i know the answer to this question too but just to make sure... if you can include variables in an include file and use them outside that file (in the file that includes that file that is) then can you do the

Re: [PHP] classes and functions in include files

2003-02-27 Thread 1LT John W. Holmes
just a fast question here.. and the lotic probably isnt to bright on my part and i think i know the answer to this question too but just to make sure... if you can include variables in an include file and use them outside that file (in the file that includes that file that is) then can you do

Re: [PHP] Classes vs. Functions

2002-07-17 Thread Christopher J. Crane
Thank you for your 2 cents I am just learning and appreciate your comments. - Original Message - From: Michael Hall [EMAIL PROTECTED] To: Chris Crane [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 16, 2002 11:13 PM Subject: Re: [PHP] Classes vs. Functions

[PHP] Classes vs. Functions

2002-07-16 Thread Chris Crane
Could someone please explain the difference between classes and functions and how to use a class. I write alot of PHP, but I never understood this at all. I use an include statement in many of my pages and include a file with a bunch of functions. For instance, I might have a function called

RE: [PHP] Classes vs. Functions

2002-07-16 Thread Jay Blanchard
[snip] Could someone please explain the difference between classes and functions and how to use a class. I write alot of PHP, but I never understood this at all. I use an include statement in many of my pages and include a file with a bunch of functions. For instance, I might have a function

RE: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Clifford
To add to the below, object classes, can have their own set of functions, called methods. These methods are specific to the function, and ALL functions within a class treat any properties (variables) within the class as global. So if you have a class Car with two properties (Make and Model),

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Chris Crane
It helps a little bit, thank you. Could you provide some code as to what a Class looks like. I am just trying to understand it better and if I see it, it might help. Jay Blanchard [EMAIL PROTECTED] wrote in message

RE: [PHP] Classes vs. Functions

2002-07-16 Thread Jay Blanchard
[snip] example? [/snip] http://www.devshed.com/Server_Side/PHP/FormValidatorClass/page1.html Good tutorial Jay * * Want to meet other PHP developers * * in your area? Check out: * * http://php.meetup.com/* * No developer is an island

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Clifford
Here is a sample code (don't take this as gospel... Jay knows more about OOP than I do, I'm sure!): class Car { var $make; var $model; function setMake($x) { $this-make = $x; } function setModel($y) { $this-model = $y; } } $make and $model are the

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Chris Crane
This helps quite a bit Thank you. I am just wondering if I should make classes instead of functions? What would be the benefit of that? Do you know? Martin Clifford [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Here is a sample code (don't take this as gospel...

RE: [PHP] Classes vs. Functions

2002-07-16 Thread Steve Bradwell
info, makes it easier to keep track of. Hope this helps, Steve. -Original Message- From: Chris Crane [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 11:07 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Classes vs. Functions It helps a little bit, thank you. Could you provide some code

RE: [PHP] Classes vs. Functions

2002-07-16 Thread Jay Blanchard
[snip] This helps quite a bit Thank you. I am just wondering if I should make classes instead of functions? What would be the benefit of that? Do you know? [/snip] You should keep classes and functions seperate in your thought process, they are not the same and not meant to do or be the same

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Clifford
I'm still trying to figure that out, but the fog is clearing slowly but steadily :o) From what I've heard on this and other lists, it's all a matter of preference. Obviously those that come from an object-oriented environment (Java, etc), will lean toward this method, while others stay with

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Chris Crane
thanks Jay. Jay Blanchard [EMAIL PROTECTED] wrote in message 000e01c22cdd$0d0c7530$8102a8c0@niigziuo4ohhdt">news:000e01c22cdd$0d0c7530$8102a8c0@niigziuo4ohhdt... [snip] This helps quite a bit Thank you. I am just wondering if I should make classes instead of functions? What would be the

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Chris Crane
Is there an advantage to Classes vs. Functions? Jay Blanchard [EMAIL PROTECTED] wrote in message 000c01c22cdb$11485c10$8102a8c0@niigziuo4ohhdt">news:000c01c22cdb$11485c10$8102a8c0@niigziuo4ohhdt... [snip] example? [/snip] http://www.devshed.com/Server_Side/PHP/FormValidatorClass/page1.html

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Chris Crane
: [EMAIL PROTECTED] Subject: Re: [PHP] Classes vs. Functions It helps a little bit, thank you. Could you provide some code as to what a Class looks like. I am just trying to understand it better and if I see it, it might help. Jay Blanchard [EMAIL PROTECTED] wrote in message 000401c22cd8$

RE: [PHP] Classes vs. Functions

2002-07-16 Thread Steve Bradwell
: Chris Crane [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 11:40 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Classes vs. Functions Wow...this is pretty cool. Do you HAVE to declareall your varibles ahead of time? Steve Bradwell [EMAIL PROTECTED] wrote in message

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Alberto Serra
ðÒÉ×ÅÔ! Martin Clifford wrote: Could someone please explain the difference between classes and functions and how to use a class. Well, that's a 1 billion $$ question. I don't think one can fully grasp that difference by reading an email. I strongly suggest you to buy yourself a book about

RE: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Towell
Martin Clifford wrote: Could someone please explain the difference between classes and functions and how to use a class. Whether you should like OOP or not is a religious matter, so I will not enter the field. OOP has its pluses and its minuses. It's a technique, not an ultimate

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Peter J. Schoenster
On 17 Jul 2002 at 12:43, Michael Hall wrote: There is no simple answer here. I have started using classes where I find I am writing a lot of related functions that share similar parameters. Database connection and queries are a good example. Authentication is another. Yeah. I have

RE: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Towell
[snip] A CLASS after all is just a collection of functions with a data model. But ... there is modular and then there is OO imho. [snip] A class is more than just a bunch of functions that have been placed together. If you want to do that, then you might as well just throw them all into the

[PHP] Classes and functions

2001-11-28 Thread Daniel Reichenbach
Hy, I'm writing a class for POP3 access and I want some of the internal functions to be private, like the mime decoding stuff. Is there any way to do this? I found nothing in the docs :( Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: [PHP] Classes and functions

2001-11-28 Thread Andrey Hristov
Subject: [PHP] Classes and functions Hy, I'm writing a class for POP3 access and I want some of the internal functions to be private, like the mime decoding stuff. Is there any way to do this? I found nothing in the docs :( Daniel -- PHP General Mailing List (http://www.php.net