3v4l.org

run code in 300+ PHP versions simultaneously
<?php $page_access = array( 'index' => array('1', '2', '3'), 'users' => array('4', '5', '6') ); function level_access($page){ global $page_access; if (array_key_exists($page, $page_access)) { echo "yes"; } else { echo "no"; } } level_access('index'); echo "\n"; function level_access2($page){ global $page_access; if (isset($page_access[$page])) { echo "yes"; } else { echo "no"; } } level_access2('index');

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.4.140.0120.01017.67
8.4.130.0110.00917.86
8.4.120.0130.00724.02
8.4.110.0110.00822.61
8.4.100.0030.00517.60
8.4.90.0160.00418.55
8.4.80.0070.00417.77
8.4.70.0090.00017.94
8.4.60.0160.00520.26
8.4.50.0140.00619.53
8.4.40.0120.00919.31
8.4.30.0150.00417.65
8.4.20.0090.01320.41
8.4.10.0090.00017.71
8.3.270.0060.00416.58
8.3.260.0040.00416.42
8.3.250.0110.00818.66
8.3.240.0080.00417.04
8.3.230.0020.00716.56
8.3.220.0040.00517.30
8.3.210.0070.00918.21
8.3.200.0070.00216.65
8.3.190.0050.00518.99
8.3.180.0040.00518.39
8.3.170.0150.00018.89
8.3.160.0070.01118.27
8.3.150.0070.01320.80
8.3.140.0090.00916.47
8.3.130.0040.01116.80
8.3.120.0140.00618.94
8.3.110.0160.00320.94
8.3.100.0060.00624.06
8.3.90.0060.01226.77
8.3.80.0090.00317.97
8.3.70.0110.00718.43
8.3.60.0060.00918.43
8.3.50.0150.00318.24
8.3.40.0070.00718.69
8.3.30.0040.01118.67
8.3.20.0030.00619.18
8.3.10.0050.00221.88
8.3.00.0070.00020.40
8.2.290.0130.00620.50
8.2.280.0030.00820.24
8.2.270.0160.00317.04
8.2.260.0070.01118.22
8.2.250.0040.00418.29
8.2.240.0060.00919.07
8.2.230.0030.00622.58
8.2.220.0040.01237.54
8.2.210.0080.00026.77
8.2.200.0060.00316.75
8.2.190.0060.00916.58
8.2.180.0090.00618.54
8.2.170.0090.00622.96
8.2.160.0070.00722.08
8.2.150.0040.00424.18
8.2.140.0110.00424.66
8.2.130.0050.00326.16
8.2.120.0090.00317.50
8.2.110.0050.00521.13
8.2.100.0060.00617.84
8.2.90.0050.00318.03
8.2.80.0050.00318.05
8.2.70.0030.00617.93
8.2.60.0000.00718.16
8.2.50.0040.00418.10
8.2.40.0030.00619.48
8.2.30.0000.00819.25
8.2.20.0000.00817.97
8.2.10.0070.00017.98
8.2.00.0030.00517.63
8.1.330.0110.00921.85
8.1.320.0120.00716.09
8.1.310.0000.00818.66
8.1.300.0160.00320.12
8.1.290.0040.01130.84
8.1.280.0070.01025.92
8.1.270.0040.00422.11
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00323.96
8.1.230.0060.00622.60
8.1.220.0030.00617.74
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0080.00417.00
8.1.180.0040.00418.10
8.1.170.0000.00818.27
8.1.160.0030.00618.82
8.1.150.0070.00018.73
8.1.140.0000.00722.13
8.1.130.0000.00720.16
8.1.120.0050.00317.28
8.1.110.0040.00417.34
8.1.100.0040.00417.28
8.1.90.0000.00817.38
8.1.80.0070.00017.42
8.1.70.0000.00717.32
8.1.60.0040.00417.59
8.1.50.0060.00317.41
8.1.40.0000.00817.41
8.1.30.0060.00617.52
8.1.20.0040.00417.57
8.1.10.0030.00617.62
8.1.00.0030.00617.47
8.0.300.0040.00419.77
8.0.290.0070.00016.75
8.0.280.0020.00518.31
8.0.270.0080.00016.76
8.0.260.0030.00318.38
8.0.250.0030.00316.88
8.0.240.0000.00716.80
8.0.230.0070.00016.79
8.0.220.0000.01016.73
8.0.210.0040.00416.71
8.0.200.0000.00716.75
8.0.190.0050.00316.87
8.0.180.0040.00416.88
8.0.170.0060.00316.70
8.0.160.0030.00416.88
8.0.150.0030.00716.63
8.0.140.0030.00316.72
8.0.130.0070.00013.21
8.0.120.0020.00516.76
8.0.110.0000.00716.72
8.0.100.0000.00816.81
8.0.90.0000.00816.66
8.0.80.0070.01016.81
8.0.70.0080.00016.80
8.0.60.0040.00416.70
8.0.50.0020.00516.76
8.0.30.0090.00917.27
8.0.20.0100.01717.40
8.0.10.0040.00416.79
8.0.00.0050.01216.79
7.4.330.0040.00015.55
7.4.320.0030.00316.43
7.4.300.0030.00316.59
7.4.290.0000.00616.35
7.4.280.0060.00316.39
7.4.270.0070.00016.51
7.4.260.0080.00016.47
7.4.250.0040.00416.39
7.4.240.0000.00716.56
7.4.230.0030.00316.44
7.4.220.0050.00316.41
7.4.210.0050.01316.56
7.4.200.0070.00016.55
7.4.160.0090.00816.50
7.4.140.0100.01117.86
7.4.130.0100.01016.47
7.4.120.0090.00916.47
7.4.110.0100.00916.68
7.4.100.0070.01716.61
7.4.90.0060.01616.43
7.4.80.0100.01019.39
7.4.70.0100.01016.57
7.4.60.0070.01016.51
7.4.50.0070.00716.43
7.4.40.0090.01216.32
7.4.00.0100.00614.67
7.3.330.0000.00613.30
7.3.320.0060.00013.11
7.3.310.0000.00916.14
7.3.300.0000.00716.30
7.3.290.0000.00716.29
7.3.280.0080.00916.30
7.3.260.0060.01116.37
7.3.240.0120.00516.49
7.3.230.0130.00316.28
7.3.210.0140.00316.40
7.3.200.0100.00716.36
7.3.190.0120.01216.64
7.3.180.0120.00416.42
7.3.170.0060.01216.20
7.3.160.0060.01116.48
7.3.10.0140.00516.50
7.3.00.0070.00516.31
7.2.330.0140.00416.51
7.2.320.0060.01216.27
7.2.310.0160.00016.54
7.2.300.0080.00816.61
7.2.290.0070.01116.41
7.2.130.0110.00416.76
7.2.120.0090.00916.60
7.2.110.0280.01015.99
7.2.100.0430.00516.11
7.2.90.0400.00716.11
7.2.80.0070.00916.09
7.2.70.0070.00916.09
7.2.60.0110.00816.18
7.2.50.0100.00816.24
7.2.40.0100.00816.29
7.2.30.0100.00716.18
7.2.20.0120.00716.21
7.2.10.0360.01016.36
7.2.00.0140.01016.20
7.1.250.0110.00815.63
7.1.230.1070.00713.93
7.1.220.1320.00613.59
7.1.210.0990.01213.59
7.1.200.1570.01313.74
7.1.190.0130.00613.83
7.1.180.0110.00713.44
7.1.170.0040.01213.69
7.1.160.0110.00613.53
7.1.150.0040.01213.62
7.1.140.0280.00413.54
7.1.130.0080.01113.65
7.1.120.0120.00913.87
7.1.110.0250.00013.78
7.1.100.0180.01113.83
7.1.90.0210.00613.50
7.1.80.0340.00813.46
7.1.70.0320.00413.62
7.1.60.0300.01731.54
7.1.50.1410.00631.47
7.1.40.0270.01231.84
7.1.30.0300.01331.61
7.1.20.0300.01431.83
7.1.10.0180.00613.44
7.1.00.0510.01013.83
5.6.380.0070.00713.78

preferences:
32.34 ms | 403 KiB | 5 Q