3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $data; public function setData($data=null) { $this->data = $data; } public function getData() { return $this->data; } } $foo = new Foo(); $foo->setData('data'); var_dump($foo->getData());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/esUB2
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'setData'
          4        SEND_VAL_EX                                              'data'
          5        DO_FCALL                                      0          
   22     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'getData'
          8        DO_FCALL                                      0  $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

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

End of function setdata

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

End of function getdata

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.52 ms | 1399 KiB | 16 Q