php7 void return type not working?

后端 未结 5 982
一个人的身影
一个人的身影 2020-12-06 15:48

I have a problem with return types in php7, specially \"void\".

it works with all other types, int, string, null, bool, class objects.

but when i use void it

5条回答
  •  有刺的猬
    2020-12-06 16:29

    tl;dr

    Return type void works since PHP 7.1 which is already available.

    Working syntax is:

提交回复
热议问题