PHP Classes

File: examples/adding/test.php

Recommend this page to a friend!
  Classes of Nicola Covolo   Editable   examples/adding/test.php   Download  
File: examples/adding/test.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Editable
Add functions and variables dynamically to objects
Author: By
Last change: Update of examples/adding/test.php
Date: 11 months ago
Size: 211 bytes
 

Contents

Class file image Download
<?php
include("../../Editable.php");
include(
"B.php");

$f = new B();
$f->addPrivateVariable("ciao","Hello World");
$a = function ()
{
    echo
$this->ciao;
}
;
$f->addPublicFunction("test", $a);
$f->test();

?>