3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Item { // more code public function getPrice() { return $this->price; } public function setPrice(float $price) { $this->price = $price; } public function setTitle(string $title) { $this->title = $title; } public function setPublished(bool $published) { $this->published = $published; } public function setId(int $id) { $this->id = $id; } } $item = new Item(); $item->setPrice('string'); var_dump($item->getPrice());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CmgqC
function name:  (null)
number of ops:  12
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'Item'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_METHOD_CALL                                         !0, 'setPrice'
          4        SEND_VAL_EX                                              'string'
          5        DO_FCALL                                      0          
   28     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'getPrice'
          8        DO_FCALL                                      0  $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class Item:
Function getprice:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CmgqC
function name:  getPrice
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                      ~0      'price'
          1      > RETURN                                                   ~0
    8     2*     > RETURN                                                   null

End of function getprice

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

End of function setprice

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

End of function settitle

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

End of function setpublished

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

End of function setid

End of class Item.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.88 ms | 1392 KiB | 15 Q