Skip to content

--repeat cli option #16493

@staabm

Description

@staabm

Description

While discussing stuff at the PHPUnit codesprint we stumbled over a comment mentioning the --repeat cli option.

running e.g. php --repeat=10 -r 'echo "hello";' yields

➜ php --repeat=10 -r 'echo "hello";'
Executing for the first time...
helloFinished execution, repeating...
helloFinished execution, repeating...
helloFinished execution, repeating...
helloFinished execution, repeating...
helloFinished execution, repeating...
helloFinished execution, repeating...
helloFinished execution, repeating...
helloFinished execution, repeating...
helloFinished execution, repeating...
hello%

it works the same way with php --repeat=10 -f myfile.php

this option was something noone of the people in the room has ever seen/used.

we are wondering...

  • php --help doesn't mention this option
  • php --r<TAB> does not autocomplete this option

PHP Version

PHP 8.3.12 (cli) (built: Sep 24 2024 18:08:04) (NTS)

Operating System

macos 15

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions