Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP runkit_function_rename don't work?

This code don't work. Why not?

<?php
function test()
{
    echo 'test';
}
runkit_function_rename('test', 'test2');
test2();
?>

What I really want is this. I'm using a system that have a function. When I'm on localhost I want that function to do something different. I want to override the function with own stuff.

All alternatives are welcome as well.

like image 999
Jens Törnell Avatar asked Dec 13 '22 13:12

Jens Törnell


1 Answers

Do you have the PECL extension installed?

http://www.php.net/manual/en/runkit.installation.php

This » PECL extension is not bundled with PHP.
like image 149
Nanne Avatar answered Dec 23 '22 01:12

Nanne