3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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);
based on KSBVV
Output for 7.0.30 - 7.3.0alpha1
Notice: Undefined variable: kha in /in/fT55u on line 4 Notice: Undefined variable: kha in /in/fT55u on line 4 Notice: Undefined variable: main in /in/fT55u on line 5 Notice: Undefined variable: main in /in/fT55u on line 5 Notice: Undefined variable: kha1 in /in/fT55u on line 5 Notice: Undefined variable: kha1 in /in/fT55u on line 5 array(2) { [0]=> array(0) { } [1]=> array(0) { } } (globals:)string(1332) "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 ; print ; ?> <?php Global ; print -['kha']; ?><?php Global ; print $1kha; ?><?php Global $1kha; print ; ?> <!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"
Output for hhvm-3.22.0
Notice: Undefined variable: kha in /in/fT55u on line -1 Notice: Undefined variable: kha in /in/fT55u on line -1 Notice: Undefined variable: main in /in/fT55u on line -1 Notice: Undefined variable: main in /in/fT55u on line -1 Notice: Undefined variable: kha1 in /in/fT55u on line -1 Notice: Undefined variable: kha1 in /in/fT55u on line -1 array(2) { [0]=> array(0) { } [1]=> array(0) { } } (globals:)string(1332) "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 ; print ; ?> <?php Global ; print -['kha']; ?><?php Global ; print $1kha; ?><?php Global $1kha; print ; ?> <!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"
Output for hhvm-3.18.5 - 3.21.3
Notice: Undefined variable: kha in /in/fT55u on line 19 Notice: Undefined variable: kha in /in/fT55u on line 19 Notice: Undefined variable: main in /in/fT55u on line 19 Notice: Undefined variable: main in /in/fT55u on line 19 Notice: Undefined variable: kha1 in /in/fT55u on line 19 Notice: Undefined variable: kha1 in /in/fT55u on line 19 array(2) { [0]=> array(0) { } [1]=> array(0) { } } (globals:)string(1332) "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 ; print ; ?> <?php Global ; print -['kha']; ?><?php Global ; print $1kha; ?><?php Global $1kha; print ; ?> <!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"
Output for 5.6.30
Notice: Undefined variable: kha in /in/fT55u on line 4 Notice: Undefined variable: kha in /in/fT55u on line 5 Notice: Undefined variable: main in /in/fT55u on line 5 Notice: Undefined variable: main in /in/fT55u on line 5 Notice: Undefined variable: kha1 in /in/fT55u on line 5 Notice: Undefined variable: kha1 in /in/fT55u on line 19 array(2) { [0]=> array(0) { } [1]=> array(0) { } } (globals:)string(1332) "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 ; print ; ?> <?php Global ; print -['kha']; ?><?php Global ; print $1kha; ?><?php Global $1kha; print ; ?> <!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"