3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "meow"; $b = $a . "\0woef"; $a = hash_hmac('sha512', $a, 'boegaboe', true); $b = hash_hmac('sha512', $b, 'boegaboe', true); function meow($string) { $callback = function($char) { return str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT); }; return array_map($callback, str_split($string)); } var_dump( $a, $b, meow($a), meow($b), password_hash($a, PASSWORD_BCRYPT, ['salt' => 'boeschrikboeschrikboe!', 'cost' => 12]), password_hash($b, PASSWORD_BCRYPT, ['salt' => 'boeschrikboeschrikboe!', 'cost' => 12]) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BKrfd
function name:  (null)
number of ops:  42
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'meow'
    4     1        CONCAT                                           ~3      !0, '%00woef'
          2        ASSIGN                                                   !1, ~3
    6     3        INIT_FCALL                                               'hash_hmac'
          4        SEND_VAL                                                 'sha512'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'boegaboe'
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !0, $5
    7    10        INIT_FCALL                                               'hash_hmac'
         11        SEND_VAL                                                 'sha512'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 'boegaboe'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $7      
         16        ASSIGN                                                   !1, $7
   19    17        INIT_FCALL                                               'var_dump'
   20    18        SEND_VAR                                                 !0
   21    19        SEND_VAR                                                 !1
   22    20        INIT_FCALL                                               'meow'
         21        SEND_VAR                                                 !0
         22        DO_FCALL                                      0  $9      
         23        SEND_VAR                                                 $9
   23    24        INIT_FCALL                                               'meow'
         25        SEND_VAR                                                 !1
         26        DO_FCALL                                      0  $10     
         27        SEND_VAR                                                 $10
   24    28        INIT_FCALL                                               'password_hash'
         29        SEND_VAR                                                 !0
         30        SEND_VAL                                                 '2y'
         31        SEND_VAL                                                 <array>
         32        DO_ICALL                                         $11     
         33        SEND_VAR                                                 $11
   25    34        INIT_FCALL                                               'password_hash'
         35        SEND_VAR                                                 !1
         36        SEND_VAL                                                 '2y'
         37        SEND_VAL                                                 <array>
         38        DO_ICALL                                         $12     
         39        SEND_VAR                                                 $12
         40        DO_ICALL                                                 
   26    41      > RETURN                                                   1

Function meow:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BKrfd
function name:  meow
number of ops:  12
compiled vars:  !0 = $string, !1 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBKrfd%3A11%240'
          2        ASSIGN                                                   !1, ~2
   16     3        INIT_FCALL                                               'array_map'
          4        SEND_VAR                                                 !1
          5        INIT_FCALL                                               'str_split'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10      > RETURN                                                   $5
   17    11*     > RETURN                                                   null

End of function meow

Function %00%7Bclosure%7D%2Fin%2FBKrfd%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BKrfd
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'str_pad'
          2        INIT_FCALL                                               'decbin'
          3        INIT_FCALL                                               'ord'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        SEND_VAL                                                 8
         10        SEND_VAL                                                 '0'
         11        SEND_VAL                                                 0
         12        DO_ICALL                                         $3      
         13      > RETURN                                                   $3
   14    14*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBKrfd%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.56 ms | 1403 KiB | 31 Q