3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'xyz'; $password = 'abz'; $email = 'sdfs@example.com'; $isValid = true; if (empty($password)) { echo 'You need to enter a Password'; $isValid = false; } if (empty($username)) { echo 'You need to enter a Username'; $isValid = false; } if (empty($email)) { echo 'You need to enter a Email Address'; $isValid = false; }elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "You need to have a valid Email Address"; $isValid = false; } echo 'Is valid:' . ($isValid ? 'yes' : 'no');

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.5.30.0100.00819.14
8.5.20.0100.01218.95
8.5.10.0090.01217.21
8.5.00.0150.00720.27
8.4.180.0110.01320.16
8.4.170.0150.00820.59
8.4.160.0060.00422.56
8.4.150.0080.00517.11
8.4.140.0150.00718.02
8.4.130.0050.00419.93
8.4.120.0170.00424.24
8.4.110.0040.00522.07
8.4.100.0050.00519.20
8.4.90.0040.00619.11
8.4.80.0130.00819.02
8.4.70.0100.00518.56
8.4.60.0160.00719.13
8.4.50.0090.01218.04
8.4.40.0070.00718.28
8.4.30.0070.01320.89
8.4.20.0140.00718.27
8.4.10.0110.01119.85
8.3.300.0130.00821.14
8.3.290.0140.00920.97
8.3.280.0110.01018.72
8.3.270.0120.01017.17
8.3.260.0120.00917.50
8.3.250.0140.00819.02
8.3.240.0080.00919.14
8.3.230.0110.01117.09
8.3.220.0070.00219.34
8.3.210.0120.00618.91
8.3.200.0040.00517.19
8.3.190.0120.00516.95
8.3.180.0070.00218.92
8.3.170.0130.00317.25
8.3.160.0050.00319.43
8.3.150.0180.00317.55
8.3.140.0100.00716.91
8.3.130.0160.00818.88
8.3.120.0030.01319.13
8.3.110.0030.00618.72
8.3.100.0210.00024.06
8.3.90.0100.00326.77
8.3.80.0090.00319.36
8.3.70.0190.00317.13
8.3.60.0080.00818.78
8.3.50.0080.01217.99
8.3.40.0090.00919.17
8.3.30.0120.00319.04
8.3.20.0060.01324.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.300.0130.01022.45
8.2.290.0130.00720.94
8.2.280.0100.01318.90
8.2.270.0100.00016.93
8.2.260.0100.00619.01
8.2.250.0100.01019.20
8.2.240.0130.00717.43
8.2.230.0060.00320.94
8.2.220.0060.00337.54
8.2.210.0030.00626.77
8.2.200.0100.00018.88
8.2.190.0130.00618.91
8.2.180.0150.00025.92
8.2.170.0150.00019.29
8.2.160.0110.00422.96
8.2.150.0050.00325.66
8.2.140.0090.00024.66
8.2.130.0030.00526.16
8.2.120.0040.00426.35
8.2.110.0030.00621.29
8.2.100.0070.01018.22
8.2.90.0000.00819.44
8.2.80.0000.00818.13
8.2.70.0060.00318.00
8.2.60.0080.00018.25
8.2.50.0000.00818.07
8.2.40.0000.00820.42
8.2.30.0000.00918.40
8.2.20.0050.00318.45
8.2.10.0000.00919.51
8.2.00.0040.00419.63
8.1.340.0130.00918.05
8.1.330.0110.00922.18
8.1.320.0070.00516.82
8.1.310.0120.00318.85
8.1.300.0060.00316.57
8.1.290.0090.00330.84
8.1.280.0030.01525.92
8.1.270.0030.00723.99
8.1.260.0030.00528.09
8.1.250.0050.00328.09
8.1.240.0030.00621.62
8.1.230.0040.00821.27
8.1.220.0040.00418.14
8.1.210.0000.00918.77
8.1.200.0030.00717.85
8.1.190.0080.00017.72
8.1.180.0060.00318.10
8.1.170.0030.00618.99
8.1.160.0000.00819.07
8.1.150.0000.00919.09
8.1.140.0000.00819.10
8.1.130.0000.00720.29
8.1.120.0080.00017.77
8.1.110.0060.00317.80
8.1.100.0040.00417.80
8.1.90.0040.00417.68
8.1.80.0080.00417.82
8.1.70.0000.00717.76
8.1.60.0030.00617.89
8.1.50.0030.00617.72
8.1.40.0000.00917.77
8.1.30.0000.00817.90
8.1.20.0040.00417.96
8.1.10.0030.00617.84
8.1.00.0000.01219.74
8.0.300.0040.00418.77
8.0.290.0000.01017.12
8.0.280.0030.00518.63
8.0.270.0000.00718.36
8.0.260.0040.00420.40
8.0.250.0050.00317.25
8.0.240.0030.00317.16
8.0.230.0000.00717.24
8.0.220.0000.00717.14
8.0.210.0040.00417.18
8.0.200.0000.00817.32
8.0.190.0030.00517.13
8.0.180.0090.00017.27
8.0.170.0060.00317.20
8.0.160.0040.00417.23
8.0.150.0030.00617.21
8.0.140.0040.00417.16
8.0.130.0000.00613.55
8.0.120.0090.00017.14
8.0.110.0040.00417.32
8.0.100.0000.00917.38
8.0.90.0000.00717.14
8.0.80.0070.01117.27
8.0.70.0080.00017.12
8.0.60.0040.00417.29
8.0.50.0040.00417.15
8.0.30.0080.01217.57
8.0.20.0040.01817.03
8.0.10.0060.00917.24
8.0.00.0160.00617.52
7.4.330.0030.00315.55
7.4.320.0070.00416.99
7.4.300.0070.00016.79
7.4.290.0040.00417.00
7.4.280.0000.00816.94
7.4.270.0040.00417.02
7.4.260.0030.00313.74
7.4.250.0080.00016.86
7.4.240.0040.00416.96
7.4.230.0000.00817.02
7.4.220.0040.00416.67
7.4.210.0030.01216.88
7.4.200.0070.00016.71
7.4.160.0070.00716.62
7.4.150.0150.00416.62
7.4.140.0110.01416.63
7.4.130.0070.01316.78
7.4.120.0110.01316.65
7.4.110.0170.00016.73
7.4.100.0120.00816.74
7.4.90.0060.01116.79
7.4.80.0170.00516.85
7.4.70.0080.01016.62
7.4.60.0100.00616.70
7.4.50.0110.01116.76
7.4.40.0030.01216.88
7.4.30.0130.00916.57
7.4.20.0100.01316.93
7.4.10.0150.00616.80
7.4.00.0040.01416.79
7.3.330.0050.00316.64
7.3.320.0030.00313.27
7.3.310.0000.00716.53
7.3.300.0030.00316.48
7.3.290.0070.00816.55
7.3.270.0150.00316.52
7.3.260.0120.00416.80
7.3.250.0140.00716.73
7.3.240.0100.01016.55
7.3.230.0040.01316.50
7.3.220.0000.01616.68
7.3.210.0110.00816.79
7.3.200.0110.00716.66
7.3.190.0090.00616.63
7.3.180.0090.00616.59
7.3.170.0080.00816.55
7.3.160.0060.01216.59
7.3.150.0070.01116.73
7.3.140.0090.00916.81
7.3.130.0100.00816.51
7.3.120.0120.00316.41
7.3.110.0130.00816.41
7.3.100.0210.00016.60
7.3.90.0030.01716.50
7.3.80.0130.01016.54
7.3.70.0140.00716.53
7.3.60.0100.01016.65
7.3.50.0100.01016.49
7.3.40.0060.01516.66
7.3.30.0090.00616.45
7.3.20.0060.01316.72
7.3.10.0100.00916.56
7.3.00.0100.00616.61

preferences:
58.93 ms | 1360 KiB | 5 Q