3v4l.org

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

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

End of function lalala

Function %00%7Bclosure%7D%2Fin%2FQlHJs%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QlHJs
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        CONCAT                                           ~1      'something%3A+', !0
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FQlHJs%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.05 ms | 1398 KiB | 16 Q