3v4l.org

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

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

End of function test

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.64 ms | 996 KiB | 13 Q