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); $privatekey=base64_encode($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/dZZAA
function name:  (null)
number of ops:  27
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          
    8     7        INIT_FCALL                                               'base64_encode'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !1, $6
   10    11        INIT_FCALL_BY_NAME                                       'openssl_pkey_get_details'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0  $8      
         14        ASSIGN                                                   !2, $8
   11    15        INIT_FCALL                                               'base64_encode'
         16        FETCH_DIM_R                                      ~10     !2, 'key'
         17        SEND_VAL                                                 ~10
         18        DO_ICALL                                         $11     
         19        ASSIGN                                                   !2, $11
   13    20        ROPE_INIT                                     5  ~14     'Private+Key%3A%3CBR%3E'
         21        ROPE_ADD                                      1  ~14     ~14, !1
         22        ROPE_ADD                                      2  ~14     ~14, '%3Cbr%3E%3Cbr%3EPublic+Key%3A%3CBR%3E'
         23        ROPE_ADD                                      3  ~14     ~14, !2
         24        ROPE_END                                      4  ~13     ~14, '%3CBR%3E%3CBR%3E'
         25        ECHO                                                     ~13
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.05 ms | 1395 KiB | 15 Q