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) - 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 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 5
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 5
Branch analysis from position: 18
Branch analysis from position: 5
filename:       /in/WhS5Q
function name:  (null)
number of ops:  19
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                                                      ->16
    7     5    >   INIT_FCALL                                               'sqrt'
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $7      
          8        INIT_FCALL                                               'sqrt'
          9        SEND_VAL                                                 1
         10        DO_ICALL                                         $8      
         11        SUB                                              ~9      $7, $8
         12        ECHO                                                     ~9
    9    13        ECHO                                                     '%0A'
   10    14        PRE_INC                                                  !1
    6    15        PRE_INC                                                  !2
         16    >   IS_SMALLER_OR_EQUAL                                      !2, 20
         17      > JMPNZ                                                    ~12, ->5
   11    18    > > 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/WhS5Q
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:
142.14 ms | 945 KiB | 14 Q