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"); if (false === $fp) { return false; } 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, 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/pYKdD on line 12 Warning: fopen(/usr/local/something.txt): Failed to open stream: Operation not permitted in /in/pYKdD on line 12

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:
38.43 ms | 406 KiB | 5 Q