3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass{ public function setProperty1($property1){ $this->property1 = $property1; return $this; } public function setProperty2($property2){ $this->property2 = $property2; return $this; } public function setProperty3($property3){ $this->property3 = $property3; return $this; } public function setProperty4($property4){ $this->property4 = $property4; return $this; } public function setProperty5($property5){ $this->property5 = $property5; return $this; } } $obj = new MyClass(); $obj->setProperty1("p1"); $obj->setProperty2(""); $obj->setProperty3(null); echo json_encode($obj);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/biEPB
function name:  (null)
number of ops:  17
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   NEW                                              $1      'MyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   33     3        INIT_METHOD_CALL                                         !0, 'setProperty1'
          4        SEND_VAL_EX                                              'p1'
          5        DO_FCALL                                      0          
   34     6        INIT_METHOD_CALL                                         !0, 'setProperty2'
          7        SEND_VAL_EX                                              ''
          8        DO_FCALL                                      0          
   35     9        INIT_METHOD_CALL                                         !0, 'setProperty3'
         10        SEND_VAL_EX                                              null
         11        DO_FCALL                                      0          
   36    12        INIT_FCALL                                               'json_encode'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $7      
         15        ECHO                                                     $7
         16      > RETURN                                                   1

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

End of function setproperty1

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

End of function setproperty2

Function setproperty3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/biEPB
function name:  setProperty3
number of ops:  6
compiled vars:  !0 = $property3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        ASSIGN_OBJ                                               'property3'
          2        OP_DATA                                                  !0
   18     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   19     5*     > RETURN                                                   null

End of function setproperty3

Function setproperty4:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/biEPB
function name:  setProperty4
number of ops:  6
compiled vars:  !0 = $property4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   22     1        ASSIGN_OBJ                                               'property4'
          2        OP_DATA                                                  !0
   23     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   24     5*     > RETURN                                                   null

End of function setproperty4

Function setproperty5:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/biEPB
function name:  setProperty5
number of ops:  6
compiled vars:  !0 = $property5
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   27     1        ASSIGN_OBJ                                               'property5'
          2        OP_DATA                                                  !0
   28     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   29     5*     > RETURN                                                   null

End of function setproperty5

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.8 ms | 1015 KiB | 14 Q