3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public static function foo() { return array('a','b','c'); } } $x = new Bar(); var_dump($x::foo()[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IF6RQ
function name:  (null)
number of ops:  11
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        INIT_FCALL                                               'var_dump'
          4        FETCH_CLASS                                   0  $4      !0
          5        INIT_STATIC_METHOD_CALL                                  $4, 'foo'
          6        DO_FCALL                                      0  $5      
          7        FETCH_DIM_R                                      ~6      $5, 1
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class Bar:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IF6RQ
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   <array>
    7     1*     > RETURN                                                   null

End of function foo

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.69 ms | 1398 KiB | 15 Q