3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = hash('sha256', 'hello'); $mutated = mutate($result); $unmutated = unmutate($mutated); echo "hello in sha256 is $result. Mutated it becomes $mutated, and when unmutated it is returned to $unmutated"; function mutate($hash) { return str_replace(['a', 'b', 'c', 'd', 'e', 'f'], ['f', 'e', 'd', 'c', 'b', 'a'], $hash); } function unmutate($hash) { return str_replace(['f', 'e', 'd', 'c', 'b', 'a'], ['a', 'b', 'c', 'd', 'e', 'f'], $hash); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wdla3
function name:  (null)
number of ops:  21
compiled vars:  !0 = $result, !1 = $mutated, !2 = $unmutated
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'hash'
          1        SEND_VAL                                                 'sha256'
          2        SEND_VAL                                                 'hello'
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    5     5        INIT_FCALL_BY_NAME                                       'mutate'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !1, $5
    7     9        INIT_FCALL_BY_NAME                                       'unmutate'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0  $7      
         12        ASSIGN                                                   !2, $7
    9    13        ROPE_INIT                                     6  ~10     'hello+in+sha256+is+'
         14        ROPE_ADD                                      1  ~10     ~10, !0
         15        ROPE_ADD                                      2  ~10     ~10, '.+Mutated+it+becomes+'
         16        ROPE_ADD                                      3  ~10     ~10, !1
         17        ROPE_ADD                                      4  ~10     ~10, '%2C+and+when+unmutated+it+is+returned+to+'
         18        ROPE_END                                      5  ~9      ~10, !2
         19        ECHO                                                     ~9
   20    20      > RETURN                                                   1

Function mutate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wdla3
function name:  mutate
number of ops:  8
compiled vars:  !0 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 <array>
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
   15     7*     > RETURN                                                   null

End of function mutate

Function unmutate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wdla3
function name:  unmutate
number of ops:  8
compiled vars:  !0 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 <array>
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
   20     7*     > RETURN                                                   null

End of function unmutate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.26 ms | 1400 KiB | 17 Q