function test() { if (is_callable(array($this, 'test_func1'))) { $this->test_func1(); } else { echo "test_func1 isn't callable from child\n"; } if (is_callable(array($this, 'test_func2'))) { $this->test_func2(); } else { echo "test_func2 isn't callable from child\n"; } if (is_callable(array('test_class', 'test_func3'))) { test_class::test_func3(); } else { echo "test_func3 isn't callable from child\n"; } if (is_callable(array('test_class', 'test_func4'))) { test_class::test_func4(); } else { echo "test_func4 isn't callable from child\n"; } }
return true; } function set_var4($value) { $this->test_var4 = $value; echo "test_var4 property set to {$value}<br />\n"; return true; } function disp() { echo "<pre>"; var_dump($this); echo "</pre>"; } } $obj = new test_class(1, 'arg2'); $obj->set_var1('test1'); $obj->set_var2(123); $obj->set_var3($a); /* Array from previous test */ $obj->set_var4(array(1, 2, 3, 4, 5, 6, 7, 8, 9)); $obj->disp(); ?> <h2>And finally a bit of XML and XSLT</h2> <?php $xml = domxml_open_file('presentations/slides/intro/menu.xml'); $xsl = domxml_xslt_stylesheet_file('presentations/slides/intro/menu.xsl'); $out = $xsl->process($xml); echo $out->dump_mem(); ?> </p>
<script src="bower_components/angular-aria/angular-aria.min.js"></script> <script src="bower_components/angular-material/angular-material.min.js"></script> <script src="js/main.js"></script> </head> <body layout="column" ng-controller="MainCtrl"> <h1>Hello World!</h1> <?php echo "<h3>From PHP too :)</h3>"; ?> <h3>{{ angular_hello }}</h3> </br> <?php include_once "class.php"; $test_c = new test_class(); $arr = $test_c->initJSON(); var_dump($TYPES["_INT_"]); echo "</br>"; var_dump($arr); echo "</br>"; $test_c->setInt(1); $arr = $test_c->initJSON(); var_dump($arr); echo "</br>"; $out = array_values($arr); echo "<pre>" . json_encode($out) . "</pre>"; ?> </body>