Re: Dealing with large classes over several files
| From: | Kim Steinhaug | Date: | Wed, 03 Dec 2003 09:05:24 +0000 |
| Subject: | Re: Dealing with large classes over several files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171648@lists.php.net to get a copy of this message | ||
umm... It all looks good except this one :
function foo::f ()
This is where you get the T_ error. Dont know what you are
trying to do here, but thats the error anyways, :)
Your first example is all correct,
// myclass.inc.php
class foo
{
// constructor and destructor
function f () {}
}
Dont know if it helps you though.
--
Kim Steinhaug
---------------------------------------------------------------
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
---------------------------------------------------------------
"Callum Urquhart" <callum@devnet-uk.net> wrote in message
news:20031202175534.94665.qmail@pb1.pair.com...
> This may well have come up before as it is an obvious problem/question.
>
> Coming from a C++ background, I define a class in a header file and define
> the functions for that class in a seperate source file. Now the question:
is
> this possible in PHP4?
>
> I have tried the obvious:
>
> // myclass.inc.php
>
> class foo
> {
> // constructor and destructor
> function f () {}
> }
>
>
> // myclass.php
>
> function foo::f ()
> {
> // define here
> }
>
>
> This gives me an error: unexpected T_PAAMAYIM_NEKUDOTAYIM
> Is this possible in PHP4, and if not, why not? It's an obvious problem,
> namely for code management.
>
>
> -Callum Urquhart
> www.pastecode.net