3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $name; public function __construct($name) { $this->name = $name; } public function isTest() { return $this->name === 'test'; } } $things = array(); $things[] = new A('aaa'); $things[] = new A('bbb'); $things[] = new A('test'); $things[] = new A('ddd'); var_dump(array_filter($things, array('isTest', '$this')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gmai7
function name:  (null)
number of ops:  29
compiled vars:  !0 = $things
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ASSIGN                                                   !0, <array>
   19     1        NEW                                              $3      'A'
          2        SEND_VAL_EX                                              'aaa'
          3        DO_FCALL                                      0          
          4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  $3
   20     6        NEW                                              $6      'A'
          7        SEND_VAL_EX                                              'bbb'
          8        DO_FCALL                                      0          
          9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  $6
   21    11        NEW                                              $9      'A'
         12        SEND_VAL_EX                                              'test'
         13        DO_FCALL                                      0          
         14        ASSIGN_DIM                                               !0
         15        OP_DATA                                                  $9
   22    16        NEW                                              $12     'A'
         17        SEND_VAL_EX                                              'ddd'
         18        DO_FCALL                                      0          
         19        ASSIGN_DIM                                               !0
         20        OP_DATA                                                  $12
   24    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'array_filter'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 <array>
         25        DO_ICALL                                         $14     
         26        SEND_VAR                                                 $14
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gmai7
function name:  __construct
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'name'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function __construct

Function istest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gmai7
function name:  isTest
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1        IS_IDENTICAL                                     ~1      ~0, 'test'
          2      > RETURN                                                   ~1
   14     3*     > RETURN                                                   null

End of function istest

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.79 ms | 1400 KiB | 17 Q