3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class dog { public $name = ''; public function setName($name) { $this->name = $name; } public function getName() { return $this->name; } } $rover = new dog(); $rover->name = 'rover'; echo $rover->name;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gdGtL
function name:  (null)
number of ops:  9
compiled vars:  !0 = $rover
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  16     1        NEW                                              $2      :-5
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $2
  17     4        ASSIGN_OBJ                                               !0, 'name'
         5        OP_DATA                                                  'rover'
  18     6        FETCH_OBJ_R                                      $6      !0, 'name'
         7        ECHO                                                     $6
  19     8      > RETURN                                                   1

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

End of function setname

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

End of function getname

End of class dog.

Generated using Vulcan Logic Dumper, using php 7.3.0