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

Escape Latin Characters
I need to escape latin characters in an xml doc. Example: "é" is escaped to "é". I thoug

Parse XML
Good day,

I use oempro software and try to parse XMLReturn but it's not working for me, simpl

Check if another session of the page is running?
I want to keep people from opening multiple tabs, or sessions of my Facebook app. Is it possible to

PHP doesn't send my mail
Hi all, I found this and used it to send mail. Simple contact form with some required fields. The va

Struct/union and scope problem!
HI all , I have
Code: in header.h typedef struct Node Link; /* ---------

Why use OOP?
Can someone explain to me why I should use OOP instead of procedure based code.

Im building a

CHECH A STRING FOR ' " ' (DOUBLE QUOTES)
I am checking for delimiter (.!?) and if there is a " after a sentence then it should neglect a

void* and sizeof()
Hi,

Using void* and sizeof is it possible to get the value of the object ?

I understan

FlashVar function how to insert variables
Hi guys. Im new in this forum and also new in php programming. Can you help me about this code?
<

Need help with some php code :)
Hey! I'm quite new to this whole thing, so please don't fire me with shait on this one =D

I'm

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