3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST['email'] = 'test@mail.com'; $_POST['emailrepeat'] = 'test@gmail.com'; function cleanInput($input){ if(isset($_POST[$input])){ $input = $_POST[$input]; }else{ return false; } $input = htmlspecialchars($input); $input = trim($input); $input = stripslashes($input); return $input; } function isCorrectLength($input,$min,$max){ $x = mb_strlen($input); return ($x >= $min && $x <= $max); } if($email = cleanInput('email')){ if(filter_var($email, FILTER_VALIDATE_EMAIL)){ if(isCorrectLength($email,1,60)){ if(!$auth->isEmailTaken($email)){ $email_clean = $email; }else{ array_push($errorMessages,'Your email is already registered'); } }else{ array_push($errorMessage,'Your email is too long'); } }else{ array_push($errorMessages,'You entered an incorrect email'); } }else{ array_push($errorMessages,'You did not input an email'); } if($emailrepeat = cleanInput('emailrepeat')){ if(strcasecmp($email_clean, emailrepeat) != 0){ echo "$emailrepeat<br>$email_clean<br>"; array_push($errorMessages,'Your emails did not match'); } }else{ array_push($errorMessages,'You did not repeat your email'); }

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.0130.01017.07
8.3.50.0040.01216.90
8.3.40.0060.00919.40
8.3.30.0130.00619.46
8.3.20.0080.00020.76
8.3.10.0050.00322.13
8.3.00.0030.00524.03
8.2.180.0150.00617.07
8.2.170.0040.01122.96
8.2.160.0040.01120.77
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00418.38
8.2.120.0060.00326.35
8.2.110.0050.00522.49
8.2.100.0060.00618.42
8.2.90.0030.00619.71
8.2.80.0070.00318.42
8.2.70.0000.00918.13
8.2.60.0040.00418.42
8.2.50.0070.00318.38
8.2.40.0030.00622.67
8.2.30.0000.00819.84
8.2.20.0040.00418.28
8.2.10.0040.00418.53
8.2.00.0040.00418.38
8.1.280.0060.00925.92
8.1.270.0080.00022.39
8.1.260.0050.00328.09
8.1.250.0000.00828.09
8.1.240.0060.00324.31
8.1.230.0060.00619.38
8.1.220.0060.00318.04
8.1.210.0050.00518.77
8.1.200.0100.00017.98
8.1.190.0030.00617.86
8.1.180.0040.00418.10
8.1.170.0040.00418.87
8.1.160.0000.00821.02
8.1.150.0080.00019.28
8.1.140.0060.00319.83
8.1.130.0000.00918.00
8.1.120.0040.00417.85
8.1.110.0000.00817.74
8.1.100.0020.00517.78
8.1.90.0070.00317.77
8.1.80.0030.00517.86
8.1.70.0040.00417.75
8.1.60.0040.00417.89
8.1.50.0040.00418.00
8.1.40.0000.00817.86
8.1.30.0060.00318.05
8.1.20.0040.00418.11
8.1.10.0030.00518.02
8.1.00.0030.00819.88
8.0.300.0080.00018.77
8.0.290.0080.00017.38
8.0.280.0000.00818.64
8.0.270.0000.00717.52
8.0.260.0000.00717.53
8.0.250.0000.00717.47
8.0.240.0040.00417.45
8.0.230.0030.00517.39
8.0.220.0000.00817.38
8.0.210.0040.00417.28
8.0.200.0000.00717.44
8.0.190.0000.00817.50
8.0.180.0040.00417.44
8.0.170.0040.00417.38
8.0.160.0070.00017.35
8.0.150.0000.00817.40
8.0.140.0000.00817.25
8.0.130.0070.00013.86
8.0.120.0030.00617.29
8.0.110.0040.00417.48
8.0.100.0040.00417.41
8.0.90.0000.00817.24
8.0.80.0070.01117.43
8.0.70.0030.00617.38
8.0.60.0040.00417.41
8.0.50.0080.00017.33
8.0.30.0160.00317.57
8.0.20.0120.00817.45
8.0.10.0050.00317.45
8.0.00.0100.01117.16
7.4.330.0000.00516.84
7.4.320.0000.00717.03
7.4.300.0080.00016.82
7.4.290.0040.00416.98
7.4.280.0000.01017.01
7.4.270.0000.00816.89
7.4.260.0040.00916.99
7.4.250.0030.00617.06
7.4.240.0040.00417.05
7.4.230.0080.00016.88
7.4.220.0130.01017.19
7.4.210.0130.01017.16
7.4.200.0000.00816.89
7.4.160.0030.01316.85
7.4.150.0090.00917.40
7.4.140.0150.00517.86
7.4.130.0150.00617.08
7.4.120.0110.00917.04
7.4.110.0040.01516.94
7.4.100.0090.00917.16
7.4.90.0090.01016.93
7.4.80.0110.01219.39
7.4.70.0090.01116.99
7.4.60.0090.00916.86
7.4.50.0000.01416.86
7.4.40.0130.00416.98
7.4.30.0040.01416.95
7.4.00.0070.01115.54
7.3.330.0030.00313.71
7.3.320.0000.00613.80
7.3.310.0070.00016.79
7.3.300.0080.00016.79
7.3.290.0100.00816.81
7.3.280.0090.01016.82
7.3.270.0120.00917.40
7.3.260.0070.01416.95
7.3.250.0080.01616.84
7.3.240.0100.00916.71
7.3.230.0080.00816.83
7.3.210.0160.00316.72
7.3.200.0130.00419.39
7.3.190.0140.00716.79
7.3.180.0140.00416.78
7.3.170.0150.00316.82
7.3.160.0060.01117.06
7.2.330.0040.01616.93
7.2.320.0130.00617.11
7.2.310.0100.01316.89
7.2.300.0070.01016.99
7.2.290.0110.00617.12
7.2.60.0030.01017.09
7.2.00.0050.01419.67
7.1.200.0080.00316.23
7.1.100.0060.00618.61
7.1.70.0000.00917.43
7.1.60.0070.00719.27
7.1.50.0070.01317.55
7.1.00.0030.07722.58
7.0.200.0070.00417.15
7.0.60.0200.07722.05
7.0.50.0030.08718.08
7.0.40.0030.08320.13
7.0.30.0200.04320.27
7.0.20.0330.07320.22
7.0.10.0070.04020.45
7.0.00.0030.07320.37
5.6.280.0000.03320.95
5.6.210.0100.07020.77
5.6.200.0000.04718.32
5.6.190.0030.06720.53
5.6.180.0330.08020.53
5.6.170.0300.08020.54
5.6.160.0100.08720.52
5.6.150.0000.05318.24
5.6.140.0000.05018.17
5.6.130.0100.03718.20
5.6.120.0070.04021.15
5.6.110.0100.07021.04
5.6.100.0070.04021.01
5.6.90.0030.07321.16
5.6.80.0170.07320.39
5.5.350.0030.09020.55
5.5.340.0070.05317.96
5.5.330.0030.05020.36
5.5.320.0270.06020.38
5.5.310.0300.06320.40
5.5.300.0000.04018.02
5.5.290.0130.07018.13
5.5.280.0130.08020.72
5.5.270.0130.07720.68
5.5.260.0100.08020.91
5.5.250.0070.07020.62
5.5.240.0170.08320.16

preferences:
65.49 ms | 400 KiB | 5 Q