Skip to content

kjdev/php-ext-override

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Override function Extension for PHP

Build Status

This extension allows overrides functions.

Function

  • override_function — Overrides functions

override_function — Overrides functions

Description

bool override_function ( string $name , string $args , string $code [ , string $origin ] )

Overrides functions by replacing them in the symbol table.

Pameters

  • name

    The function to override.

  • args

    The function arguments, as a comma separated string.

  • code

    The new code for the function.

  • origin

    Original function to rename.

Return Values

Returns TRUE on success or FALSE on failure.

Examples

override_function('test', '$a,$b', 'echo "TEST"; return $a * $b;');
override_function('test', '$a,$b', 'echo "TEST"; return $a * $b;', 'origin_test');

About

Override function Extension for PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published