3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = trim(fgets(STDIN)); $func = function($x, $y) { $j = $x + $y; }; for ($i = 0; $i < 10000; $i++) { $func($i, 100); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 12
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 12
Branch analysis from position: 19
Branch analysis from position: 12
filename:       /in/3Ku1t
function name:  (null)
number of ops:  20
compiled vars:  !0 = $x, !1 = $func, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'trim'
          1        INIT_FCALL                                               'fgets'
          2        FETCH_CONSTANT                                   ~3      'STDIN'
          3        SEND_VAL                                                 ~3
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !0, $5
    3     8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F3Ku1t%3A3%240'
          9        ASSIGN                                                   !1, ~7
    7    10        ASSIGN                                                   !2, 0
         11      > JMP                                                      ->17
    8    12    >   INIT_DYNAMIC_CALL                                        !1
         13        SEND_VAR_EX                                              !2
         14        SEND_VAL_EX                                              100
         15        DO_FCALL                                      0          
    7    16        PRE_INC                                                  !2
         17    >   IS_SMALLER                                               !2, 10000
         18      > JMPNZ                                                    ~12, ->12
    9    19    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F3Ku1t%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3Ku1t
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $x, !1 = $y, !2 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ADD                                              ~3      !0, !1
          3        ASSIGN                                                   !2, ~3
    5     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F3Ku1t%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.29 ms | 1396 KiB | 17 Q