3v4l.org

run code in 300+ PHP versions simultaneously
<?php // include the tmdb class include('tmdb.php'); //if you prefer using 'xml' $tmdb_xml = new TMDb('YOUR_API_KEY_HERE', TMDb::XML); //Title to search for $title = $_POST['title']; //Search Movie with default return format $xml_movies_result = $tmdb_xml->searchMovie($title); $xml = simplexml_load_string($xml_movies_result); echo '<table>'; echo '<tr>'; echo '<th>Cover</th>'; echo '<th>Info</th>'; echo '</tr>'; foreach ($xml->movies->movie as $movie) { $moviename = $movie->name; $imdbid = $movie->imdb_id; $posterimg = $movie->images->image[3]['url']; echo '<tr>'; if (!empty($posterimg)) { echo '<td><a target="_blank" href="'.$movie->url.'"></a></td>'; } else { echo '<td>No image</td>'; } echo '<td><a target="_blank" href="'.$movie->url.'"><strong>'.$moviename.'</strong></a> ('.substr($movie->released, 0, 4).')<br /><br />'; echo $movie->overview; echo '</td>'; echo '</tr>'; } echo '</table>'; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: include(): open_basedir restriction in effect. File(tmdb.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/qvEHS on line 3 Warning: include(tmdb.php): Failed to open stream: Operation not permitted in /in/qvEHS on line 3 Warning: include(): Failed opening 'tmdb.php' for inclusion (include_path='.:') in /in/qvEHS on line 3 Fatal error: Uncaught Error: Class "TMDb" not found in /in/qvEHS:7 Stack trace: #0 {main} thrown in /in/qvEHS on line 7
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:
47.68 ms | 401 KiB | 8 Q