3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassA{ protected $nota; public function __construct($n){ $this->nota = $n; } public function showNota(){ echo "Nota: " . $this->nota . "\n"; } public function setNota($n){ $this->nota = $n; } } $alunoA1 = new ClassA(10); $alunoA2 = new ClassA(8); echo $alunoA1->nota; $alunoA1->showNota(); $alunoA2->showNota(); $alunoA1->setNota(2); $alunoA1->showNota();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h2apq
function name:  (null)
number of ops:  20
compiled vars:  !0 = $alunoA1, !1 = $alunoA2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $2      'ClassA'
          1        SEND_VAL_EX                                              10
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   21     4        NEW                                              $5      'ClassA'
          5        SEND_VAL_EX                                              8
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   23     8        FETCH_OBJ_R                                      ~8      !0, 'nota'
          9        ECHO                                                     ~8
   25    10        INIT_METHOD_CALL                                         !0, 'showNota'
         11        DO_FCALL                                      0          
   26    12        INIT_METHOD_CALL                                         !1, 'showNota'
         13        DO_FCALL                                      0          
   28    14        INIT_METHOD_CALL                                         !0, 'setNota'
         15        SEND_VAL_EX                                              2
         16        DO_FCALL                                      0          
   29    17        INIT_METHOD_CALL                                         !0, 'showNota'
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

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

End of function __construct

Function shownota:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h2apq
function name:  showNota
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_OBJ_R                                      ~0      'nota'
          1        CONCAT                                           ~1      'Nota%3A+', ~0
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
   13     4      > RETURN                                                   null

End of function shownota

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

End of function setnota

End of class ClassA.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.73 ms | 1399 KiB | 13 Q