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=$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/JTdXr
function name:  (null)
number of ops:  20
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        FETCH_DIM_R                                      ~8      !2, 'key'
         12        ASSIGN                                                   !2, ~8
   13    13        ROPE_INIT                                     5  ~11     'Private+Key%3A%3CBR%3E'
         14        ROPE_ADD                                      1  ~11     ~11, !1
         15        ROPE_ADD                                      2  ~11     ~11, '%3Cbr%3E%3Cbr%3EPublic+Key%3A%3CBR%3E'
         16        ROPE_ADD                                      3  ~11     ~11, !2
         17        ROPE_END                                      4  ~10     ~11, '%3CBR%3E%3CBR%3E'
         18        ECHO                                                     ~10
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.46 ms | 1393 KiB | 13 Q