'how to get function in joomla module - in helper.php?

in mymodule/helper.php :
<?php
defined('_JEXEC') or die;
class modvmymodHelper {

public static function function_one() {

function update_sql(){
 $i = 5;
}

update_sql();
}
}

Whyy Joomla 3.10 php 7.4 returns internal server error ? please hot to get function in function in joomla 3.10 ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source