3v4l.org

run code in 300+ PHP versions simultaneously
<?php function display_table(){ global $mysqli; $phpself = $_SERVER["PHP_SELF"]; $user = $_SESSION['user']; echo<<<TABLE <html> <head> <title>Insert new record</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]--> <script src="js/jquery.min.js"></script> <script src="js/jquery.dropotron.min.js"></script> <script src="js/skel.min.js"></script> <script src="js/skel-layers.min.js"></script> <script src="js/init.js"></script> <link rel="stylesheet" type="text/css" media="screen" href="css-table.css" /> <script type="text/javascript" src="js/jquery-1.2.6.min.js"></script> <script type="text/javascript" src="js/style-table.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript"> jQuery.expr[':'].contains = function(a,i,m){ return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0; }; $(document).ready(function(){ $('input[name="search"]').keyup(function(){ var searchterm = $(this).val(); if(searchterm.length >2) { var match = $('tr.data-row:contains("' + searchterm + '")'); var nomatch = $('tr.data-row:not(:contains("' + searchterm + '"))'); match.addClass('selected'); nomatch.css("display", "none"); } else { $('tr.data-row').css("display", ""); $('tr.data-row').removeClass('selected'); } }); }); </script> <noscript> <link rel="stylesheet" href="css/skel.css" /> <link rel="stylesheet" href="css/style.css" /> <link rel="stylesheet" href="css/style-noscript.css" /> </noscript> <!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]--> <!--[if lte IE 9]><link rel="stylesheet" href="css/ie/v9.css" /><![endif]--> </head> <body class="no-sidebar loading"> <!-- Header --> <header id="header"> <h1 id="logo"><a href="home.php">HOME <span>PAGE</span></a></h1> <nav id="nav"> <ul> <li class="current"><a href="home.php">Welcome, $user</a></li> <li class="submenu"> <a href="">Options</a> <ul> <li class="submenu"> <a href="">View Database</a> <ul> <li><a href="example.php">Prospects </a></li> <li><a href="clients.php">Clients </a></li> </ul> </li> <li><a href="excel.php">Download report</a></li> <li class="submenu"> <a href="">Add Record</a> <ul> <li><a href="import.php">Import file</a></li> </ul> </li> <li><a href="backup.php">Backup Database</a></li> <li><a href="restore.php">Import Database</a></li> </ul> </li> <li> <a href="index.php" class="button special">Sign Out </a></li> </ul> </nav> </header> <!-- Main --> <article id="main"> <header class="special container"> <span class="icon fa-mobile"></span> <h2>Backup Database Files</h2> <p></p> </header> <!-- One --> <section class="wrapper style4 container"> <form action="$phpself" method="post"> <center>Choose Type : &nbsp; <select name='type'> <option>prospects</option> <option>clients</option> </select><br/><br/><input type="submit" name="submit" value="Backup SQL Database Now"> </center><br/> </form> </section> <!-- Two --> </article> <!-- Footer --> <footer id="footer"> <ul class="icons"> <li><a href="#" class="icon circle fa-twitter"><span class="label">Twitter</span></a></li> <li><a href="#" class="icon circle fa-facebook"><span class="label">Facebook</span></a></li> <li><a href="#" class="icon circle fa-google-plus"><span class="label">Google+</span></a></li> <li><a href="#" class="icon circle fa-github"><span class="label">Github</span></a></li> <li><a href="#" class="icon circle fa-dribbble"><span class="label">Dribbble</span></a></li> </ul> <span class="copyright">&copy; Untitled. All rights reserved. Design: <a href="http://html5up.net">HTML5 UP</a>.</span> </footer> </body> </html> TABLE; } function badinput($msg){ echo <<<BADINPUT <html> <head> <title>Bad input</title> </head> <body> <h1>Error</h1> <p>Input could not be used because $msg.</p> </body> </html> BADINPUT; } // CLEAN QUERIES function clean($str) { if(@isset($str)){ $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); } else{ return 'NULL'; } } // DATABASE BACKUP CREATING FUNCTION function backup_Database($hostName,$userName,$password,$DbName,$tables = '*') { // CONNECT TO THE DATABASE $con = mysql_connect($hostName,$userName,$password) or die(mysql_error()); mysql_select_db($DbName,$con) or die(mysql_error()); // GET ALL TABLES if($tables == '*') { $tables = array(); $result = mysql_query('SHOW TABLES'); while($row = mysql_fetch_row($result)) { $tables[] = $row[0]; } } else { $tables = is_array($tables) ? $tables : explode(',',$tables); } $return = 'SET FOREIGN_KEY_CHECKS=0;' . "\r\n"; $return.= 'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";' . "\r\n"; $return.= 'SET AUTOCOMMIT=0;' . "\r\n"; $return.= 'START TRANSACTION;' . "\r\n"; foreach($tables as $table) { $result = mysql_query('SELECT * FROM '.$table) or die(mysql_error()); $num_fields = mysql_num_fields($result) or die(mysql_error()); $data.= 'DROP TABLE IF EXISTS '.$table.';'; $row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE '.$table)); $data.= "\n\n".$row2[1].";\n\n"; for ($i = 0; $i<$num_fields; $i++) { while($row = mysql_fetch_row($result)) { $data.= 'INSERT INTO '.$table.' VALUES('; for($x=0; $x<$num_fields; $x++) { $row[$x] = addslashes($row[$x]); //$row[$x] = ereg_replace("\n","\\n",$row[$x]); $row[$x] = clean($row[$x]);// CLEAN QUERIES if (isset($row[$x])) { $data.= '"'.$row[$x].'"' ; } else { $data.= '""'; } if ($x<($num_fields-1)) { $data.= ','; } } // end of the for loop 2 $data.= ");\n"; } // end of the while loop } // end of the for loop 1 $data.="\n\n\n"; } // end of the foreach*/ $return .= 'SET FOREIGN_KEY_CHECKS=1;' . "\r\n"; $return.= 'COMMIT;'; //SAVE THE BACKUP AS SQL FILE $handle = fopen($DbName.'-Database-Backup-'.$table.date('Y-m-d @ h-i-s').'.sql','w+'); fwrite($handle,$data); fclos($handle); /* gz format $gzdata = gzencode($data, 9); $handle = fopen($DbName.'-Database-Backup-'.date('Y-m-d @ h-i-s').'.sql.gz','w+'); fwrite($handle, $gzdata); fclose($handle);*/ if($data) return true; else return false; } // end of the function function addnewdata(){ global $mysqli; $utype = $_POST["type"]; $tables = $utype; $backup_response = backup_Database('ptjobstation.com','csci311','020809','user',$tables); if($backup_response) { echo <<<SUCCESSRESPONSE <html> <head> <title>New record inserted</title> </head> <body> <h1>Database Backup Successfully Created!</h1> <p>Please wait, link will be auto redirected</p> <script>setTimeout(function(){window.location.href='backup.php'},4000);</script> </body> </html> SUCCESSRESPONSE; } else { echo 'Errors in Database Backup Creating!'; } } session_cache_limiter ('private, must-revalidate'); $cache_limiter = session_cache_limiter(); // session_cache_expire(60); // 60 minutes session_start(); $user = $_SESSION['user']; function connectToDatabase(){ global $mysqli; $mysqli = new mysqli('ptjobstation.com','csci311','020809','user'); // Check for connection errors if(mysqli_connect_errno()){ $problem = mysqli_connect_error(); badinput($problem); exit; } } $method = $_SERVER["REQUEST_METHOD"]; if($method=="POST"){ addnewdata(); } else{ display_table(); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gRHnc
function name:  (null)
number of ops:  25
compiled vars:  !0 = $cache_limiter, !1 = $user, !2 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  279     0  E >   INIT_FCALL                                               'session_cache_limiter'
          1        SEND_VAL                                                 'private%2C+must-revalidate'
          2        DO_ICALL                                                 
  280     3        INIT_FCALL                                               'session_cache_limiter'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !0, $4
  282     6        INIT_FCALL                                               'session_cache_expire'
          7        SEND_VAL                                                 60
          8        DO_ICALL                                                 
  284     9        INIT_FCALL                                               'session_start'
         10        DO_ICALL                                                 
  285    11        FETCH_R                      global              ~8      '_SESSION'
         12        FETCH_DIM_R                                      ~9      ~8, 'user'
         13        ASSIGN                                                   !1, ~9
  298    14        FETCH_R                      global              ~11     '_SERVER'
         15        FETCH_DIM_R                                      ~12     ~11, 'REQUEST_METHOD'
         16        ASSIGN                                                   !2, ~12
  299    17        IS_EQUAL                                                 !2, 'POST'
         18      > JMPZ                                                     ~14, ->22
  300    19    >   INIT_FCALL                                               'addnewdata'
         20        DO_FCALL                                      0          
         21      > JMP                                                      ->24
  303    22    >   INIT_FCALL                                               'display_table'
         23        DO_FCALL                                      0          
  308    24    > > RETURN                                                   1

Function display_table:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gRHnc
function name:  display_table
number of ops:  14
compiled vars:  !0 = $mysqli, !1 = $phpself, !2 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_GLOBAL                                              !0, 'mysqli'
    5     1        FETCH_R                      global              ~3      '_SERVER'
          2        FETCH_DIM_R                                      ~4      ~3, 'PHP_SELF'
          3        ASSIGN                                                   !1, ~4
    6     4        FETCH_R                      global              ~6      '_SESSION'
          5        FETCH_DIM_R                                      ~7      ~6, 'user'
          6        ASSIGN                                                   !2, ~7
    8     7        ROPE_INIT                                     5  ~10     '%09%3Chtml%3E%0A%09%09%3Chead%3E%0A%09%09%09%3Ctitle%3EInsert+new+record%3C%2Ftitle%3E%0A%09%09%09%3Cmeta+http-equiv%3D%22content-type%22+content%3D%22text%2Fhtml%3B+charset%3Dutf-8%22+%2F%3E%0A%09%09%09%3Cmeta+name%3D%22description%22+content%3D%22%22+%2F%3E%0A%09%09%09%3Cmeta+name%3D%22keywords%22+content%3D%22%22+%2F%3E%0A%09%09%09%3C%21--%5Bif+lte+IE+8%5D%3E%3Cscript+src%3D%22css%2Fie%2Fhtml5shiv.js%22%3E%3C%2Fscript%3E%3C%21%5Bendif%5D--%3E%0A%09%09%09%3Cscript+src%3D%22js%2Fjquery.min.js%22%3E%3C%2Fscript%3E%0A%09%09%09%3Cscript+src%3D%22js%2Fjquery.dropotron.min.js%22%3E%3C%2Fscript%3E%0A%09%09%09%3Cscript+src%3D%22js%2Fskel.min.js%22%3E%3C%2Fscript%3E%0A%09%09%09%3Cscript+src%3D%22js%2Fskel-layers.min.js%22%3E%3C%2Fscript%3E%0A%09%09%09%3Cscript+src%3D%22js%2Finit.js%22%3E%3C%2Fscript%3E%0A%09%09%09%3Clink+rel%3D%22stylesheet%22+type%3D%22text%2Fcss%22+media%3D%22screen%22+href%3D%22css-table.css%22+%2F%3E%0A%09%09%09%3Cscript+type%3D%22text%2Fjavascript%22+src%3D%22js%2Fjquery-1.2.6.min.js%22%3E%3C%2Fscript%3E%0A%09%09%09%3Cscript+type%3D%22text%2Fjavascript%22+src%3D%22js%2Fstyle-table.js%22%3E%3C%2Fscript%3E%0A%09%09%09%3Cscript+src%3D%22https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.9.1%2Fjquery.min.js%22%3E%3C%2Fscript%3E%0A%09%09%09%3Cscript+type%3D%22text%2Fjavascript%22%3E%0A%09%09%09%09jQuery.expr%5B%27%3A%27%5D.contains+%3D+function%28a%2Ci%2Cm%29%7B%0A%09%09%09%09return+jQuery%28a%29.text%28%29.toUpperCase%28%29.indexOf%28m%5B3%5D.toUpperCase%28%29%29%3E%3D0%3B%0A%09%09%09%09%7D%3B%0A%09%09%09%09%24%28document%29.ready%28function%28%29%7B++%0A%09%09%09%09%24%28%27input%5Bname%3D%22search%22%5D%27%29.keyup%28function%28%29%7B+%0A%09%09%09%09var+searchterm+%3D+%24%28this%29.val%28%29%3B%0A%09%09%09%09%09%09%09if%28searchterm.length+%3E2%29+%7B%0A%09%09%09%09var+match+%3D+%24%28%27tr.data-row%3Acontains%28%22%27+%2B+searchterm+%2B+%27%22%29%27%29%3B%0A%09%09%09%09var+nomatch+%3D+%24%28%27tr.data-row%3Anot%28%3Acontains%28%22%27+%2B+searchterm+%2B+%27%22%29%29%27%29%3B%0A%09%09%09%09%09%09%09%09match.addClass%28%27selected%27%29%3B%0A%09%09%09%09nomatch.css%28%22display%22%2C+%22none%22%29%3B%0A%09%09%09%09%7D+else+%7B%0A%09%09%09%09%24%28%27tr.data-row%27%29.css%28%22display%22%2C+%22%22%29%3B%0A%09%09%09%09%24%28%27tr.data-row%27%29.removeClass%28%27selected%27%29%3B%0A%09%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%09%7D%29%3B%0A%09%09%09%09%7D%29%3B%09%0A%09%09%09%3C%2Fscript%3E%0A%09%09%09%3Cnoscript%3E%0A%09%09%09%09%3Clink+rel%3D%22stylesheet%22+href%3D%22css%2Fskel.css%22+%2F%3E%0A%09%09%09%09%3Clink+rel%3D%22stylesheet%22+href%3D%22css%2Fstyle.css%22+%2F%3E%0A%09%09%09%09%3Clink+rel%3D%22stylesheet%22+href%3D%22css%2Fstyle-noscript.css%22+%2F%3E%0A%09%09%09%3C%2Fnoscript%3E%0A%09%09%09%3C%21--%5Bif+lte+IE+8%5D%3E%3Clink+rel%3D%22stylesheet%22+href%3D%22css%2Fie%2Fv8.css%22+%2F%3E%3C%21%5Bendif%5D--%3E%0A%09%09%09%3C%21--%5Bif+lte+IE+9%5D%3E%3Clink+rel%3D%22stylesheet%22+href%3D%22css%2Fie%2Fv9.css%22+%2F%3E%3C%21%5Bendif%5D--%3E%0A%09%09%3C%2Fhead%3E%0A%09%09%3Cbody+class%3D%22no-sidebar+loading%22%3E%0A%09%09%0A%09%09%09%3C%21--+Header+--%3E%0A%09%09%09%09%3Cheader+id%3D%22header%22%3E%0A%09%09%09%09%09%3Ch1+id%3D%22logo%22%3E%3Ca+href%3D%22home.php%22%3EHOME+%3Cspan%3EPAGE%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fh1%3E%0A%09%09%09%09%09%3Cnav+id%3D%22nav%22%3E%0A%09%09%09%09%09%09%3Cul%3E%0A%09%09%09%09%09%09%09%3Cli+class%3D%22current%22%3E%3Ca+href%3D%22home.php%22%3EWelcome%2C+'
   58     8        ROPE_ADD                                      1  ~10     ~10, !2
          9        ROPE_ADD                                      2  ~10     ~10, '%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%09%3Cli+class%3D%22submenu%22%3E%0A%09%09%09%09%09%09%09%09%3Ca+href%3D%22%22%3EOptions%3C%2Fa%3E%0A%09%09%09%09%09%09%09%09%3Cul%3E%0A%09%09%09%09%09%09%09%09%09%3Cli+class%3D%22submenu%22%3E%0A%09%09%09%09%09%09%09%09%09%09%3Ca+href%3D%22%22%3EView+Database%3C%2Fa%3E%0A%09%09%09%09%09%09%09%09%09%09%3Cul%3E%0A%09%09%09%09%09%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22example.php%22%3EProspects+%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22clients.php%22%3EClients+%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%09%09%09%09%3C%2Ful%3E%0A%09%09%09%09%09%09%09%09%09%3C%2Fli%3E%0A%09%09%09%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22excel.php%22%3EDownload+report%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%09%09%09%0A%09%09%09%09%09%09%09%09%09%3Cli+class%3D%22submenu%22%3E%0A%09%09%09%09%09%09%09%09%09%09%3Ca+href%3D%22%22%3EAdd+Record%3C%2Fa%3E%0A%09%09%09%09%09%09%09%09%09%09%3Cul%3E%0A%09%09%09%09%09%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22import.php%22%3EImport+file%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%09%09%09%09%09%0A%09%09%09%09%09%09%09%09%09%09%3C%2Ful%3E%0A%09%09%09%09%09%09%09%09%09%3C%2Fli%3E%0A%09%09%09%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22backup.php%22%3EBackup+Database%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22restore.php%22%3EImport+Database%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%09%09%3C%2Ful%3E%0A%09%09%09%09%09%09%09%3C%2Fli%3E%0A%09%09%09%09%09%09%09%3Cli%3E%0A%09%09%09%09%09%09%09%3Ca+href%3D%22index.php%22+class%3D%22button+special%22%3ESign+Out%09%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%3C%2Ful%3E%0A%09%09%09%09%09%3C%2Fnav%3E%0A%09%09%09%09%3C%2Fheader%3E%0A%09%09%09%0A%09%09%09%3C%21--+Main+--%3E%0A%09%09%09%09%3Carticle+id%3D%22main%22%3E%0A%0A%09%09%09%09%09%3Cheader+class%3D%22special+container%22%3E%0A%09%09%09%09%09%09%3Cspan+class%3D%22icon+fa-mobile%22%3E%3C%2Fspan%3E%0A%09%09%09%09%09%09%3Ch2%3EBackup+Database+Files%3C%2Fh2%3E%0A%09%09%09%09%09%09%3Cp%3E%3C%2Fp%3E%0A%09%09%09%09%09%3C%2Fheader%3E%0A%09%09%09%09%09%09%0A%09%09%09%09%09%3C%21--+One+--%3E%0A%09%09%09%09%09%09%3Csection+class%3D%22wrapper+style4+container%22%3E%0A%09%09%09%09%09%09%09%3Cform+action%3D%22'
   99    10        ROPE_ADD                                      3  ~10     ~10, !1
         11        ROPE_END                                      4  ~9      ~10, '%22+method%3D%22post%22%3E%0A%09%09%09%09%09%09%09%09%09%3Ccenter%3EChoose+Type+%3A+%26nbsp%3B%0A%09%09%09%09%09%09%09%09%09%09%3Cselect+name%3D%27type%27%3E%0A%09%09%09%09%09%09%09%09%09%09%09%3Coption%3Eprospects%3C%2Foption%3E%0A%09%09%09%09%09%09%09%09%09%09%09%3Coption%3Eclients%3C%2Foption%3E%0A%09%09%09%09%09%09%09%09%09%09%09%3C%2Fselect%3E%3Cbr%2F%3E%3Cbr%2F%3E%3Cinput+type%3D%22submit%22+name%3D%22submit%22+value%3D%22Backup+SQL+Database+Now%22%3E%0A%09%09%09%09%09%09%09%09%09%3C%2Fcenter%3E%3Cbr%2F%3E%0A%09%09%09%09%09%09%09%3C%2Fform%3E%0A%09%09%09%09%09%09%3C%2Fsection%3E%0A%0A%09%09%09%09%09%3C%21--+Two+--%3E%0A%09%09%09%09%09%09%0A%09%09%09%09%09%09%0A%09%09%09%09%3C%2Farticle%3E%0A%0A%09%09%09%3C%21--+Footer+--%3E%0A%09%09%09%09%3Cfooter+id%3D%22footer%22%3E%0A%09%09%09%09%0A%09%09%09%09%09%3Cul+class%3D%22icons%22%3E%0A%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22%23%22+class%3D%22icon+circle+fa-twitter%22%3E%3Cspan+class%3D%22label%22%3ETwitter%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22%23%22+class%3D%22icon+circle+fa-facebook%22%3E%3Cspan+class%3D%22label%22%3EFacebook%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22%23%22+class%3D%22icon+circle+fa-google-plus%22%3E%3Cspan+class%3D%22label%22%3EGoogle%2B%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22%23%22+class%3D%22icon+circle+fa-github%22%3E%3Cspan+class%3D%22label%22%3EGithub%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%09%3Cli%3E%3Ca+href%3D%22%23%22+class%3D%22icon+circle+fa-dribbble%22%3E%3Cspan+class%3D%22label%22%3EDribbble%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fli%3E%0A%09%09%09%09%09%3C%2Ful%3E%0A%09%09%09%09%09%0A%09%09%09%09%09%3Cspan+class%3D%22copyright%22%3E%26copy%3B+Untitled.+All+rights+reserved.+Design%3A+%3Ca+href%3D%22http%3A%2F%2Fhtml5up.net%22%3EHTML5+UP%3C%2Fa%3E.%3C%2Fspan%3E%0A%09%09%09%09%0A%09%09%09%09%3C%2Ffooter%3E%0A%0A%09%09%3C%2Fbody%3E%0A%09%3C%2Fhtml%3E'
         12        ECHO                                                     ~9
  132    13      > RETURN                                                   null

