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.3.0 - 5.4.25
Parse error: syntax error, unexpected ';' in /in/6opbS on line 20
Process exited with code 255.