3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create the keypair $res=openssl_pkey_new(); // Get private key openssl_pkey_export($res, $privatekey); // Get public key $publickey=openssl_pkey_get_details($res); $publickey=base64_encode($publickey["key"]); echo "Private Key:<BR>$privatekey<br><br>Public Key:<BR>$publickey<BR><BR>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Skvoe
function name:  (null)
number of ops:  23
compiled vars:  !0 = $res, !1 = $privatekey, !2 = $publickey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'openssl_pkey_new'
          1        DO_FCALL                                      0  $3      
          2        ASSIGN                                                   !0, $3
    7     3        INIT_FCALL_BY_NAME                                       'openssl_pkey_export'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
   10     7        INIT_FCALL_BY_NAME                                       'openssl_pkey_get_details'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $6      
         10        ASSIGN                                                   !2, $6
   11    11        INIT_FCALL                                               'base64_encode'
         12        FETCH_DIM_R                                      ~8      !2, 'key'
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !2, $9
   13    16        ROPE_INIT                                     5  ~12     'Private+Key%3A%3CBR%3E'
         17        ROPE_ADD                                      1  ~12     ~12, !1
         18        ROPE_ADD                                      2  ~12     ~12, '%3Cbr%3E%3Cbr%3EPublic+Key%3A%3CBR%3E'
         19        ROPE_ADD                                      3  ~12     ~12, !2
         20        ROPE_END                                      4  ~11     ~12, '%3CBR%3E%3CBR%3E'
         21        ECHO                                                     ~11
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.87 ms | 1386 KiB | 15 Q