End of function display_table

Function badinput:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gRHnc
function name:  badinput
number of ops:  6
compiled vars:  !0 = $msg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  134     0  E >   RECV                                             !0      
  136     1        ROPE_INIT                                     3  ~2      '++++++++%3Chtml%3E%0A++++++++++++%3Chead%3E%0A++++++++++++++++%3Ctitle%3EBad+input%3C%2Ftitle%3E%0A++++++++++++%3C%2Fhead%3E%0A++++++++++++%3Cbody%3E%0A++++++++++++++++%3Ch1%3EError%3C%2Fh1%3E%0A++++++++++++++++%3Cp%3EInput+could+not+be+used+because+'
  142     2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '.%3C%2Fp%3E%0A++++++++++++%3C%2Fbody%3E%0A++++++++%3C%2Fhtml%3E+'
          4        ECHO                                                     ~1
  146     5      > RETURN                                                   null

End of function badinput

Function clean:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 23
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gRHnc
function name:  clean
number of ops:  25
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  149     0  E >   RECV                                             !0      
  150     1        BEGIN_SILENCE                                    ~1      
          2        ISSET_ISEMPTY_CV                                 ~2      !0
          3        END_SILENCE                                              ~1
          4      > JMPZ                                                     ~2, ->23
  151     5    >   BEGIN_SILENCE                                    ~3      
          6        INIT_FCALL                                               'trim'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        END_SILENCE                                              ~3
         10        ASSIGN                                                   !0, $4
  152    11        INIT_FCALL_BY_NAME                                       'get_magic_quotes_gpc'
         12        DO_FCALL                                      0  $6      
         13      > JMPZ                                                     $6, ->18
  153    14    >   INIT_FCALL                                               'stripslashes'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $7      
         17        ASSIGN                                                   !0, $7
  155    18    >   INIT_FCALL_BY_NAME                                       'mysql_real_escape_string'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0  $9      
         21      > RETURN                                                   $9
         22*       JMP                                                      ->24
  158    23    > > RETURN                                                   'NULL'
  160    24*     > RETURN                                                   null

