improved examples

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@336937 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2015-06-13 22:10:18 +00:00
parent 27f822f870
commit f96f7aecf8
2 changed files with 3 additions and 2 deletions

View file

@ -165,9 +165,10 @@ pcntl_signal(SIGUSR1, "sig_handler");
// or use an object, available as of PHP 4.3.0
// pcntl_signal(SIGUSR1, array($obj, "do_something"));
echo"Generating signal SIGTERM to self...\n";
echo"Generating signal SIGUSR1 to self...\n";
// send SIGUSR1 to current process id
// posix_* functions require the posix extension
posix_kill(posix_getpid(), SIGUSR1);
echo "Done\n";

View file

@ -253,7 +253,7 @@ include 'example.php';
$movies = new SimpleXMLElement($xmlstr);
foreach ($movies->xpath('//character') as $character) {
echo $character->name, 'played by ', $character->actor, PHP_EOL;
echo $character->name, ' played by ', $character->actor, PHP_EOL;
}
?>
]]>