php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50170 undefined function readline()
Submitted: 2009-11-13 19:02 UTC Modified: 2009-11-13 19:34 UTC
From: ramtsoft at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.3.0 OS: windows xp sp3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ramtsoft at gmail dot com
New email:
PHP Version: OS:

 

 [2009-11-13 19:02 UTC] ramtsoft at gmail dot com
Description:
------------
Fatal error: Call to undefined function readline() in ... on line 4


Reproduce code:
---------------
---
From manual page: function.readline#Examples
---
<?php
//get 3 commands from user
for ($i=0; $i < 3; $i++) {
        $line = readline("Command: ");
        readline_add_history($line);
}

//dump history
print_r(readline_list_history());

//dump variables
print_r(readline_info());
?>

Expected result:
----------------
Work!!!

Actual result:
--------------
Error

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-13 19:34 UTC] vrana@php.net
Readline must be properly installed as stated at http://www.php.net/manual/en/readline.installation.php.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 00:01:31 2025 UTC