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; } } $person = new Person(); $person->setName("John Doe"); $person->setAge("53"); echo $person->name; echo $person->age;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KVNSC
function name:  (null)
number of ops:  14
compiled vars:  !0 = $person
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Person'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'setName'
          4        SEND_VAL_EX                                              'John+Doe'
          5        DO_FCALL                                      0          
   19     6        INIT_METHOD_CALL                                         !0, 'setAge'
          7        SEND_VAL_EX                                              '53'
          8        DO_FCALL                                      0          
   20     9        FETCH_OBJ_R                                      ~6      !0, 'name'
         10        ECHO                                                     ~6
   21    11        FETCH_OBJ_R                                      ~7      !0, 'age'
         12        ECHO                                                     ~7
         13      > RETURN                                                   1

Class Person:
Function setname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KVNSC
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/KVNSC
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

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.66 ms | 1394 KiB | 13 Q