3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar($arg) { var_dump(__METHOD__, $arg); } } $f = array('Foo', 'bar'); $f('static array'); $foo = new Foo(); $f = array($foo, 'bar'); $f('array'); $f = 'Foo::bar'; $f('static');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hcler
function name:  (null)
number of ops:  18
compiled vars:  !0 = $f, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_DYNAMIC_CALL                                        !0
          2        SEND_VAL_EX                                              'static+array'
          3        DO_FCALL                                      0          
   11     4        NEW                                              $4      'Foo'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $4
   12     7        INIT_ARRAY                                       ~7      !1
          8        ADD_ARRAY_ELEMENT                                ~7      'bar'
          9        ASSIGN                                                   !0, ~7
   13    10        INIT_DYNAMIC_CALL                                        !0
         11        SEND_VAL_EX                                              'array'
         12        DO_FCALL                                      0          
   15    13        ASSIGN                                                   !0, 'Foo%3A%3Abar'
   16    14        INIT_DYNAMIC_CALL                                        !0
         15        SEND_VAL_EX                                              'static'
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hcler
function name:  bar
number of ops:  6
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAL                                                 'Foo%3A%3Abar'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    5     5      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.73 ms | 1395 KiB | 15 Q