php8.5
Home/ Manual/ uopz / functions/ uopz_overload

uopz_overload

PHP function Deprecated as of PECL uopz 5 Edit on GitHub ✎

(PECL uopz 1, PECL uopz 2)

Overload a VM opcode

Function-5-0-0

Description

uopz_overload(int $opcode, Callable $callable): void

Overloads the specified opcode with the user defined function

Parameters

opcode

A valid opcode, see constants for details of supported codes

callable

Return Values

Examples

uopz_overload() example

php
<?php
uopz_overload(ZEND_EXIT, function(){});

exit();
echo "Hello World";
?>

The above example will output:

output
Hello World

Source: reference/uopz/functions/uopz-overload.xml · from the official PHP manual (php/doc-en)