1--TEST-- 2Test define_syslog_variables() function : variation 3--INI-- 4define_syslog_variables = false 5--SKIPIF-- 6<?php 7if(substr(PHP_OS, 0, 3) != "WIN") 8 die("skip Only run on Windows"); 9?> 10--FILE-- 11<?php 12/* Prototype : void define_syslog_variables(void) 13 * Description: Initializes all syslog-related variables 14 * Source code: ext/standard/syslog.c 15 * Alias to functions: 16 */ 17 18echo "*** Testing define_syslog_variables() : variation ***\n"; 19 20$log_constants = array( 21 LOG_EMERG, 22 LOG_ALERT, 23 LOG_CRIT, 24 LOG_ERR, 25 LOG_WARNING, 26 LOG_NOTICE, 27 LOG_INFO, 28 LOG_DEBUG, 29 LOG_KERN, 30 LOG_USER, 31 LOG_MAIL, 32 LOG_DAEMON, 33 LOG_AUTH, 34 LOG_SYSLOG, 35 LOG_LPR, 36 LOG_NEWS, 37 LOG_UUCP, 38 LOG_CRON, 39 LOG_AUTHPRIV, 40 LOG_PID, 41 LOG_CONS, 42 LOG_ODELAY, 43 LOG_NDELAY, 44 LOG_NOWAIT, 45 LOG_PERROR, 46); 47 48 49$log_variables = array( 50 "LOG_EMERG", 51 "LOG_ALERT", 52 "LOG_CRIT", 53 "LOG_ERR", 54 "LOG_WARNING", 55 "LOG_NOTICE", 56 "LOG_INFO", 57 "LOG_DEBUG", 58 "LOG_KERN", 59 "LOG_USER", 60 "LOG_MAIL", 61 "LOG_DAEMON", 62 "LOG_AUTH", 63 "LOG_SYSLOG", 64 "LOG_LPR", 65 "LOG_NEWS", 66 "LOG_UUCP", 67 "LOG_CRON", 68 "LOG_AUTHPRIV", 69 "LOG_PID", 70 "LOG_CONS", 71 "LOG_ODELAY", 72 "LOG_NDELAY", 73 "LOG_NOWAIT", 74 "LOG_PERROR", 75); 76 77error_reporting(E_ALL); 78$failed = false; 79 80// show variables not defined 81foreach($log_variables as $log_var) { 82 if (isset($$log_var)) { 83 $failed = true; 84 echo "FAILED: variable defined\n"; 85 } 86} 87 88if ($failed == false) { 89 echo "PASSED\n"; 90} 91?> 92===DONE=== 93--EXPECT-- 94*** Testing define_syslog_variables() : variation *** 95PASSED 96===DONE=== 97