3v4l.org

run code in 300+ PHP versions simultaneously
<?php function __( $string ) { return $string; } class AtomParser { var $FILE = "php://input"; var $debug = false; public function parse() { $fp = fopen($this->FILE, "r"); while ($data = fread($fp, 4096)) { if($this->debug) $this->content .= $data; if(!xml_parse($parser, $data, feof($fp))) { /* translators: 1: Error message, 2: Line number. */ trigger_error(sprintf(__('XML Error: %1$s at line %2$s')."\n", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); $ret = false; break; } } fclose($fp); } } $atom_parser = new AtomParser(); $atom_parser->FILE = "/usr/local/something.txt"; $atom_parser->parse();
Output for git.master, git.master_jit
Warning: fopen(): open_basedir restriction in effect. File(/usr/local/something.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/HhApV on line 12 Warning: fopen(/usr/local/something.txt): Failed to open stream: Operation not permitted in /in/HhApV on line 12 Fatal error: Uncaught TypeError: fread(): Argument #1 ($stream) must be of type resource, bool given in /in/HhApV:13 Stack trace: #0 /in/HhApV(13): fread(false, 4096) #1 /in/HhApV(32): AtomParser->parse() #2 {main} thrown in /in/HhApV on line 13
Process exited with code 255.
Output for rfc.property-hooks
Warning: fopen(): open_basedir restriction in effect. File(/usr/local/something.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/HhApV on line 12 Warning: fopen(/usr/local/something.txt): Failed to open stream: Operation not permitted in /in/HhApV on line 12 Fatal error: Uncaught TypeError: fread(): Argument #1 ($stream) must be of type resource, false given in /in/HhApV:13 Stack trace: #0 /in/HhApV(13): fread(false, 4096) #1 /in/HhApV(32): AtomParser->parse() #2 {main} thrown in /in/HhApV on line 13
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
589.27 ms | 408 KiB | 5 Q