3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterations = 100000; class A {protected $a; protected $b; protected $c;} class AHydrator extends A { public function hydrate(A $a, array $data) { $a->a = $data['a']; $a->b = $data['b']; $a->c = $data['c']; } } $aHydrator = function(A $a, array $data) { $this->a = $data['a']; $this->b = $data['b']; $this->c = $data['c']; }; $data = array('a' => 1, 'b' => 2, 'c' => 3); $a = new A(); for ($i = 0; $i < $iterations; $i++) { $aHydrator->call($a, $data); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 9
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 9
Branch analysis from position: 16
Branch analysis from position: 9
filename:       /in/IQteB
function name:  (null)
number of ops:  17
compiled vars:  !0 = $iterations, !1 = $aHydrator, !2 = $data, !3 = $a, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 100000
   12     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIQteB%3A12%240'
          2        ASSIGN                                                   !1, ~6
   17     3        ASSIGN                                                   !2, <array>
   18     4        NEW                                              $9      'A'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !3, $9
   19     7        ASSIGN                                                   !4, 0
          8      > JMP                                                      ->14
   20     9    >   INIT_METHOD_CALL                                         !1, 'call'
         10        SEND_VAR_EX                                              !3
         11        SEND_VAR_EX                                              !2
         12        DO_FCALL                                      0          
   19    13        PRE_INC                                                  !4
         14    >   IS_SMALLER                                               !4, !0
         15      > JMPNZ                                                    ~15, ->9
   21    16    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FIQteB%3A12%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IQteB
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $a, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        FETCH_THIS                                       $2      
          3        FETCH_DIM_R                                      ~4      !1, 'a'
          4        ASSIGN_OBJ                                               $2, 'a'
          5        OP_DATA                                                  ~4
   14     6        FETCH_THIS                                       $5      
          7        FETCH_DIM_R                                      ~7      !1, 'b'
          8        ASSIGN_OBJ                                               $5, 'b'
          9        OP_DATA                                                  ~7
   15    10        FETCH_THIS                                       $8      
         11        FETCH_DIM_R                                      ~10     !1, 'c'
         12        ASSIGN_OBJ                                               $8, 'c'
         13        OP_DATA                                                  ~10
   16    14      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FIQteB%3A12%240

Class A: [no user functions]
Class AHydrator:
Function hydrate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IQteB
function name:  hydrate
number of ops:  12
compiled vars:  !0 = $a, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        FETCH_DIM_R                                      ~3      !1, 'a'
          3        ASSIGN_OBJ                                               !0, 'a'
          4        OP_DATA                                                  ~3
    8     5        FETCH_DIM_R                                      ~5      !1, 'b'
          6        ASSIGN_OBJ                                               !0, 'b'
          7        OP_DATA                                                  ~5
    9     8        FETCH_DIM_R                                      ~7      !1, 'c'
          9        ASSIGN_OBJ                                               !0, 'c'
         10        OP_DATA                                                  ~7
   10    11      > RETURN                                                   null

End of function hydrate

End of class AHydrator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.33 ms | 1399 KiB | 13 Q