Guest User

Untitled

a guest
May 26th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <?php
  2. $name = "Petr";
  3. echo <<<HEREDOC
  4. Hello $name!
  5.  
  6. HEREDOC;
  7.  
  8. class Test {
  9. const TEST = 1;
  10.  
  11. // beginning of docblock area
  12. /**
  13. * @access private
  14. * @var string
  15. */
  16. var $_var1 = 'hello';
  17. var $publicvar = 'Lookee me!';
  18.  
  19. /**
  20. * readFile - do something
  21. * @param string $src Path to dir or textfile (local or remote)
  22. * @return string The content of the file or NULL
  23. */
  24. public static function readFile($src) {
  25. if (!isset($src)) {
  26. return NULL;
  27. } else {
  28. // TODO: read the $src file
  29. return "Not yet implemented";
  30. }
  31. }
  32. }
  33.  
  34. echo "File: " . Test::readFile("/tmp/greetings.txt");
  35. ?>
Add Comment
Please, Sign In to add comment