3v4l.org

run code in 300+ PHP versions simultaneously
<?php class File { // "Resource(stream)" isn't all that useful private $fp; // But all the stream meta data is public function __debugInfo() { return $this->fp ? stream_get_meta_data($fp) : []; } public function open($filename, $mode = 'r'){ $this->fp = fopen($filename, $mode); } } $f = new File; var_dump($f); // object(File)#1 { } $f->open('http://php.net'); var_dump($f);
Output for git.master, git.master_jit, rfc.property-hooks
object(File)#1 (0) { } Warning: fopen(): php_network_getaddresses: getaddrinfo for php.net failed: System error in /in/ZKA5e on line 13 Warning: fopen(http://php.net): Failed to open stream: php_network_getaddresses: getaddrinfo for php.net failed: System error in /in/ZKA5e on line 13 object(File)#1 (0) { }

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:
40.78 ms | 401 KiB | 8 Q