php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55454 Apparent errors in the example for expect_expectl
Submitted: 2011-08-18 20:11 UTC Modified: 2011-08-25 21:11 UTC
From: dpatterson at dplhenterprises dot com Assigned: nikic (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2011-08-18 20:11 UTC] dpatterson at dplhenterprises dot com
Description:
------------
The examples for the expect extension appear to a number of undefined constants (PASSWORD, YESNO, SHELL, UNAME).

These are used in the calls to expect_expectl() and, unless I miss by guess, will result in PHP Notice errors of the form "Use of undefined constant PASSWORD - assumed 'PASSWORD' in ...".

Just seems like the examples should be error free as possible.

Thanks.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-22 14:04 UTC] kalle@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: kalle
 [2011-08-22 14:04 UTC] kalle@php.net
Hi

I honestly don't know how this extension works, but if you got a better example then please post it here and I'll update the documentation to reflect it.
 [2011-08-25 21:09 UTC] nikic@php.net
Automatic comment from SVN on behalf of nikic
Revision: http://svn.php.net/viewvc/?view=revision&revision=315522
Log: Fix Doc Bug #55454: Apparent errors in the examples
 [2011-08-25 21:11 UTC] nikic@php.net
-Summary: Apparent errors in the examples +Summary: Apparent errors in the example for expect_expectl -Status: Assigned +Status: Closed -Assigned To: kalle +Assigned To: nikic
 [2011-08-25 21:11 UTC] nikic@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

I updated the example to just use strings instead of constants (and fixed formatting + added some small comments).
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 19:00:01 2026 UTC