3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = json_decode(' { "results": [ { "url": "https:1783.json", "id": 1783, "created_at": "2019-08-29T13:52:47Z", "status": "open", "recipient": null }, { "url": "https:1781.json", "id": 1781, "created_at": "2019-08-29T10:21:57Z", "status": "open", "recipient": null } ] } ', true); echo count(array_filter($arr['results'], function ($val) {return $val['status'] == 'open';}));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WIUuS
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%0A%7B%0A%22results%22%3A+%5B%0A++++%7B%0A++++++++%22url%22%3A+%22https%3A1783.json%22%2C%0A++++++++%22id%22%3A+1783%2C%0A++++++++%22created_at%22%3A+%222019-08-29T13%3A52%3A47Z%22%2C%0A++++++++%22status%22%3A+%22open%22%2C%0A++++++++%22recipient%22%3A+null%0A++++%7D%2C%0A++++%7B%0A++++++++%22url%22%3A+%22https%3A1781.json%22%2C%0A++++++++%22id%22%3A+1781%2C%0A++++++++%22created_at%22%3A+%222019-08-29T10%3A21%3A57Z%22%2C%0A++++++++%22status%22%3A+%22open%22%2C%0A++++++++%22recipient%22%3A+null%0A++++%7D%0A++++%5D%0A%7D%0A%0A%09'
   23     2        SEND_VAL                                                 <true>
    3     3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   24     5        INIT_FCALL                                               'array_filter'
          6        FETCH_DIM_R                                      ~3      !0, 'results'
          7        SEND_VAL                                                 ~3
          8        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                         $5      
         11        COUNT                                            ~6      $5
         12        ECHO                                                     ~6
         13      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WIUuS
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        FETCH_DIM_R                                      ~1      !0, 'status'
          2        IS_EQUAL                                         ~2      ~1, 'open'
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.52 ms | 1001 KiB | 15 Q