Information about built-in classes and functions from the command line

    Maybe what I'm going to tell you is already known to all, or maybe not.

    In general, this way: to get information about any built-in class or function (of course, this includes functions from any extension included in your assembly) - you can get this information using simple commands.



    php --rc <class or interface>
    $ php --rc Countable
    Interface [  interface Countable] {
      - Constants [0] {
      }
      - Static properties [0] {
      }
      - Static methods [0] {
      }
      - Properties [0] {
      }
      - Methods [1] {
        Method [  abstract public method count] {
        }
      }
    }

    php --rf <function>
    $ php --rf gettext
    Function [  function gettext] {
      - Parameters [1] {
        Parameter # 0 [  $ msgid]
      }
    }

    In addition, the following features are also available:

    php --re <extension> - information about the extension, its classes and functions.

    php --ri <extension> - configuration of the selected extension

    Also popular now: