3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const OMG = 10; public function get($what) { return self::$what; } } $test = new Test(); var_dump($test->get("OMG")); var_dump($test::OMG);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LbcoH
function name:  (null)
number of ops:  15
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'get'
          5        SEND_VAL_EX                                              'OMG'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
   14     9        INIT_FCALL                                               'var_dump'
         10        FETCH_CLASS                                   0  $6      !0
         11        FETCH_CLASS_CONSTANT                             ~7      $6, 'OMG'
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class Test:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LbcoH
function name:  get
number of ops:  4
compiled vars:  !0 = $what
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        FETCH_STATIC_PROP_R          unknown             ~1      'what'
          2      > RETURN                                                   ~1
    9     3*     > RETURN                                                   null

End of function get

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.73 ms | 1395 KiB | 15 Q