3v4l.org

run code in 500+ PHP versions simultaneously
<?php $_SESSION['person_role'] = 'admin'; // set for testing demo // Either do your switch case and set variables... $page = "default"; $role = "default"; switch($_SESSION['person_role']) { case 'admin': $page = $role = "admin"; break; case 'operator': $page = $role = "operator"; break; case 'partner': $page = $role = "partner"; break; } ?> Example W/ Switch Case.. <ul> <li class="uk-margin-left uk-margin-right"><a href="<?php echo $page; ?>.html"><?php echo ucwords($role); ?></a></li> </ul> <?php // - OR - // Just use $_SESSION data (assuming sanitized) in the HTML... $_SESSION['person_role'] = 'operator'; // set for testing demo ?> Example just using $_SESSION data.. <ul> <li class="uk-margin-left uk-margin-right"><a href="<?php echo $_SESSION['person_role']; ?>.html"><?php echo ucwords($_SESSION['person_role']); ?></a></li> </ul>

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.0110.00821.27
8.5.20.0120.00519.48
8.5.10.0040.00416.80
8.5.00.0170.01120.06
8.4.180.0130.00919.76
8.4.170.0120.01119.80
8.4.160.0120.01119.71
8.4.150.0070.00616.92
8.4.140.0230.01117.58
8.4.130.0080.00818.79
8.4.120.0110.00820.60
8.4.110.0090.00922.30
8.4.100.0050.00517.51
8.4.90.0030.00518.96
8.4.80.0040.00417.95
8.4.70.0010.00817.84
8.4.60.0120.00918.67
8.4.50.0080.00817.86
8.4.40.0060.00319.53
8.4.30.0150.00320.39
8.4.20.0180.00318.89
8.4.10.0110.00819.66
8.3.300.0130.00920.31
8.3.290.0120.00818.32
8.3.280.0090.01318.36
8.3.270.0120.00716.67
8.3.260.0070.00216.81
8.3.250.0110.00818.91
8.3.240.0140.00516.56
8.3.230.0090.01016.57
8.3.220.0130.00617.14
8.3.210.0050.00216.80
8.3.200.0080.00416.44
8.3.190.0070.00818.88
8.3.180.0100.00516.86
8.3.170.0060.00317.45
8.3.160.0060.01416.73
8.3.150.0120.00617.20
8.3.140.0140.00716.38
8.3.130.0090.00018.36
8.3.120.0090.00920.55
8.3.110.0040.00420.94
8.3.100.0000.00816.52
8.3.90.0040.00426.77
8.3.80.0060.00316.75
8.3.70.0070.00716.58
8.3.60.0070.00718.55
8.3.50.0120.00416.60
8.3.40.0080.00818.61
8.3.30.0040.01118.49
8.3.20.0040.00420.85
8.3.10.0000.00719.27
8.3.00.0040.00421.63
8.2.300.0140.00518.14
8.2.290.0100.00620.59
8.2.280.0130.00622.26
8.2.270.0120.00316.70
8.2.260.0100.00017.34
8.2.250.0050.00316.60
8.2.240.0040.00418.95
8.2.230.0030.00622.58
8.2.220.0080.00024.06
8.2.210.0030.00726.77
8.2.200.0040.00716.50
8.2.190.0100.01016.75
8.2.180.0140.00725.92
8.2.170.0080.00822.96
8.2.160.0060.00922.11
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00919.70
8.2.110.0040.00420.22
8.2.100.0080.00417.91
8.2.90.0040.00417.75
8.2.80.0000.00818.73
8.2.70.0050.00517.50
8.2.60.0040.00418.05
8.2.50.0030.00618.07
8.2.40.0030.00620.07
8.2.30.0040.00418.12
8.2.20.0040.00418.04
8.2.10.0030.00618.87
8.2.00.0030.00519.55
8.1.340.0130.00617.82
8.1.330.0040.00421.87
8.1.320.0140.00516.04
8.1.310.0040.00416.73
8.1.300.0040.00415.98
8.1.290.0000.00930.84
8.1.280.0100.00625.92
8.1.270.0000.00720.71
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00723.77
8.1.230.0070.00422.24
8.1.220.0030.00617.75
8.1.210.0070.00318.77
8.1.200.0030.00617.38
8.1.190.0090.00017.35
8.1.180.0090.00018.10
8.1.170.0030.00518.58
8.1.160.0040.00418.90
8.1.150.0080.00018.82
8.1.140.0040.00420.26
8.1.130.0030.00520.02
8.1.120.0110.00017.35
8.1.110.0000.00717.50
8.1.100.0040.00417.37
8.1.90.0030.00717.34
8.1.80.0050.00217.37
8.1.70.0030.00317.50
8.1.60.0040.00417.61
8.1.50.0050.00217.52
8.1.40.0000.00917.44
8.1.30.0050.00317.61
8.1.20.0020.00517.69
8.1.10.0030.00717.54
8.1.00.0040.00417.55
8.0.300.0030.00518.77
8.0.290.0000.00716.75
8.0.280.0080.00018.42
8.0.270.0050.00217.13
8.0.260.0030.00318.38
8.0.250.0000.00716.83
8.0.240.0000.00716.95
8.0.230.0040.00416.95
8.0.220.0060.00016.88
8.0.210.0060.00316.86
8.0.200.0030.00316.90
8.0.190.0000.00716.86
8.0.180.0080.00016.85
8.0.170.0060.00316.79
8.0.160.0000.00817.00
8.0.150.0030.00616.91
8.0.140.0040.00416.78
8.0.130.0060.00013.26
8.0.120.0090.00016.75
8.0.110.0040.00416.89
8.0.100.0040.00417.00
8.0.90.0040.00416.74
8.0.80.0040.01116.81
8.0.70.0070.00016.92
8.0.60.0060.00316.94
8.0.50.0000.00716.78
8.0.30.0140.00317.00
8.0.20.0140.00516.99
8.0.10.0000.00816.95
8.0.00.0090.00916.85
7.4.330.0030.00415.55
7.4.320.0040.00416.50
7.4.300.0060.00016.51
7.4.290.0120.00016.45
7.4.280.0080.00016.51
7.4.270.0070.00016.51
7.4.260.0040.00416.48
7.4.250.0070.00016.55
7.4.240.0040.00416.57
7.4.230.0070.00016.57
7.4.220.0050.00316.63
7.4.210.0050.01116.59
7.4.200.0000.00716.70
7.4.160.0130.00416.42
7.4.140.0140.01017.86
7.4.130.0130.00416.39
7.4.120.0140.00316.52
7.4.110.0130.00316.45
7.4.100.0110.00616.56
7.4.90.0090.01016.46
7.4.80.0040.01319.39
7.4.70.0080.01016.32
7.4.60.0040.01616.36
7.4.50.0000.01716.23
7.4.40.0140.01116.38
7.3.330.0000.00513.12
7.3.320.0000.00513.02
7.3.310.0040.00416.13
7.3.300.0000.00716.30
7.3.290.0040.00416.25
7.3.280.0070.01016.21
7.3.260.0060.01216.50
7.3.240.0090.00816.45
7.3.230.0210.01016.55
7.3.210.0090.00916.46
7.3.200.0060.01316.45
7.3.190.0120.00316.56
7.3.180.0130.00316.33
7.3.170.0110.01216.37
7.3.160.0160.00316.29
7.3.50.0260.00014.75
7.3.40.0120.00014.79
7.3.30.0130.00314.70
7.3.20.0120.00314.83
7.3.10.0070.01014.80
7.3.00.0220.00614.71
7.2.330.0070.01016.75
7.2.320.0090.01216.78
7.2.310.0000.01816.81
7.2.300.0180.00016.44
7.2.290.0060.01216.71
7.2.180.0130.01415.18
7.2.170.0120.00914.96
7.2.160.0060.00715.12
7.2.150.0080.02015.05
7.2.140.0230.00715.20
7.2.130.0150.00315.29
7.2.120.0100.00715.12
7.2.110.0130.00915.02
7.2.100.0090.00615.11
7.2.90.0130.01015.37
7.2.80.0070.01415.03
7.2.70.0170.00315.18
7.2.60.0140.00614.94
7.2.50.0200.00715.05
7.2.40.0070.01415.20
7.2.30.0110.00315.28
7.2.20.0090.00615.06
7.2.10.0070.00715.31
7.2.00.0110.00414.97
7.1.280.0080.00814.16
7.1.270.0110.00413.74
7.1.260.0230.00313.89
7.1.250.0090.00613.91

preferences:
123.39 ms | 1466 KiB | 5 Q