3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Shape { public int $numberOfSides; public string $name; public function setNumberOfSides(int $numberOfSides): void { $this->numberOfSides = $numberOfSides; } public function setName(string $name): void { $this->name = $name; } public function getNumberOfSides(): int { return $this->numberOfSides; } public function getName(): string { return $this->name; } } $triangle = new Shape(); $triangle ->setNumberofSides(4) ->setName("triangle"); var_dump($triangle);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SbPRW
function name:  (null)
number of ops:  13
compiled vars:  !0 = $triangle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $1      'Shape'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   31     3        INIT_METHOD_CALL                                         !0, 'setNumberofSides'
          4        SEND_VAL_EX                                              4
          5        DO_FCALL                                      0  $4      
   32     6        INIT_METHOD_CALL                                         $4, 'setName'
          7        SEND_VAL_EX                                              'triangle'
          8        DO_FCALL                                      0          
   33     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function setnumberofsides

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

End of function setname

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

End of function getnumberofsides

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

End of function getname

End of class Shape.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.98 ms | 1405 KiB | 15 Q