3v4l.org

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

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/7SMNr
function name:  hydrate
number of ops:  12
compiled vars:  !0 = $a, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        FETCH_DIM_R                                      ~3      !1, 'a'
          3        ASSIGN_OBJ                                               !0, 'a'
          4        OP_DATA                                                  ~3
   10     5        FETCH_DIM_R                                      ~5      !1, 'b'
          6        ASSIGN_OBJ                                               !0, 'b'
          7        OP_DATA                                                  ~5
   11     8        FETCH_DIM_R                                      ~7      !1, 'c'
          9        ASSIGN_OBJ                                               !0, 'c'
         10        OP_DATA                                                  ~7
   12    11      > RETURN                                                   null

End of function hydrate

End of class AHydrator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.45 ms | 1386 KiB | 13 Q