3v4l.org

run code in 300+ PHP versions simultaneously
<?php function nsaEncrypt($key, $plainText) { $result = 0; for ($character = 0; $character < strlen($plainText); $character++) { $result = bcadd($result, ord($plainText[$character])); $result = bcmul($result, $key); } return $result; } print(nsaEncrypt(255, 'ab')); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z8pPM
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'nsaencrypt'
          1        SEND_VAL                                                 255
          2        SEND_VAL                                                 'ab'
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
   16     5      > RETURN                                                   1

Function nsaencrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 5
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 5
Branch analysis from position: 23
Branch analysis from position: 5
filename:       /in/Z8pPM
function name:  nsaEncrypt
number of ops:  25
compiled vars:  !0 = $key, !1 = $plainText, !2 = $result, !3 = $character
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ASSIGN                                                   !2, 0
    6     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->20
    8     5    >   INIT_FCALL_BY_NAME                                       'bcadd'
          6        SEND_VAR_EX                                              !2
          7        INIT_FCALL                                               'ord'
          8        FETCH_DIM_R                                      ~6      !1, !3
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                         $7      
         11        SEND_VAR_NO_REF_EX                                       $7
         12        DO_FCALL                                      0  $8      
         13        ASSIGN                                                   !2, $8
    9    14        INIT_FCALL_BY_NAME                                       'bcmul'
         15        SEND_VAR_EX                                              !2
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0  $10     
         18        ASSIGN                                                   !2, $10
    6    19        PRE_INC                                                  !3
         20    >   STRLEN                                           ~13     !1
         21        IS_SMALLER                                               !3, ~13
         22      > JMPNZ                                                    ~14, ->5
   12    23    > > RETURN                                                   !2
   13    24*     > RETURN                                                   null

End of function nsaencrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164 ms | 1399 KiB | 16 Q