PHP

http://www.php.net/

syslog

Generate a system log message

   1 <?php
   2 // levels LOG_EMERG LOG_ALERT LOG_CRIT LOG_ERR  LOG_WARNING LOG_NOTICE  LOG_INFO LOG_DEBUG 
   3 syslog(LOG_INFO,'Hello here'); // In Slackware by default logs the message to /var/log/messages
   4 ?>

sprintf

Return a formatted string

   1 <?php
   2 echo sprintf('There are %d monkeys in the %s', 5, 'tree');
   3 ?>

str_replace

Replace all occurrences of the search string with the replacement string

   1 <?php
   2 // Returns <body text='black'>
   3 $bodytag = str_replace("%body%", "black", "<body text='%body%'>");
   4 ?>

PHP (last edited 2014-07-09 20:32:52 by 92)