3v4l.org

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

End of function afunction

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.69 ms | 1394 KiB | 15 Q