swig/Examples/test-suite/php/director_extend_runme.php
Olly Betts e54d44c4be php: Omit closing ?> in manual and examples
PSR-12 says "The closing ?> tag MUST be omitted from files containing
only PHP".
2021-03-23 11:47:19 +13:00

23 lines
486 B
PHP

<?php
require "tests.php";
require "director_extend.php";
// No new functions
check::functions(array('spobject_getfoobar','spobject_dummy','spobject_exceptionmethod'));
// No new classes
check::classes(array('SpObject'));
// now new vars
check::globals(array());
class MyObject extends SpObject{
function getFoo() {
return 123;
}
}
$m = new MyObject();
check::equal($m->dummy(), 666, "1st call");
check::equal($m->dummy(), 666, "2st call"); // Locked system
check::done();