3v4l.org

run code in 300+ PHP versions simultaneously
<?php $score_url = 'http://vowgag.com/to/23335/'; $headers = get_headers($score_url); $response = substr($headers[0], 9, 3); $html = file_get_contents($score_url); $html2 = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8"); $classname = 'entry-content'; $ogtitle = 'og:title'; $dom = new DOMDocument; $dom->loadHTML($html2); $xpath = new DOMXPath($dom); //$results = $xpath->query("(//div[@class='" . $classname . "'])[1]/p/a[1]"); $results2 = $xpath->query("(//div[@class='" . $classname . "'])[1]/p/a[1]/img[1]/@src"); $results3 = $xpath->query("//meta[@property='" . $ogtitle . "']/@content"); foreach ($results2 as $parseimg){ $parseimgurl = parse_url($parseimg->nodue.""); } echo $parseimgurl;
Output for git.master, git.master_jit
Warning: get_headers(): php_network_getaddresses: getaddrinfo for vowgag.com failed: System error in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): Failed to open stream: php_network_getaddresses: getaddrinfo for vowgag.com failed: System error in /in/8fv51 on line 4 Warning: Trying to access array offset on value of type bool in /in/8fv51 on line 5 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/8fv51 on line 5 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for vowgag.com failed: System error in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): Failed to open stream: php_network_getaddresses: getaddrinfo for vowgag.com failed: System error in /in/8fv51 on line 6 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in /in/8fv51 on line 7 Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /in/8fv51:11 Stack trace: #0 /in/8fv51(11): DOMDocument->loadHTML('') #1 {main} thrown in /in/8fv51 on line 11
Process exited with code 255.
Output for rfc.property-hooks
Warning: get_headers(): php_network_getaddresses: getaddrinfo for vowgag.com failed: System error in /in/8fv51 on line 4 Warning: get_headers(http://vowgag.com/to/23335/): Failed to open stream: php_network_getaddresses: getaddrinfo for vowgag.com failed: System error in /in/8fv51 on line 4 Warning: Trying to access array offset on false in /in/8fv51 on line 5 Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /in/8fv51 on line 5 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for vowgag.com failed: System error in /in/8fv51 on line 6 Warning: file_get_contents(http://vowgag.com/to/23335/): Failed to open stream: php_network_getaddresses: getaddrinfo for vowgag.com failed: System error in /in/8fv51 on line 6 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in /in/8fv51 on line 7 Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /in/8fv51:11 Stack trace: #0 /in/8fv51(11): DOMDocument->loadHTML('') #1 {main} thrown in /in/8fv51 on line 11
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:
58.74 ms | 402 KiB | 8 Q