506329b7ce
add f_error_log message_type=3 function hhvm defult error_log message_type 0,so it can't support user-defind error_log mode(message_type=3) Closes #831 Github: https://github.com/facebook/hiphop-php/pull/831
20 linhas
397 B
PHP
20 linhas
397 B
PHP
<?php
|
|
|
|
$log_string = 'hello world';
|
|
$filename = tempnam(null, 'errorlog_test');
|
|
|
|
error_log($log_string, 3, $filename);
|
|
$f = fopen($filename, 'r');
|
|
$content = fgets($f);
|
|
var_dump($content);
|
|
fclose($f);
|
|
|
|
// test that the logging is appending without newlines
|
|
error_log($log_string, 3, $filename);
|
|
$f = fopen($filename, 'r');
|
|
$content = fgets($f);
|
|
var_dump($content);
|
|
fclose($f);
|
|
|
|
unlink($filename);
|