3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $myVar = 10; function printMyVar(){ echo $this->myVar; echo "\n"; } } $test = new Test; $test->printMyVar(); $test->myVar = "Hello World"; $test->printMyVar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7SgBA
function name:  (null)
number of ops:  10
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_METHOD_CALL                                         !0, 'printMyVar'
          4        DO_FCALL                                      0          
   17     5        ASSIGN_OBJ                                               !0, 'myVar'
          6        OP_DATA                                                  'Hello+World'
   18     7        INIT_METHOD_CALL                                         !0, 'printMyVar'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class Test:
Function printmyvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7SgBA
function name:  printMyVar
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~0      'myVar'
          1        ECHO                                                     ~0
    9     2        ECHO                                                     '%0A'
   10     3      > RETURN                                                   null

End of function printmyvar

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.22 ms | 1393 KiB | 13 Q