3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_title($url){ $str = file_get_contents($url); if(strlen($str)>0) { preg_match("/<title\>(.*)\<\/title\>/i", $str, $title); $title = "Title: " . $title[1] . "<br>"; return $title; } } function get_meta($url) { $meta = get_meta_tags($url); $description = "Description: " . $meta['description'] . "<br>"; $keywords = "Keywords: " . $meta['keywords'] . "<br>"; return [$description, $keywords]; } function get_header($url){ $str = file_get_contents($url); if(strlen($str)>0) { preg_match("/<h1.{31}>(.*)\<\/h1\>/i", $str, $header); $header = "H1: " . $header[1] . "<br>"; return $header; } } $meta = get_meta("https://hotels24.ua/"); echo get_title("https://hotels24.ua/"); echo $meta[0]; echo $meta[1]; echo get_header("https://hotels24.ua/");
Output for git.master, git.master_jit
Warning: get_meta_tags(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/1o52p on line 13 Warning: get_meta_tags(): open_basedir restriction in effect. File(https://hotels24.ua/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/1o52p on line 13 Warning: get_meta_tags(https://hotels24.ua/): Failed to open stream: Operation not permitted in /in/1o52p on line 13 Warning: Trying to access array offset on value of type bool in /in/1o52p on line 14 Warning: Trying to access array offset on value of type bool in /in/1o52p on line 15 Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/1o52p on line 4 Warning: file_get_contents(): open_basedir restriction in effect. File(https://hotels24.ua/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/1o52p on line 4 Warning: file_get_contents(https://hotels24.ua/): Failed to open stream: Operation not permitted in /in/1o52p on line 4 Description: <br>Keywords: <br> Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/1o52p on line 20 Warning: file_get_contents(): open_basedir restriction in effect. File(https://hotels24.ua/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/1o52p on line 20 Warning: file_get_contents(https://hotels24.ua/): Failed to open stream: Operation not permitted in /in/1o52p on line 20
Output for rfc.property-hooks
Warning: get_meta_tags(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/1o52p on line 13 Warning: get_meta_tags(): open_basedir restriction in effect. File(https://hotels24.ua/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/1o52p on line 13 Warning: get_meta_tags(https://hotels24.ua/): Failed to open stream: Operation not permitted in /in/1o52p on line 13 Warning: Trying to access array offset on false in /in/1o52p on line 14 Warning: Trying to access array offset on false in /in/1o52p on line 15 Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/1o52p on line 4 Warning: file_get_contents(): open_basedir restriction in effect. File(https://hotels24.ua/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/1o52p on line 4 Warning: file_get_contents(https://hotels24.ua/): Failed to open stream: Operation not permitted in /in/1o52p on line 4 Description: <br>Keywords: <br> Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/1o52p on line 20 Warning: file_get_contents(): open_basedir restriction in effect. File(https://hotels24.ua/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/1o52p on line 20 Warning: file_get_contents(https://hotels24.ua/): Failed to open stream: Operation not permitted in /in/1o52p on line 20

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:
39.38 ms | 412 KiB | 5 Q