Object Interfaces


Posted on 16th Feb 2014 07:03 pm by admin

EDIT: Never mind, I just updated to php 5.

Hey all,

I'm currently experimenting with php object interfaces. However, whenever I try to implement one, I get a php error.


interface iTemplate
{
public function setVariable($name, $var);
public function getHtml($template);
}


The error is:Code: Parse error: parse error, unexpected T_STRING in /path/test.php on line 1

What am I doing wrong? If it matters, my server is running php version 4.3.11.

No comments posted yet

Your Answer:

Login to answer
269 Like 28 Dislike
Previous forums Next forums
Other forums

Memory Allocation
Hi folks,
see this ex:

int v=5;
v=v+10;

then what will do the compiler before th

NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder '

user data not transferring to new page
I'm a PHP learner. After an index.php page, the user goes to a login.php page. Both pages seem to

Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,

some query on multilingual website
Hi all,

Which is the simplest and easiest method to make a website multilingual,
is it put

Scrolling news bar and MySQL
I am not sure if this is the correct forum to post this on. If not, I apologize. I am still pretty

Sufficient protection from bad input?
I am writing a simple script to let people upload 'pages' of their own content, be it simply a few b

Is there something wrong?
Hi all,

Just a quick question... can someone look at this code and see if something is wrong?

form problem
Hi all, I think this is going to be easy to resolve but for I have been looking at it to long and I

WORDPRESS - Multiple Loops Only Going to One Post?
I have various pages with multiple loops and i need them to be individual to all other categories.

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash