0

I'm trying to send some data through STDIO in a Symfony Process.

$process = new Process([
    'php',
    'bin/console',
    'whatever:command'
]);

Once the process is running, I want to send something through STDIO (Input !== STDIO), but seems that is not possible.

BTW, Process uses the PHP function proc_open, where the third parameter is an array, having as the position 0 a file pointer for the STDIO. The problem is that this array is not accessible.

Did anyone find a solution for that? How can I send something through STDIO without changing the Process class?

1 Answer 1

2

The Process class takes a 4th argument to it's constructor, you could pass in STDIO there.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.