End of function clean

Function backup_database:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 47) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 42
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 33
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
2 jumps found. (Code = 77) Position 1 = 57, Position 2 = 138
Branch analysis from position: 57
2 jumps found. (Code = 78) Position 1 = 58, Position 2 = 138
Branch analysis from position: 58
2 jumps found. (Code = 47) Position 1 = 64, Position 2 = 68
Branch analysis from position: 64
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 68
2 jumps found. (Code = 47) Position 1 = 73, Position 2 = 77
Branch analysis from position: 73
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 77
1 jumps found. (Code = 42) Position 1 = 134
Branch analysis from position: 134
2 jumps found. (Code = 44) Position 1 = 136, Position 2 = 94
Branch analysis from position: 136
1 jumps found. (Code = 42) Position 1 = 57
Branch analysis from position: 57
Branch analysis from position: 94
1 jumps found. (Code = 42) Position 1 = 128
Branch analysis from position: 128
2 jumps found. (Code = 44) Position 1 = 133, Position 2 = 95
Branch analysis from position: 133
2 jumps found. (Code = 44) Position 1 = 136, Position 2 = 94
Branch analysis from position: 136
Branch analysis from position: 94
Branch analysis from position: 95
1 jumps found. (Code = 42) Position 1 = 125
Branch analysis from position: 125
2 jumps found. (Code = 44) Position 1 = 127, Position 2 = 100
Branch analysis from position: 127
2 jumps found. (Code = 44) Position 1 = 133, Position 2 = 95
Branch analysis from position: 133
Branch analysis from position: 95
Branch analysis from position: 100
2 jumps found. (Code = 43) Position 1 = 114, Position 2 = 119
Branch analysis from position: 114
1 jumps found. (Code = 42) Position 1 = 120
Branch analysis from position: 120
2 jumps found. (Code = 43) Position 1 = 123, Position 2 = 124
Branch analysis from position: 123
2 jumps found. (Code = 44) Position 1 = 127, Position 2 = 100
Branch analysis from position: 127
Branch analysis from position: 100
Branch analysis from position: 124
Branch analysis from position: 119
2 jumps found. (Code = 43) Position 1 = 123, Position 2 = 124
Branch analysis from position: 123
Branch analysis from position: 124
Branch analysis from position: 138
2 jumps found. (Code = 43) Position 1 = 161, Position 2 = 163
Branch analysis from position: 161
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 163
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 138
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 33
Branch analysis from position: 41
Branch analysis from position: 33
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
2 jumps found. (Code = 77) Position 1 = 57, Position 2 = 138
Branch analysis from position: 57
Branch analysis from position: 138
Branch analysis from position: 46
2 jumps found. (Code = 77) Position 1 = 57, Position 2 = 138
Branch analysis from position: 57
Branch analysis from position: 138
filename:       /in/gRHnc
function name:  backup_Database
number of ops:  165
compiled vars:  !0 = $hostName, !1 = $userName, !2 = $password, !3 = $DbName, !4 = $tables, !5 = $con, !6 = $result, !7 = $row, !8 = $return, !9 = $table, !10 = $num_fields, !11 = $data, !12 = $row2, !13 = $i, !14 = $x, !15 = $handle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  163     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV_INIT                                        !4      '%2A'
  167     5        INIT_FCALL_BY_NAME                                       'mysql_connect'
          6        SEND_VAR_EX                                              !0
          7        SEND_VAR_EX                                              !1
          8        SEND_VAR_EX                                              !2
          9        DO_FCALL                                      0  $16     
         10        ASSIGN                                           ~17     !5, $16
         11      > JMPNZ_EX                                         ~17     ~17, ->16
         12    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         13        DO_FCALL                                      0  $18     
         14      > EXIT                                                     $18
         15*       BOOL                                             ~17     <true>
  168    16    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         17        SEND_VAR_EX                                              !3
         18        SEND_VAR_EX                                              !5
         19        DO_FCALL                                      0  $19     
         20      > JMPNZ_EX                                         ~20     $19, ->25
         21    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         22        DO_FCALL                                      0  $21     
         23      > EXIT                                                     $21
         24*       BOOL                                             ~20     <true>
  175    25    >   IS_EQUAL                                                 !4, '%2A'
         26      > JMPZ                                                     ~22, ->42
  177    27    >   ASSIGN                                                   !4, <array>
  178    28        INIT_FCALL_BY_NAME                                       'mysql_query'
         29        SEND_VAL_EX                                              'SHOW+TABLES'
         30        DO_FCALL                                      0  $24     
         31        ASSIGN                                                   !6, $24
  179    32      > JMP                                                      ->36
  181    33    >   FETCH_DIM_R                                      ~27     !7, 0
         34        ASSIGN_DIM                                               !4
         35        OP_DATA                                                  ~27
  179    36    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_row'
         37        SEND_VAR_EX                                              !6
         38        DO_FCALL                                      0  $28     
         39        ASSIGN                                           ~29     !7, $28
         40      > JMPNZ                                                    ~29, ->33
         41    > > JMP                                                      ->52
  186    42    >   TYPE_CHECK                                  128          !4
         43      > JMPZ                                                     ~30, ->46
         44    >   QM_ASSIGN                                        ~31     !4
         45      > JMP                                                      ->51
         46    >   INIT_FCALL                                               'explode'
         47        SEND_VAL                                                 '%2C'
         48        SEND_VAR                                                 !4
         49        DO_ICALL                                         $32     
         50        QM_ASSIGN                                        ~31     $32
         51    >   ASSIGN                                                   !4, ~31
  189    52    >   ASSIGN                                                   !8, 'SET+FOREIGN_KEY_CHECKS%3D0%3B%0D%0A'
  190    53        ASSIGN_OP                                     8          !8, 'SET+SQL_MODE%3D%22NO_AUTO_VALUE_ON_ZERO%22%3B%0D%0A'
  191    54        ASSIGN_OP                                     8          !8, 'SET+AUTOCOMMIT%3D0%3B%0D%0A'
  192    55        ASSIGN_OP                                     8          !8, 'START+TRANSACTION%3B%0D%0A'
  195    56      > FE_RESET_R                                       $38     !4, ->138
         57    > > FE_FETCH_R                                               $38, !9, ->138
  197    58    >   INIT_FCALL_BY_NAME                                       'mysql_query'
         59        CONCAT                                           ~39     'SELECT+%2A+FROM+', !9
         60        SEND_VAL_EX                                              ~39
         61        DO_FCALL                                      0  $40     
         62        ASSIGN                                           ~41     !6, $40
         63      > JMPNZ_EX                                         ~41     ~41, ->68
         64    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         65        DO_FCALL                                      0  $42     
         66      > EXIT                                                     $42
         67*       BOOL                                             ~41     <true>
  198    68    >   INIT_FCALL_BY_NAME                                       'mysql_num_fields'
         69        SEND_VAR_EX                                              !6
         70        DO_FCALL                                      0  $43     
         71        ASSIGN                                           ~44     !10, $43
         72      > JMPNZ_EX                                         ~44     ~44, ->77
         73    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         74        DO_FCALL                                      0  $45     
         75      > EXIT                                                     $45
         76*       BOOL                                             ~44     <true>
  200    77    >   CONCAT                                           ~46     'DROP+TABLE+IF+EXISTS+', !9
         78        CONCAT                                           ~47     ~46, '%3B'
         79        ASSIGN_OP                                     8          !11, ~47
  201    80        INIT_FCALL_BY_NAME                                       'mysql_fetch_row'
         81        INIT_FCALL_BY_NAME                                       'mysql_query'
         82        CONCAT                                           ~49     'SHOW+CREATE+TABLE+', !9
         83        SEND_VAL_EX                                              ~49
         84        DO_FCALL                                      0  $50     
         85        SEND_VAR_NO_REF_EX                                       $50
         86        DO_FCALL                                      0  $51     
         87        ASSIGN                                                   !12, $51
  202    88        FETCH_DIM_R                                      ~53     !12, 1
         89        CONCAT                                           ~54     '%0A%0A', ~53
         90        CONCAT                                           ~55     ~54, '%3B%0A%0A'
         91        ASSIGN_OP                                     8          !11, ~55
  204    92        ASSIGN                                                   !13, 0
         93      > JMP                                                      ->134
  206    94    > > JMP                                                      ->128
  208    95    >   CONCAT                                           ~58     'INSERT+INTO+', !9
         96        CONCAT                                           ~59     ~58, '+VALUES%28'
         97        ASSIGN_OP                                     8          !11, ~59
  209    98        ASSIGN                                                   !14, 0
         99      > JMP                                                      ->125
  211   100    >   INIT_FCALL                                               'addslashes'
        101        FETCH_DIM_R                                      ~63     !7, !14
        102        SEND_VAL                                                 ~63
        103        DO_ICALL                                         $64     
        104        ASSIGN_DIM                                               !7, !14
        105        OP_DATA                                                  $64
  213   106        INIT_FCALL                                               'clean'
        107        FETCH_DIM_R                                      ~66     !7, !14
        108        SEND_VAL                                                 ~66
        109        DO_FCALL                                      0  $67     
        110        ASSIGN_DIM                                               !7, !14
        111        OP_DATA                                                  $67
  214   112        ISSET_ISEMPTY_DIM_OBJ                         0          !7, !14
        113      > JMPZ                                                     ~68, ->119
  215   114    >   FETCH_DIM_R                                      ~69     !7, !14
        115        CONCAT                                           ~70     '%22', ~69
        116        CONCAT                                           ~71     ~70, '%22'
        117        ASSIGN_OP                                     8          !11, ~71
        118      > JMP                                                      ->120
  217   119    >   ASSIGN_OP                                     8          !11, '%22%22'
  220   120    >   SUB                                              ~74     !10, 1
        121        IS_SMALLER                                               !14, ~74
        122      > JMPZ                                                     ~75, ->124
  221   123    >   ASSIGN_OP                                     8          !11, '%2C'
  209   124    >   PRE_INC                                                  !14
        125    >   IS_SMALLER                                               !14, !10
        126      > JMPNZ                                                    ~78, ->100
  224   127    >   ASSIGN_OP                                     8          !11, '%29%3B%0A'
  206   128    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_row'
        129        SEND_VAR_EX                                              !6
        130        DO_FCALL                                      0  $80     
        131        ASSIGN                                           ~81     !7, $80
        132      > JMPNZ                                                    ~81, ->95
  204   133    >   PRE_INC                                                  !13
        134    >   IS_SMALLER                                               !13, !10
        135      > JMPNZ                                                    ~83, ->94
  228   136    >   ASSIGN_OP                                     8          !11, '%0A%0A%0A'
  195   137      > JMP                                                      ->57
        138    >   FE_FREE                                                  $38
  231   139        ASSIGN_OP                                     8          !8, 'SET+FOREIGN_KEY_CHECKS%3D1%3B%0D%0A'
  232   140        ASSIGN_OP                                     8          !8, 'COMMIT%3B'
  235   141        INIT_FCALL                                               'fopen'
        142        CONCAT                                           ~87     !3, '-Database-Backup-'
        143        CONCAT                                           ~88     ~87, !9
        144        INIT_FCALL                                               'date'
        145        SEND_VAL              

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.4 ms | 1431 KiB | 37 Q