Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 513 Bytes

README.md

File metadata and controls

30 lines (26 loc) · 513 Bytes

README

provided functions

  • fildes_fdopen
  • fildes_close
  • fildes_fileno
  • fildes_dup
  • fildes_dup2

usage

<?php
$stdout = fopen("out.log", "a");
$tmp_fd = fildes_fileno($stdout);
if(fildes_dup2($tmp_fd, fildes_fileno(STDOUT))<0){
    fwrite(STDERR, "dup2 failed");
    exit;
}
fildes_close($tmp_fd);
echo "Hello world!"; // this goes to out.log

installation

phpize;
./configure;
make;
make install;