3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*======================================================================*\ || #################################################################### || || # GECKO 2.1 # || || # ---------------------------------------------------------------- # || || # Copyright 2013 Gecko All Rights Reserved. # || || # This file may not be redistributed in whole or significant part. # || || # ---------------- Gecko IS NOT FREE SOFTWARE ---------------- # || || # http://www.cmsgecko.com | http://www.cmsgecko.com/license # || || #################################################################### || \*======================================================================*/ // Check if the file is accessed only via index.php if not stop the script from running if (!defined('JAK_ADMIN_PREVENT_ACCESS')) die('You cannot access this file directly.'); require 'kint/Kint.class.php'; Kint::dump( $_SERVER ); // or, even easier, use a shorthand: d( $_SERVER ); // or, to seize execution after dumping use dd(); dd( $_SERVER ); // same as d( $_SERVER ); die; // to see trace: Kint::trace(); // or pass 1 to a dumper function Kint::dump( 1 ); // to disable all output Kint::enabled(false); // further calls, this one included, will not yield any output d('Get off my lawn!'); // no effect // Login IN if (!empty($_POST['action']) && $_POST['action'] == 'login') { $username = smartsql($_POST['username']); $userpass = smartsql($_POST['password']); // Security fix $valid_agent = filter_var($_SERVER['HTTP_USER_AGENT'], FILTER_SANITIZE_STRING); $valid_ip = filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP); // Write the log file each time someone tries to login before $jakuserlogin->jakWriteloginlog($username, $_SERVER['REQUEST_URI'], $valid_ip, $valid_agent, 0); $user_check = $jakuserlogin->jakCheckuserdata($username, $userpass); if ($user_check == true) { // Now login in the user $jakuserlogin->jakLogin($user_check, $userpass, $_POST['lcookies']); // Write the log file each time someone login after to show success $jakuserlogin->jakWriteloginlog($username, '', $valid_ip, '', 1); // Unset the recover message unset($_SESSION['password_recover']); jak_redirect(BASE_URL); } else { $errors = '1'; $ErrLogin = $tl['error']['l']; } } // Forgot password if ($_SERVER["REQUEST_METHOD"] == 'POST' && isset($_POST['forgotP'])) { $defaults = $_POST; if ($defaults['jakE'] == '' || !filter_var($defaults['jakE'], FILTER_VALIDATE_EMAIL)) { $errors['e'] = $tl['error']['e19']; } // transform user email $femail = filter_var($defaults['jakE'], FILTER_SANITIZE_EMAIL); $fwhen = time(); // Check if this user exist $user_check = $jakuserlogin->jakForgotpassword($femail, $fwhen); if (!$errors['e'] && !$user_check) { $errors['e'] = $tl['error']['e19']; } if (count($errors) == 0) { $mail = new PHPMailer(); // defaults to using php "mail()" $mail->SetFrom(JAK_EMAIL, JAK_TITLE); $mail->AddAddress($femail, $address); $mail->Subject = JAK_TITLE.' - '.$tl['login']['l13']; $mail->Body = $tl['login']['l14'].' '.(JAK_USE_APACHE ? substr(BASE_URL_ORIG, 0, -1) : BASE_URL_ORIG).html_entity_decode(JAK_rewrite::jakParseurl($tl['login']['l12'], $fwhen, '', '', '')); if ($mail->Send()) { $_SESSION['password_recover'] = 1; jak_redirect(BASE_URL); } } else { $errorfp = $errors; } } // let's call the template $template = 'login.php'; ?>

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)
7.4.00.0130.00614.94
7.3.120.0070.01114.81
7.3.110.0030.01314.61
7.3.100.0070.01314.95
7.3.90.0000.01714.80
7.3.80.0030.00614.88
7.3.70.0030.00714.82
7.3.60.0090.00014.87
7.3.50.0040.00814.62
7.3.40.0130.00014.74
7.3.30.0040.00814.66
7.3.20.0060.00316.45
7.3.10.0080.00516.55
7.3.00.0040.00816.40
7.2.250.0170.00314.88
7.2.240.0090.00915.04
7.2.230.0000.01514.86
7.2.220.0070.00315.21
7.2.210.0070.00714.76
7.2.200.0030.00914.83
7.2.190.0060.00615.14
7.2.180.0030.00614.97
7.2.170.0060.00614.59
7.2.130.0040.01416.87
7.2.120.0030.01316.53
7.2.110.0100.00316.89
7.2.100.0070.00717.00
7.2.90.0100.00616.82
7.2.80.0060.01016.48
7.2.70.0110.00016.84
7.2.60.0060.00816.72
7.2.50.0050.01016.85
7.2.40.0110.00616.64
7.2.30.0100.00716.60
7.2.20.0030.01016.62
7.2.10.0100.00016.61
7.2.00.0030.01016.84
7.1.330.0030.00915.39
7.1.320.0060.00315.34
7.1.310.0060.00315.49
7.1.300.0030.01015.50
7.1.290.0060.00615.43
7.1.280.0090.00615.63
7.1.270.0060.00615.65
7.1.260.0030.01015.61
7.1.250.0030.01315.74
7.1.200.0040.01115.65
7.1.70.0050.00216.93
7.1.60.0060.01919.82
7.1.50.0080.00416.86
7.1.00.0000.08022.32
7.0.200.0030.00716.65
7.0.140.0070.06721.97
7.0.100.0400.08320.05
7.0.90.0400.08719.98
7.0.80.0430.07719.96
7.0.70.0500.06319.99
7.0.60.0330.06320.04
7.0.50.0370.07320.36
7.0.40.0030.03320.18
7.0.30.0070.03320.00
7.0.20.0070.04020.04
7.0.10.0070.03720.10
7.0.00.0030.03720.16
5.6.280.0000.07720.80
5.6.250.0000.05020.62
5.6.240.0130.07720.53
5.6.230.0170.07020.68
5.6.220.0130.07020.67
5.6.210.0030.08320.70
5.6.200.0030.08321.07
5.6.190.0070.06020.98
5.6.180.0000.03721.19
5.6.170.0100.03720.95
5.6.160.0000.04320.96
5.6.150.0000.04321.07
5.6.140.0030.04321.09
5.6.130.0030.03721.19
5.6.120.0130.03020.94
5.6.110.0070.03721.12
5.6.100.0030.03721.01
5.6.90.0100.03721.07
5.6.80.0000.03720.41
5.6.70.0030.04320.48
5.6.60.0000.04320.41
5.6.50.0030.04020.36
5.6.40.0000.04320.37
5.6.30.0000.04720.42
5.6.20.0070.03720.51
5.6.10.0000.04320.32
5.6.00.0070.03020.31
5.5.380.0170.06720.36
5.5.370.0070.08720.38
5.5.360.0170.05320.41
5.5.350.0000.04720.43
5.5.340.0030.07720.91
5.5.330.0030.07320.91
5.5.320.0000.03720.93
5.5.310.0030.04020.93
5.5.300.0100.04020.85
5.5.290.0000.04020.83
5.5.280.0030.04020.77
5.5.270.0030.04720.92
5.5.260.0030.04020.79
5.5.250.0070.04020.56
5.5.240.0070.03020.30
5.5.230.0000.04020.31
5.5.220.0030.03320.13
5.5.210.0100.02720.31
5.5.200.0100.04020.21
5.5.190.0100.03720.28
5.5.180.0000.04320.26
5.5.160.0000.04320.26
5.5.150.0070.03720.15
5.5.140.0070.03720.01
5.5.130.0030.04019.97
5.5.120.0100.03020.24
5.5.110.0000.04320.25
5.5.100.0070.03720.10
5.5.90.0000.04020.13
5.5.80.0000.05020.07
5.5.70.0100.06320.16
5.5.60.0030.08020.17
5.5.50.0030.07020.22
5.5.40.0130.07020.18
5.5.30.0130.07320.16
5.5.20.0000.07320.15
5.5.10.0100.08020.09
5.5.00.0130.03720.10
5.4.450.0070.03719.11
5.4.440.0100.03019.21
5.4.430.0000.04019.44
5.4.420.0030.04019.13
5.4.410.0030.05719.18
5.4.400.0000.04018.91
5.4.390.0000.04019.03
5.4.380.0030.03318.80
5.4.370.0070.05318.78
5.4.360.0070.03719.13
5.4.350.0000.03719.05
5.4.340.0070.05719.04
5.4.320.0000.04319.14
5.4.310.0030.03718.79
5.4.300.0030.03719.04
5.4.290.0070.03319.11
5.4.280.0070.03318.98
5.4.270.0000.04019.12
5.4.260.0000.03318.89
5.4.250.0000.03318.95
5.4.240.0070.06318.98
5.4.230.0030.08019.09
5.4.220.0030.08018.97
5.4.210.0070.07319.22
5.4.200.0070.07019.11
5.4.190.0030.07718.95
5.4.180.0030.06318.95
5.4.170.0030.07019.19
5.4.160.0130.03318.96
5.4.150.0030.04319.12
5.4.140.0170.05716.38
5.4.130.0070.06716.38
5.4.120.0030.06316.30
5.4.110.0030.05016.33
5.4.100.0100.03716.32
5.4.90.0000.07716.43
5.4.80.0070.07016.26
5.4.70.0100.06016.43
5.4.60.0070.03716.30
5.4.50.0070.07316.23
5.4.40.0130.06716.47
5.4.30.0100.06316.38
5.4.20.0030.05016.21
5.4.10.0070.07316.34
5.4.00.0130.04715.53
5.3.290.0000.03314.66
5.3.280.0100.07714.56
5.3.270.0070.08014.63
5.3.260.0070.07714.64
5.3.250.0070.07714.64
5.3.240.0100.04014.50
5.3.230.0030.05314.49
5.3.220.0070.07314.59
5.3.210.0100.07014.46
5.3.200.0100.06314.60
5.3.190.0070.04014.57
5.3.180.0070.06714.58
5.3.170.0000.04714.58
5.3.160.0000.08014.41
5.3.150.0070.08014.45
5.3.140.0000.07714.40
5.3.130.0000.07014.50
5.3.120.0100.07714.54
5.3.110.0070.07714.56
5.3.100.0100.03314.06
5.3.90.0030.07313.92
5.3.80.0070.07313.90
5.3.70.0170.06314.00
5.3.60.0030.05013.97
5.3.50.0000.07013.93
5.3.40.0100.04013.75
5.3.30.0200.04013.80
5.3.20.0030.07313.73
5.3.10.0000.04713.63
5.3.00.0130.03713.64
5.2.170.0100.06011.17
5.2.160.0000.03311.17
5.2.150.0000.06711.18
5.2.140.0100.05711.13
5.2.130.0100.02710.92
5.2.120.0030.03311.11
5.2.110.0030.03310.96
5.2.100.0070.06011.15
5.2.90.0130.05311.00
5.2.80.0070.06311.11
5.2.70.0000.05311.11
5.2.60.0100.05311.04
5.2.50.0000.04010.96
5.2.40.0030.05711.01
5.2.30.0030.05010.80
5.2.20.0030.04711.05
5.2.10.0000.05710.94
5.2.00.0030.06010.80
5.1.60.0030.03710.02
5.1.50.0000.05310.07
5.1.40.0070.05310.05
5.1.30.0030.06010.29
5.1.20.0070.05310.29
5.1.10.0070.05010.10
5.1.00.0100.06010.13
5.0.50.0030.0379.28
5.0.40.0000.0439.28
5.0.30.0000.0539.28
5.0.20.0000.0309.28
5.0.10.0000.0439.28
5.0.00.0030.0639.28
4.4.90.0000.0379.28
4.4.80.0030.0339.28
4.4.70.0030.0379.28
4.4.60.0030.0239.28
4.4.50.0000.0339.28
4.4.40.0030.0439.28
4.4.30.0030.0279.28
4.4.20.0000.0409.28
4.4.10.0000.0379.28
4.4.00.0030.0309.28
4.3.110.0000.0239.28
4.3.100.0030.0309.28
4.3.90.0000.0279.28
4.3.80.0130.0309.28
4.3.70.0070.0279.28
4.3.60.0030.0209.28
4.3.50.0070.0309.28
4.3.40.0100.0439.28
4.3.30.0000.0179.28
4.3.20.0000.0339.28
4.3.10.0000.0379.28
4.3.00.0000.0279.28

preferences:
33.81 ms | 400 KiB | 5 Q