3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Baz { protected $foo; private $data; public function extract(array $data = array()) { foreach ($data as $key => $val) { if (property_exists($this, $key)) { $this->data[$key] = $val; } } return $this->data; } } $data = array('foo' => 'bar'); $baz = new Baz; var_dump($baz->extract($data));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kIZcb
function name:  (null)
number of ops:  11
compiled vars:  !0 = $data, !1 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN                                                   !0, <array>
   22     1        NEW                                              $3      'Baz'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   24     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !1, 'extract'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class Baz:
Function extract:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 14
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/kIZcb
function name:  extract
number of ops:  18
compiled vars:  !0 = $data, !1 = $val, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV_INIT                                        !0      <array>
   11     1      > FE_RESET_R                                       $3      !0, ->14
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->14
          3    >   ASSIGN                                                   !2, ~4
   12     4        INIT_FCALL                                               'property_exists'
          5        FETCH_THIS                                       ~6      
          6        SEND_VAL                                                 ~6
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $7      
          9      > JMPZ                                                     $7, ->13
   13    10    >   FETCH_OBJ_W                                      $8      'data'
         11        ASSIGN_DIM                                               $8, !2
         12        OP_DATA                                                  !1
   11    13    > > JMP                                                      ->2
         14    >   FE_FREE                                                  $3
   16    15        FETCH_OBJ_R                                      ~10     'data'
         16      > RETURN                                                   ~10
   17    17*     > RETURN                                                   null

End of function extract

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
264.89 ms | 1396 KiB | 18 Q