3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Some example variables: $alice_ecdh_secret = "\x69\xf2\x08\x41\x2d\x8d\xd5\xdb\x9d\x0c\x6d\x18\x51\x2e\x86\xf0" . "\xec\x75\x66\x5a\xb8\x41\x37\x2d\x57\xb0\x42\xb2\x7e\xf8\x9d\x8c"; $bob_ecdh_public = "\xe8\x98\x0c\x86\xe0\x32\xf1\xeb\x29\x75\x05\x2e\x8d\x65\xbd\xdd" . "\x15\xc3\xb5\x96\x41\x17\x4e\xc9\x67\x8a\x53\x78\x9d\x92\xc7\x54"; $message_keypair = sodium_crypto_box_keypair_from_secretkey_and_publickey( $alice_ecdh_secret, $bob_ecdh_public ); $plaintext = "This is a secret message for your eyes only."; $nonce = random_bytes(24); // And now for the actual public-key encryption step: $ciphertext = sodium_crypto_box($plaintext, $nonce, $message_keypair);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nuTAi
function name:  (null)
number of ops:  19
compiled vars:  !0 = $alice_ecdh_secret, !1 = $bob_ecdh_public, !2 = $message_keypair, !3 = $plaintext, !4 = $nonce, !5 = $ciphertext
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'i%F2%08A-%8D%D5%DB%9D%0Cm%18Q.%86%F0%ECufZ%B8A7-W%B0B%B2%7E%F8%9D%8C'
    7     1        ASSIGN                                                   !1, '%E8%98%0C%86%E02%F1%EB%29u%05.%8De%BD%DD%15%C3%B5%96A%17N%C9g%8ASx%9D%92%C7T'
   10     2        INIT_FCALL_BY_NAME                                       'sodium_crypto_box_keypair_from_secretkey_and_publickey'
   11     3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $8      
   10     6        ASSIGN                                                   !2, $8
   14     7        ASSIGN                                                   !3, 'This+is+a+secret+message+for+your+eyes+only.'
   15     8        INIT_FCALL                                               'random_bytes'
          9        SEND_VAL                                                 24
         10        DO_ICALL                                         $11     
         11        ASSIGN                                                   !4, $11
   18    12        INIT_FCALL_BY_NAME                                       'sodium_crypto_box'
         13        SEND_VAR_EX                                              !3
         14        SEND_VAR_EX                                              !4
         15        SEND_VAR_EX                                              !2
         16        DO_FCALL                                      0  $13     
         17        ASSIGN                                                   !5, $13
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.56 ms | 1399 KiB | 15 Q