Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Shows that you can create a new instance.
- *
- * @author Fabian M.
- */
- // Include file.
- include(dirname(__FILE__) . '/../lib/prototype.php');
- $p = pt_new();
- $p->hello_world = function($self) {
- $self->output = function($self) {
- echo "!! Hello World !!";
- };
- };
- $i = $p->hello_world()->_new();
- $i->output();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement