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

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

Not "Just Another" MMORPG - text based.
Hello,

I've been learning MySQL and PHP for the last 2-3 years.
Though, I've had long paus

ECC6 - Single sign-on
We are in the process of upgrading to ECC 6 which will support single sign on with user passwords al

using file_get_contents??
okay how would i create a script using file_get_contents() in php have it grab search pages 1-20 and

RFQ Configuration - can you make PLANT field an optional field in ME42
Is there a way to make the plant field on an RFQ optional in change mode (ME42)?

Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:
"a.b.c.d.e.f&

LOOPing Problem
Hello All!

The following code loops through the data and displays the data accordingly. My p

help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:

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