3v4l.org

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

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

End of function extract

End of class Proxy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.95 ms | 1396 KiB | 17 Q