3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __call($a, $b){ var_dump($a, $b); } } $foo = new Foo; var_dump($c = Closure::fromCallable([$foo, "baz"])); $c(123);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7u6hV
function name:  (null)
number of ops:  16
compiled vars:  !0 = $foo, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        INIT_FCALL                                               'var_dump'
          4        INIT_STATIC_METHOD_CALL                                  'Closure', 'fromCallable'
          5        INIT_ARRAY                                       ~5      !0
          6        ADD_ARRAY_ELEMENT                                ~5      'baz'
          7        SEND_VAL                                                 ~5
          8        DO_FCALL                                      0  $6      
          9        ASSIGN                                           ~7      !1, $6
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
   15    12        INIT_DYNAMIC_CALL                                        !1
         13        SEND_VAL_EX                                              123
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

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

End of function __call

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
263.37 ms | 1002 KiB | 14 Q