3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ static function foo() { static $numCalls = 0; $numCalls++; print("this function has been executed " . $numCalls . " times<br>"); } } A::foo(); A::foo(); A::foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ScNnq
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'foo'
          1        DO_FCALL                                      0          
   19     2        INIT_STATIC_METHOD_CALL                                  'A', 'foo'
          3        DO_FCALL                                      0          
   23     4        INIT_STATIC_METHOD_CALL                                  'A', 'foo'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class A:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ScNnq
function name:  foo
number of ops:  6
compiled vars:  !0 = $numCalls
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
    6     1        PRE_INC                                                  !0
    7     2        CONCAT                                           ~2      'this+function+has+been+executed+', !0
          3        CONCAT                                           ~3      ~2, '+times%3Cbr%3E'
          4        ECHO                                                     ~3
    8     5      > RETURN                                                   null

End of function foo

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.24 ms | 1393 KiB | 13 Q