3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <style> body{ background-color: #95a5a6; } </style> <title> Random Cats </title> <meta charset="utf-8" /> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"> <!-- Latest compiled and minified JavaScript --> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"> </script> <style> body{ background-color: #95a5a6; }.img-thumbnail{ -moz-box-shadow: 3px 3px 5px 6px grey; -webkit-box-shadow: 3px 3px 5px 6px grey; box-shadow: 3px 3px 5px 6px grey; } </style> </head> <body> <center> <h1> Random Cats *.* </h1> <?php $url = "http://thecatapi.com/api/images/get?format=xml&results_per_page=1"; $xml = simplexml_load_file($url); $xmlImg = $xml->data->images->image->url; $xmlImgSource = $xml->data->images->image->source_url; $source = $xmlImgsource; echo " <img src='$xmlImg' width='600px' class='img-thumbnail'> " ?> <br> <br> <div> <a href=" <?php echo $xmlImgSource ?> "> <button class="button"> Source </button> </a> <a href="/"> <button type="submit" class="button"> New Picture </button> </a> </div> <br> <p> Original made by Nihad Dizdarevic <br> TheCatAPI & XML </p> <a href="https://github.com/dizzyniho/TheCatsSite"> Fork this on GitHub </a> </center> </body> </html>
Output for git.master, git.master_jit
<html> <head> <style> body{ background-color: #95a5a6; } </style> <title> Random Cats </title> <meta charset="utf-8" /> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"> <!-- Latest compiled and minified JavaScript --> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"> </script> <style> body{ background-color: #95a5a6; }.img-thumbnail{ -moz-box-shadow: 3px 3px 5px 6px grey; -webkit-box-shadow: 3px 3px 5px 6px grey; box-shadow: 3px 3px 5px 6px grey; } </style> </head> <body> <center> <h1> Random Cats *.* </h1> Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo for thecatapi.com failed: System error in /in/K10dE on line 169 Warning: simplexml_load_file(http://thecatapi.com/api/images/get?format=xml&results_per_page=1): Failed to open stream: php_network_getaddresses: getaddrinfo for thecatapi.com failed: System error in /in/K10dE on line 169 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://thecatapi.com/api/images/get?format=xml&results_per_page=1" in /in/K10dE on line 169 Warning: Attempt to read property "data" on bool in /in/K10dE on line 173 Warning: Attempt to read property "images" on null in /in/K10dE on line 173 Warning: Attempt to read property "image" on null in /in/K10dE on line 173 Warning: Attempt to read property "url" on null in /in/K10dE on line 173 Warning: Attempt to read property "data" on bool in /in/K10dE on line 177 Warning: Attempt to read property "images" on null in /in/K10dE on line 177 Warning: Attempt to read property "image" on null in /in/K10dE on line 177 Warning: Attempt to read property "source_url" on null in /in/K10dE on line 177 Warning: Undefined variable $xmlImgsource in /in/K10dE on line 181 <img src='' width='600px' class='img-thumbnail'> <br> <br> <div> <a href=" "> <button class="button"> Source </button> </a> <a href="/"> <button type="submit" class="button"> New Picture </button> </a> </div> <br> <p> Original made by Nihad Dizdarevic <br> TheCatAPI & XML </p> <a href="https://github.com/dizzyniho/TheCatsSite"> Fork this on GitHub </a> </center> </body> </html>
Output for rfc.property-hooks
<html> <head> <style> body{ background-color: #95a5a6; } </style> <title> Random Cats </title> <meta charset="utf-8" /> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"> <!-- Latest compiled and minified JavaScript --> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"> </script> <style> body{ background-color: #95a5a6; }.img-thumbnail{ -moz-box-shadow: 3px 3px 5px 6px grey; -webkit-box-shadow: 3px 3px 5px 6px grey; box-shadow: 3px 3px 5px 6px grey; } </style> </head> <body> <center> <h1> Random Cats *.* </h1> Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo for thecatapi.com failed: System error in /in/K10dE on line 169 Warning: simplexml_load_file(http://thecatapi.com/api/images/get?format=xml&results_per_page=1): Failed to open stream: php_network_getaddresses: getaddrinfo for thecatapi.com failed: System error in /in/K10dE on line 169 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://thecatapi.com/api/images/get?format=xml&results_per_page=1" in /in/K10dE on line 169 Warning: Attempt to read property "data" on false in /in/K10dE on line 173 Warning: Attempt to read property "images" on null in /in/K10dE on line 173 Warning: Attempt to read property "image" on null in /in/K10dE on line 173 Warning: Attempt to read property "url" on null in /in/K10dE on line 173 Warning: Attempt to read property "data" on false in /in/K10dE on line 177 Warning: Attempt to read property "images" on null in /in/K10dE on line 177 Warning: Attempt to read property "image" on null in /in/K10dE on line 177 Warning: Attempt to read property "source_url" on null in /in/K10dE on line 177 Warning: Undefined variable $xmlImgsource in /in/K10dE on line 181 <img src='' width='600px' class='img-thumbnail'> <br> <br> <div> <a href=" "> <button class="button"> Source </button> </a> <a href="/"> <button type="submit" class="button"> New Picture </button> </a> </div> <br> <p> Original made by Nihad Dizdarevic <br> TheCatAPI & XML </p> <a href="https://github.com/dizzyniho/TheCatsSite"> Fork this on GitHub </a> </center> </body> </html>

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:
36.53 ms | 413 KiB | 8 Q