3v4l.org

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

Class Example:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fZWRH
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'
   10     1      > RETURN                                                   null

End of function __construct

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

End of function returninstancecount

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.29 ms | 1385 KiB | 13 Q