3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); include("inc/include.php"); if(!isset($_SESSION['sess_id'])) { header("Location: index"); exit; } $query = $config['mysql_connection']->prepare("SELECT SUM(`uSize`) FROM `uploads` WHERE `uUser` = ? AND `uRemoved` = 0"); $query->execute(array($_SESSION['sess_id'])); $used = $query->fetchColumn(); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="shortcut icon" href="<?php echo $config['favicon']; ?>"> <title><?php echo $config['name']; ?></title> <!-- Bootstrap --> <link href="<?php echo $config['style'][0]; ?>" rel="stylesheet"> <link href="<?php echo $config['fa']; ?>" rel="stylesheet"> <link href="<?php echo $config['social']; ?>" rel="stylesheet"> <link href="css/quacco.css" rel="stylesheet"> <link href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css" rel="stylesheet"> <style> #dropbox { height: 116px; text-align: center; padding-top: 47px; font-weight: bold; letter-spacing: 1px; } .db-active { background: #dd4814; color: #ffffff; box-shadow: 0px 0px 5px 6px #cccccc; } .preview { border: 1px solid #CDCDCD; width: 450px; padding: 10px; height:auto; overflow: auto; color: #4D4D4D; float: left; box-shadow:3px 3px 3px #888888; border-radius: 2px; } .preview-image { box-shadow: 3px 3px 3px #888888; width: 70px; height: 70px; float: left; margin-right: 10px; } .file-info { height: 50px; float: left; width: auto; margin-bottom: 10px; border: 1px solid blue; } .file-info span { margin: 3px 2px; font-size: 12px; float:left; display: block; min-width: 100px; overflow: auto; border: 1px solid red; overflow: none; } .progress { margin-bottom: 3px; } </style> </head> <body> <div id="wrapper"> <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <li class="naaaav"><a href="dashboard" id="dashboard"><i class="fa fa-tachometer fa-fw fa-2x"></i><br />Dashboard</a></li> <li class="naaaav"><a href="insights"><i class="fa fa-bar-chart-o fa-fw fa-2x"></i><br />Insights</a></li> <li class="dropdown active"> <a href="#" class="dropdown-toggle naaaav" data-toggle="dropdown"><i class="fa fa-wrench fa-fw fa-2x"></i><br />Tools <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="files">Files</a></li> <li><a href="compose">Compose</a></li> <li><a href="shorten">Bit.ly</a></li> <li><a href="cloud">Tag cloud</a></li> </ul> </li> </ul> <ul class="nav navbar-nav navbar-right"> <li class="dropdown"> <a href="#" class="dropdown-toggle naaaav" data-toggle="dropdown"><i class="fa fa-user fa-fw fa-2x"></i><br /><b class="caret"></b></a> <ul class="dropdown-menu"> <li class="dropdown-header">You</li> <li><a href="profile">Profile</a></li> <li><a href="add_service">Add services</a></li> <li><a href="settings">Settings</a></li> <li class="divider"></li> <li><a href="pricing">Pricing & plans</a></li> <li class="divider"></li> <li><a href="help">Need help?</a></li> <li><a href="privacy">Privacy</a></li> <li><a href="developers">Developers</a></li> <li class="divider"></li> <li><a href="logout">Logout</a></li> </ul> </li> </ul> </div> </div> </nav> <div id="page-wrapper"> <div class="row"> <div class="col-xs-12"> <h1 class="page-header">Your uploaded files<?php echo "<small id='used'> - " . round(($used/$_SESSION['sess_database']['uStorage'])*100, 0) . "% of " . formatSizeUnits($_SESSION['sess_database']['uStorage']) . " used</small>"; ?></h1> </div> </div> <div class="row"> <div class="col-xs-8"> <div class="panel panel-default"> <div class="panel-heading"><i class="fa fa-list fa-fw"></i> Uploaded files</div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover" id="table"> <thead> <tr> <th></th> <th>Name</th> <th>Size</th> <th>Format</th> <th class="text-right">Uploaded</th> <th></th> </tr> </thead> <tbody id="all-files"></tbody> </table> </div> </div> </div> </div> <div class="col-xs-4"> <div class="row"> <div class="col-xs-12"> <div class="panel panel-default"> <div class="panel-heading"><i class="fa fa-upload fa-fw"></i> Upload files</div> <div class="panel-body"> <?php if($used > $_SESSION['sess_database']['uStorage']) echo '<p class="text-danger">Please upgrade to <strong>Premium</strong> if you wish to upload more than 50 MB!</p>'; ?> <input type="file" id="upload" multiple accept="image/*|audio/*" onchange="handleFiles(this.files)" /> <span>Browse and select OR drop files below</span> <div id="dropbox" class="well">Drag and drop files here</div> </div> </div> </div> </div> <!--- HERE --> <div class="row"> <div class="col-xs-12"> <div class="panel panel-default"> <div class="panel-heading"><i class="fa fa-download fa-fw"></i> Import files</div> <div class="panel-body"> <button type="button" class="btn btn-info btn-block btn-lg" onclick="$('#import_modal').modal()">Import files</button> </div> </div> </div> </div> </div> </div> </div> </div> <div class="modal fade" id="import_modal" tabindex="-1" role="dialog" aria-labelledby="import_label" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="import_label">Import my files</h4> </div> <div class="modal-body"> <a class="btn btn-block btn-social btn-dropbox" onclick="Dropbox.choose({success: function(files) { $('#post-image-src').val(files[0].link).trigger('input'); $('#thumbnail-img').attr('src', files[0].thumbnailLink); },linkType:'direct',multiselect:true,extensions:['images,audio']})"> <i class="fa fa-dropbox"></i> Choose from Dropbox </a><br /> <a class="btn btn-block btn-social btn-box" onclick="box.launchPopup()"> <i class="fa fa-box"></i> Choose from Box </a><br /> <input type="text" id="post-image-src" class="form-control" placeholder="Image source"> <div id="thumbnail" class="hidden"> <br /> <a href="" id="thumbnail-src" target="_blank" class="thumbnail"> <img src="" id="thumbnail-img" /> </a> </div> </div> </div> </div> </div> <iframe style="display:none" src="cache.php"></iframe> <!-- JavaScript --> <script src="<?php echo $config['jquery']; ?>"></script> <script src="<?php echo $config['bootstrap']; ?>"></script> <script src="<?php echo $config['quacco_js']; ?>"></script> <script src="js/upload.js"></script> <script src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script> <script src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="<?php echo $config['db_clientid']; ?>"></script> <script src="https://app.box.com/js/static/select.js"></script> <script> var table, box = new BoxSelect({clientId: '<?php echo $config['box_clientid']; ?>',linkType: 'direct',multiselect: 'true'}); $("#all-files").load("ajax/files.php", function() { table = $("#table").dataTable({ "aaSorting": [[0, "desc"]] }); $("[data-toggle='tooltip']").tooltip(); }); box.success(function(response) { console.log(response); }); function deleteFile(fid) { if(confirm("Do you really want to delete this file?")) { $("#row-"+fid).hide(); $.ajax({ url: "api/remove_file", type: "POST", data: { id: fid, token: "<?php echo $_SESSION['sess_database']['uExternalToken']; ?>" }, cache: false }); $("#used").load("ajax/used.php"); } } </script> </body> </html>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0110.00416.75
8.3.50.0040.01121.95
8.3.40.0100.01019.02
8.3.30.0120.00319.17
8.3.20.0060.00320.29
8.3.10.0090.00023.79
8.3.00.0100.01019.62
8.2.180.0110.01116.75
8.2.170.0110.00422.96
8.2.160.0030.01022.17
8.2.150.0120.00624.18
8.2.140.0000.00824.66
8.2.130.0140.00426.16
8.2.120.0040.00422.25
8.2.110.0040.00422.23
8.2.100.0000.01217.97
8.2.90.0040.00419.30
8.2.80.0040.00418.05
8.2.70.0060.00317.88
8.2.60.0060.00318.05
8.2.50.0000.00818.07
8.2.40.0030.00720.07
8.2.30.0040.00419.85
8.2.20.0080.00017.80
8.2.10.0000.00818.22
8.2.00.0090.00017.83
8.1.280.0120.00325.92
8.1.270.0080.00023.92
8.1.260.0040.00426.35
8.1.250.0110.00728.09
8.1.240.0060.00323.96
8.1.230.0080.00319.35
8.1.220.0040.00417.78
8.1.210.0060.00318.77
8.1.200.0070.00317.38
8.1.190.0040.00417.65
8.1.180.0030.00618.10
8.1.170.0080.00018.75
8.1.160.0080.00422.14
8.1.150.0080.00018.70
8.1.140.0040.00417.50
8.1.130.0000.00717.86
8.1.120.0040.00417.54
8.1.110.0000.00817.35
8.1.100.0040.00417.41
8.1.90.0040.00417.42
8.1.80.0000.00817.36
8.1.70.0070.00017.39
8.1.60.0060.00317.49
8.1.50.0040.00417.64
8.1.40.0040.00417.52
8.1.30.0040.00417.64
8.1.20.0040.00417.77
8.1.10.0040.00417.54
8.1.00.0030.00617.55
8.0.300.0080.00019.01
8.0.290.0040.00417.41
8.0.280.0070.00018.70
8.0.270.0000.00817.37
8.0.260.0000.00717.36
8.0.250.0000.00717.11
8.0.240.0060.00017.14
8.0.230.0030.00717.08
8.0.220.0040.00417.07
8.0.210.0030.00517.03
8.0.200.0070.00017.00
8.0.190.0000.00817.15
8.0.180.0040.00417.10
8.0.170.0080.00017.18
8.0.160.0000.00717.04
8.0.150.0040.00416.99
8.0.140.0070.00317.12
8.0.130.0030.00313.54
8.0.120.0000.00817.00
8.0.110.0000.00817.08
8.0.100.0000.00817.10
8.0.90.0000.00717.11
8.0.80.0090.01216.99
8.0.70.0040.00417.00
8.0.60.0000.00716.96
8.0.50.0070.00017.07
8.0.30.0090.00917.09
8.0.20.0090.00917.40
8.0.10.0040.00417.11
8.0.00.0150.00716.81
7.4.330.0050.00015.13
7.4.320.0000.00716.71
7.4.300.0040.00416.58
7.4.290.0030.00316.57
7.4.280.0070.00016.42
7.4.270.0000.00716.52
7.4.260.0070.00016.66
7.4.250.0000.00716.52
7.4.240.0050.00216.54
7.4.230.0040.00416.48
7.4.220.0110.00716.64
7.4.210.0090.00816.59
7.4.200.0000.00716.76
7.4.190.0000.00816.53
7.4.160.0090.00616.49
7.4.150.0140.01117.40
7.4.140.0140.00817.86
7.4.130.0090.00916.68
7.4.120.0060.01116.54
7.4.110.0060.01516.49
7.4.100.0100.01016.61
7.4.90.0120.00616.54
7.4.80.0170.00319.39
7.4.70.0060.01216.43
7.4.60.0170.00016.54
7.4.50.0000.00616.71
7.4.40.0080.00822.77
7.4.30.0080.00816.50
7.4.00.0110.00515.03
7.3.330.0050.00013.21
7.3.320.0000.00513.36
7.3.310.0000.00716.20
7.3.300.0000.00816.24
7.3.290.0140.00416.35
7.3.280.0080.01116.35
7.3.270.0130.00417.40
7.3.260.0070.01016.36
7.3.250.0120.00616.45
7.3.240.0100.00616.31
7.3.230.0080.00816.39
7.3.210.0030.01516.53
7.3.200.0170.00719.39
7.3.190.0150.00816.57
7.3.180.0130.00716.37
7.3.170.0060.00916.43
7.3.160.0030.01316.60
7.3.120.0060.00914.86
7.3.110.0000.01414.58
7.3.100.0000.00914.71
7.3.90.0030.00614.85
7.3.80.0060.00314.79
7.3.70.0000.01414.89
7.3.60.0040.01214.50
7.3.50.0080.00814.63
7.3.40.0070.00414.56
7.3.30.0090.00314.59
7.3.20.0080.00416.33
7.3.10.0070.01016.65
7.3.00.0100.00716.64
7.2.330.0140.00316.63
7.2.320.0100.01116.67
7.2.310.0130.01016.70
7.2.300.0060.01216.57
7.2.290.0130.01016.58
7.2.250.0120.00614.88
7.2.240.0100.01015.16
7.2.230.0070.00715.05
7.2.220.0030.00715.06
7.2.210.0060.00914.77
7.2.200.0060.00614.85
7.2.190.0100.00314.93
7.2.180.0090.00614.96
7.2.170.0070.00314.96
7.2.60.0000.01316.89
7.2.50.0070.00716.86
7.1.330.0080.00515.43
7.1.320.0030.01015.61
7.1.310.0070.00715.91
7.1.300.0070.00715.46
7.1.290.0040.00915.83
7.1.280.0040.01115.65
7.1.270.0090.00615.46
7.1.260.0030.01315.89
7.1.200.0070.00715.70
7.1.70.0100.01017.08
7.1.60.0100.01419.46
7.1.50.0100.01016.91
7.1.00.0030.07722.37
7.0.200.0070.00316.53
7.0.140.0000.07722.23
7.0.60.0130.07719.95
7.0.50.0000.05017.91
7.0.40.0130.07020.27
7.0.30.0500.07020.34
7.0.20.0300.08020.02
7.0.10.0070.08320.34
7.0.00.0130.08720.17
5.6.280.0030.07320.93
5.6.210.0070.08720.50
5.6.200.0030.06018.14
5.6.190.0070.04320.34
5.6.180.0230.07320.40
5.6.170.0400.07320.51
5.6.160.0070.04020.49
5.6.150.0070.08718.16
5.6.140.0070.07718.18
5.6.130.0070.06718.19
5.6.120.0100.07321.00
5.6.110.0100.08320.97
5.6.100.0100.08321.20
5.6.90.0030.08321.14
5.6.80.0030.08320.55
5.6.70.4170.04020.37
5.5.350.0100.04320.42
5.5.340.0070.04017.96
5.5.330.0000.06320.15
5.5.320.0030.06020.23
5.5.310.0200.07720.29
5.5.300.0070.08717.93
5.5.290.0070.06017.93
5.5.280.0070.06720.87
5.5.270.0030.04720.66
5.5.260.0030.06020.83
5.5.250.0100.07720.60
5.5.240.0270.07020.14
5.4.450.0970.05719.25
5.4.440.0900.05719.41
5.4.430.0870.06019.11
5.4.420.0670.00019.49
5.4.410.0100.05319.00
5.4.400.1330.05718.77
5.4.390.0930.05018.71
5.4.380.0230.05318.63
5.4.370.0100.04318.66
5.4.360.0170.04718.68
5.4.350.0080.03812.03
5.4.340.0070.03512.02
5.4.320.0050.03612.51
5.4.310.0040.04212.52
5.4.300.0120.03012.51
5.4.290.0050.04512.49
5.4.280.0110.04612.38
5.4.270.0080.04212.38
5.4.260.0040.05212.39
5.4.250.0110.04112.39
5.4.240.0140.03512.39
5.4.230.0040.04712.38
5.4.220.0060.04012.38
5.4.210.0080.04012.38
5.4.200.0070.03912.38
5.4.190.0080.03712.37
5.4.180.0070.05112.38
5.4.170.0050.04012.38
5.4.160.0060.04712.38
5.4.150.0070.03612.38
5.4.140.0060.03812.06
5.4.130.0040.03812.05
5.4.120.0070.03412.01
5.4.110.0070.03512.01
5.4.100.0070.03412.00
5.4.90.0060.03612.00
5.4.80.0090.03412.00
5.4.70.0040.03612.00
5.4.60.0050.03512.00
5.4.50.0080.03512.00
5.4.40.0050.03611.99
5.4.30.0070.04311.98
5.4.20.0080.03711.99
5.4.10.0110.03611.98
5.4.00.0060.04011.47
5.3.290.0060.03912.80
5.3.280.0070.06012.71
5.3.270.0070.04512.73
5.3.260.0080.04312.72
5.3.250.0050.04012.72
5.3.240.0090.03912.72
5.3.230.0040.04512.71
5.3.220.0070.03912.68
5.3.210.0060.04012.68
5.3.200.0060.03612.68
5.3.190.0080.03912.68
5.3.180.0100.05212.67
5.3.170.0090.05212.67
5.3.160.0060.04112.68
5.3.150.0110.03712.67
5.3.140.0090.05212.66
5.3.130.0080.05512.66
5.3.120.0120.05112.66
5.3.110.0040.05912.66
5.3.100.0060.04012.13
5.3.90.0090.03412.11
5.3.80.0070.03912.09
5.3.70.0040.04012.10
5.3.60.0090.03512.08
5.3.50.0080.03312.02
5.3.40.0090.03412.02
5.3.30.0050.03711.99
5.3.20.0060.03511.77
5.3.10.0040.04211.73
5.3.00.0020.04311.72
5.2.170.0090.0309.23
5.2.160.0090.0339.23
5.2.150.0050.0349.23
5.2.140.0060.0299.23
5.2.130.0070.0369.19
5.2.120.0050.0409.20
5.2.110.0050.0319.20
5.2.100.0040.0299.20
5.2.90.0040.0329.19
5.2.80.0080.0469.19
5.2.70.0080.0819.18
5.2.60.0140.0699.15
5.2.50.0080.0419.11
5.2.40.0090.0459.09
5.2.30.0070.0429.07
5.2.20.0050.0419.06
5.2.10.0050.0409.01
5.2.00.0070.0408.86
5.1.60.0040.0308.15
5.1.50.0040.0278.15
5.1.40.0070.0338.13
5.1.30.0080.0358.48
5.1.20.0040.0338.50
5.1.10.0040.0288.23
5.1.00.0050.0348.23
5.0.50.0040.0286.70
5.0.40.0040.0286.55
5.0.30.0060.0396.37
5.0.20.0080.0246.39
5.0.10.0070.0206.32
5.0.00.0040.0376.31
4.4.90.0140.0484.78
4.4.80.0030.0214.76
4.4.70.0030.0174.76
4.4.60.0060.0164.75
4.4.50.0070.0234.77
4.4.40.0040.0384.71
4.4.30.0020.0234.76
4.4.20.0010.0254.84
4.4.10.0040.0224.85
4.4.00.0050.0234.75
4.3.110.0030.0174.67
4.3.100.0040.0164.66
4.3.90.0030.0144.63
4.3.80.0030.0244.61
4.3.70.0000.0174.63
4.3.60.0040.0154.62
4.3.50.0030.0174.62
4.3.40.0030.0294.56
4.3.30.0020.0193.37
4.3.20.0030.0183.34
4.3.10.0030.0173.30
4.3.00.0030.0236.82

preferences:
44.55 ms | 401 KiB | 5 Q