3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterations = 100000; class A {protected $a; protected $b; protected $c;} $rA = new ReflectionProperty('A', 'a'); $rB = new ReflectionProperty('A', 'b'); $rC = new ReflectionProperty('A', 'c'); $rA->setAccessible(true); $rB->setAccessible(true); $rC->setAccessible(true); $data = array('a' => 1, 'b' => 2, 'c' => 3); $a = new A(); for ($i = 0; $i < $iterations; $i++) { $rA->setValue($a, $data['a']); $rB->setValue($a, $data['b']); $rC->setValue($a, $data['c']); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 31
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 31
Branch analysis from position: 52
Branch analysis from position: 31
filename:       /in/nVKXG
function name:  (null)
number of ops:  53
compiled vars:  !0 = $iterations, !1 = $rA, !2 = $rB, !3 = $rC, !4 = $data, !5 = $a, !6 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 100000
    7     1        NEW                                              $8      'ReflectionProperty'
          2        SEND_VAL_EX                                              'A'
          3        SEND_VAL_EX                                              'a'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $8
    8     6        NEW                                              $11     'ReflectionProperty'
          7        SEND_VAL_EX                                              'A'
          8        SEND_VAL_EX                                              'b'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $11
    9    11        NEW                                              $14     'ReflectionProperty'
         12        SEND_VAL_EX                                              'A'
         13        SEND_VAL_EX                                              'c'
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !3, $14
   11    16        INIT_METHOD_CALL                                         !1, 'setAccessible'
         17        SEND_VAL_EX                                              <true>
         18        DO_FCALL                                      0          
   12    19        INIT_METHOD_CALL                                         !2, 'setAccessible'
         20        SEND_VAL_EX                                              <true>
         21        DO_FCALL                                      0          
   13    22        INIT_METHOD_CALL                                         !3, 'setAccessible'
         23        SEND_VAL_EX                                              <true>
         24        DO_FCALL                                      0          
   15    25        ASSIGN                                                   !4, <array>
   16    26        NEW                                              $21     'A'
         27        DO_FCALL                                      0          
         28        ASSIGN                                                   !5, $21
   18    29        ASSIGN                                                   !6, 0
         30      > JMP                                                      ->50
   19    31    >   INIT_METHOD_CALL                                         !1, 'setValue'
         32        SEND_VAR_EX                                              !5
         33        CHECK_FUNC_ARG                                           
         34        FETCH_DIM_FUNC_ARG                               $25     !4, 'a'
         35        SEND_FUNC_ARG                                            $25
         36        DO_FCALL                                      0          
   20    37        INIT_METHOD_CALL                                         !2, 'setValue'
         38        SEND_VAR_EX                                              !5
         39        CHECK_FUNC_ARG                                           
         40        FETCH_DIM_FUNC_ARG                               $27     !4, 'b'
         41        SEND_FUNC_ARG                                            $27
         42        DO_FCALL                                      0          
   21    43        INIT_METHOD_CALL                                         !3, 'setValue'
         44        SEND_VAR_EX                                              !5
         45        CHECK_FUNC_ARG                                           
         46        FETCH_DIM_FUNC_ARG                               $29     !4, 'c'
         47        SEND_FUNC_ARG                                            $29
         48        DO_FCALL                                      0          
   18    49        PRE_INC                                                  !6
         50    >   IS_SMALLER                                               !6, !0
         51      > JMPNZ                                                    ~32, ->31
   22    52    > > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.59 ms | 1399 KiB | 13 Q