3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Something { public function __construct() { // $this->current_user = Auth::get_user(); } public function another_thing() { $groups = array_filter(array(0, 1, 5, 10, 50), function($item) { return $item < $this->current_user->group; }); } } $something = new Something(); $something->another_thing();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/10oDa
function name:  (null)
number of ops:  6
compiled vars:  !0 = $something
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Something'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'another_thing'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F10oDa%3A12%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/10oDa
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        FETCH_THIS                                       $1      
          2        FETCH_OBJ_R                                      ~2      $1, 'current_user'
          3        FETCH_OBJ_R                                      ~3      ~2, 'group'
          4        IS_SMALLER                                       ~4      !0, ~3
          5      > RETURN                                                   ~4
   14     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F10oDa%3A12%240

Class Something:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/10oDa
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   null

End of function __construct

Function another_thing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/10oDa
function name:  another_thing
number of ops:  7
compiled vars:  !0 = $groups
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'array_filter'
          1        SEND_VAL                                                 <array>
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F10oDa%3A12%240'
   14     3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
   12     5        ASSIGN                                                   !0, $2
   15     6      > RETURN                                                   null

End of function another_thing

End of class Something.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.59 ms | 1396 KiB | 15 Q