3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_secret = sodium_hex2bin("da93b1db433cfb2efe490a1bb263e440b586b6167c20b86f14cd058515806940"); $my_public = sodium_crypto_scalarmult_base($my_secret); $message = sodium_crypto_box_seal("This is a secret", $my_public); var_dump(sodium_bin2hex($message)); $opened = sodium_crypto_box_seal_open($message, $my_secret . $my_public); var_dump(sodium_bin2hex($opened));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XovTK
function name:  (null)
number of ops:  32
compiled vars:  !0 = $my_secret, !1 = $my_public, !2 = $message, !3 = $opened
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'sodium_hex2bin'
          1        SEND_VAL_EX                                              'da93b1db433cfb2efe490a1bb263e440b586b6167c20b86f14cd058515806940'
          2        DO_FCALL                                      0  $4      
          3        ASSIGN                                                   !0, $4
    4     4        INIT_FCALL_BY_NAME                                       'sodium_crypto_scalarmult_base'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                                   !1, $6
    6     8        INIT_FCALL_BY_NAME                                       'sodium_crypto_box_seal'
          9        SEND_VAL_EX                                              'This+is+a+secret'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0  $8      
         12        ASSIGN                                                   !2, $8
    7    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL_BY_NAME                                       'sodium_bin2hex'
         15        SEND_VAR_EX                                              !2
         16        DO_FCALL                                      0  $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
    9    19        INIT_FCALL_BY_NAME                                       'sodium_crypto_box_seal_open'
         20        SEND_VAR_EX                                              !2
         21        CONCAT                                           ~12     !0, !1
         22        SEND_VAL_EX                                              ~12
         23        DO_FCALL                                      0  $13     
         24        ASSIGN                                                   !3, $13
   10    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL_BY_NAME                                       'sodium_bin2hex'
         27        SEND_VAR_EX                                              !3
         28        DO_FCALL                                      0  $15     
         29        SEND_VAR                                                 $15
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.65 ms | 1400 KiB | 15 Q