3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { private $name; public function getName() { return $this->name; } public function setName($name) { $this->name = $name; } } $user = new User(); $user->setName('Alice'); echo $user->getName();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1uOcs
function name:  (null)
number of ops:  10
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'User'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'setName'
          4        SEND_VAL_EX                                              'Alice'
          5        DO_FCALL                                      0          
   20     6        INIT_METHOD_CALL                                         !0, 'getName'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

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

End of function getname

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

End of function setname

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.54 ms | 1398 KiB | 13 Q