Break array_walk from anonymous function

后端 未结 2 1994
我在风中等你
我在风中等你 2021-01-17 09:26

Is there a way to stop an array_walk from inside the anonymous function ?

Here is some sample code (that works) to show what I mean, th

2条回答
  •  日久生厌
    2021-01-17 10:18

    As stated, theoretically it's possible but I'd advise against it. Here's how to use an Exception to break out of the array_walk.

提交回复
热议问题