public function methods($object)
    {
        $methods = (new ReflectionClass($object))->getMethods(ReflectionMethod::IS_PUBLIC);

        $iterator = function(ReflectionMethod $method)
        {
            return $method->getName();
        };

        return array_map($iterator, $methods);
    }
public function methods($object)
    {
        $methods = (new ReflectionClass($object))->getMethods(ReflectionMethod::IS_PUBLIC);

        $iterator = function(ReflectionMethod $method)
        {
            return $method->getName();
        };

        return array_map($iterator, $methods);
    }
public function methods ( $ object ) { $ methods = ( new ReflectionClass ( $ object ) ) -> getMethods ( ReflectionMethod :: IS_PUBLIC ) ; $ iterator = function ( ReflectionMethod $ method ) { return $ method -> getName ( ) ; } ; return array_map ( $ iterator , $ methods ) ; }
Get the names of all public methods.

@param mixed $object
@return array
Get the names of all public methods .