3v4l.org

run code in 500+ PHP versions simultaneously
<?php $newresults = array ( 1 => (object)(array( 'id' => 30508, 'status' => 'Active' )), 2 => (object)(array( 'id' => 30509, 'status' => 'InActive' )), 3 => (object)(array( 'id' => 30510, 'status' => 'Active' )) ); $newresults = array_filter($newresults, function ($v) { return $v->status == 'Active'; }); print_r($newresults);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BYJLh
function name:  (null)
number of ops:  17
compiled vars:  !0 = $newresults
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   CAST                                              8  ~1      <array>
          1        INIT_ARRAY                                           ~2      ~1, 1
          2        CAST                                              8  ~3      <array>
          3        ADD_ARRAY_ELEMENT                                    ~2      ~3, 2
          4        CAST                                              8  ~4      <array>
          5        ADD_ARRAY_ELEMENT                                    ~2      ~4, 3
    3     6        ASSIGN                                                       !0, ~2
   21     7        INIT_FCALL                                                   'array_filter'
          8        SEND_VAR                                                     !0
          9        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
         10        SEND_VAL                                                     ~6
         11        DO_ICALL                                             $7      
         12        ASSIGN                                                       !0, $7
   23    13        INIT_FCALL                                                   'print_r'
         14        SEND_VAR                                                     !0
         15        DO_ICALL                                                     
         16      > 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/BYJLh
function name:  {closure:/in/BYJLh:21}
number of ops:  5
compiled vars:  !0 = $v
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   RECV                                                 !0      
          1        FETCH_OBJ_R                                          ~1      !0, 'status'
          2        IS_EQUAL                                             ~2      ~1, 'Active'
          3      > RETURN                                                       ~2
          4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
138.1 ms | 1920 KiB | 15 Q