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 __construct($firstName = null, $lastName = null) { $this->setFirstName($firstName); $this->setLastName($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) { $data = array(); $reflection = new ReflectionClass($object); $transform = function ($key) { return '_' . strtolower(array_shift($key)); }; 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($object); } return $data; } } class DryReflectionHydrator implements Hydrator { public function extract($object) { $transform = function ($key) { return '_' . strtolower(array_shift($key)); }; $data = array(); // Process get methods $this->processMethods($object, 'get', function ($field, ReflectionClass $ref, ReflectionMethod $method) use (&$data, $transform) { $normalized = preg_replace_callback('/([A-Z])/', $transform, $field); $data[$normalized] = $method->invoke($ref); }); return $data; } public function hydrate($object, array $data) { $transform = function ($key) { return 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))); }; $this->processMethods($object, 'set', function($field, ReflectionClass $ref, ReflectionMethod $method) use ($data, $transform) { $method->invoke($ref, $data[$transform($field)]); }); } protected function processMethods($object, $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, $reflection, $method); } } } $book = new Book(); $book->setTitle('Harry potter'); $book->addGenre('Drama')->addGenre('Nosense'); $book->setAuthor(new Person('James', 'Bond')); $hydrator = new ReflectionHydrator(); var_dump($hydrator->extract($book)); var_dump($hydrator->extract($book->getAuthor())); $dryHydrator = new DryReflectionHydrator(); var_dump($dryHydrator->extract($book)); var_dump($dryHydrator->extract($book->getAuthor()));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SH6TC
function name:  (null)
number of ops:  56
compiled vars:  !0 = $book, !1 = $hydrator, !2 = $dryHydrator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   89     0  E >   DECLARE_CLASS                                            'reflectionhydrator'
  128     1        DECLARE_CLASS                                            'dryreflectionhydrator'
  173     2        NEW                                              $3      'Book'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
  174     5        INIT_METHOD_CALL                                         !0, 'setTitle'
          6        SEND_VAL_EX                                              'Harry+potter'
          7        DO_FCALL                                      0          
  175     8        INIT_METHOD_CALL                                         !0, 'addGenre'
          9        SEND_VAL_EX                                              'Drama'
         10        DO_FCALL                                      0  $7      
         11        INIT_METHOD_CALL                                         $7, 'addGenre'
         12        SEND_VAL_EX                                              'Nosense'
         13        DO_FCALL                                      0          
  176    14        INIT_METHOD_CALL                                         !0, 'setAuthor'
         15        NEW                                              $9      'Person'
         16        SEND_VAL_EX                                              'James'
         17        SEND_VAL_EX                                              'Bond'
         18        DO_FCALL                                      0          
         19        SEND_VAR_NO_REF_EX                                       $9
         20        DO_FCALL                                      0          
  178    21        NEW                                              $12     'ReflectionHydrator'
         22        DO_FCALL                                      0          
         23        ASSIGN                                                   !1, $12
  180    24        INIT_FCALL                                               'var_dump'
         25        INIT_METHOD_CALL                                         !1, 'extract'
         26        SEND_VAR_EX                                              !0
         27        DO_FCALL                                      0  $15     
         28        SEND_VAR                                                 $15
         29        DO_ICALL                                                 
  181    30        INIT_FCALL                                               'var_dump'
         31        INIT_METHOD_CALL                                         !1, 'extract'
         32        INIT_METHOD_CALL                                         !0, 'getAuthor'
         33        DO_FCALL                                      0  $17     
         34        SEND_VAR_NO_REF_EX                                       $17
         35        DO_FCALL                                      0  $18     
         36        SEND_VAR                                                 $18
         37        DO_ICALL                                                 
  183    38        NEW                                              $20     'DryReflectionHydrator'
         39        DO_FCALL                                      0          
         40        ASSIGN                                                   !2, $20
  185    41        INIT_FCALL                                               'var_dump'
         42        INIT_METHOD_CALL                                         !2, 'extract'
         43        SEND_VAR_EX                                              !0
         44        DO_FCALL                                      0  $23     
         45        SEND_VAR                                                 $23
         46        DO_ICALL                                                 
  186    47        INIT_FCALL                                               'var_dump'
         48        INIT_METHOD_CALL                                         !2, 'extract'
         49        INIT_METHOD_CALL                                         !0, 'getAuthor'
         50        DO_FCALL                                      0  $25     
         51        SEND_VAR_NO_REF_EX                                       $25
         52        DO_FCALL                                      0  $26     
         53        SEND_VAR                                                 $26
         54        DO_ICALL                                                 
         55      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FSH6TC%3A94%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SH6TC
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   94     0  E >   RECV                                             !0      
   95     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
   96    16*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSH6TC%3A94%240

Function %00%7Bclosure%7D%2Fin%2FSH6TC%3A111%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SH6TC
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  111     0  E >   RECV                                             !0      
  112     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
  113     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSH6TC%3A111%241

Function %00%7Bclosure%7D%2Fin%2FSH6TC%3A133%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SH6TC
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  133     0  E >   RECV                                             !0      
  134     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
  135     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSH6TC%3A133%243

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

End of function %00%7Bclosure%7D%2Fin%2FSH6TC%3A139%244

Function %00%7Bclosure%7D%2Fin%2FSH6TC%3A149%245:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SH6TC
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  149     0  E >   RECV                                             !0      
  150     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
  151    16*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSH6TC%3A149%245

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

End of function %00%7Bclosure%7D%2Fin%2FSH6TC%3A152%246

Class Book:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SH6TC
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/SH6TC
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/SH6TC
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/SH6TC
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/SH6TC
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/SH6TC
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/SH6TC
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 __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SH6TC
function name:  __construct
number of ops:  9
compiled vars:  !0 = $firstName, !1 = $lastName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   54     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
   56     2        INIT_METHOD_CALL                                         'setFirstName'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
   57     5        INIT_METHOD_CALL                                         'setLastName'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
   58     8      > RETURN                                                   null

End of function __construct

Function setfirstname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SH6TC
function name:  setFirstName
number of ops:  6
compiled vars:  !0 = $firstName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   60     0  E >   RECV                                             !0      
   62     1        ASSIGN_OBJ                                               'firstName'
          2        OP_DATA                                                  !0
   63     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   64     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/SH6TC
function name:  getFirstName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E >   FETCH_OBJ_R                                      ~0      'firstName'
          1      > RETURN                                                   ~0
   69     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/SH6TC
function name:  setLastName
number of ops:  6
compiled vars:  !0 = $lastName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   71     0  E >   RECV                                             !0      
   73     1        ASSIGN_OBJ                                               'lastName'
          2        OP_DATA                                                  !0
   74     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   75     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/SH6TC
function name:  getLastName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   79     0  E >   FETCH_OBJ_R                                      ~0      'lastName'
          1      > RETURN                                                   ~0
   80     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/SH6TC
function name:  hydrate
number of ops:  3
compiled vars:  !0 = $object, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   85     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/SH6TC
function name:  extract
number of ops:  2
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   86     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/SH6TC
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
-------------------------------------------------------------------------------------
   91     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   93     2        NEW                                              $6      'ReflectionClass'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $6
   94     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSH6TC%3A94%240'
          7        ASSIGN                                                   !3, ~9
   98     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
   99    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
  100    25    > > JMP                                                      ->11
  102    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
   98    36      > JMP                                                      ->11
         37    >   FE_FREE                                                  $12
  105    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 = 48
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 48
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: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 48
filename:       /in/SH6TC
function name:  extract
number of ops:  51
compiled vars:  !0 = $object, !1 = $data, !2 = $reflection, !3 = $transform, !4 = $method, !5 = $field, !6 = $normalized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  107     0  E >   RECV                                             !0      
  109     1        ASSIGN                                                   !1, <array>
  110     2        NEW                                              $8      'ReflectionClass'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $8
  111     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSH6TC%3A111%241'
          7        ASSIGN                                                   !3, ~11
  115     8        INIT_METHOD_CALL                                         !2, 'getMethods'
          9        DO_FCALL                                      0  $13     
         10      > FE_RESET_R                                       $14     $13, ->48
         11    > > FE_FETCH_R                                               $14, !4, ->48
  116    12    >   INIT_METHOD_CALL                                         !4, 'isPublic'
         13        DO_FCALL                   

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.19 ms | 1428 KiB | 31 Q