Swoole\Server->on('beforereload', fn)

Declaration

<?php
Swoole\Server->on('beforereload', callback $callback)

Parameters

event

The event name

callback

callback function

Return

success

if success, it returns TRUE, otherwise it returns FALSE.

Since version 4.5.0

Description

Callback function when before the code reloading.

Example