Why does $fd in Event::__construct under PHP-7 only support resource type?

Issue #31 closed
Timandes White created an issue

When I tried to send an integer $fd to Event::__construct as I tried it under PHP-5.4, I got a core dump at Z_TRY_ADDREF:


    } else if (e->stream_res) {
        ZVAL_RES(&argv[0], e->stream_res);

Should I convert $fd to resource type or is there a bug here? I'm so confused.

Comments (5)

  1. Ruslan Osmanov repo owner

    Actually, PHP5 version was also broken, because a numeric file descriptor was interpreted as a resource with id equal to the numeric fd. Both versions should be fixed by the above-mentioned commit.

  2. Log in to comment