Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kjdev/php-ext-override
Override function Extension for PHP
https://github.com/kjdev/php-ext-override
Last synced: 25 days ago
JSON representation
Override function Extension for PHP
- Host: GitHub
- URL: https://github.com/kjdev/php-ext-override
- Owner: kjdev
- License: other
- Created: 2012-08-08T04:55:26.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-10-18T00:52:43.000Z (about 12 years ago)
- Last Synced: 2024-11-18T00:52:35.816Z (about 2 months ago)
- Language: C
- Size: 97.7 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Override function Extension for PHP #
[![Build Status](https://secure.travis-ci.org/kjdev/php-ext-override.png?branch=master)](http://travis-ci.org/kjdev/php-ext-override)
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');