3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SimpleClass { const COSNTANT_VALUE = "costant value"; private $var = "a default value"; function __construct($var) { $this->var = $var; } public function getVar() { return $this->var; } public function setVar($var) { $this->var = $var; } public function toString() { echo $this->var; } } //$test = new SimpleClass("test2"); //$test->setVar("test"); //$test->toString(); class MyClass { const CONST_VALUE = "A constant value"; private $name; function __construct($name) { $this->name = $name; } public function getName() { return $this->name; } public function setName($name) { $this->name = $name; } public function toString(){ echo $this->name; } } echo MyClass::CONST_VALUE; $Object = new MyClass();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ermkQ
function name:  (null)
number of ops:  5
compiled vars:  !0 = $Object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   50     0  E >   ECHO                                                     'A+constant+value'
   51     1        NEW                                              $1      'MyClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Class SimpleClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ermkQ
function name:  __construct
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'var'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function __construct

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

End of function getvar

Function setvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ermkQ
function name:  setVar
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        ASSIGN_OBJ                                               'var'
          2        OP_DATA                                                  !0
   17     3      > RETURN                                                   null

End of function setvar

Function tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ermkQ
function name:  toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   FETCH_OBJ_R                                      ~0      'var'
          1        ECHO                                                     ~0
   21     2      > RETURN                                                   null

End of function tostring

End of class SimpleClass.

Class MyClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ermkQ
function name:  __construct
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   RECV                                             !0      
   34     1        ASSIGN_OBJ                                               'name'
          2        OP_DATA                                                  !0
   35     3      > RETURN                                                   null

End of function __construct

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

End of function getname

Function setname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ermkQ
function name:  setName
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
   42     1        ASSIGN_OBJ                                               'name'
          2        OP_DATA                                                  !0
   43     3      > RETURN                                                   null

End of function setname

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

End of function tostring

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.38 ms | 1399 KiB | 13 Q