expect_expectl(), when EOF is reached. * @link https://www.php.net/manual/en/expect.constants.php */ const EXP_EOF = -11; /** * Value, returned by expect_expectl() upon timeout of seconds, specified in value of expect.timeout * @link https://www.php.net/manual/en/expect.constants.php */ const EXP_TIMEOUT = -2; /** * Value, returned by expect_expectl() if no pattern have been matched. * @link https://www.php.net/manual/en/expect.constants.php */ const EXP_FULLBUFFER = -5; /** * Execute command via Bourne shell, and open the PTY stream to the process * * @param string $command Command to execute. * @return resource|false Returns an open PTY stream to the processes stdio, stdout, and stderr. * On failure this function returns FALSE. * @since PECL expect >= 0.1.0 * @link https://www.php.net/manual/en/function.expect-popen.php */ function expect_popen(string $command) { unset($command); return false; } /** * Waits until the output from a process matches one of the patterns, a specified time period has passed, * or an EOF is seen. * * If match is provided, then it is filled with the result of search. The matched string can be found in match[0]. * The match substrings (according to the parentheses) in the original pattern can be found in match[1], match[2], * and so on, up to match[9] (the limitation of libexpect). * * @param resource $expect An Expect stream, previously opened with expect_popen() * @param array $cases
An array of expect cases. Each expect case is an indexed array, as described in the following table:
**