3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function log_error($num, $str, $file, $line, $context = null) { throw new ErrorException( $str, 0, $num, $file, $line ); } set_error_handler('log_error'); ob_start(); $out = php_strip_whitespace(__FILE__); var_dump(ob_get_clean(), $out); /*
Output for 5.0.1 - 5.2.9, 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Unterminated comment starting line 13 in /in/pS3LE on line 13 string(0) "" string(316) "<?php function log_error($num, $str, $file, $line, $context = null) { throw new ErrorException( $str, 0, $num, $file, $line ); } set_error_handler('log_error'); ob_start(); $out = php_strip_whitespace(__FILE__); var_dump(ob_get_clean(), $out); Warning: Unterminated comment starting line 13 in /in/pS3LE on line 9 "
Output for hhvm-3.10.0 - 3.12.0
string(0) "" string(245) "<?php function log_error($num, $str, $file, $line, $context = null) { throw new ErrorException( $str, 0, $num, $file, $line ); } set_error_handler('log_error'); ob_start(); $out = php_strip_whitespace(__FILE__); var_dump(ob_get_clean(), $out); "
Output for 5.2.10 - 5.2.17
Warning: Unterminated comment starting line 13 in /in/pS3LE on line 13 Fatal error: fatal flex scanner internal error--end of buffer missed in /in/pS3LE on line 13
Process exited with code 255.
Output for 5.0.0
Warning: Unterminated comment starting line 13 in /in/pS3LE on line 13 string(0) "" string(71) " Warning: Unterminated comment starting line 13 in /in/pS3LE on line 9 " <?php function log_error($num, $str, $file, $line, $context = null) { throw new ErrorException( $str, 0, $num, $file, $line ); } set_error_handler('log_error'); ob_start(); $out = php_strip_whitespace(__FILE__); var_dump(ob_get_clean(), $out);
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_NEW in /in/pS3LE on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_NEW in /in/pS3LE on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/pS3LE on line 4
Process exited with code 255.