['pipe', 'w'], 2 => ['pipe', 'w']], $pipes); $output = stream_get_contents($pipes[1]); $error = stream_get_contents($pipes[2]); fclose($pipes[1]); fclose($pipes[2]); if (proc_close($process) !== 0 || !is_array(json_decode($output, true))) { throw new RuntimeException($scenario . ': ' . $error); } } print "PASS: native account save and audit scenarios\n";