3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = function () { echo 'hello'; }; function myfunction(callable $a, callable $b = null) { if (null !== $a) call_user_func($a); if (null !== $b) call_user_func($b); } myfunction($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bfbJB
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FbfbJB%3A3%240'
          1        ASSIGN                                                   !0, ~1
   10     2        INIT_FCALL                                               'myfunction'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FbfbJB%3A3%240

Function myfunction:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
Branch analysis from position: 6
filename:       /in/bfbJB
function name:  myfunction
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    6     2        TYPE_CHECK                                  1020          !0
          3      > JMPZ                                                     ~2, ->6
          4    >   INIT_USER_CALL                                0          'call_user_func', !0
          5        DO_FCALL                                      0          
    7     6    >   TYPE_CHECK                                  1020          !1
          7      > JMPZ                                                     ~4, ->10
          8    >   INIT_USER_CALL                                0          'call_user_func', !1
          9        DO_FCALL                                      0          
    8    10    > > RETURN                                                   null

End of function myfunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.26 ms | 1399 KiB | 14 Q