3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isValidMd5(string $md5 = '') : bool { return strlen($md5) == 32 && ctype_xdigit($md5); } var_dump(isValidMd5(md5('test'))); var_dump(isValidMd5('test'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uNApG
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'isvalidmd5'
          2        INIT_FCALL                                               'md5'
          3        SEND_VAL                                                 'test'
          4        DO_ICALL                                         $0      
          5        SEND_VAR                                                 $0
          6        DO_FCALL                                      0  $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'isvalidmd5'
         11        SEND_VAL                                                 'test'
         12        DO_FCALL                                      0  $3      
         13        SEND_VAR                                                 $3
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function isvalidmd5:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/uNApG
function name:  isValidMd5
number of ops:  12
compiled vars:  !0 = $md5
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      ''
    4     1        STRLEN                                           ~1      !0
          2        IS_EQUAL                                         ~2      ~1, 32
          3      > JMPZ_EX                                          ~2      ~2, ->8
          4    >   INIT_FCALL                                               'ctype_xdigit'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        BOOL                                             ~2      $3
          8    >   VERIFY_RETURN_TYPE                                       ~2
          9      > RETURN                                                   ~2
    5    10*       VERIFY_RETURN_TYPE                                       
         11*     > RETURN                                                   null

End of function isvalidmd5

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.12 ms | 1399 KiB | 21 Q