假如现在a.php有一个函数
function test(){
echo 'this is a test';
}
然后在b.php 里面require_once('a.php')能不能在b.php里面把test函数的定义show出来
function_exists('test'),这个只能知道它存不存在,能不能把它的定义看出来呢,谢谢
function test(){
echo 'this is a test';
}
然后在b.php 里面require_once('a.php')能不能在b.php里面把test函数的定义show出来
function_exists('test'),这个只能知道它存不存在,能不能把它的定义看出来呢,谢谢
但是你应该知道下面该怎么办了
<?php
function title($title, $name)
{
return sprintf("%s. %s\r\n", $title, $name);
}echo ReflectionFunction::export('title',true);
?>