3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function test() { echo 'Ok!<br>'; } } $bar = ['test']; Foo::{$bar[0]}(); (Foo::$bar)[0]();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hheZj
function name:  (null)
number of ops:  9
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   13     1        FETCH_DIM_R                                      ~2      !0, 0
          2        INIT_STATIC_METHOD_CALL                                  'Foo', ~2
          3        DO_FCALL                                      0          
   14     4        FETCH_STATIC_PROP_R          global lock         ~4      'bar'
          5        FETCH_DIM_R                                      ~5      ~4, 0
          6        INIT_DYNAMIC_CALL                                        ~5
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hheZj
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'Ok%21%3Cbr%3E'
    8     1      > RETURN                                                   null

End of function test

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.55 ms | 1393 KiB | 13 Q