3v4l.org

run code in 300+ PHP versions simultaneously
<?php global $user_login, $current_user; $user_info = array( 'nothing', 'even more nothing' ); $roles = array ( 'administrator', 'subscriber', ); if (array_intersect( $roles, $user_info)) { echo 'success'; } else { echo 'failure'; } ?>

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.130.0120.00818.39
8.3.120.0040.00418.84
8.3.110.0060.00320.94
8.3.100.0150.00924.06
8.3.90.0070.01126.77
8.3.80.0040.00416.38
8.3.70.0110.00716.58
8.3.60.0070.01018.31
8.3.50.0090.00922.90
8.3.40.0090.00618.55
8.3.30.0000.01418.34
8.3.20.0030.00620.39
8.3.10.0060.00320.39
8.3.00.0000.00820.64
8.2.250.0070.00016.78
8.2.240.0060.00316.36
8.2.230.0050.00522.58
8.2.220.0060.00337.54
8.2.210.0030.00626.77
8.2.200.0000.00916.38
8.2.190.0170.00316.58
8.2.180.0210.00025.92
8.2.170.0150.00018.62
8.2.160.0100.01022.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0000.00820.87
8.2.110.0060.00321.03
8.2.100.0080.00417.78
8.2.90.0040.00417.97
8.2.80.0030.00618.03
8.2.70.0040.00417.63
8.2.60.0000.00817.50
8.2.50.0040.00417.55
8.2.40.0080.00017.63
8.2.30.0070.00017.54
8.2.20.0040.00417.63
8.2.10.0040.00418.00
8.2.00.0050.00317.96
8.1.300.0130.00616.04
8.1.290.0030.00618.88
8.1.280.0190.00325.92
8.1.270.0060.00324.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00419.44
8.1.230.0000.01220.99
8.1.220.0030.00517.74
8.1.210.0030.00618.77
8.1.200.0060.00317.23
8.1.190.0090.00017.23
8.1.180.0050.00619.04
8.1.170.0020.00517.62
8.1.160.0000.00718.84
8.1.150.0060.00320.47
8.1.140.0080.00019.50
8.1.130.0070.00017.30
8.1.120.0000.00717.42
8.1.110.0070.00017.41
8.1.100.0000.00817.41
8.1.90.0030.00617.32
8.1.80.0020.00517.41
8.1.70.0000.00717.42
8.1.60.0040.00417.42
8.1.50.0040.00417.49
8.1.40.0040.00417.48
8.1.30.0000.01117.45
8.1.20.0040.00417.37
8.1.10.0080.00017.46
8.1.00.0080.00017.43
8.0.300.0000.00720.07
8.0.290.0090.00016.63
8.0.280.0040.00418.08
8.0.270.0080.00017.91
8.0.260.0060.00016.76
8.0.250.0030.00316.78
8.0.240.0030.00516.91
8.0.230.0000.00716.88
8.0.220.0000.00816.84
8.0.210.0040.00416.71
8.0.200.0040.00416.84
8.0.190.0030.00616.91
8.0.180.0000.00716.84
8.0.170.0020.00516.78
8.0.160.0040.00416.87
8.0.150.0040.00416.87
8.0.140.0000.00716.68
8.0.130.0050.00013.27
8.0.120.0030.00516.75
8.0.110.0000.00816.70
8.0.100.0040.00416.69
8.0.90.0000.00716.70
8.0.80.0070.01016.73
8.0.70.0050.00316.64
8.0.60.0040.00416.86
8.0.50.0000.00716.87
8.0.30.0080.01316.89
8.0.20.0080.01017.40
8.0.10.0000.00716.98
8.0.00.0060.01216.76
7.4.330.0050.00016.75
7.4.320.0030.00316.44
7.4.300.0030.00316.36
7.4.290.0000.00716.45
7.4.280.0040.00416.42
7.4.270.0000.00716.52
7.4.260.0040.00416.38
7.4.250.0000.00716.48
7.4.240.0070.00016.46
7.4.230.0000.00716.52
7.4.220.0090.01516.65
7.4.210.0060.00916.58
7.4.200.0070.00016.45
7.4.160.0030.02016.19
7.4.150.0070.01117.40
7.4.140.0110.01417.86
7.4.130.0070.00916.48
7.4.120.0100.00916.42
7.4.110.0080.01316.57
7.4.100.0090.01216.35
7.4.90.0130.00316.29
7.4.80.0110.00719.39
7.4.70.0100.00716.57
7.4.60.0080.00816.38
7.4.50.0100.00716.42
7.4.40.0050.01116.29
7.4.30.0100.00716.49
7.4.00.0030.01014.92
7.3.330.0000.00513.02
7.3.320.0030.00313.04
7.3.310.0000.00716.07
7.3.300.0000.00716.11
7.3.290.0070.00916.10
7.3.280.0090.00916.15
7.3.270.0060.01117.40
7.3.260.0070.01016.01
7.3.250.0080.00916.21
7.3.240.0100.01316.49
7.3.230.0140.00316.39
7.3.210.0070.01016.25
7.3.200.0130.00316.21
7.3.190.0130.00316.14
7.3.180.0040.01116.17
7.3.170.0090.01016.42
7.3.160.0120.00416.22
7.2.330.0110.00816.16
7.2.320.0160.00716.52
7.2.310.0040.01316.38
7.2.300.0060.01016.48
7.2.290.0030.01316.34
7.2.60.0030.01016.84
7.1.200.0000.01115.84
7.1.80.0100.01315.87
7.1.70.0060.00916.06
7.1.60.0190.01326.37
7.1.50.0160.01224.82
7.1.40.0210.01332.55
7.1.30.0410.00432.32
7.1.20.0300.01232.67
7.1.10.0150.00914.64
7.1.00.0100.03918.53
7.0.200.0190.00714.99
7.0.190.0220.00414.52
7.0.180.0130.01414.29
7.0.170.0190.00314.31
7.0.160.0170.01414.52
7.0.150.0070.01414.23
7.0.140.2060.00614.38
7.0.130.0060.01614.61
7.0.120.0130.00814.63
7.0.110.0200.00514.46
7.0.100.0100.01514.30
7.0.90.0130.01514.52
7.0.80.2780.01614.36
7.0.70.0040.01614.36
7.0.60.1350.02417.94
7.0.50.0070.04216.14
7.0.40.1150.02217.48
7.0.30.0200.04517.45
7.0.20.1200.04517.27
7.0.10.1060.04617.27
7.0.00.1180.02817.42
5.6.300.0270.06120.75
5.6.290.0130.07120.89
5.6.280.0060.06820.90
5.6.270.0170.05820.79
5.6.260.0090.06220.78
5.6.250.0160.08220.95
5.6.240.0200.07120.83
5.6.230.0220.05620.86
5.6.220.0230.05520.79
5.6.210.0140.07120.71
5.6.200.0130.04519.43
5.6.190.0080.08620.65
5.6.180.0240.07520.69
5.6.170.0220.07320.75
5.6.160.0100.07720.60
5.6.150.0150.05219.52
5.6.140.0100.05419.57
5.6.130.0110.08119.43
5.6.120.0100.08020.92
5.6.110.0110.07720.99
5.6.100.0100.07020.81
5.6.90.0130.04820.78
5.6.80.0100.06220.35
5.6.70.0080.06120.08
5.6.60.0130.08120.12
5.6.50.0180.07220.13
5.6.40.0060.06820.18
5.6.30.0070.06120.34
5.6.20.0090.08620.17
5.6.10.0160.07720.07
5.6.00.0070.08320.18
5.5.380.0180.09217.57
5.5.370.0070.08017.57
5.5.360.0160.07417.39
5.5.350.0240.06818.92
5.5.340.0130.06317.98
5.5.330.0110.07219.01
5.5.320.0410.06419.05
5.5.310.0190.05319.09
5.5.300.0100.06617.86
5.5.290.0160.07717.89
5.5.280.0150.08019.34
5.5.270.0170.07919.36
5.5.260.0100.06219.37
5.5.250.0200.06119.33
5.5.240.0130.05518.79
5.5.230.0100.07917.12
5.5.220.0160.05117.27
5.5.210.0070.05617.25
5.5.200.0160.05317.27
5.5.190.0190.05217.42
5.5.180.0190.07717.42
5.5.160.0160.05917.07
5.5.150.0190.07317.05
5.5.140.0040.06317.30
5.5.130.0070.07017.34
5.5.120.0160.07317.22
5.5.110.0130.07317.31
5.5.100.0170.05517.24
5.5.90.0100.05617.05
5.5.80.0130.06417.21
5.5.70.0000.06617.15
5.5.60.0160.04717.21
5.5.50.0100.05417.21
5.5.40.0120.05417.31
5.5.30.0160.06317.04
5.5.20.0130.07217.13
5.5.10.0130.07617.01
5.5.00.0160.07317.17

preferences:
30.23 ms | 403 KiB | 5 Q