Re: [PHP-DEV] FFI extension / NULL-Checks

2019-09-09 Thread Philip Hofstetter
On Mon, Sep 9, 2019 at 10:13 AM Stanislav Malyshev wrote: > > isset($err) > > $err[0] != null > > -> is always true, regardless of whether func as assigned an error or not > > > > $err[0]; > > -> segfault > > This is a bit confusing - if $err[0] segfaults, how it can be != null? > Does this beha

Re: [PHP-DEV] FFI extension / NULL-Checks

2019-09-09 Thread Stanislav Malyshev
Hi! > isset($err) > $err[0] != null > -> is always true, regardless of whether func as assigned an error or not > > $err[0]; > -> segfault This is a bit confusing - if $err[0] segfaults, how it can be != null? Does this behave differently in different contexts? Anyway, it shouldn't probably segf

[PHP-DEV] FFI extension / NULL-Checks

2019-09-08 Thread Philip Hofstetter
Hello, (I'm writing to the internals list because I don't think that at this point, FFI usage is wide-spread enough to get an opinion on other venues) maybe I'm just stupid, but I think there has been a slight oversight in the API design for the FFI interface. My problem is with functions that r