3v4l.org

run code in 300+ PHP versions simultaneously
<?php assert($a == $b); // 相等 $nowdoc = <<<'END' Multi line string END; echo $nowdoc; die; header('Content-type: text/html; charset=utf-8'); echo '<br />百度关键词URL编码转换示例:<br />'; $urlBaidu = 'http://www.baidu.com/s?wd=%D6%D0%CE%C4'; $arrParse = parse_url($urlBaidu); var_dump($arrParse); parse_str($arrParse ['query'],$output); var_dump($output); echo '乱码:' . $output['wd'] . '<br />'; //将gb2312编码转换成utf-8编码 $strUTF8 = mb_convert_encoding($output['wd'], 'utf-8', 'gb2312'); echo '可读码:' . $strUTF8 . '<br />'; echo '<br />谷歌关键词URL编码转换示例:<br />'; $urlGoogle = 'http://www.google.cn/search?hl=zh-CN&source=hp&q=%E4%B8%AD%E6%96%87&aq=f&oq='; $arrParse = parse_url($urlGoogle); var_dump($arrParse); parse_str($arrParse ['query'],$output); var_dump($output); //谷歌关键词URL编码是utf-8,不用再作转换 echo '可读码:' . $output['q'] . '<br />'; echo $escaped = "This contains a \t tab character."; echo $unescaped = 'This just contains a slash and a t: \t';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/YiO4R
function name:  (null)
number of ops:  69
compiled vars:  !0 = $a, !1 = $b, !2 = $nowdoc, !3 = $urlBaidu, !4 = $arrParse, !5 = $output, !6 = $strUTF8, !7 = $urlGoogle, !8 = $escaped, !9 = $unescaped
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSERT_CHECK                                             
          1        INIT_FCALL                                               'assert'
          2        IS_EQUAL                                         ~10     !0, !1
          3        SEND_VAL                                                 ~10
          4        SEND_VAL                                                 'assert%28%24a+%3D%3D+%24b%29'
          5        DO_ICALL                                                 
    5     6        ASSIGN                                                   !2, 'Multi+line%0Astring'
   10     7        ECHO                                                     !2
   11     8      > EXIT                                                     
   14     9*       INIT_FCALL                                               'header'
         10*       SEND_VAL                                                 'Content-type%3A+text%2Fhtml%3B+charset%3Dutf-8'
         11*       DO_ICALL                                                 
   16    12*       ECHO                                                     '%3Cbr+%2F%3E%E7%99%BE%E5%BA%A6%E5%85%B3%E9%94%AE%E8%AF%8DURL%E7%BC%96%E7%A0%81%E8%BD%AC%E6%8D%A2%E7%A4%BA%E4%BE%8B%EF%BC%9A%3Cbr+%2F%3E'
   18    13*       ASSIGN                                                   !3, 'http%3A%2F%2Fwww.baidu.com%2Fs%3Fwd%3D%25D6%25D0%25CE%25C4'
   20    14*       INIT_FCALL                                               'parse_url'
         15*       SEND_VAR                                                 !3
         16*       DO_ICALL                                         $15     
         17*       ASSIGN                                                   !4, $15
   21    18*       INIT_FCALL                                               'var_dump'
         19*       SEND_VAR                                                 !4
         20*       DO_ICALL                                                 
   22    21*       INIT_FCALL                                               'parse_str'
         22*       FETCH_DIM_R                                      ~18     !4, 'query'
         23*       SEND_VAL                                                 ~18
         24*       SEND_REF                                                 !5
         25*       DO_ICALL                                                 
   23    26*       INIT_FCALL                                               'var_dump'
         27*       SEND_VAR                                                 !5
         28*       DO_ICALL                                                 
   24    29*       FETCH_DIM_R                                      ~21     !5, 'wd'
         30*       CONCAT                                           ~22     '%E4%B9%B1%E7%A0%81%EF%BC%9A', ~21
         31*       CONCAT                                           ~23     ~22, '%3Cbr+%2F%3E'
         32*       ECHO                                                     ~23
   27    33*       INIT_FCALL                                               'mb_convert_encoding'
         34*       FETCH_DIM_R                                      ~24     !5, 'wd'
         35*       SEND_VAL                                                 ~24
         36*       SEND_VAL                                                 'utf-8'
         37*       SEND_VAL                                                 'gb2312'
         38*       DO_ICALL                                         $25     
         39*       ASSIGN                                                   !6, $25
   29    40*       CONCAT                                           ~27     '%E5%8F%AF%E8%AF%BB%E7%A0%81%EF%BC%9A', !6
         41*       CONCAT                                           ~28     ~27, '%3Cbr+%2F%3E'
         42*       ECHO                                                     ~28
   31    43*       ECHO                                                     '%3Cbr+%2F%3E%E8%B0%B7%E6%AD%8C%E5%85%B3%E9%94%AE%E8%AF%8DURL%E7%BC%96%E7%A0%81%E8%BD%AC%E6%8D%A2%E7%A4%BA%E4%BE%8B%EF%BC%9A%3Cbr+%2F%3E'
   33    44*       ASSIGN                                                   !7, 'http%3A%2F%2Fwww.google.cn%2Fsearch%3Fhl%3Dzh-CN%26source%3Dhp%26q%3D%25E4%25B8%25AD%25E6%2596%2587%26aq%3Df%26oq%3D'
   35    45*       INIT_FCALL                                               'parse_url'
         46*       SEND_VAR                                                 !7
         47*       DO_ICALL                                         $30     
         48*       ASSIGN                                                   !4, $30
   36    49*       INIT_FCALL                                               'var_dump'
         50*       SEND_VAR                                                 !4
         51*       DO_ICALL                                                 
   37    52*       INIT_FCALL                                               'parse_str'
         53*       FETCH_DIM_R                                      ~33     !4, 'query'
         54*       SEND_VAL                                                 ~33
         55*       SEND_REF                                                 !5
         56*       DO_ICALL                                                 
         57*       INIT_FCALL                                               'var_dump'
         58*       SEND_VAR                                                 !5
         59*       DO_ICALL                                                 
   40    60*       FETCH_DIM_R                                      ~36     !5, 'q'
         61*       CONCAT                                           ~37     '%E5%8F%AF%E8%AF%BB%E7%A0%81%EF%BC%9A', ~36
         62*       CONCAT                                           ~38     ~37, '%3Cbr+%2F%3E'
         63*       ECHO                                                     ~38
   42    64*       ASSIGN                                           ~39     !8, 'This+contains+a+%09+tab+character.'
         65*       ECHO                                                     ~39
   43    66*       ASSIGN                                           ~40     !9, 'This+just+contains+a+slash+and+a+t%3A+%5Ct'
         67*       ECHO                                                     ~40
         68*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.16 ms | 1400 KiB | 25 Q