3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { private $name; private $age; public function setName($name) { $this->name = $name; } public function setAge($age) { $this->age = $age; } public function getAge() { return $this->age; } public function getName() { return $this->age; } } $person = new Person(); $person->setName("John Doe")->setAge("53"); echo $person->getName(); echo $person->getAge();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RoLbn
function name:  (null)
number of ops:  16
compiled vars:  !0 = $person
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'Person'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'setName'
          4        SEND_VAL_EX                                              'John+Doe'
          5        DO_FCALL                                      0  $4      
          6        INIT_METHOD_CALL                                         $4, 'setAge'
          7        SEND_VAL_EX                                              '53'
          8        DO_FCALL                                      0          
   27     9        INIT_METHOD_CALL                                         !0, 'getName'
         10        DO_FCALL                                      0  $6      
         11        ECHO                                                     $6
   28    12        INIT_METHOD_CALL                                         !0, 'getAge'
         13        DO_FCALL                                      0  $7      
         14        ECHO                                                     $7
         15      > RETURN                                                   1

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

End of function setname

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

End of function setage

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

End of function getage

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

End of function getname

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.68 ms | 1399 KiB | 13 Q