3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Book { protected $title; protected $author; protected $genres; public function __construct() { $this->genres = new ArrayObject(); } public function addGenre($genre) { $this->genres[] = $genre; return $this; } public function getGenres() { return $this->genres; } public function setAuthor(Person $author) { $this->author = $author; return $this; } public function getAuthor() { return $this->author; } public function setTitle($title) { $this->title = $title; return $this; } public function getTitle() { return $this->title; } } class Person { protected $firstName; protected $lastName; public function setFirstName($firstName) { $this->firstName = $firstName; return $this; } public function getFirstName() { return $this->firstName; } public function setLastName($lastName) { $this->lastName = $lastName; return $this; } public function getLastName() { return $this->lastName; } } interface Hydrator { public function hydrate($object, array $data); public function extract($object); } class ReflectionHydrator implements Hydrator { public function hydrate($object, array $data) { $reflection = new ReflectionClass($object); $transform = function ($key) { return 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))); }; foreach ($reflection->getMethod() as $method) { if (!$method->isPublic() || 0 !== strpos($method->getName(), 'set')) { continue; } $field = lcfirst(substr($method->getName(), 3)); // @todo } } public function extract($object) { $reflection = new ReflectionClass($object); $transform = function ($key) { return '_' . strtolower(array_shift($key)); }; $data = array(); foreach ($reflection->getMethods() as $method) { if (!$method->isPublic() || 0 !== strpos($method->getName(), 'get')) { continue; } $field = lcfirst(substr($method->getName(), 3)); $normalized = preg_replace_callback('/([A-Z])/', $transform, $field); $data[$normalized] = $method->invoke(); } return $array; } } class DryReflectionHydrator implements Hydrator { public function extract($object) { $transform = function ($key) { return '_' . strtolower(array_shift($key)); }; $data = array(); // Process get methods $this->processMethods('get', function ($field, ReflectionMethod $method) use (&$data, $transform) { $normalized = preg_replace_callback('/([A-Z])/', $transform, $field); $data[$normalized] = $method->invoke(); }); return $data; } public function hydrate($object, array $data) { $transform = function ($key) { return 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))); }; $this->processMethods('set', function($field, ReflectionMethod $method) use ($data, $transform) { $method->invoke(null, $data[$transform($field)]); }); } protected function processMethods($prefix, $callback) { $reflection = new ReflectionClass($object); foreach ($reflection->getMethods() as $method) { if (!$method->isPublic() || 0 !== strpos($method->getName(), $prefix)) { continue; } $field = lcfirst(substr($method->getName(), strlen($prefix))); $callback($field, $method); } } } $book = new Book(); $book->setTitle('Harry potter'); $book->addGenre('Drama')->addGenre('Nosense'); $hydrator = new ReflectionHydrator(); var_dump($hydrator->extract($book));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  (null)
number of ops:  24
compiled vars:  !0 = $book, !1 = $hydrator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   83     0  E >   DECLARE_CLASS                                            'reflectionhydrator'
  122     1        DECLARE_CLASS                                            'dryreflectionhydrator'
  167     2        NEW                                              $2      'Book'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
  168     5        INIT_METHOD_CALL                                         !0, 'setTitle'
          6        SEND_VAL_EX                                              'Harry+potter'
          7        DO_FCALL                                      0          
  169     8        INIT_METHOD_CALL                                         !0, 'addGenre'
          9        SEND_VAL_EX                                              'Drama'
         10        DO_FCALL                                      0  $6      
         11        INIT_METHOD_CALL                                         $6, 'addGenre'
         12        SEND_VAL_EX                                              'Nosense'
         13        DO_FCALL                                      0          
  171    14        NEW                                              $8      'ReflectionHydrator'
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !1, $8
  173    17        INIT_FCALL                                               'var_dump'
         18        INIT_METHOD_CALL                                         !1, 'extract'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0  $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fegl47%3A88%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   88     0  E >   RECV                                             !0      
   89     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '+'
          3        SEND_VAL                                                 ''
          4        INIT_FCALL                                               'ucwords'
          5        INIT_FCALL                                               'str_replace'
          6        SEND_VAL                                                 '_'
          7        SEND_VAL                                                 '+'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $1      
         10        SEND_VAR                                                 $1
         11        DO_ICALL                                         $2      
         12        SEND_VAR                                                 $2
         13        DO_ICALL                                         $3      
         14        CONCAT                                           ~4      'set', $3
         15      > RETURN                                                   ~4
   90    16*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fegl47%3A88%240

Function %00%7Bclosure%7D%2Fin%2Fegl47%3A104%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  104     0  E >   RECV                                             !0      
  105     1        INIT_FCALL                                               'strtolower'
          2        INIT_FCALL                                               'array_shift'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7        CONCAT                                           ~3      '_', $2
          8      > RETURN                                                   ~3
  106     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fegl47%3A104%241

Function %00%7Bclosure%7D%2Fin%2Fegl47%3A127%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  127     0  E >   RECV                                             !0      
  128     1        INIT_FCALL                                               'strtolower'
          2        INIT_FCALL                                               'array_shift'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7        CONCAT                                           ~3      '_', $2
          8      > RETURN                                                   ~3
  129     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fegl47%3A127%243

Function %00%7Bclosure%7D%2Fin%2Fegl47%3A133%244:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $field, !1 = $method, !2 = $data, !3 = $transform, !4 = $normalized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  133     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
  134     4        INIT_FCALL                                               'preg_replace_callback'
          5        SEND_VAL                                                 '%2F%28%5BA-Z%5D%29%2F'
          6        SEND_VAR                                                 !3
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !4, $5
  135    10        INIT_METHOD_CALL                                         !1, 'invoke'
         11        DO_FCALL                                      0  $8      
         12        ASSIGN_DIM                                               !2, !4
         13        OP_DATA                                                  $8
  136    14      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fegl47%3A133%244

Function %00%7Bclosure%7D%2Fin%2Fegl47%3A143%245:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  143     0  E >   RECV                                             !0      
  144     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '+'
          3        SEND_VAL                                                 ''
          4        INIT_FCALL                                               'ucwords'
          5        INIT_FCALL                                               'str_replace'
          6        SEND_VAL                                                 '_'
          7        SEND_VAL                                                 '+'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $1      
         10        SEND_VAR                                                 $1
         11        DO_ICALL                                         $2      
         12        SEND_VAR                                                 $2
         13        DO_ICALL                                         $3      
         14        CONCAT                                           ~4      'set', $3
         15      > RETURN                                                   ~4
  145    16*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fegl47%3A143%245

Function %00%7Bclosure%7D%2Fin%2Fegl47%3A146%246:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $field, !1 = $method, !2 = $data, !3 = $transform
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  146     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
  147     4        INIT_METHOD_CALL                                         !1, 'invoke'
          5        SEND_VAL_EX                                              null
          6        CHECK_FUNC_ARG                                           
          7        INIT_DYNAMIC_CALL                                        !3
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $4      
         10        FETCH_DIM_FUNC_ARG                               $5      !2, $4
         11        SEND_FUNC_ARG                                            $5
         12        DO_FCALL                                      0          
  148    13      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fegl47%3A146%246

Class Book:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'ArrayObject'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'genres'
          3        OP_DATA                                                  $1
   12     4      > RETURN                                                   null

End of function __construct

Function addgenre:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  addGenre
number of ops:  7
compiled vars:  !0 = $genre
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        FETCH_OBJ_W                                      $1      'genres'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   17     4        FETCH_THIS                                       ~3      
          5      > RETURN                                                   ~3
   18     6*     > RETURN                                                   null

End of function addgenre

Function getgenres:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  getGenres
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   FETCH_OBJ_R                                      ~0      'genres'
          1      > RETURN                                                   ~0
   23     2*     > RETURN                                                   null

End of function getgenres

Function setauthor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  setAuthor
number of ops:  6
compiled vars:  !0 = $author
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
   27     1        ASSIGN_OBJ                                               'author'
          2        OP_DATA                                                  !0
   28     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   29     5*     > RETURN                                                   null

End of function setauthor

Function getauthor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  getAuthor
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   FETCH_OBJ_R                                      ~0      'author'
          1      > RETURN                                                   ~0
   34     2*     > RETURN                                                   null

End of function getauthor

Function settitle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  setTitle
number of ops:  6
compiled vars:  !0 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   RECV                                             !0      
   38     1        ASSIGN_OBJ                                               'title'
          2        OP_DATA                                                  !0
   39     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   40     5*     > RETURN                                                   null

End of function settitle

Function gettitle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  getTitle
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   44     0  E >   FETCH_OBJ_R                                      ~0      'title'
          1      > RETURN                                                   ~0
   45     2*     > RETURN                                                   null

End of function gettitle

End of class Book.

Class Person:
Function setfirstname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  setFirstName
number of ops:  6
compiled vars:  !0 = $firstName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   54     0  E >   RECV                                             !0      
   56     1        ASSIGN_OBJ                                               'firstName'
          2        OP_DATA                                                  !0
   57     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   58     5*     > RETURN                                                   null

End of function setfirstname

Function getfirstname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  getFirstName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   62     0  E >   FETCH_OBJ_R                                      ~0      'firstName'
          1      > RETURN                                                   ~0
   63     2*     > RETURN                                                   null

End of function getfirstname

Function setlastname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  setLastName
number of ops:  6
compiled vars:  !0 = $lastName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   65     0  E >   RECV                                             !0      
   67     1        ASSIGN_OBJ                                               'lastName'
          2        OP_DATA                                                  !0
   68     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   69     5*     > RETURN                                                   null

End of function setlastname

Function getlastname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  getLastName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   73     0  E >   FETCH_OBJ_R                                      ~0      'lastName'
          1      > RETURN                                                   ~0
   74     2*     > RETURN                                                   null

End of function getlastname

End of class Person.

Class Hydrator:
Function hydrate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  hydrate
number of ops:  3
compiled vars:  !0 = $object, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   79     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function hydrate

Function extract:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  extract
number of ops:  2
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   80     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function extract

End of class Hydrator.

Class ReflectionHydrator:
Function hydrate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 37
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 37
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 16, Position 2 = 24
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 24
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/egl47
function name:  hydrate
number of ops:  39
compiled vars:  !0 = $object, !1 = $data, !2 = $reflection, !3 = $transform, !4 = $method, !5 = $field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   85     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   87     2        NEW                                              $6      'ReflectionClass'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $6
   88     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fegl47%3A88%240'
          7        ASSIGN                                                   !3, ~9
   92     8        INIT_METHOD_CALL                                         !2, 'getMethod'
          9        DO_FCALL                                      0  $11     
         10      > FE_RESET_R                                       $12     $11, ->37
         11    > > FE_FETCH_R                                               $12, !4, ->37
   93    12    >   INIT_METHOD_CALL                                         !4, 'isPublic'
         13        DO_FCALL                                      0  $13     
         14        BOOL_NOT                                         ~14     $13
         15      > JMPNZ_EX                                         ~14     ~14, ->24
         16    >   INIT_FCALL                                               'strpos'
         17        INIT_METHOD_CALL                                         !4, 'getName'
         18        DO_FCALL                                      0  $15     
         19        SEND_VAR                                                 $15
         20        SEND_VAL                                                 'set'
         21        DO_ICALL                                         $16     
         22        IS_NOT_IDENTICAL                                 ~17     $16, 0
         23        BOOL                                             ~14     ~17
         24    > > JMPZ                                                     ~14, ->26
   94    25    > > JMP                                                      ->11
   96    26    >   INIT_FCALL                                               'lcfirst'
         27        INIT_FCALL                                               'substr'
         28        INIT_METHOD_CALL                                         !4, 'getName'
         29        DO_FCALL                                      0  $18     
         30        SEND_VAR                                                 $18
         31        SEND_VAL                                                 3
         32        DO_ICALL                                         $19     
         33        SEND_VAR                                                 $19
         34        DO_ICALL                                         $20     
         35        ASSIGN                                                   !5, $20
   92    36      > JMP                                                      ->11
         37    >   FE_FREE                                                  $12
   99    38      > RETURN                                                   null

End of function hydrate

Function extract:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 47
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 47
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 16, Position 2 = 24
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 24
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
filename:       /in/egl47
function name:  extract
number of ops:  50
compiled vars:  !0 = $object, !1 = $reflection, !2 = $transform, !3 = $data, !4 = $method, !5 = $field, !6 = $normalized, !7 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  101     0  E >   RECV                                             !0      
  103     1        NEW                                              $8      'ReflectionClass'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $8
  104     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fegl47%3A104%241'
          6        ASSIGN                                                   !2, ~11
  107     7        ASSIGN                                                   !3, <array>
  109     8        INIT_METHOD_CALL                                         !1, 'getMethods'
          9        DO_FCALL                                      0  $14     
         10      > FE_RESET_R                                       $15     $14, ->47
         11    > > FE_FETCH_R                                               $15, !4, ->47
  110    12    >   INIT_METHOD_CALL                                         !4, 'isPublic'
         13        DO_FCALL                                      0  $16     
         14        BOOL_NOT                                         ~17     $16
         15      > JMPNZ_EX                                         ~17     ~17, ->24
         16    >   INIT_FCALL                                               'strpos'
         17        INIT_METHOD_CALL                                         !4, 'getName'
         18        DO_FCALL                                      0  $18     
         19        SEND_VAR                                                 $18
         20        SEND_VAL                                                 'get'
         21        DO_ICALL                                         $19     
         22        IS_NOT_IDENTICAL                                 ~20     $19, 0
         23        BOOL                                             ~17     ~20
         24    > > JMPZ                                                     ~17, ->26
  111    25    > > JMP                                                      ->11
  113    26    >   INIT_FCALL                                               'lcfirst'
         27        INIT_FCALL                                               'substr'
         28        INIT_METHOD_CALL                                         !4, 'getName'
         29        DO_FCALL                                      0  $21     
         30        SEND_VAR                                                 $21
         31        SEND_VAL                                                 3
         32        DO_ICALL                                         $22     
         33        SEND_VAR                                                 $22
         34        DO_ICALL                                         $23     
         35        ASSIGN                                                   !5, $23
  114    36        INIT_FCALL                                               'preg_replace_callback'
         37        SEND_VAL                                                 '%2F%28%5BA-Z%5D%29%2F'
         38        SEND_VAR                                                 !2
         39        SEND_VAR                                                 !5
         40        DO_ICALL                                         $25     
         41        ASSIGN                                                   !6, $25
  115    42        INIT_METHOD_CALL                                         !4, 'invoke'
         43        DO_FCALL                                      0  $28     
         44        ASSIGN_DIM                                               !3, !6
         45        OP_DATA                                                  $28
  109    46      > JMP                                                      ->11
         47    >   FE_FREE                                                  $15
  118    48      > RETURN                                                   !7
  119    49*     > RETURN                                                   null

End of function extract

End of class ReflectionHydrator.

Class DryReflectionHydrator:
Function extract:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/egl47
function name:  extract
number of ops:  13
compiled vars:  !0 = $object, !1 = $transform, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  125     0  E >   RECV                                             !0      
  127     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fegl47%3A127%243'
          2        ASSIGN                                                   !1, ~3
  130     3        ASSIGN                                                   !2, <array>
  133     4        INIT_METHOD_CALL                                         'processMethods'
          5        SEND_VAL_EX                                              'get'
          6        DECLARE_LAMBDA_FUNCTION  

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.34 ms | 1428 KiB | 31 Q