This variable allows to prevent filename completion in completer function by exposing this variable and allowing PHP to update it. It closes https://bugs.php.net/bug.php?id=55694
Patch used (and updated) since PHP 5.2.
Expose attempted_completion_over variable from readline library
better to be : strncasecmp(what, "attempted_completion_over", sizeof("attempted_completion_over") - 1)
and also, test script is needed , thanks
Update readline test to support attempted_completion_over variable
It seemed safe to use strcasecmp since others statements dealing with readline variables use it too.
I updated the test script to handle the new variable.
$ ./run-tests.php ext/readline/tests/readline_info_001.phpt
PHP : ./sapi/cli/php
PHP_SAPI : cli
PHP_VERSION : 5.6.0-dev
PHP_OS : Linux - Linux hartmel-wheezy64 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64
INI actual : /home/hartmel/php-src
More .INIs :
CWD : /home/hartmel/php-src
Extra dirs :
VALGRIND : Not used
Running selected tests.
PASS readline_info(): Basic test [ext/readline/tests/readline_info_001.phpt]
Number of tests : 1 1
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 0 ( 0.0%) ( 0.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Time taken : 0 seconds
Comment on behalf of stas at php.net: