3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a='print'; $b='php_uname'; $c='system'; $d='shell_exec'; function nonalpha($string) { $str = ''; $cons = array('a' => '@ !', 'b' => '< ^', 'c' => '< _', 'd' => '? [', 'e' => '; ^', 'f' => '] ;', 'g' => ': ]', 'h' => '@ (', 'i' => ') @', 'j' => '* @', 'k' => '@ +', 'l' => ', @', 'm' => '- @', 'n' => '@ .', 'o' => '/ @', 'p' => '- ]', 'q' => '_ .', 'r' => '_ -', 's' => '- ^', 't' => '+ _', 'u' => '+ ^', 'v' => '] +', 'w' => '_ (', 'x' => '^ &', 'y' => '_ &', 'z' => '[ !', '_' => '! ~', 'A' => '{ :', 'B' => '? }', 'C' => '> }', 'D' => '` $', 'E' => '` %', 'F' => '& `', 'G' => '| ;', 'H' => '( `', 'I' => '` )', 'J' => '` J', 'K' => '` +', 'L' => '` ,', 'M' => '` -', 'N' => '` .', 'O' => '/ `', 'P' => '| ,', 'Q' => '| -', 'R' => '. |', 'S' => '| /', 'T' => '( |', 'U' => '| )', 'V' => '* |', 'W' => '* }', 'X' => '# {', 'Y' => '} $', 'Z' => '! {'); $cons_num = array('1' => "(('-'^'|')^'`')", '2' => "((','^'~')^'`')", '3' => "(('-'^'`')^'~')", '4' => "(('*'^'`')^'~')", '5' => "(('+'^'`')^'~')", '6' => "(('('^'`')^'~')", '7' => "((')'^'`')^'~')", '8' => "((':'^'|')^'~')", '9' => "((';'^'|')^'~')", '0' => "(('.'^'`')^'~')"); foreach(str_split($string) as $char) { if (!is_numeric($char)) { $bits = explode(' ', $cons[$char]); $str.= "('$bits[0]'^'$bits[1]')."; } else { $str.= "{$cons_num[$char]}."; } } return rtrim($str, '.'); } print(nonalpha($a).PHP_EOL); print(nonalpha($b).PHP_EOL); print(nonalpha($c).PHP_EOL); print(nonalpha($d).PHP_EOL);
Output for 5.0.2 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
('-'^']').('_'^'-').(')'^'@').('@'^'.').('+'^'_') ('-'^']').('@'^'(').('-'^']').('!'^'~').('+'^'^').('@'^'.').('@'^'!').('-'^'@').(';'^'^') ('-'^'^').('_'^'&').('-'^'^').('+'^'_').(';'^'^').('-'^'@') ('-'^'^').('@'^'(').(';'^'^').(','^'@').(','^'@').('!'^'~').(';'^'^').('^'^'&').(';'^'^').('<'^'_')
Output for 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/7CZBo on line 20 ('-'^']').('_'^'-').(')'^'@').('@'^'.').('+'^'_')PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/7CZBo on line 21 ('-'^']').('@'^'(').('-'^']').('!'^'~').('+'^'^').('@'^'.').('@'^'!').('-'^'@').(';'^'^')PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/7CZBo on line 22 ('-'^'^').('_'^'&').('-'^'^').('+'^'_').(';'^'^').('-'^'@')PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/7CZBo on line 23 ('-'^'^').('@'^'(').(';'^'^').(','^'@').(','^'@').('!'^'~').(';'^'^').('^'^'&').(';'^'^').('<'^'_')PHP_EOL
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: str_split() in /in/7CZBo on line 10
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: str_split() in /in/7CZBo on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: str_split() in /in/7CZBo on line 10