3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function a($a, $b) { return function ($e) use ($a, $b){ return "$e $a $b"; }; } ($a=a('h','p'))('poop');
based on n2qli
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/DXFrq
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  11     1        INIT_FCALL                                               'a'
         2        SEND_VAL                                                 'h'
         3        SEND_VAL                                                 'p'
         4        DO_FCALL                                      0  $1      
         5        ASSIGN                                           $2      !0, $1
         6        INIT_DYNAMIC_CALL                                        $2
         7        SEND_VAL_EX                                              'poop'
         8        DO_FCALL                                      0          
         9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FDXFrq0x7f9595d2e058:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/DXFrq
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $e, !1 = $a, !2 = $b
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   RECV                                             !0      
         1        FETCH_R                      static              $3      'a'
         2        ASSIGN                                                   !1, $3
         3        FETCH_R                      static              $5      'b'
         4        ASSIGN                                                   !2, $5
   6     5        ROPE_INIT                                     5  ~8      !0
         6        ROPE_ADD                                      1  ~8      ~8, '+'
         7        ROPE_ADD                                      2  ~8      ~8, !1
         8        ROPE_ADD                                      3  ~8      ~8, '+'
         9        ROPE_END                                      4  ~7      ~8, !2
        10      > RETURN                                                   ~7
   7    11*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FDXFrq0x7f9595d2e058

Function a:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/DXFrq
function name:  a
number of ops:  5
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%2FDXFrq0x7f9595d2e058'
   7     3      > RETURN                                                   ~2
   9     4*     > RETURN                                                   null

End of function a

Generated using Vulcan Logic Dumper, using php 7.3.0