PHP 8.4.24 Released!

Voting

: min(nine, three)?
(Example: nine)

The Note You're Voting On

andi at splitbrain dot org
20 years ago
function_exists will return false for functions disabled with the disable_functions ini directive. However those functions are still declared so trying to define them yourself will fail.

<?php
if(!function_exists('readfile')){
  function readfile($file){
    $handle=@fopen($cache,"r");
    echo @fread($handle,filesize($file));
    @fclose($handle);
  }
}
?>

The above will issue a "Cannot redeclare readfile()" fatal error if readfile was disabled with disable_functions.

<< Back to user notes page

To Top