3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Printer { private $content; public function setContent($content) { $this->content = $content; } public function cetak() { echo $this->content; } } $printer1 = new Printer(); $printer1->setContent('Aku printer satu'); $printer1->cetak(); echo PHP_EOL; $printer2 = new Printer(); $printer2->setContent('Aku printer dua'); echo $printer2->cetak(); echo PHP_EOL; $printer1->cetak(); echo PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vKJct
function name:  (null)
number of ops:  23
compiled vars:  !0 = $printer1, !1 = $printer2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $2      'Printer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   19     3        INIT_METHOD_CALL                                         !0, 'setContent'
          4        SEND_VAL_EX                                              'Aku+printer+satu'
          5        DO_FCALL                                      0          
   20     6        INIT_METHOD_CALL                                         !0, 'cetak'
          7        DO_FCALL                                      0          
   21     8        ECHO                                                     '%0A'
   23     9        NEW                                              $7      'Printer'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $7
   24    12        INIT_METHOD_CALL                                         !1, 'setContent'
         13        SEND_VAL_EX                                              'Aku+printer+dua'
         14        DO_FCALL                                      0          
   25    15        INIT_METHOD_CALL                                         !1, 'cetak'
         16        DO_FCALL                                      0  $11     
         17        ECHO                                                     $11
   26    18        ECHO                                                     '%0A'
   27    19        INIT_METHOD_CALL                                         !0, 'cetak'
         20        DO_FCALL                                      0          
   28    21        ECHO                                                     '%0A'
   29    22      > RETURN                                                   1

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

End of function setcontent

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

End of function cetak

End of class Printer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.3 ms | 1399 KiB | 13 Q