3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function b() { static $x = 0; echo ++$x; } } $a = new A(); $b = new A(); $a->b(); $a->b(); $a->b(); $b->b();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ORArO
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   14     3        NEW                                              $5      'A'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   16     6        INIT_METHOD_CALL                                         !0, 'b'
          7        DO_FCALL                                      0          
   17     8        INIT_METHOD_CALL                                         !0, 'b'
          9        DO_FCALL                                      0          
   18    10        INIT_METHOD_CALL                                         !0, 'b'
         11        DO_FCALL                                      0          
   20    12        INIT_METHOD_CALL                                         !1, 'b'
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Class A:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ORArO
function name:  b
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   BIND_STATIC                                              !0
    9     1        PRE_INC                                          ~1      !0
          2        ECHO                                                     ~1
   10     3      > RETURN                                                   null

End of function b

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.59 ms | 1394 KiB | 13 Q