1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/standard/tests/network/syslog_null_byte.phpt
Petr Sumbera ce1cadba29 Fix Solaris tests and add nightly CI job
Closes GH-20709
2026-03-04 10:12:03 +01:00

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