3v4l.org

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

Class A:
Function show:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/svJQV
function name:  show
number of ops:  5
compiled vars:  !0 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   POST_INC_STATIC_PROP                                 ~1      'id'
          1        ASSIGN                                                       !0, ~1
    9     2        CONCAT                                               ~3      !0, '%0A'
          3        ECHO                                                         ~3
   10     4      > RETURN                                                       null

End of function show

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
136.25 ms | 483 KiB | 9 Q