3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_NONE); class a { static $test = 10; function afunction() { echo $test; } } $test = new a(); echo $a->afunction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P87ej
function name:  (null)
number of ops:  11
compiled vars:  !0 = $test, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        FETCH_CONSTANT                                   ~2      'E_NONE'
          2        SEND_VAL                                                 ~2
          3        DO_ICALL                                                 
   14     4        NEW                                              $4      'a'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $4
   15     7        INIT_METHOD_CALL                                         !1, 'afunction'
          8        DO_FCALL                                      0  $7      
          9        ECHO                                                     $7
         10      > RETURN                                                   1

Class a:
Function afunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P87ej
function name:  afunction
number of ops:  2
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     !0
   11     1      > RETURN                                                   null

End of function afunction

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.65 ms | 939 KiB | 16 Q