summaryrefslogtreecommitdiff
path: root/Examples/CppClassesInPhp/cppclassinphp.php
blob: cf1e42c7326fbdbaf3b6c4de7b8f43708fdb2ac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
/**
 *  cppclassinphp.php
 *  @author Jasper van Eck<jasper.vaneck@copernica.com>
 * 
 *  An example file to show the working of using a C++ class in PHP.
 */
 
// run the regular function
myFunction();

//create a MyCustomClass object, which is an object of a C++ class
$object = new MyClass();

// run a function of the class
$object->myMethod(1);

echo($object->property1."\n");
echo($object->property2."\n");