diff --git a/reference/expect/functions/expect-expectl.xml b/reference/expect/functions/expect-expectl.xml
new file mode 100644
index 0000000000..1d8f17120c
--- /dev/null
+++ b/reference/expect/functions/expect-expectl.xml
@@ -0,0 +1,134 @@
+
+
+
+
+ expect_expectl
+ Waits until the output from a process matches one
+ of the patterns, a specified time period has passed, or an EOF is seen.
+
+
+
+ &reftitle.description;
+
+ resourceexpect_expectl
+ resourceexpect
+ arraycases
+
+
+ Waits until the output from a process matches one of the patterns,
+ a specified time period has passed, or an EOF is seen.
+
+
+
+ &reftitle.parameters;
+
+
+
+ expect
+
+
+ An Expect stream, previously opened with
+ expect_popen.
+
+
+
+
+ cases
+
+
+ An array of expect cases. Each expect case is an indexed array, where
+ value corresponding to key 0 is a string pattern, 1 - return value,
+ and 2 - one of EXP_GLOB, EXP_EXACT or EXP_REGEXP (pattern type).
+
+ Key index 2 is optional, if not specified - the value of EXP_GLOB is
+ used by default.
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns value associated with pattern that was matched.
+
+
+ On failure this function returns EXP_EOF, EXP_TIMEOUT or EXP_FULLBUFFER.
+
+
+
+ &reftitle.examples;
+
+
+ expect_expectl example
+
+ "password:", 1 => PASSWORD),
+ array (0 => "yes/no)?", 1 => YESNO)
+);
+
+while (true) {
+ switch (expect_expectl ($stream, $cases))
+ {
+ case PASSWORD:
+ fwrite ($stream, "password\n");
+ break;
+
+ case YESNO:
+ fwrite ($stream, "yes\n");
+ break;
+
+ case EXP_TIMEOUT:
+ case EXP_EOF:
+ break 2;
+
+ default:
+ die ("Error has occurred!\n");
+ }
+}
+
+fclose ($stream);
+?>
+]]>
+
+
+
+
+
+ &reftitle.seealso;
+
+
+ expect_popen
+
+
+
+
+
+
diff --git a/reference/expect/functions/expect-popen.xml b/reference/expect/functions/expect-popen.xml
new file mode 100644
index 0000000000..258de74433
--- /dev/null
+++ b/reference/expect/functions/expect-popen.xml
@@ -0,0 +1,90 @@
+
+
+
+
+ expect_popen
+ Exectutes command via Bourne shell.
+
+
+ &reftitle.description;
+
+ resourceexpect_popen
+ stringcommand
+
+
+ Executes command via Bourne shell.
+
+
+
+ &reftitle.parameters;
+
+
+
+ command
+
+
+ Command to execute.
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns an open PTY stream to the process'es stdio, stdout and stderr.
+
+
+ On failure this function returns &false;.
+
+
+
+ &reftitle.examples;
+
+
+ expect_popen example
+
+
+]]>
+
+
+
+
+
+ &reftitle.seealso;
+
+
+ popen
+
+
+
+
+
+