Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Test syslog() function : new line in message --SKIPIF-- <?php if(substr(PHP_OS, 0..

Decoded Output download

--TEST--
Test syslog() function : new line in message
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) == "WIN")
  die("skip Won't run on Windows");
?>
--FILE--
<?php
$priority = LOG_WARNING;
$message = "First line
Second line";

openlog('PHPT', LOG_PERROR, LOG_USER);
syslog($priority, $message);

?>
--EXPECTF--
%SPHPT%S%r(:|-)%r First line
%SPHPT%S%r(:|-)%r Second line

Did this file decode correctly?

Original Code

--TEST--
Test syslog() function : new line in message
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) == "WIN")
  die("skip Won't run on Windows");
?>
--FILE--
<?php
$priority = LOG_WARNING;
$message = "First line\nSecond line";

openlog('PHPT', LOG_PERROR, LOG_USER);
syslog($priority, $message);

?>
--EXPECTF--
%SPHPT%S%r(:|-)%r First line
%SPHPT%S%r(:|-)%r Second line

Function Calls

None

Variables

None

Stats

MD5 8355797e827616a3c8b9db085f27488a
Eval Count 0
Decode Time 81 ms