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
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
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
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
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
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'
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
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
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
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...
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
A thanks, i tried that before didn't seem to work, now it works
Thanks again!
Oh thanks again
and what does RTFM mean?
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:
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.
--
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
--- 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
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
--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
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
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
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
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
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
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
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
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
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
[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
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),
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
[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
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
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...
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
[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
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
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
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
: [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$
: 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
ðÒÉ×ÅÔ!
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
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
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
[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
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
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
61 matches
Mail list logo