php8.5
Home/ Manual/ language / wrappers/ expect://

expect://

PHP function Edit on GitHub ✎

Process Interaction Streams

Description

Streams opened via the expect:// wrapper provide access to process's stdin, stdout and stderr via PTY.

Note

In order to use the expect:// wrapper, the Expect extension available from Pecl must be installed.

expect:// (PECL)

Usage

  • expect://command

Options

AttributeSupported
Restricted by allow_url_fopenNo
Allows ReadingYes
Allows WritingYes
Allows AppendingYes
Allows Simultaneous Reading and WritingNo
Supports stat()No
Supports unlink()No
Supports rename()No
Supports mkdir()No
Supports rmdir()No

Source: language/wrappers/expect.xml · from the official PHP manual (php/doc-en)