3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static $i = 0; public $flag; public function __construct() { $this->foo = ++self::$i; return false; } public function setFlag() { $this->flag = 1; } } $one = new A(); $one->setFlag(); var_dump($one); $two = new A(); var_dump($two); $thr = $one->__construct(); var_dump($thr); $fou = $two->__construct(); var_dump($fou);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IA11r
function name:  (null)
number of ops:  27
compiled vars:  !0 = $one, !1 = $two, !2 = $thr, !3 = $fou
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $4      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   24     3        INIT_METHOD_CALL                                         !0, 'setFlag'
          4        DO_FCALL                                      0          
   25     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   27     8        NEW                                              $9      'A'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $9
   28    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   30    14        INIT_METHOD_CALL                                         !0, '__construct'
         15        DO_FCALL                                      0  $13     
         16        ASSIGN                                                   !2, $13
   31    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
   33    20        INIT_METHOD_CALL                                         !1, '__construct'
         21        DO_FCALL                                      0  $16     
         22        ASSIGN                                                   !3, $16
   34    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IA11r
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   PRE_INC_STATIC_PROP                              ~1      'i'
          1        ASSIGN_OBJ                                               'foo'
          2        OP_DATA                                                  ~1
   13     3      > RETURN                                                   <false>
   14     4*     > RETURN                                                   null

End of function __construct

Function setflag:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IA11r
function name:  setFlag
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ASSIGN_OBJ                                               'flag'
          1        OP_DATA                                                  1
   19     2      > RETURN                                                   null

End of function setflag

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.32 ms | 1400 KiB | 15 Q