3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startVal = new Command(); $middlwares = []; $middlewares[] = func1(...); if ($isAdmin) { $middlewares[] = func2(...); } if ($isTuesday) { $middlewares[] = fizbin(...); } foreach ($middlewares as $m) { $startVal = $m($startVal); } $result = $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
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 18
Branch analysis from position: 13
filename:       /in/n7UB0
function name:  (null)
number of ops:  28
compiled vars:  !0 = $startVal, !1 = $middlwares, !2 = $middlewares, !3 = $isAdmin, !4 = $isTuesday, !5 = $m, !6 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $7      'Command'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $7
    4     3        ASSIGN                                                   !1, <array>
    6     4        INIT_FCALL_BY_NAME                                       'func1'
          5        ZEND_CALLABLE_CONVERT                            ~12     
          6        ASSIGN_DIM                                               !2
          7        OP_DATA                                                  ~12
    8     8      > JMPZ                                                     !3, ->13
    9     9    >   INIT_FCALL_BY_NAME                                       'func2'
         10        ZEND_CALLABLE_CONVERT                            ~14     
         11        ASSIGN_DIM                                               !2
         12        OP_DATA                                                  ~14
   12    13    > > JMPZ                                                     !4, ->18
   13    14    >   INIT_FCALL_BY_NAME                                       'fizbin'
         15        ZEND_CALLABLE_CONVERT                            ~16     
         16        ASSIGN_DIM                                               !2
         17        OP_DATA                                                  ~16
   16    18    > > FE_RESET_R                                       $17     !2, ->25
         19    > > FE_FETCH_R                                               $17, !5, ->25
   17    20    >   INIT_DYNAMIC_CALL                                        !5
         21        SEND_VAR_EX                                              !0
         22        DO_FCALL                                      0  $18     
         23        ASSIGN                                                   !0, $18
   16    24      > JMP                                                      ->19
         25    >   FE_FREE                                                  $17
   19    26        ASSIGN                                                   !6, !0
   20    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.61 ms | 996 KiB | 13 Q