3v4l.org

run code in 300+ PHP versions simultaneously
<?php fb_intercept( 'Foo::__invoke', function () { echo '__invoke called!'; } ); var_dump((new Foo)->bar());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mva2k
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'fb_intercept'
    3     1        SEND_VAL_EX                                              'Foo%3A%3A__invoke'
    4     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fmva2k%3A4%240'
    6     3        SEND_VAL_EX                                              ~0
          4        DO_FCALL                                      0          
    8     5        INIT_FCALL                                               'var_dump'
          6        NEW                                              $2      'Foo'
          7        DO_FCALL                                      0          
          8        INIT_METHOD_CALL                                         $2, 'bar'
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fmva2k%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mva2k
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     '__invoke+called%21'
    6     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fmva2k%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.3 ms | 1386 KiB | 15 Q