3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(dechex(128)); $wrongUtf8 = mb_convert_encoding('öäü', 'UTF-8', 'ISO-8859-1'); var_dump($wrongUtf8); $validUtf8 = mb_convert_encoding($wrongUtf8, 'ISO-8859-1', 'UTF-8'); var_dump($validUtf8); var_dump(preg_match('/^./su', $validUtf8), preg_match('/[\x80-\xFF]/', $validUtf8));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7d0Ne
function name:  (null)
number of ops:  37
compiled vars:  !0 = $wrongUtf8, !1 = $validUtf8
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'dechex'
          2        SEND_VAL                                                 128
          3        DO_ICALL                                         $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'mb_convert_encoding'
          7        SEND_VAL                                                 '%C3%B6%C3%A4%C3%BC'
          8        SEND_VAL                                                 'UTF-8'
          9        SEND_VAL                                                 'ISO-8859-1'
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !0, $4
    6    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
    8    15        INIT_FCALL                                               'mb_convert_encoding'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 'ISO-8859-1'
         18        SEND_VAL                                                 'UTF-8'
         19        DO_ICALL                                         $7      
         20        ASSIGN                                                   !1, $7
    9    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
   11    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'preg_match'
         26        SEND_VAL                                                 '%2F%5E.%2Fsu'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $10     
         29        SEND_VAR                                                 $10
         30        INIT_FCALL                                               'preg_match'
         31        SEND_VAL                                                 '%2F%5B%5Cx80-%5CxFF%5D%2F'
         32        SEND_VAR                                                 !1
         33        DO_ICALL                                         $11     
         34        SEND_VAR                                                 $11
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.24 ms | 1396 KiB | 21 Q