Server IP : 66.29.132.122 / Your IP : 3.137.189.226 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/opt/alt/tests/alt-php80-phpiredis_1.0.1-1.el8/ |
Upload File : |
--TEST-- [READER] Feed reader and parse responses --SKIPIF-- <?php require_once 'testsuite_skipif.inc'; --FILE-- <?php $reader = phpiredis_reader_create(); phpiredis_reader_feed($reader, "+OK\r\n"); phpiredis_reader_feed($reader, "-Error\r\n"); var_dump(phpiredis_reader_get_reply($reader)); var_dump(phpiredis_reader_get_reply($reader)); var_dump(phpiredis_reader_get_reply($reader)); // extra read phpiredis_reader_feed($reader, ":123\r\n"); phpiredis_reader_feed($reader, "$3\r\nSET\r\n"); phpiredis_reader_feed($reader, "*3\r\n$3\r\nSET\r\n$1\r\na\r\n$2\r\nAS\r\n"); phpiredis_reader_feed($reader, "nSET\r\n"); var_dump(phpiredis_reader_get_reply($reader)); var_dump(phpiredis_reader_get_reply($reader)); var_dump(phpiredis_reader_get_reply($reader)); var_dump(phpiredis_reader_get_reply($reader)); var_dump(phpiredis_reader_get_error($reader)); --EXPECT-- string(2) "OK" string(5) "Error" bool(false) int(123) string(3) "SET" array(3) { [0]=> string(3) "SET" [1]=> string(1) "a" [2]=> string(2) "AS" } bool(false) string(42) "Protocol error, got "n" as reply type byte"