3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {} $func = function() { echo 'ah'; }; $obj = new A; $func->bindTo($obj)->__invoke(); $func->__invoke();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LdErI
function name:  (null)
number of ops:  13
compiled vars:  !0 = $func, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FLdErI%3A5%240'
          1        ASSIGN                                                   !0, ~2
    7     2        NEW                                              $4      'A'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
    9     5        INIT_METHOD_CALL                                         !0, 'bindTo'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $7      
          8        INIT_METHOD_CALL                                         $7, '__invoke'
          9        DO_FCALL                                      0          
   10    10        INIT_METHOD_CALL                                         !0, '__invoke'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FLdErI%3A5%240

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.63 ms | 1393 KiB | 13 Q