3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Route { static function start() { $controller_name = 'Main'; $action_name = 'index'; $routes = explode('/', $_SERVER['REQUEST_URI']); if ( !empty($routes[1]) ) { $controller_name = $routes[1]; } if ( !empty($routes[2]) ) { $action_name = $routes[2]; } $model_name = 'Model_'.$controller_name; $controller_name = 'Controller_'.$controller_name; $action_name = 'action_'.$action_name; $model_file = strtolower($model_name).'.php'; $model_path = "application/models/".$model_file; if(file_exists($model_path)) { include "application/models/".$model_file; } $controller_file = strtolower($controller_name).'.php'; $controller_path = "application/controllers/".$controller_file; if(file_exists($controller_path)) { include "application/controllers/".$controller_file; } else { Route::ErrorPage404(); } $controller = new $controller_name; $action = $action_name; if(method_exists($controller, $action)) { $controller->$action(); } else { Route::ErrorPage404(); } } function ErrorPage404() { $host = 'http://'.$_SERVER['HTTP_HOST'].'/'; header('HTTP/1.1 404 Not Found'); header("Status: 404 Not Found"); header('Location:'.$host.'404'); } } ?>

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.40.0130.00918.60
8.3.30.0120.00318.90
8.3.20.0000.00820.34
8.3.10.0050.00223.83
8.3.00.0030.00519.26
8.2.170.0000.01422.96
8.2.160.0090.00622.12
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0090.00926.16
8.2.120.0080.00021.12
8.2.110.0110.00420.64
8.2.100.0070.00417.59
8.2.90.0050.00317.63
8.2.80.0040.00418.52
8.2.70.0040.00417.68
8.2.60.0000.00717.91
8.2.50.0000.00818.10
8.2.40.0060.00320.95
8.2.30.0050.00319.16
8.2.20.0000.00817.60
8.2.10.0000.00717.97
8.2.00.0040.00417.55
8.1.270.0050.00319.00
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0090.00023.79
8.1.230.0070.00420.88
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.13
8.1.190.0040.00417.23
8.1.180.0040.00419.03
8.1.170.0060.00318.63
8.1.160.0080.00019.03
8.1.150.0070.00018.88
8.1.140.0040.00417.39
8.1.130.0050.00317.88
8.1.120.0060.00617.26
8.1.110.0040.00417.29
8.1.100.0070.00017.39
8.1.90.0050.00317.30
8.1.80.0030.00717.29
8.1.70.0040.00417.39
8.1.60.0000.00917.56
8.1.50.0050.00317.48
8.1.40.0040.00417.45
8.1.30.0030.00517.55
8.1.20.0040.00417.55
8.1.10.0080.00017.32
8.1.00.0040.00417.39
8.0.300.0000.00718.77
8.0.290.0000.00716.63
8.0.280.0000.00818.28
8.0.270.0000.00717.18
8.0.260.0060.00017.16
8.0.250.0030.00316.75
8.0.240.0000.00616.80
8.0.230.0050.00216.88
8.0.220.0000.00716.83
8.0.210.0030.00316.84
8.0.200.0030.00316.78
8.0.190.0080.00016.83
8.0.180.0000.00716.86
8.0.170.0030.00316.80
8.0.160.0070.00016.80
8.0.150.0060.00616.82
8.0.140.0000.00716.70
8.0.130.0030.00313.20
8.0.120.0000.00816.84
8.0.110.0050.00316.66
8.0.100.0000.00716.76
8.0.90.0030.00316.71
8.0.80.0140.00416.75
8.0.70.0050.00216.61
8.0.60.0000.00716.80
8.0.50.0000.00716.80
8.0.30.0140.01116.94
8.0.20.0070.01517.40
8.0.10.0000.01016.83
8.0.00.0110.01016.71
7.4.330.0050.00015.03
7.4.320.0030.00316.51
7.4.300.0000.00716.38
7.4.290.0080.00016.43
7.4.280.0030.00616.53
7.4.270.0070.00016.54
7.4.260.0040.00416.32
7.4.250.0050.00316.50
7.4.240.0020.00516.49
7.4.230.0070.00016.41
7.4.220.0180.00616.55
7.4.210.0110.00416.35
7.4.200.0030.00316.32
7.4.160.0100.00716.39
7.4.150.0220.00317.40
7.4.140.0130.00717.86
7.4.130.0100.00916.40
7.4.120.0100.00716.34
7.4.110.0140.00416.41
7.4.100.0100.01016.47
7.4.90.0160.00416.41
7.4.80.0090.00919.39
7.4.70.0100.00616.26
7.4.60.0060.01116.32
7.4.50.0080.00016.52
7.4.40.0070.01116.29
7.4.30.0130.01016.35
7.4.10.0120.00614.92
7.4.00.0080.00814.89
7.3.330.0050.00013.22
7.3.320.0000.00513.24
7.3.310.0030.00316.01
7.3.300.0040.00416.21
7.3.290.0020.01116.20
7.3.280.0120.00716.19
7.3.270.0110.00617.40
7.3.260.0100.01316.57
7.3.250.0090.01016.22
7.3.240.0090.00616.20
7.3.230.0090.00616.39
7.3.210.0100.00716.48
7.3.200.0090.00919.39
7.3.190.0160.00316.19
7.3.180.0090.00616.20
7.3.170.0080.00816.46
7.3.160.0130.00316.40
7.3.130.0060.00914.73
7.3.120.0080.00714.80
7.3.110.0060.01314.75
7.3.100.0050.01014.71
7.3.90.0070.00714.45
7.3.80.0080.00514.82
7.3.70.0080.00814.51
7.3.60.0060.00314.56
7.3.50.0040.01114.77
7.3.40.0070.00814.49
7.3.30.0090.00514.69
7.3.20.0060.00416.61
7.3.10.0050.00816.44
7.3.00.0050.00916.54
7.2.330.0060.01116.22
7.2.320.0090.00916.56
7.2.310.0080.00816.32
7.2.300.0090.00916.56
7.2.290.0120.00616.30
7.2.260.0090.00915.09
7.2.250.0060.00914.83
7.2.240.0120.00314.87
7.2.230.0110.00514.88
7.2.220.0040.00914.96
7.2.210.0040.00914.88
7.2.200.0070.00714.81
7.2.190.0030.01014.77
7.2.180.0100.00714.62
7.2.170.0000.01614.68
7.2.160.0060.00914.93
7.2.150.0070.00416.75
7.2.140.0040.01116.53
7.2.130.0050.00516.69
7.2.120.0040.00816.46
7.2.110.0060.00816.73
7.2.100.0050.00616.53
7.2.90.0050.00816.68
7.2.80.0030.00816.79
7.2.70.0090.00516.64
7.2.60.0080.00816.45
7.2.50.0070.00816.70
7.2.40.0030.00916.79
7.2.30.0110.00316.63
7.2.20.0060.01116.60
7.2.10.0020.00916.75
7.2.00.0070.00617.47
7.1.330.0070.00715.64
7.1.320.0080.00515.48
7.1.310.0020.01415.67
7.1.300.0050.00915.43
7.1.290.0050.01115.65
7.1.280.0040.01015.70
7.1.270.0050.00815.35
7.1.260.0030.00615.55
7.1.250.0050.00715.60
7.1.240.0060.00915.66
7.1.230.0110.00415.72
7.1.220.0060.00315.57
7.1.210.0040.01115.48
7.1.200.0040.00415.54
7.1.190.0110.00315.55
7.1.180.0000.01315.66
7.1.170.0000.00915.51
7.1.160.0000.00915.57
7.1.150.0070.00715.63
7.1.140.0040.00415.73
7.1.130.0040.01115.69
7.1.120.0000.01215.64
7.1.110.0100.00315.55
7.1.100.0080.00616.85
7.1.90.0070.01015.53
7.1.80.0030.01015.60
7.1.70.0060.00316.40
7.1.60.0060.01317.44
7.1.50.0100.00516.09
7.1.40.0000.01615.78
7.1.30.0090.00315.25
7.1.20.0030.00615.49
7.1.10.0070.00415.32
7.1.00.0040.04219.00
7.0.330.0060.00914.86
7.0.320.0110.00015.25
7.0.310.0030.00715.20
7.0.300.0030.00915.15
7.0.290.0090.00315.24
7.0.280.0070.00415.36
7.0.270.0110.00414.99
7.0.260.0070.00415.28
7.0.250.0040.00815.30
7.0.240.0070.00715.16
7.0.230.0060.00915.41
7.0.220.0110.00015.30
7.0.210.0060.00615.32
7.0.200.0010.00815.86
7.0.190.0040.01115.27
7.0.180.0030.00715.11
7.0.170.0040.00415.33
7.0.160.0080.00315.23
7.0.150.0040.00415.33
7.0.140.0050.02018.70
7.0.130.0030.01015.36
7.0.120.0080.00314.91
7.0.110.0030.00615.35
7.0.100.0130.00015.38
7.0.90.0030.00815.24
7.0.80.0090.00615.39
7.0.70.0000.01015.16
7.0.60.0070.02217.73
7.0.50.0070.03016.63
7.0.40.0050.02816.71
7.0.30.0100.02816.69
7.0.20.0150.04516.74
7.0.10.0060.02216.80
7.0.00.0120.04216.89
5.6.400.0060.00913.82
5.6.390.0080.00414.23
5.6.380.0070.00314.17
5.6.370.0040.01114.14
5.6.360.0060.00614.14
5.6.350.0030.01414.22
5.6.340.0080.00414.02
5.6.330.0070.01014.20
5.6.320.0080.00414.18
5.6.310.0140.00014.38
5.6.300.0080.00814.07
5.6.290.0060.00613.95
5.6.280.0030.04317.52
5.6.270.0030.01014.07
5.6.260.0080.00814.25
5.6.250.0030.01014.04
5.6.240.0090.00014.07
5.6.230.0050.00514.06
5.6.220.0050.00313.86
5.6.210.0090.03617.32
5.6.200.0030.04116.06
5.6.190.0070.04517.33
5.6.180.0240.03917.32
5.6.170.0210.03817.38
5.6.160.0080.02517.33
5.6.150.0070.04316.11
5.6.140.0070.03516.04
5.6.130.0060.04116.03
5.6.120.0080.03517.54
5.6.110.0070.04317.62
5.6.100.0060.02217.67
5.6.90.0080.03017.69
5.6.80.0060.03017.20
5.6.70.0110.00414.23
5.6.60.0070.00714.15
5.6.50.0040.00413.80
5.6.40.0030.00714.29
5.6.30.0100.00013.94
5.6.20.0120.00314.17
5.6.10.0040.00414.33
5.6.00.0000.01213.89
5.5.380.0030.00613.93
5.5.370.0050.00513.92
5.5.360.0040.00813.68
5.5.350.0130.03017.06
5.5.340.0040.02815.86
5.5.330.0070.02316.92
5.5.320.0180.04016.92
5.5.310.0180.03817.07
5.5.300.0090.03915.95
5.5.290.0040.04615.78
5.5.280.0080.04417.38
5.5.270.0080.02117.29
5.5.260.0100.03417.39
5.5.250.0110.04217.29
5.5.240.0030.04317.08
5.5.230.0030.01013.49
5.5.220.0090.00913.99
5.5.210.0070.00713.98
5.5.200.0100.00813.80
5.5.190.0090.00614.10
5.5.180.0090.00613.89
5.5.170.0030.01013.66
5.5.160.0090.00713.94
5.5.150.0040.01413.68
5.5.140.0090.00313.84
5.5.130.0160.00013.54
5.5.120.0050.00313.61
5.5.110.0060.01013.39
5.5.100.0030.00913.64
5.5.90.0070.00713.28
5.5.80.0030.00913.70
5.5.70.0000.01513.99
5.5.60.0060.00913.47
5.5.50.0070.00714.04
5.5.40.0030.01013.89
5.5.30.0040.01113.40
5.5.20.0040.00413.63
5.5.10.0060.00913.46
5.5.00.0070.00713.76
5.4.450.0400.03715.05
5.4.440.0320.04715.21
5.4.430.0410.02915.07
5.4.420.0380.03215.25
5.4.410.0250.02815.16
5.4.400.0280.03115.07
5.4.390.0380.03014.96
5.4.380.0190.03514.84
5.4.370.0110.03114.83
5.4.360.0150.03014.83
5.4.350.0120.03314.77
5.4.340.0230.02314.83
5.4.330.0030.00710.93
5.4.320.0190.02914.74
5.4.310.0170.02714.84
5.4.300.0150.03014.70
5.4.290.0150.02914.82
5.4.280.0190.02914.82
5.4.270.0160.03014.74
5.4.260.0130.03014.74
5.4.250.0170.03114.71
5.4.240.0170.02814.83
5.4.230.0270.03314.82
5.4.220.0220.03214.81
5.4.210.0170.03214.76
5.4.200.0120.03713.78
5.4.190.0130.04114.74
5.4.180.0170.03014.76
5.4.170.0160.03814.81
5.4.160.0170.03914.84
5.4.150.0260.03014.81
5.4.140.0280.03213.63
5.4.130.0200.03913.57
5.4.120.0130.03813.55
5.4.110.0170.02913.58
5.4.100.0180.02713.62
5.4.90.0190.02313.57
5.4.80.0160.03013.59
5.4.70.0240.02513.67
5.4.60.0140.03213.61
5.4.50.0200.02513.67
5.4.40.0150.03013.60
5.4.30.0160.02513.54
5.4.20.0180.04313.57
5.4.10.0130.03313.54
5.4.00.0150.02813.34
5.3.290.0430.04714.71
5.3.280.0230.07314.63
5.3.270.0300.07014.66
5.3.260.0500.05714.82
5.3.250.0170.06014.72
5.3.240.0470.04714.67
5.3.230.0400.07014.74
5.3.220.0500.06014.79
5.3.210.0270.05714.76
5.3.200.0200.06014.71
5.3.190.0270.06714.77
5.3.180.0300.05014.68
5.3.170.0370.04314.68
5.3.160.0600.04314.60
5.3.150.0330.04714.61
5.3.140.0200.05714.62
5.3.130.0270.05714.69
5.3.120.0430.04314.68
5.3.110.0270.06014.72
5.3.100.0300.05014.07
5.3.90.0200.06014.21
5.3.80.0330.06314.13
5.3.70.0400.06314.01
5.3.60.0570.04314.04
5.3.50.0230.05714.09
5.3.40.0270.05313.98
5.3.30.0430.03714.04
5.3.20.0330.06013.87
5.3.10.0430.05013.65
5.3.00.0430.04713.65
5.2.170.0170.04711.36
5.2.160.0330.03011.26
5.2.150.0270.06311.14
5.2.140.0200.04311.27
5.2.130.0330.05711.11
5.2.120.0370.04011.10
5.2.110.0200.04711.22
5.2.100.0330.04711.32
5.2.90.0300.03711.24
5.2.80.0200.04311.15
5.2.70.0270.04711.22
5.2.60.0300.03311.18
5.2.50.0170.04711.06
5.2.40.0230.04311.03
5.2.30.0130.04710.99
5.2.20.0200.04311.10
5.2.10.0130.04310.95
5.2.00.0270.04710.77
5.1.60.0330.02310.10
5.1.50.0270.03710.08
5.1.40.0130.0479.99
5.1.30.0270.04010.47
5.1.20.0300.03310.57
5.1.10.0170.03710.29
5.1.00.0230.03710.12
5.0.50.0170.0378.65
5.0.40.0100.0438.52
5.0.30.0070.0508.27
5.0.20.0100.0308.41
5.0.10.0170.0238.30
5.0.00.0170.0478.39
4.4.90.0100.0206.90
4.4.80.0130.0176.90
4.4.70.0070.0236.90
4.4.60.0070.0276.90
4.4.50.0100.0236.90
4.4.40.0170.0336.90
4.4.30.0030.0306.90
4.4.20.0200.0176.90
4.4.10.0070.0276.90
4.4.00.0030.0436.90
4.3.110.0100.0206.90
4.3.100.0270.0106.90
4.3.90.0070.0206.90
4.3.80.0030.0376.90
4.3.70.0100.0176.90
4.3.60.0100.0236.90
4.3.50.0170.0136.90
4.3.40.0070.0376.90
4.3.30.0100.0276.90
4.3.20.0100.0276.90
4.3.10.0200.0276.90
4.3.00.0070.0177.30

preferences:
50.24 ms | 400 KiB | 5 Q