3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { count(func_get_args()); } } $instance = new Foo(); $args = range(1, 10); for ($i = 0; $i < 100000; ++$i) { call_user_func_array(array($instance, 'bar'), $args); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 10
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 10
Branch analysis from position: 19
Branch analysis from position: 10
filename:       /in/iM7Bm
function name:  (null)
number of ops:  20
compiled vars:  !0 = $instance, !1 = $args, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   10     3        INIT_FCALL                                               'range'
          4        SEND_VAL                                                 1
          5        SEND_VAL                                                 10
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
   12     8        ASSIGN                                                   !2, 0
          9      > JMP                                                      ->17
   13    10    >   INIT_ARRAY                                       ~9      !0
         11        ADD_ARRAY_ELEMENT                                ~9      'bar'
         12        INIT_USER_CALL                                0          'call_user_func_array', ~9
         13        SEND_ARRAY                                               !1
         14        CHECK_UNDEF_ARGS                                         
         15        DO_FCALL                                      0          
   12    16        PRE_INC                                                  !2
         17    >   IS_SMALLER                                               !2, 100000
         18      > JMPNZ                                                    ~12, ->10
   14    19    > > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iM7Bm
function name:  bar
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FUNC_GET_ARGS                                    ~0      
          1        COUNT                                            ~1      ~0
          2        FREE                                                     ~1
    6     3      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.7 ms | 1396 KiB | 15 Q