3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = 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/bKCBc
function name:  (null)
number of ops:  20
compiled vars:  !0 = $result, !1 = $mutated, !2 = $unmutated
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'sha256'
          1        SEND_VAL_EX                                              'hello'
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !0, $3
    5     4        INIT_FCALL_BY_NAME                                       'mutate'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
    7     8        INIT_FCALL_BY_NAME                                       'unmutate'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $7      
         11        ASSIGN                                                   !2, $7
    9    12        ROPE_INIT                                     6  ~10     'hello+in+sha256+is+'
         13        ROPE_ADD                                      1  ~10     ~10, !0
         14        ROPE_ADD                                      2  ~10     ~10, '.+Mutated+it+becomes+'
         15        ROPE_ADD                                      3  ~10     ~10, !1
         16        ROPE_ADD                                      4  ~10     ~10, '%2C+and+when+unmutated+it+is+returned+to+'
         17        ROPE_END                                      5  ~9      ~10, !2
         18        ECHO                                                     ~9
   20    19      > RETURN                                                   1

Function mutate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bKCBc
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/bKCBc
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:
150.45 ms | 1392 KiB | 15 Q