3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bar = 'baz'; } $foo = new Foo; for ($i = 0; $i <= 10000; $i++) { $ref = new \ReflectionClass($foo); $property = $ref->getProperty('bar'); $property->setAccessible(true); $property->getValue($foo); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 5
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 5
Branch analysis from position: 22
Branch analysis from position: 5
filename:       /in/Q39Uf
function name:  (null)
number of ops:  23
compiled vars:  !0 = $foo, !1 = $i, !2 = $ref, !3 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $4      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    9     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->20
   10     5    >   NEW                                              $8      'ReflectionClass'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $8
   11     9        INIT_METHOD_CALL                                         !2, 'getProperty'
         10        SEND_VAL_EX                                              'bar'
         11        DO_FCALL                                      0  $11     
         12        ASSIGN                                                   !3, $11
   12    13        INIT_METHOD_CALL                                         !3, 'setAccessible'
         14        SEND_VAL_EX                                              <true>
         15        DO_FCALL                                      0          
   13    16        INIT_METHOD_CALL                                         !3, 'getValue'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0          
    9    19        PRE_INC                                                  !1
         20    >   IS_SMALLER_OR_EQUAL                                      !1, 10000
         21      > JMPNZ                                                    ~16, ->5
   14    22    > > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.16 ms | 1394 KiB | 13 Q