3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fn4 = fn ($totalCount) => sqrt($totalCount) - sqrt(1); $total = 1; for ($i = 1; $i <= 20; $i++) { echo sqrt($i * 20) - sqrt(1); // echo "$total: " . ceil($fn4($i)); echo "\n"; $total++; }
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 = 5
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 5
Branch analysis from position: 19
Branch analysis from position: 5
filename:       /in/YMp2r
function name:  (null)
number of ops:  20
compiled vars:  !0 = $fn4, !1 = $total, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          1        ASSIGN                                                   !0, ~3
    5     2        ASSIGN                                                   !1, 1
    6     3        ASSIGN                                                   !2, 1
          4      > JMP                                                      ->17
    7     5    >   INIT_FCALL                                               'sqrt'
          6        MUL                                              ~7      !2, 20
          7        SEND_VAL                                                 ~7
          8        DO_ICALL                                         $8      
          9        INIT_FCALL                                               'sqrt'
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $9      
         12        SUB                                              ~10     $8, $9
         13        ECHO                                                     ~10
    9    14        ECHO                                                     '%0A'
   10    15        PRE_INC                                                  !1
    6    16        PRE_INC                                                  !2
         17    >   IS_SMALLER_OR_EQUAL                                      !2, 20
         18      > JMPNZ                                                    ~13, ->5
   11    19    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YMp2r
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $totalCount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'sqrt'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        INIT_FCALL                                               'sqrt'
          5        SEND_VAL                                                 1
          6        DO_ICALL                                         $2      
          7        SUB                                              ~3      $1, $2
          8      > RETURN                                                   ~3
          9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.63 ms | 945 KiB | 14 Q