3v4l.org

run code in 500+ PHP versions simultaneously
<?php class word{ private $text; public function __construct($word){ $this->text=$word; } public function setWord($word){ $this->text=$word; } public function getWord() { return $this->text; } } $class_words = array(); $word = new word("this"); $class_words[] = $word->getWord(); $word->setWord("that"); $class_words[] = $word->getWord(); print_r($class_words); exit;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 61) Position 1 = -2
filename:       /in/hGBiL
function name:  (null)
number of ops:  22
compiled vars:  !0 = $class_words, !1 = $word
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                       !0, <array>
   18     1        NEW                                                  $3      'word'
          2        SEND_VAL_EX                                                  'this'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !1, $3
   19     5        INIT_METHOD_CALL                                             !1, 'getWord'
          6        DO_FCALL                                          0  $7      
          7        ASSIGN_DIM                                                   !0
          8        OP_DATA                                                      $7
   20     9        INIT_METHOD_CALL                                             !1, 'setWord'
         10        SEND_VAL_EX                                                  'that'
         11        DO_FCALL                                          0          
   21    12        INIT_METHOD_CALL                                             !1, 'getWord'
         13        DO_FCALL                                          0  $10     
         14        ASSIGN_DIM                                                   !0
         15        OP_DATA                                                      $10
   22    16        INIT_FCALL                                                   'print_r'
         17        SEND_VAR                                                     !0
         18        DO_ICALL                                                     
   23    19      > INIT_FCALL                                                   'exit'
         20*       DO_ICALL                                                     
   24    21*     > RETURN                                                       1

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

End of function __construct

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

End of function setword

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

End of function getword

End of class word.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
150.82 ms | 2273 KiB | 15 Q