3v4l.org

run code in 500+ PHP versions simultaneously
<?php $startVal = new Command(); $middlwares = []; $middlewares[] = func1(...); if ($isAdmin) { $middlewares[] = func2(...); } if ($isTuesday) { $middlewares[] = fizbin(...); } $result = compose($middlewares)($startVal);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 13
filename:       /in/ncpEE
function name:  (null)
number of ops:  26
compiled vars:  !0 = $startVal, !1 = $middlwares, !2 = $middlewares, !3 = $isAdmin, !4 = $isTuesday, !5 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $6      'Command'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $6
    4     3        ASSIGN                                                       !1, <array>
    6     4        INIT_FCALL_BY_NAME                                           'func1'
          5        CALLABLE_CONVERT                                     ~11     
          6        ASSIGN_DIM                                                   !2
          7        OP_DATA                                                      ~11
    8     8      > JMPZ                                                         !3, ->13
    9     9    >   INIT_FCALL_BY_NAME                                           'func2'
         10        CALLABLE_CONVERT                                     ~13     
         11        ASSIGN_DIM                                                   !2
         12        OP_DATA                                                      ~13
   12    13    > > JMPZ                                                         !4, ->18
   13    14    >   INIT_FCALL_BY_NAME                                           'fizbin'
         15        CALLABLE_CONVERT                                     ~15     
         16        ASSIGN_DIM                                                   !2
         17        OP_DATA                                                      ~15
   16    18    >   INIT_FCALL_BY_NAME                                           'compose'
         19        SEND_VAR_EX                                                  !2
         20        DO_FCALL                                          0  $16     
         21        INIT_DYNAMIC_CALL                                            $16
         22        SEND_VAR_EX                                                  !0
         23        DO_FCALL                                          0  $17     
         24        ASSIGN                                                       !5, $17
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.04 ms | 1455 KiB | 13 Q