3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Human { private $name; public function getName() { return $this->name; } public function __construct($name) { $this->name = $name; } } $leri = new Human('Leri'); $gvantsa = new Human('Gvantsa'); echo $leri->getName()."\n"; echo $gvantsa->getName()."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P1b30
function name:  (null)
number of ops:  17
compiled vars:  !0 = $leri, !1 = $gvantsa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'Human'
          1        SEND_VAL_EX                                              'Leri'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   12     4        NEW                                              $5      'Human'
          5        SEND_VAL_EX                                              'Gvantsa'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   13     8        INIT_METHOD_CALL                                         !0, 'getName'
          9        DO_FCALL                                      0  $8      
         10        CONCAT                                           ~9      $8, '%0A'
         11        ECHO                                                     ~9
   14    12        INIT_METHOD_CALL                                         !1, 'getName'
         13        DO_FCALL                                      0  $10     
         14        CONCAT                                           ~11     $10, '%0A'
         15        ECHO                                                     ~11
         16      > RETURN                                                   1

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

End of function getname

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

End of function __construct

End of class Human.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.52 ms | 1395 KiB | 13 Q