3v4l.org

run code in 300+ PHP versions simultaneously
<?php $remote_links = "http://es.ninemanga.com/chapter/LALEYENDADEASURAPRLOGONovelaCaptulo1/649751/ http://es.ninemanga.com/chapter/UglyDucklingCaptulo5/649745/"; $content_arr = preg_split("/\n/",$remote_links); $length = count($remote_links); for($j=0;$j<count($remote_links);$j++){ $html = file_get_contents($remote_links[$j], false, $context); //Create a new DOM document $dom = new DOMDocument; //Parse the HTML. The @ is used to suppress any parsing errors //that will be thrown if the $html string isn't valid XHTML. @$dom->loadHTML($html); //Get all links. You could also use any other tag name here, //like 'img' or 'table', to extract other tags. $links = $dom->getElementsByTagName('a'); //Iterate over the extracted links and display their URLs foreach ($links as $link){ //Extract and show the "href" attribute. //echo $link->nodeValue; echo $link->getAttribute('href'), '<br>'; // var_dump ($html); // $html = str_replace('<br />', ',', $html).PHP_EOL; //echo $html.PHP_EOL; //print_r(htmlentities($content).'<br>'); } // print $content_arr[$i].PHP_EOL; //print $title.PHP_EOL; //print $title_no.PHP_EOL; //print $TITLE_master.PHP_EOL; }
Output for 8.0.10 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /in/hgpho:7 Stack trace: #0 {main} thrown in /in/hgpho on line 7
Process exited with code 255.
Output for 8.0.0 - 8.0.9
Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, string given in /in/hgpho:7 Stack trace: #0 {main} thrown in /in/hgpho on line 7
Process exited with code 255.
Output for 7.4.33
Warning: count(): Parameter must be an array or an object that implements Countable in /in/hgpho on line 7 Warning: count(): Parameter must be an array or an object that implements Countable in /in/hgpho on line 8 Notice: Undefined variable: context in /in/hgpho on line 9 Warning: file_get_contents(h): failed to open stream: No such file or directory in /in/hgpho on line 9 Warning: count(): Parameter must be an array or an object that implements Countable in /in/hgpho on line 8
Output for 7.3.24 - 7.3.31, 7.4.12 - 7.4.32
Warning: count(): Parameter must be an array or an object that implements Countable in /in/hgpho on line 7 Warning: count(): Parameter must be an array or an object that implements Countable in /in/hgpho on line 8 Notice: Undefined variable: context in /in/hgpho on line 9 Warning: file_get_contents(): open_basedir restriction in effect. File(h) is not within the allowed path(s): (/tmp:/in:/etc) in /in/hgpho on line 9 Warning: file_get_contents(h): failed to open stream: Operation not permitted in /in/hgpho on line 9 Warning: count(): Parameter must be an array or an object that implements Countable in /in/hgpho on line 8
Output for 7.3.32 - 7.3.33
Warning: count(): Parameter must be an array or an object that implements Countable in /in/hgpho on line 7 Warning: count(): Parameter must be an array or an object that implements Countable in /in/hgpho on line 8 Warning: file_get_contents(h): failed to open stream: No such file or directory in /in/hgpho on line 9 Warning: count(): Parameter must be an array or an object that implements Countable in /in/hgpho on line 8

preferences:
87.54 ms | 413 KiB | 5 Q