Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $name = "Petr";
- echo <<<HEREDOC
- Hello $name!
- HEREDOC;
- class Test {
- const TEST = 1;
- // beginning of docblock area
- /**
- * @access private
- * @var string
- */
- var $_var1 = 'hello';
- var $publicvar = 'Lookee me!';
- /**
- * readFile - do something
- * @param string $src Path to dir or textfile (local or remote)
- * @return string The content of the file or NULL
- */
- public static function readFile($src) {
- if (!isset($src)) {
- return NULL;
- } else {
- // TODO: read the $src file
- return "Not yet implemented";
- }
- }
- }
- echo "File: " . Test::readFile("/tmp/greetings.txt");
- ?>
Add Comment
Please, Sign In to add comment