3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key1 = openssl_pkey_new( [ 'ec' => [ 'curve_name' => 'prime192v1', 'x' => hex2bin('42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0'), 'y' => hex2bin('dfbe5d7c61fac88b11811bde328e8a0d12bf01a9d204b523'), ], ] ); $key2 = openssl_pkey_new( [ 'ec' => [ 'curve_name' => 'prime192v1', 'd' => hex2bin('f269c158637482aad644cd692dd1d3ef2c8a7c49e389f7f6'), ], ] ); // Should print 803d8ab2e5b6e6fca715737c3a82f7ce3c783124f6d51cd0 echo bin2hex(openssl_pkey_derive($key1, $key2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DsrpG
function name:  (null)
number of ops:  33
compiled vars:  !0 = $key1, !1 = $key2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'openssl_pkey_new'
    5     1        INIT_ARRAY                                       ~2      'prime192v1', 'curve_name'
    7     2        INIT_FCALL                                               'hex2bin'
          3        SEND_VAL                                                 '42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0'
          4        DO_ICALL                                         $3      
          5        ADD_ARRAY_ELEMENT                                ~2      $3, 'x'
    9     6        INIT_FCALL                                               'hex2bin'
          7        SEND_VAL                                                 'dfbe5d7c61fac88b11811bde328e8a0d12bf01a9d204b523'
          8        DO_ICALL                                         $4      
          9        ADD_ARRAY_ELEMENT                                ~2      $4, 'y'
         10        INIT_ARRAY                                       ~5      ~2, 'ec'
         11        SEND_VAL_EX                                              ~5
         12        DO_FCALL                                      0  $6      
    2    13        ASSIGN                                                   !0, $6
   13    14        INIT_FCALL_BY_NAME                                       'openssl_pkey_new'
   16    15        INIT_ARRAY                                       ~8      'prime192v1', 'curve_name'
   18    16        INIT_FCALL                                               'hex2bin'
         17        SEND_VAL                                                 'f269c158637482aad644cd692dd1d3ef2c8a7c49e389f7f6'
         18        DO_ICALL                                         $9      
         19        ADD_ARRAY_ELEMENT                                ~8      $9, 'd'
         20        INIT_ARRAY                                       ~10     ~8, 'ec'
         21        SEND_VAL_EX                                              ~10
         22        DO_FCALL                                      0  $11     
   13    23        ASSIGN                                                   !1, $11
   24    24        INIT_FCALL                                               'bin2hex'
         25        INIT_FCALL_BY_NAME                                       'openssl_pkey_derive'
         26        SEND_VAR_EX                                              !0
         27        SEND_VAR_EX                                              !1
         28        DO_FCALL                                      0  $13     
         29        SEND_VAR                                                 $13
         30        DO_ICALL                                         $14     
         31        ECHO                                                     $14
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.61 ms | 1401 KiB | 17 Q