3v4l.org

run code in 300+ PHP versions simultaneously
<?php $roleRequiredToLogin = 'dev-keboola-gcp-us-central1_APP_LoginKeboola'; $projectRole = 'dev-keboola-gcp-us-central1_APP_Keboola'; $orgRole = 'dev-keboola-gcp-us-central1_APP_OrgKeboola'; $strings = [ $roleRequiredToLogin, $projectRole.'_', $orgRole.'_', ]; if (array_unique($strings) !== $strings) { throw new \InvalidArgumentException('The strings must be unique'); } foreach ($strings as $potentialPrefix) { foreach ($strings as $stringToCompareTo) { if ($potentialPrefix === $stringToCompareTo) { continue; } if (strpos($stringToCompareTo, $potentialPrefix) === 0) { throw new \InvalidArgumentException(sprintf( '"%s" is a prefix of "%s"', $potentialPrefix, $stringToCompareTo )); } } } echo 'Success';

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.00.0120.00920.10
8.4.150.0010.00214.05
8.4.140.0110.01017.58
8.4.130.0170.00317.86
8.4.120.0160.00420.71
8.4.110.0090.01122.65
8.4.100.0140.00817.75
8.4.90.0110.00917.93
8.4.80.0040.00417.82
8.4.70.0140.01218.10
8.4.60.0150.00817.77
8.4.50.0130.00817.89
8.4.40.0130.00717.54
8.4.30.0090.00318.74
8.4.20.0040.00417.82
8.4.10.0080.00019.39
8.3.280.0090.01218.52
8.3.270.0130.00616.48
8.3.260.0140.00616.54
8.3.250.0050.01418.79
8.3.240.0120.00916.74
8.3.230.0120.00716.38
8.3.220.0100.00817.36
8.3.210.0130.00616.71
8.3.200.0090.01216.54
8.3.190.0100.00916.37
8.3.180.0050.00319.04
8.3.170.0070.01019.11
8.3.160.0000.01018.25
8.3.150.0040.01420.61
8.3.140.0000.00816.59
8.3.130.0060.00318.53
8.3.120.0000.01019.05
8.3.110.0130.00020.94
8.3.100.0090.00624.06
8.3.90.0040.00426.77
8.3.80.0000.00917.97
8.3.70.0040.01116.50
8.3.60.0090.00616.32
8.3.50.0110.01118.65
8.3.40.0070.01021.82
8.3.30.0030.01318.59
8.3.20.0000.00824.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.290.0110.01020.58
8.2.280.0070.00316.56
8.2.270.0090.00917.19
8.2.260.0140.00418.96
8.2.250.0130.00317.38
8.2.240.0090.00617.13
8.2.230.0040.00422.58
8.2.220.0090.00937.54
8.2.210.0070.00726.77
8.2.200.0000.01116.75
8.2.190.0090.00616.58
8.2.180.0140.00716.50
8.2.170.0150.00018.95
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0100.00326.16
8.2.120.0040.00420.79
8.2.110.0140.00722.27
8.2.100.0130.01020.45
8.2.90.0060.01520.74
8.2.80.0070.01520.38
8.2.70.0170.00320.41
8.2.60.0070.01120.62
8.2.50.0100.01320.32
8.2.40.0070.00320.39
8.2.30.0060.00320.42
8.2.20.0090.01520.51
8.2.10.0050.00520.55
8.2.00.0060.00320.46
8.1.330.0140.00416.65
8.1.320.0050.00616.34
8.1.310.0030.01218.29
8.1.300.0060.00616.02
8.1.290.0100.00030.84
8.1.280.0100.01025.92
8.1.270.0050.00324.66
8.1.260.0000.00926.35
8.1.250.0030.00528.09
8.1.240.0110.01220.18
8.1.230.0030.00620.35
8.1.220.0060.00320.35
8.1.210.0030.00621.53
8.1.200.0160.00620.21
8.1.190.0070.00320.08
8.1.180.0180.00420.16
8.1.170.0060.00320.30
8.1.160.0060.00320.26
8.1.150.0060.01220.32
8.1.140.0030.00620.35
8.1.130.0050.00520.22
8.1.120.0070.00420.46
8.1.110.0070.00320.18
8.1.100.0030.00720.26
8.1.90.0090.00320.37
8.1.80.0030.00820.23
8.1.70.0080.00320.21
8.1.60.0070.00420.31
8.1.50.0030.00720.30
8.1.40.0040.00720.39
8.1.30.0000.01120.51
8.1.20.0050.00520.51
8.1.10.0040.00720.54
8.1.00.0030.00720.16
8.0.300.0050.00519.81
8.0.290.0060.00319.64
8.0.280.0100.00019.68
8.0.270.0060.00319.77
8.0.260.0040.00419.70
8.0.250.0070.00319.76
8.0.240.0030.00619.70
8.0.230.0070.00319.67
8.0.220.0100.00019.81
8.0.210.0030.00719.69
8.0.200.0100.00019.66
8.0.190.0060.00319.76
8.0.180.0060.00319.75
8.0.170.0060.00319.70
8.0.160.0030.00619.87
8.0.150.0000.00919.66
8.0.140.0000.00919.63
8.0.130.0070.00319.77
8.0.120.0050.00519.56
8.0.110.0060.00319.88
8.0.100.0070.01019.80
8.0.90.0060.00319.62
8.0.80.0060.00319.59
8.0.70.0060.00319.62
8.0.60.0100.00019.75
8.0.50.0030.00619.70
8.0.30.0050.00519.73
8.0.20.0030.00619.85
8.0.10.0100.00019.75

preferences:
94.54 ms | 403 KiB | 5 Q