3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { protected $a = '1'; public function a() { print "2"; } public function b() { print $this->a; } public function a1() { static::a(); } public function b1() { static::b(); } } $t = new test(); $t->a(); $t->b(); $t->a1(); $t->b1(); $t::a(); $t::b(); $t::a1(); $t::b1();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8ArS9
function name:  (null)
number of ops:  24
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_METHOD_CALL                                         !0, 'a'
          4        DO_FCALL                                      0          
   28     5        INIT_METHOD_CALL                                         !0, 'b'
          6        DO_FCALL                                      0          
   29     7        INIT_METHOD_CALL                                         !0, 'a1'
          8        DO_FCALL                                      0          
   30     9        INIT_METHOD_CALL                                         !0, 'b1'
         10        DO_FCALL                                      0          
   32    11        FETCH_CLASS                                   0  $8      !0
         12        INIT_STATIC_METHOD_CALL                                  $8, 'a'
         13        DO_FCALL                                      0          
   33    14        FETCH_CLASS                                   0  $10     !0
         15        INIT_STATIC_METHOD_CALL                                  $10, 'b'
         16        DO_FCALL                                      0          
   35    17        FETCH_CLASS                                   0  $12     !0
         18        INIT_STATIC_METHOD_CALL                                  $12, 'a1'
         19        DO_FCALL                                      0          
   36    20        FETCH_CLASS                                   0  $14     !0
         21        INIT_STATIC_METHOD_CALL                                  $14, 'b1'
         22        DO_FCALL                                      0          
         23      > RETURN                                                   1

Class test:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8ArS9
function name:  a
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     '2'
    9     1      > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8ArS9
function name:  b
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        ECHO                                                     ~0
   13     2      > RETURN                                                   null

End of function b

Function a1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8ArS9
function name:  a1
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_STATIC_METHOD_CALL                                  'a'
          1        DO_FCALL                                      0          
   17     2      > RETURN                                                   null

End of function a1

Function b1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8ArS9
function name:  b1
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_STATIC_METHOD_CALL                                  'b'
          1        DO_FCALL                                      0          
   21     2      > RETURN                                                   null

End of function b1

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.81 ms | 1399 KiB | 13 Q