getopt
reactphp/event-loop
Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Gets options from the command line argument list
getopt
(
string $short_options
, array
$long_options
= [],
int
&
$rest_index
=
null
): array|
false
require
__DIR__
.
'/../vendor/autoload.php'
;
$args
=
getopt
(
't:l:r:'
);
$t
= isset(
$args
[
't'
]) ? (int)
$args
[
't'
] :
0
;
$loop
= isset(
$args
[
'l'
]) &&
class_exists
(
'React\EventLoop\\'
.
$args
[
'l'
] .
'Loop'
) ?
'React\EventLoop\\'
.
$args
[
'l'
] .
'Loop'
:
Loop
::
get
();
examples/95-benchmark-memory.php