3v4l.org

run code in 300+ PHP versions simultaneously
<?php function analyze(string $input): bool { $decoded = base64_decode($input); var_dump(bin2hex($decoded)); return base64_encode($decoded) === $input; } var_dump(analyze('PHP')); var_dump(analyze('PHP=')); var_dump(analyze('PHM='));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OM5jE
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'analyze'
          2        SEND_VAL                                                 'PHP'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   12     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'analyze'
          8        SEND_VAL                                                 'PHP%3D'
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
   13    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'analyze'
         14        SEND_VAL                                                 'PHM%3D'
         15        DO_FCALL                                      0  $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function analyze:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OM5jE
function name:  analyze
number of ops:  19
compiled vars:  !0 = $input, !1 = $decoded
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'base64_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !1, $2
    6     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'bin2hex'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                                 
    8    11        INIT_FCALL                                               'base64_encode'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $6      
         14        IS_IDENTICAL                                     ~7      !0, $6
         15        VERIFY_RETURN_TYPE                                       ~7
         16      > RETURN                                                   ~7
    9    17*       VERIFY_RETURN_TYPE                                       
         18*     > RETURN                                                   null

End of function analyze

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.76 ms | 1460 KiB | 20 Q