3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_xml = "<haberler>"; $resim = mysql_query("SELECT * FROM " . $table_prefix . "postmeta LEFT OUTER JOIN " . $table_prefix . "posts ON " . $table_prefix . "postmeta.post_id = " . $table_prefix . "posts.id Where " . $table_prefix . "postmeta.meta_key='manset' ORDER By " . $table_prefix . "postmeta.post_id DESC Limit 0,7"); for ($j = 0; $niphell = mysql_fetch_array($resim); $j++) { $_xml .= "<haber><baslik>" . $niphell[post_title] . "</baslik><icerik>" . htmlspecialchars(substr(strip_tags($niphell[post_content]), 0, 150)) . "</icerik><img>" . $niphell[meta_value] . "</img><link>" . get_permalink($niphell[post_id]) . "</link></haber>"; }; $_xml .= "</haberler>"; $dosya = "wp-content/themes/" . get_template() . "/manset/haberler.xml"; $file = fopen($dosya, 'w+') or die("Dosya açılamadı!"); fwrite($file, $_xml); fclose($file); echo '<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="970" height="290"> <param name="movie" value="'.get_bloginfo('template_url').'/manset/manset.swf"> <param name="quality" value="High"> <param name="base" value="'.get_bloginfo('template_url').'/manset/manset.swf"> <param name="wmode" value="transparent"> <embed pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="970" height="290" quality="High" base="'.get_bloginfo('template_url').'/manset/manset.swf" src="'.get_bloginfo('template_url').'/manset/manset.swf" wmode="transparent"></object>'; ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/dvs4n:5 Stack trace: #0 {main} thrown in /in/dvs4n on line 5
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Warning: supplied argument is not a valid MySQL-Link resource in /in/dvs4n on line 5 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /in/dvs4n on line 7 Fatal error: Uncaught Error: Call to undefined function get_template() in /in/dvs4n:14 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Warning: supplied argument is not a valid MySQL-Link resource in /in/dvs4n on line 5 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /in/dvs4n on line 7 Fatal error: Call to undefined function get_template() in /in/dvs4n on line 14
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function mysql_query() in /in/dvs4n on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/dvs4n on line 5 Warning: mysql_query(): A link to the server could not be established in /in/dvs4n on line 5 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /in/dvs4n on line 7 Fatal error: Call to undefined function: get_template() in /in/dvs4n on line 14
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/dvs4n on line 5 Warning: mysql_query(): A link to the server could not be established in /in/dvs4n on line 5 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /in/dvs4n on line 7 Fatal error: Call to undefined function: get_template() in /in/dvs4n on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Notice: Undefined variable: table_prefix in /in/dvs4n on line 5 Warning: mysql_query() [http://www.php.net/function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/dvs4n on line 5 Warning: mysql_query() [http://www.php.net/function.mysql-query]: A link to the server could not be established in /in/dvs4n on line 5 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /in/dvs4n on line 7 Fatal error: Call to undefined function: get_template() in /in/dvs4n on line 14