3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { static function afunction() { static $test=10; $test--; echo $test; if($test>0) { $this->afunction(); } } } $testa = new a(); echo $testa->afunction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yh39l
function name:  (null)
number of ops:  7
compiled vars:  !0 = $testa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'afunction'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6      > RETURN                                                   1

Class a:
Function afunction:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/Yh39l
function name:  afunction
number of ops:  9
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   BIND_STATIC                                              !0
   10     1        PRE_DEC                                                  !0
   11     2        ECHO                                                     !0
   12     3        IS_SMALLER                                               0, !0
          4      > JMPZ                                                     ~2, ->8
   14     5    >   FETCH_THIS                                       $3      
          6        INIT_METHOD_CALL                                         $3, 'afunction'
          7        DO_FCALL                                      0          
   16     8    > > RETURN                                                   null

End of function afunction

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.58 ms | 1394 KiB | 13 Q