3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public $prop1 = "I'm a class property!"; public function __construct() { echo 'The class "', __CLASS__, '" was initiated!<br />'; } public function setProperty($newval) { $this->prop1 = $newval; } public function getProperty() { return $this->prop1 . "<br />"; } } // Create a new object $obj = new MyClass; // Get the value of $prop1 echo $obj->getProperty(); // Output a message at the end of the file echo "End of file.<br />";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nCAVi
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'MyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'getProperty'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
   29     6        ECHO                                                     'End+of+file.%3Cbr+%2F%3E'
          7      > RETURN                                                   1

Class MyClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nCAVi
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'The+class+%22'
          1        ECHO                                                     'MyClass'
          2        ECHO                                                     '%22+was+initiated%21%3Cbr+%2F%3E'
    9     3      > RETURN                                                   null

End of function __construct

Function setproperty:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nCAVi
function name:  setProperty
number of ops:  4
compiled vars:  !0 = $newval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        ASSIGN_OBJ                                               'prop1'
          2        OP_DATA                                                  !0
   14     3      > RETURN                                                   null

End of function setproperty

Function getproperty:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nCAVi
function name:  getProperty
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_OBJ_R                                      ~0      'prop1'
          1        CONCAT                                           ~1      ~0, '%3Cbr+%2F%3E'
          2      > RETURN                                                   ~1
   19     3*     > RETURN                                                   null

End of function getproperty

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.44 ms | 1399 KiB | 13 Q