3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { private $count = 0; function __construct() { $this->count++; } function getCount() { return $this->count; } } $instance = new Example(); echo $instance->getCount(); $anotherInstance = new Example(); echo $instance->getCount(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cD859
function name:  (null)
number of ops:  13
compiled vars:  !0 = $instance, !1 = $anotherInstance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $2      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   22     3        INIT_METHOD_CALL                                         !0, 'getCount'
          4        DO_FCALL                                      0  $5      
          5        ECHO                                                     $5
   23     6        NEW                                              $6      'Example'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
   24     9        INIT_METHOD_CALL                                         !0, 'getCount'
         10        DO_FCALL                                      0  $9      
         11        ECHO                                                     $9
   26    12      > RETURN                                                   1

Class Example:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cD859
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   PRE_INC_OBJ                                              'count'
   11     1      > RETURN                                                   null

End of function __construct

Function getcount:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cD859
function name:  getCount
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_OBJ_R                                      ~0      'count'
          1      > RETURN                                                   ~0
   17     2*     > RETURN                                                   null

End of function getcount

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.19 ms | 1394 KiB | 13 Q