3v4l.org

run code in 300+ PHP versions simultaneously
<?php function o($f, $g) { return function (...$x) { return $f(...$g(...$x)); }; } $f = function ($a, $b) { return [$a + $b, $a * $b]; }; $g = function (...$n) { return array_map(); };
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uJnif
function name:  (null)
number of ops:  5
compiled vars:  !0 = $f, !1 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FuJnif%3A10%241'
          1        ASSIGN                                                   !0, ~2
   14     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FuJnif%3A14%242'
          3        ASSIGN                                                   !1, ~4
   16     4      > RETURN                                                   1

Function o:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uJnif
function name:  o
number of ops:  5
compiled vars:  !0 = $f, !1 = $g
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%2FuJnif%3A5%240'
    7     3      > RETURN                                                   ~2
    8     4*     > RETURN                                                   null

End of function o

Function %00%7Bclosure%7D%2Fin%2FuJnif%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uJnif
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $x, !1 = $f, !2 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_VARIADIC                                    !0      
    6     1        INIT_DYNAMIC_CALL                                        !1
          2        INIT_DYNAMIC_CALL                                        !2
          3        SEND_UNPACK                                              !0
          4        CHECK_UNDEF_ARGS                                         
          5        DO_FCALL                                      1  $3      
          6        SEND_UNPACK                                              $3
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      1  $4      
          9      > RETURN                                                   $4
    7    10*     > RETURN                                                   null

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

Function %00%7Bclosure%7D%2Fin%2FuJnif%3A10%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uJnif
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        ADD                                              ~2      !0, !1
          3        INIT_ARRAY                                       ~3      ~2
          4        MUL                                              ~4      !0, !1
          5        ADD_ARRAY_ELEMENT                                ~3      ~4
          6      > RETURN                                                   ~3
   12     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FuJnif%3A10%241

Function %00%7Bclosure%7D%2Fin%2FuJnif%3A14%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uJnif
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV_VARIADIC                                    !0      
   15     1        INIT_FCALL                                               'array_map'
          2        DO_ICALL                                         $1      
          3      > RETURN                                                   $1
   16     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FuJnif%3A14%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.14 ms | 1400 KiB | 15 Q