<?php class Foo{ static $variable = array('func' => __CLASS__ . '::secondFunction'); public static function firstFunction(){ return "PHP5!"; } public static function secondFunction(){ return "PHP7!"; } } $variable = array('func' => 'firstFunction'); echo Foo::$variable['func']();
You have javascript disabled. You will not be able to edit any code.