3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dostuff() { echo 'mb_check_encoding: '; if ( function_exists( 'mb_check_encoding' ) ) { var_dump( mb_check_encoding( "\xF4\x90\x80\x80", 'UTF-8' ) ); var_dump( mb_check_encoding( "\xEF\xBF\xBF", 'UTF-8' ) ); } else { echo "absent\n"; } echo 'preg_match: '; if ( function_exists( 'preg_match' ) ) { var_dump(preg_match( '//u', "\xF4\x90\x80\x80" )); var_dump(preg_match( '//u', "\xEF\xBF\xBF" )); } else { echo "absent\n"; } } dostuff();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5cPik
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'dostuff'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function dostuff:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 20
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 41
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 41
Branch analysis from position: 26
Branch analysis from position: 41
filename:       /in/5cPik
function name:  dostuff
number of ops:  43
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'mb_check_encoding%3A+'
    6     1        INIT_FCALL                                               'function_exists'
          2        SEND_VAL                                                 'mb_check_encoding'
          3        DO_ICALL                                         $0      
          4      > JMPZ                                                     $0, ->20
    7     5    >   INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'mb_check_encoding'
          7        SEND_VAL                                                 '%F4%90%80%80'
          8        SEND_VAL                                                 'UTF-8'
          9        DO_ICALL                                         $1      
         10        SEND_VAR                                                 $1
         11        DO_ICALL                                                 
    8    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'mb_check_encoding'
         14        SEND_VAL                                                 '%EF%BF%BF'
         15        SEND_VAL                                                 'UTF-8'
         16        DO_ICALL                                         $3      
         17        SEND_VAR                                                 $3
         18        DO_ICALL                                                 
         19      > JMP                                                      ->21
   10    20    >   ECHO                                                     'absent%0A'
   13    21    >   ECHO                                                     'preg_match%3A+'
   14    22        INIT_FCALL                                               'function_exists'
         23        SEND_VAL                                                 'preg_match'
         24        DO_ICALL                                         $5      
         25      > JMPZ                                                     $5, ->41
   15    26    >   INIT_FCALL                                               'var_dump'
         27        INIT_FCALL                                               'preg_match'
         28        SEND_VAL                                                 '%2F%2Fu'
         29        SEND_VAL                                                 '%F4%90%80%80'
         30        DO_ICALL                                         $6      
         31        SEND_VAR                                                 $6
         32        DO_ICALL                                                 
   16    33        INIT_FCALL                                               'var_dump'
         34        INIT_FCALL                                               'preg_match'
         35        SEND_VAL                                                 '%2F%2Fu'
         36        SEND_VAL                                                 '%EF%BF%BF'
         37        DO_ICALL                                         $8      
         38        SEND_VAR                                                 $8
         39        DO_ICALL                                                 
         40      > JMP                                                      ->42
   18    41    >   ECHO                                                     'absent%0A'
   21    42    > > RETURN                                                   null

End of function dostuff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.7 ms | 1407 KiB | 22 Q