3v4l.org

run code in 300+ PHP versions simultaneously
<?php class One { protected static $myVar = [1, 2, 3]; public function myFunc() { return count(self::$myVar); } } $one = new One(); for ($i = 0; $i < 100; $i++) { echo $one->myFunc(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
Branch analysis from position: 5
filename:       /in/8ahH3
function name:  (null)
number of ops:  12
compiled vars:  !0 = $one, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'One'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   15     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->9
   16     5    >   INIT_METHOD_CALL                                         !0, 'myFunc'
          6        DO_FCALL                                      0  $6      
          7        ECHO                                                     $6
   15     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 100
         10      > JMPNZ                                                    ~8, ->5
   17    11    > > RETURN                                                   1

Class One:
Function myfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8ahH3
function name:  myFunc
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'myVar'
          1        COUNT                                            ~1      ~0
          2      > RETURN                                                   ~1
   10     3*     > RETURN                                                   null

End of function myfunc

End of class One.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.75 ms | 1393 KiB | 13 Q