3v4l.org

run code in 300+ PHP versions simultaneously
<?php $HashPrivado = 'ec7363b7c7ff3ab851335f801568dec5115f09705a45f7d849928e906e0964b0'; $HashPBD = '746e085ea210dd7c14f3cad3f6113767aa58439bebee6459989141c0f0474bff'; $BodyCupon = array( "Tipo" => "code128", "Codigo" => "1234567", "Tam" => 300, "Color" => "black", "ColorB" => "white", "AltoB"=> 50, "AnchoB"=> 2 ); //Preparo la llamada //$Parametros = json_encode($BodyCupon); $Parametros = '{"Tablet":153161,"Telefono":"650849571","RxTlf":"22","Email":"jaime@likeik.com", "RxEmail":"23", "DeliveryId":1222}'; //$Parametros = '{"a":1,"b":2,"c":3,"d":4,"e":5}'; var_dump(json_decode($Parametros, TRUE)); //Usando el hash privado, firmamos el contenido a transmitir (los parĂ¡metros) $ElHash = hash_hmac('sha256', $Parametros, $HashPrivado); $ElHashBD = hash_hmac('sha256', $Parametros, $HashPBD); echo 'HashLK-'.$ElHash.PHP_EOL; echo 'HashBD-'.$ElHashBD.PHP_EOL; $HashMD5 = hash('md5', $Parametros, FALSE); echo 'ElMD5:'.$HashMD5;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3rmZ7
function name:  (null)
number of ops:  38
compiled vars:  !0 = $HashPrivado, !1 = $HashPBD, !2 = $BodyCupon, !3 = $Parametros, !4 = $ElHash, !5 = $ElHashBD, !6 = $HashMD5
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ec7363b7c7ff3ab851335f801568dec5115f09705a45f7d849928e906e0964b0'
    4     1        ASSIGN                                                   !1, '746e085ea210dd7c14f3cad3f6113767aa58439bebee6459989141c0f0474bff'
    5     2        ASSIGN                                                   !2, <array>
   16     3        ASSIGN                                                   !3, '%7B%22Tablet%22%3A153161%2C%22Telefono%22%3A%22650849571%22%2C%22RxTlf%22%3A%2222%22%2C%22Email%22%3A%22jaime%40likeik.com%22%2C+%22RxEmail%22%3A%2223%22%2C+%22DeliveryId%22%3A1222%7D'
   18     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !3
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $11     
          9        SEND_VAR                                                 $11
         10        DO_ICALL                                                 
   20    11        INIT_FCALL                                               'hash_hmac'
         12        SEND_VAL                                                 'sha256'
         13        SEND_VAR                                                 !3
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $13     
         16        ASSIGN                                                   !4, $13
   21    17        INIT_FCALL                                               'hash_hmac'
         18        SEND_VAL                                                 'sha256'
         19        SEND_VAR                                                 !3
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $15     
         22        ASSIGN                                                   !5, $15
   22    23        CONCAT                                           ~17     'HashLK-', !4
         24        CONCAT                                           ~18     ~17, '%0A'
         25        ECHO                                                     ~18
   23    26        CONCAT                                           ~19     'HashBD-', !5
         27        CONCAT                                           ~20     ~19, '%0A'
         28        ECHO                                                     ~20
   24    29        INIT_FCALL                                               'hash'
         30        SEND_VAL                                                 'md5'
         31        SEND_VAR                                                 !3
         32        SEND_VAL                                                 <false>
         33        DO_ICALL                                         $21     
         34        ASSIGN                                                   !6, $21
   25    35        CONCAT                                           ~23     'ElMD5%3A', !6
         36        ECHO                                                     ~23
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.28 ms | 1388 KiB | 21 Q