3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tpl = "The side bar{l:{khalid}} s a Cheatsheet,{l:{test}} full Reference, and Help. You can also Save & Share with the Community, and {{kaitbellahs}}view patterns you{{eu mesmo}} create or favorite in My Patterns. RegExr v3 was created by gskinner.com, and is proudly hosted by Media Temple <?php Global $kha; print $kha; ?> <?php Global $main; print $main-['kha']; ?><?php Global $kha1; print $1kha; ?><?php Global $1kha; print $kha1; ?> <!DOCTYPE html> <html <?php if(#main->conf['amp'] ){ print \"amp\"; } ?> <?php if(#main->conf['amp']=<?php GLOBAL #main;print #main->conf['kha']; ?> ){ print \"amp\"; } ?>lang=\" <?php if(#main->conf['amp']==<?php GLOBAL #main;print #main->conf['kha']; ?> ){ print \"amp\"; } ?>lang=\" <?php if(#main->conf['amp']!=<?php GLOBAL #main;print #main->conf['kha']; ?> ){ print \"amp\"; } ?>lang=\" <?php if(#main->conf['amp']<<?php GLOBAL #main;print #main->conf['kha']; ?> ){ print \"amp\"; } ?>lang=\" <?php if(#main->conf['amp']><?php GLOBAL #main;print #main->conf['kha']; ?> ){ print \"amp\"; } ?>lang=\" <?php GLOBAL #main;print #main->lng['lng']; ?> \"> <!DOCTYPE html> <html <?php if( \$main->conf['amp'] ){ print \"amp\"; } ?> lang=\" <?php GLOBAL \$main;print \$main->lng['lng']; ?> \"> <head> <meta charset=\"utf-8\"/> Explore results with the Tools below. Replace & List output custom results. Details lists capture groups. Explain d"; //$globals = array(); $tpl = preg_replace("/if\( \<\?php GLOBAL.*?\;print (.*?); \?\>+/im", "if(\$1", $tpl); preg_match_all("/global \$(.*?);/im", $tpl, $globals); print "(globals:".var_dump($globals).")"; //$globals = array_unique(array_map("StrToLower", $globals[0])); var_dump($tpl);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fT55u
function name:  (null)
number of ops:  35
compiled vars:  !0 = $tpl, !1 = $kha, !2 = $main, !3 = $kha1, !4 = $globals
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ROPE_INIT                                    13  ~6      'The+side+bar%7Bl%3A%7Bkhalid%7D%7D+s+a+Cheatsheet%2C%7Bl%3A%7Btest%7D%7D+full+Reference%2C+and+Help.+You+can+also+Save+%26+Share+with+the+Community%2C+and+%7B%7Bkaitbellahs%7D%7Dview+patterns+you%7B%7Beu+mesmo%7D%7D+create+or+favorite+in+My+Patterns.%0ARegExr+v3+was+created+by+gskinner.com%2C+and+is+proudly+hosted+by+Media+Temple%0A%3C%3Fphp+Global+'
    4     1        ROPE_ADD                                      1  ~6      ~6, !1
          2        ROPE_ADD                                      2  ~6      ~6, '%3B+print+'
          3        ROPE_ADD                                      3  ~6      ~6, !1
          4        ROPE_ADD                                      4  ~6      ~6, '%3B+%3F%3E%0A%3C%3Fphp+Global+'
    5     5        ROPE_ADD                                      5  ~6      ~6, !2
          6        ROPE_ADD                                      6  ~6      ~6, '%3B+print+'
          7        ROPE_ADD                                      7  ~6      ~6, !2
          8        ROPE_ADD                                      8  ~6      ~6, '-%5B%27kha%27%5D%3B+%3F%3E%3C%3Fphp+Global+'
          9        ROPE_ADD                                      9  ~6      ~6, !3
         10        ROPE_ADD                                     10  ~6      ~6, '%3B+print+%241kha%3B+%3F%3E%3C%3Fphp+Global+%241kha%3B+print+'
         11        ROPE_ADD                                     11  ~6      ~6, !3
         12        ROPE_END                                     12  ~5      ~6, '%3B+%3F%3E%0A%3C%21DOCTYPE+html%3E%0A%3Chtml++%3C%3Fphp+if%28%23main-%3Econf%5B%27amp%27%5D+%29%7B+print+%22amp%22%3B+%7D+%3F%3E%0A%3C%3Fphp+if%28%23main-%3Econf%5B%27amp%27%5D%3D%3C%3Fphp+GLOBAL+%23main%3Bprint+%23main-%3Econf%5B%27kha%27%5D%3B+%3F%3E++%29%7B+print+%22amp%22%3B+%7D+%3F%3Elang%3D%22+%0A%3C%3Fphp+if%28%23main-%3Econf%5B%27amp%27%5D%3D%3D%3C%3Fphp+GLOBAL+%23main%3Bprint+%23main-%3Econf%5B%27kha%27%5D%3B+%3F%3E++%29%7B+print+%22amp%22%3B+%7D+%3F%3Elang%3D%22+%0A%3C%3Fphp+if%28%23main-%3Econf%5B%27amp%27%5D%21%3D%3C%3Fphp+GLOBAL+%23main%3Bprint+%23main-%3Econf%5B%27kha%27%5D%3B+%3F%3E++%29%7B+print+%22amp%22%3B+%7D+%3F%3Elang%3D%22+%0A%3C%3Fphp+if%28%23main-%3Econf%5B%27amp%27%5D%3C%3C%3Fphp+GLOBAL+%23main%3Bprint+%23main-%3Econf%5B%27kha%27%5D%3B+%3F%3E++%29%7B+print+%22amp%22%3B+%7D+%3F%3Elang%3D%22+%0A%3C%3Fphp+if%28%23main-%3Econf%5B%27amp%27%5D%3E%3C%3Fphp+GLOBAL+%23main%3Bprint+%23main-%3Econf%5B%27kha%27%5D%3B+%3F%3E++%29%7B+print+%22amp%22%3B+%7D+%3F%3Elang%3D%22+%3C%3Fphp+GLOBAL+%23main%3Bprint+%23main-%3Elng%5B%27lng%27%5D%3B+%3F%3E+%22%3E%0A%3C%21DOCTYPE+html%3E%0A%3Chtml++%3C%3Fphp+if%28+%24main-%3Econf%5B%27amp%27%5D+%29%7B+print+%22amp%22%3B+%7D+%3F%3E++lang%3D%22+%3C%3Fphp+GLOBAL+%24main%3Bprint+%24main-%3Elng%5B%27lng%27%5D%3B+%3F%3E+%22%3E%0A%0A%3Chead%3E%0A%09%3Cmeta+charset%3D%22utf-8%22%2F%3E%0A%0AExplore+results+with+the+Tools+below.+Replace+%26+List+output+custom+results.+Details+lists+capture+groups.+Explain+d'
    2    13        ASSIGN                                                   !0, ~5
   21    14        INIT_FCALL                                               'preg_replace'
         15        SEND_VAL                                                 '%2Fif%5C%28+%5C%3C%5C%3Fphp+GLOBAL.%2A%3F%5C%3Bprint+%28.%2A%3F%29%3B+%5C%3F%5C%3E%2B%2Fim'
         16        SEND_VAL                                                 'if%28%241'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $14     
         19        ASSIGN                                                   !0, $14
   23    20        INIT_FCALL                                               'preg_match_all'
         21        SEND_VAL                                                 '%2Fglobal+%24%28.%2A%3F%29%3B%2Fim'
         22        SEND_VAR                                                 !0
         23        SEND_REF                                                 !4
         24        DO_ICALL                                                 
   24    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !4
         27        DO_ICALL                                         $17     
         28        CONCAT                                           ~18     '%28globals%3A', $17
         29        CONCAT                                           ~19     ~18, '%29'
         30        ECHO                                                     ~19
   28    31        INIT_FCALL                                               'var_dump'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.37 ms | 1400 KiB | 19 Q