Since php 5.3.0 , you can do the following:
class Funcs { public function __callStatic($name, $args) { if (!function_exists($name)) { require_once sprintf( 'funcs/%s.func.php',
And then use it like (for example):
Funcs::helloworld();
That will try to upload the file to funcs/helloworld.func.php and execute helloworld after a successful download.
This way you can omit the repeated inline tests.
Yoshi Jul 25 2018-11-11T00: 00Z
source share