3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Brings in some Joomla Framework features to allow databse handling below define( '_JEXEC', 1 ); define( 'JPATH_BASE', realpath(dirname(__FILE__))); define( 'DS', DIRECTORY_SEPARATOR ); require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); $mainframe =& JFactory::getApplication('site'); $mainframe->initialise(); ob_start(); echo "<?xml version='1.0' encoding='UTF-8'?> <urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>"; $db = JFactory::getDbo(); $query = "SELECT * FROM #__sh404sef_urls ORDER BY oldurl ASC"; $db->setQuery($query); $rows = $db->loadObjectList(); foreach ($rows as $row) { $SEFedurl = $row->oldurl; $date = date("Y-m-d"); $line = "<url> <loc>http://" . $_SERVER['HTTP_HOST'] . "/$SEFedurl</loc> <priority>1.00</priority> <changefreq>weekly</changefreq> <lastmod>$date</lastmod> </url>"; echo $line; } echo "</urlset>"; //mysqli_close($dbc); $toWrite = ob_get_clean(); $toWrite; // data generated from form, formatted to XML $fp = fopen('sitemap.xml', 'w'); fwrite($fp, $toWrite); fclose($fp); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: require_once(/in/includes/defines.php): Failed to open stream: No such file or directory in /in/rHfX6 on line 8 Fatal error: Uncaught Error: Failed opening required '/in/includes/defines.php' (include_path='.:') in /in/rHfX6:8 Stack trace: #0 {main} thrown in /in/rHfX6 on line 8
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:
59.7 ms | 401 KiB | 8 Q