HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/otium.komma.nl/vendor/phpbench/phpbench/docs/customisation/command.rst
Commands
========

Commands let you add custom CLI commands to PHPBench. For example we can add a
command which prints cats to the console output.

Create a new `Symfony Command`_ similar to the following:

.. codeimport:: ../../examples/Extension/Command/CatsCommand.php
  :language: php

Register it with the :doc:`DI extension <extension>`:

.. codeimport:: ../../examples/Extension/AcmeExtension.php
  :language: php
  :sections: all,command_di

You can then run your command:

.. code-block:: bash

    $ phpbench cats
    🐈🐈🐈🐈🐈🐈🐈

.. _Symfony Command: https://symfony.com/doc/current/console.html