3v4l.org

run code in 300+ PHP versions simultaneously
<?php $contenuto = file_get_contents('http://www.mistermatic.it/api/?cc=89091203'); // echo '<pre>'.var_dump(json_decode($contenuto)).'</pre>'; $lista = json_decode($contenuto); $chiavi = array( "ad_number", "vehicle_type", "title", "sub_title", "make", "model", "version", "vehicle_class", "vehicle_category", "damaged", "first_registration_date", "mileage", "power_kw", "power_cv", "fuel_type", "color", "color_type", "price", "last_update", "description", "company_logo", "images_number" ); echo "<table border='1' cellspacing='0'>"; echo "<tr>"; for($j=0; $j<count($chiavi); $j++){ echo "<td>".$chiavi[$j]."</td>"; } echo "</tr>"; for($i=0; $i<count($lista); $i++){ $auto[$i] = (array) $lista[$i]; /* $chiavi = array_keys($auto[$i]); echo "<tr>"; for($j=0; $j<count($chiavi); $j++){ echo "<td>".$chiavi[$j]."</td>"; } echo "</tr>"; */ echo "<tr style='white-space: nowrap;'>"; for($j=0; $j<count($chiavi); $j++){ $chiave = $chiavi[$j]; echo "<td>".$auto[$i][$chiave]."</td>"; } echo "</tr>"; } echo "</table>"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.mistermatic.it failed: System error in /in/mbWLu on line 3 Warning: file_get_contents(http://www.mistermatic.it/api/?cc=89091203): Failed to open stream: php_network_getaddresses: getaddrinfo for www.mistermatic.it failed: System error in /in/mbWLu on line 3 <table border='1' cellspacing='0'><tr><td>ad_number</td><td>vehicle_type</td><td>title</td><td>sub_title</td><td>make</td><td>model</td><td>version</td><td>vehicle_class</td><td>vehicle_category</td><td>damaged</td><td>first_registration_date</td><td>mileage</td><td>power_kw</td><td>power_cv</td><td>fuel_type</td><td>color</td><td>color_type</td><td>price</td><td>last_update</td><td>description</td><td>company_logo</td><td>images_number</td></tr> Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/mbWLu:40 Stack trace: #0 {main} thrown in /in/mbWLu on line 40
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:
50.56 ms | 402 KiB | 8 Q