3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { var $myVar = 10; function printMyVar(){ echo $this->myVar; echo "\n"; } } Test::printMyVar(); $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/t8tF3
function name:  (null)
number of ops:  12
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'Test', 'printMyVar'
          1        DO_FCALL                                      0          
   16     2        NEW                                              $2      'Test'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   17     5        INIT_METHOD_CALL                                         !0, 'printMyVar'
          6        DO_FCALL                                      0          
   19     7        ASSIGN_OBJ                                               !0, 'myVar'
          8        OP_DATA                                                  'Hello+World'
   20     9        INIT_METHOD_CALL                                         !0, 'printMyVar'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Test:
Function printmyvar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t8tF3
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:
150.01 ms | 1394 KiB | 13 Q