3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a($a, $b) { return function ($e) use ($a, $b){ return "$e $a $b"; }; } a('h','p')('poop');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n2qli
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'a'
          1        SEND_VAL                                                 'h'
          2        SEND_VAL                                                 'p'
          3        DO_FCALL                                      0  $0      
          4        INIT_DYNAMIC_CALL                                        $0
          5        SEND_VAL_EX                                              'poop'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n2qli
function name:  a
number of ops:  7
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        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fn2qli%3A5%240'
          3        BIND_LEXICAL                                             ~2, !0
          4        BIND_LEXICAL                                             ~2, !1
    7     5      > RETURN                                                   ~2
    9     6*     > RETURN                                                   null

End of function a

Function %00%7Bclosure%7D%2Fin%2Fn2qli%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n2qli
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $e, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
    6     3        ROPE_INIT                                     5  ~4      !0
          4        ROPE_ADD                                      1  ~4      ~4, '+'
          5        ROPE_ADD                                      2  ~4      ~4, !1
          6        ROPE_ADD                                      3  ~4      ~4, '+'
          7        ROPE_END                                      4  ~3      ~4, !2
          8      > RETURN                                                   ~3
    7     9*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.97 ms | 1399 KiB | 14 Q