1--TEST--
2pcntl_exec(): Test cleanup after non-stringable array value has been encountered for $args and $env_vars.
3--EXTENSIONS--
4pcntl
5--FILE--
6<?php
7try {
8    pcntl_exec('cmd', ['-n', new stdClass()]);
9} catch (Throwable $e) {
10    echo $e::class, ': ', $e->getMessage(), "\n";
11}
12
13try {
14    pcntl_exec(
15        'cmd',
16        ['-n'],
17        ['var1' => 'value1', 'var2' => new stdClass()],
18    );
19} catch (Throwable $e) {
20    echo $e::class, ': ', $e->getMessage(), "\n";
21}
22?>
23--EXPECT--
24Error: Object of class stdClass could not be converted to string
25Error: Object of class stdClass could not be converted to string
26