There is a plugin which is trying to deactivate some of my PHP functions. Is there a way to add a rand to the function name?
This is what I'm trying to archieve:
$rand = rand(10,100);
function thisismyname . $rand() . () {
function....
}
There is a plugin which is trying to deactivate some of my PHP functions. Is there a way to add a rand to the function name?
This is what I'm trying to archieve:
$rand = rand(10,100);
function thisismyname . $rand() . () {
function....
}
You could define a function into a variable with a rand name and then call it. Ex:
<?php
$function_name = mt_rand(100,10000); //rand name
$func_{$function_name} = function(){
echo 'Your function';
}; //variable that contains the function, named with the rand value obtained
echo "Name: func_$function_name() =>";
$func_{$function_name}(); //Execute function
This outputs:
Name: funct_6929() => Your function
With a diferent name in each run.