Advertisement
Guest User

Untitled

a guest
Oct 11th, 2011
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Shows that you can create a new instance.
  4.  *
  5.  * @author Fabian M.
  6.  */
  7. // Include file.
  8. include(dirname(__FILE__) . '/../lib/prototype.php');
  9.  
  10. $p = pt_new();
  11. $p->hello_world = function($self) {
  12.     $self->output = function($self) {
  13.         echo "!! Hello World !!";
  14.     };
  15. };
  16.  
  17. $i = $p->hello_world()->_new();
  18.  
  19. $i->output();
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement