mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
21 lines
431 B
PHP
21 lines
431 B
PHP
--TEST--
|
|
Test syslog() function : nul byte in message
|
|
--SKIPIF--
|
|
<?php
|
|
if(substr(PHP_OS, 0, 3) == "WIN")
|
|
die("skip Won't run on Windows");
|
|
if (!defined("LOG_PERROR"))
|
|
die("skip LOG_PERROR is not available on this platform");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$priority = LOG_WARNING;
|
|
$message = "A simple \0 message";
|
|
|
|
openlog('PHPT', LOG_PERROR, LOG_USER);
|
|
syslog($priority, $message);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
%SPHPT%S%r(:|-)%r A simple \x00 message
|