3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userAllowedString = "Sales Manager,Sales Director,Project Manager,Developer"; $userRole = "Sales Administrator"; $userAllowedString = explode(',', $userAllowedString); if(in_array($userRole, $userAllowedString)) { $userAllowed= 'true'; } else { $userAllowed = 'false'; } echo $userAllowed;

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.10.0120.00716.49
8.5.00.0130.00920.03
8.4.150.0030.00014.05
8.4.140.0100.01017.45
8.4.130.0160.00517.93
8.4.120.0040.00620.93
8.4.110.0050.00418.55
8.4.100.0150.00717.52
8.4.90.0140.00717.79
8.4.80.0140.00717.93
8.4.70.0100.00719.48
8.4.60.0100.00618.82
8.4.50.0060.00317.70
8.4.40.0110.00424.11
8.4.30.0090.00617.81
8.4.20.0040.01119.63
8.4.10.0000.00819.50
8.3.280.0080.01118.51
8.3.270.0150.00616.76
8.3.260.0100.00816.45
8.3.250.0140.00518.84
8.3.240.0120.00716.85
8.3.230.0080.01116.44
8.3.220.0090.00617.09
8.3.210.0040.00316.51
8.3.200.0050.00316.68
8.3.190.0090.00416.41
8.3.180.0110.00716.42
8.3.170.0080.00018.67
8.3.160.0110.00716.54
8.3.150.0210.00017.12
8.3.140.0110.00719.02
8.3.130.0050.00318.16
8.3.120.0060.00320.51
8.3.110.0000.00820.94
8.3.100.0080.00016.78
8.3.90.0040.00426.77
8.3.80.0060.00319.36
8.3.70.0070.00718.56
8.3.60.0120.00318.55
8.3.50.0090.00716.58
8.3.40.0110.00718.79
8.3.30.0030.01418.38
8.3.20.0040.00419.00
8.3.10.0000.00723.71
8.3.00.0080.00020.84
8.2.290.0140.00520.25
8.2.280.0110.00720.14
8.2.270.0060.01218.86
8.2.260.0160.00019.23
8.2.250.0100.01018.35
8.2.240.0080.00017.13
8.2.230.0060.00922.58
8.2.220.0030.00624.06
8.2.210.0070.01126.77
8.2.200.0060.00318.88
8.2.190.0150.00017.95
8.2.180.0120.00318.28
8.2.170.0090.00622.96
8.2.160.0100.00320.53
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00919.70
8.2.110.0050.00519.30
8.2.100.0080.00417.72
8.2.90.0080.00019.05
8.2.80.0080.00017.97
8.2.70.0000.00817.50
8.2.60.0000.00817.93
8.2.50.0080.00018.10
8.2.40.0080.00022.27
8.2.30.0000.00719.17
8.2.20.0050.00217.99
8.2.10.0000.00718.14
8.2.00.0040.00418.11
8.1.330.0070.00221.87
8.1.320.0110.00917.72
8.1.310.0030.01016.68
8.1.300.0000.00619.98
8.1.290.0060.00330.84
8.1.280.0120.00625.92
8.1.270.0040.00423.84
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0080.00022.74
8.1.230.0070.00317.45
8.1.220.0080.00017.79
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00817.13
8.1.180.0050.00318.10
8.1.170.0050.00318.59
8.1.160.0050.00219.03
8.1.150.0050.00318.88
8.1.140.0040.00419.40
8.1.130.0030.00318.78
8.1.120.0030.00617.48
8.1.110.0040.00417.44
8.1.100.0030.00517.30
8.1.90.0000.00917.37
8.1.80.0040.00317.45
8.1.70.0000.00717.30
8.1.60.0070.00017.51
8.1.50.0000.00817.48
8.1.40.0060.00317.36
8.1.30.0080.00017.43
8.1.20.0060.00317.54
8.1.10.0050.00217.41
8.1.00.0050.00217.47
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0030.00318.46
8.0.270.0030.00316.88
8.0.260.0000.00616.79
8.0.250.0030.00317.04
8.0.240.0000.00716.92
8.0.230.0030.00316.80
8.0.220.0000.00716.84
8.0.210.0030.00316.88
8.0.200.0080.00016.94
8.0.190.0040.00416.89
8.0.180.0030.00316.83
8.0.170.0030.00516.76
8.0.160.0000.00716.87
8.0.150.0000.00716.74
8.0.140.0070.00016.78
8.0.130.0030.00313.23
8.0.120.0030.00516.74
8.0.110.0070.00016.79
8.0.100.0040.00416.90
8.0.90.0030.00516.90
8.0.80.0120.00416.81
8.0.70.0000.00716.64
8.0.60.0040.00416.90
8.0.50.0040.00416.74
8.0.30.0080.00917.03
8.0.20.0120.00917.40
8.0.10.0050.00216.94
8.0.00.0110.00716.86
7.4.330.0030.00315.55
7.4.320.0030.00316.55
7.4.300.0030.00316.46
7.4.290.0110.00016.46
7.4.280.0040.00416.57
7.4.270.0030.00316.54
7.4.260.0030.00313.21
7.4.250.0030.00316.41
7.4.240.0080.00016.38
7.4.230.0000.00816.34
7.4.220.0120.00616.59
7.4.210.0060.01216.57
7.4.200.0030.00316.55
7.4.160.0110.00516.38
7.4.150.0110.01117.40
7.4.140.0070.01217.86
7.4.130.0110.00716.45
7.4.120.0120.00816.48
7.4.110.0100.00616.36
7.4.100.0090.01116.25
7.4.90.0030.01316.43
7.4.80.0070.01019.39
7.4.70.0090.00616.46
7.4.60.0160.00016.45
7.4.50.0030.01316.26
7.4.40.0000.01816.61
7.4.30.0090.00916.26
7.4.00.0060.01115.02
7.3.330.0070.00013.08
7.3.320.0050.00013.08
7.3.310.0070.00016.25
7.3.300.0030.00316.20
7.3.290.0110.00516.16
7.3.280.0060.01016.19
7.3.270.0040.01217.40
7.3.260.0120.00816.31
7.3.250.0090.01016.17
7.3.240.0120.00516.32
7.3.230.0100.00716.31
7.3.210.0090.00916.38
7.3.200.0080.00816.34
7.3.190.0070.01016.20
7.3.180.0060.01616.32
7.3.170.0180.00016.18
7.3.160.0120.00616.25
7.2.330.0090.00916.43
7.2.320.0090.00916.50
7.2.310.0080.00816.58
7.2.300.0120.00916.37
7.2.290.0030.01516.39
7.2.60.0120.00916.52
7.2.50.0100.01716.24
7.1.200.0030.01015.51
7.1.70.0000.01317.17
7.1.60.1970.01733.00
7.1.50.0130.02032.72
7.1.40.0070.02032.51
7.1.30.2730.00732.62
7.1.20.0200.01332.74
7.1.10.0470.00314.91
7.1.00.0030.01014.60
7.0.200.0030.01014.80
7.0.190.0070.00714.77
7.0.180.0030.01014.26
7.0.170.0030.01014.29
7.0.160.0400.01314.06
7.0.150.0000.01314.30
7.0.140.0130.00714.46
7.0.130.0000.01014.55
7.0.120.0000.01314.70
7.0.110.0030.01014.49
7.0.100.2300.00714.53
7.0.90.0170.01314.24
7.0.80.0000.01014.37
7.0.70.0200.00014.61
7.0.60.0130.00314.23
7.0.50.0100.00314.56
7.0.40.2370.01714.60
7.0.30.0030.01014.73
7.0.20.0000.01314.55
7.0.10.1630.00714.75
7.0.00.1400.01014.58

preferences:
152.71 ms | 403 KiB | 5 Q