3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MVCFramework { var $url = ''; function __construct($url) { $this->url = $url; //HTTP_REQUEST URL $this->run(); } function run() { if ($route = Routes::get($this->url)) { list($controller, $action) = route; $controllerObj = new $$controller; $controllerObj->$$action(); //template } else { print_r('404'); } } } class Routes { static $routes = array(); static function add($route, $controller, $action) { self::$routes[] = array($route, $controller.'Controller', $action); } static function getRoutes() { return self::$routes; } } abstract class Model { // connect to DB and etc. } class BooksController { function index() { $books = Book::all(); } function show() { $id = 1; $books = Book::find(1); } } class Book { static function all() { $books = array('Book', 'Book', 'Book'); return $books; } static function find() { $book = 'Book'; return $book; } } class View { } Routes::add('/books', 'Books', 'index'); Routes::add('/books/:id', 'Books', 'show'); $url = '/books'; new MVCFramework($url);

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.60.0030.01018.43
8.3.50.0100.00821.90
8.3.40.0140.00418.97
8.3.30.0030.01319.04
8.3.20.0030.00520.34
8.3.10.0000.00723.52
8.3.00.0070.00019.13
8.2.180.0060.01018.42
8.2.170.0070.00722.96
8.2.160.0000.01320.58
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0040.00420.79
8.2.110.0040.00722.07
8.2.100.0030.00917.73
8.2.90.0000.00819.30
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0000.00818.05
8.2.50.0040.00718.07
8.2.40.0030.00618.27
8.2.30.0050.00218.27
8.2.20.0040.00417.88
8.2.10.0020.00518.20
8.2.00.0030.00617.82
8.1.280.0120.00325.92
8.1.270.0140.00323.80
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00922.20
8.1.230.0080.00419.02
8.1.220.0070.00017.77
8.1.210.0060.00318.77
8.1.200.0030.00617.48
8.1.190.0030.00617.25
8.1.180.0040.00418.10
8.1.170.0030.00618.53
8.1.160.0000.00722.07
8.1.150.0000.00718.65
8.1.140.0060.00317.38
8.1.130.0000.00717.90
8.1.120.0030.00317.50
8.1.110.0030.00717.43
8.1.100.0080.00017.35
8.1.90.0070.00017.50
8.1.80.0040.00417.52
8.1.70.0000.00717.45
8.1.60.0030.00517.63
8.1.50.0040.00417.49
8.1.40.0000.00717.51
8.1.30.0040.00417.57
8.1.20.0060.00317.70
8.1.10.0080.00017.48
8.1.00.0040.00417.45
8.0.300.0040.00418.77
8.0.290.0040.00417.05
8.0.280.0000.00718.46
8.0.270.0000.00717.18
8.0.260.0000.00717.14
8.0.250.0060.00017.08
8.0.240.0000.00717.10
8.0.230.0040.00417.10
8.0.220.0030.00316.91
8.0.210.0000.00816.95
8.0.200.0000.00717.02
8.0.190.0000.00717.03
8.0.180.0040.00417.01
8.0.170.0070.00016.88
8.0.160.0070.00016.95
8.0.150.0000.00816.89
8.0.140.0040.00416.89
8.0.130.0050.00013.44
8.0.120.0040.00416.82
8.0.110.0060.00317.00
8.0.100.0070.00016.77
8.0.90.0050.00216.82
8.0.80.0120.00416.99
8.0.70.0080.00016.88
8.0.60.0040.00416.97
8.0.50.0000.00816.97
8.0.30.0070.01417.19
8.0.20.0090.01017.40
8.0.10.0050.00316.91
8.0.00.0100.00816.80
7.4.330.0000.00515.00
7.4.320.0030.00316.59
7.4.300.0070.00016.61
7.4.290.0040.00416.62
7.4.280.0040.00416.45
7.4.270.0070.00016.50
7.4.260.0000.00816.42
7.4.250.0040.00416.54
7.4.240.0050.00316.52
7.4.230.0000.00716.31
7.4.220.0090.01216.57
7.4.210.0080.00616.56
7.4.200.0000.00816.60
7.4.190.0000.00716.72
7.4.160.0090.00616.54
7.4.150.0090.00917.40
7.4.140.0130.00717.86
7.4.130.0100.00716.49
7.4.120.0120.00816.63
7.4.110.0130.00616.77
7.4.100.0120.00916.45
7.4.90.0070.01016.37
7.4.80.0120.01219.39
7.4.70.0070.01316.70
7.4.60.0140.00316.63
7.4.50.0040.00416.58
7.4.40.0090.01116.61
7.4.30.0070.01016.68
7.4.00.0100.00715.05
7.3.330.0060.00013.38
7.3.320.0000.00513.38
7.3.310.0000.00716.42
7.3.300.0030.00316.38
7.3.290.0120.00416.39
7.3.280.0090.01016.39
7.3.270.0120.01217.40
7.3.260.0070.01016.42
7.3.250.0050.01316.42
7.3.240.0120.00616.45
7.3.230.0090.00616.46
7.3.210.0090.00916.41
7.3.200.0110.00919.39
7.3.190.0130.01016.38
7.3.180.0030.01316.36
7.3.170.0040.01216.32
7.3.160.0150.00316.48
7.3.120.0080.00414.76
7.3.10.0050.01116.22
7.3.00.0100.00416.47
7.2.330.0070.01016.68
7.2.320.0140.00316.57
7.2.310.0000.01716.66
7.2.300.0110.01216.37
7.2.290.0070.01716.41
7.2.130.0100.00316.36
7.2.120.0050.00916.54
7.2.110.0030.01016.38
7.2.100.0090.00916.47
7.2.90.0070.00416.57
7.2.80.0080.00316.51
7.2.70.0110.01216.68
7.2.60.0070.00916.79
7.2.50.0110.00416.58
7.2.40.0130.01016.41
7.2.30.0150.00016.85
7.2.20.0070.00316.59
7.2.10.0140.00316.70
7.2.00.0030.00818.08
7.1.250.0090.00915.62
7.1.200.0000.01215.84
7.1.100.0060.00618.15
7.1.70.0000.00817.09
7.1.60.0000.02419.70
7.1.50.0220.00634.81
7.1.00.0070.07322.57
7.0.200.0060.00616.77
7.0.140.0030.07322.10
7.0.120.0270.06322.12
7.0.110.0030.04722.07
7.0.100.0030.06322.13
7.0.90.0070.07722.02
7.0.80.0070.03721.93
7.0.70.0130.07022.12
7.0.60.0130.06322.04
7.0.50.0130.04721.95
7.0.40.0070.03719.97
7.0.30.0130.06720.04
7.0.20.0000.07320.16
7.0.10.0100.08020.05
7.0.00.0030.07319.93
5.6.280.0100.06021.04
5.6.270.0070.06320.93
5.6.260.0130.03021.10
5.6.250.0070.07321.02
5.6.240.0200.07320.84
5.6.230.0030.08020.84
5.6.220.0030.04020.96
5.6.210.0070.06321.02
5.6.200.0000.06720.80
5.6.190.0170.07321.00
5.6.180.0000.05720.77
5.6.170.0070.07021.02
5.6.160.0030.06321.00
5.6.150.0000.06321.01
5.6.140.0070.06020.75
5.6.130.0030.07720.76
5.6.120.0130.07020.76
5.6.110.0030.04021.04
5.6.100.0070.03721.02
5.6.90.0030.08320.88
5.6.80.0100.04020.39
5.6.70.0030.06020.33
5.6.60.0070.03720.34
5.6.50.0000.04020.39
5.6.40.0100.04020.34
5.6.30.0070.05720.09
5.6.20.0030.04320.38
5.6.10.0100.07020.24
5.6.00.0030.08020.10
5.5.380.0100.06717.72
5.5.370.0030.04017.48
5.5.360.0030.03717.58
5.5.350.0130.06717.58
5.5.340.0130.07317.93
5.5.330.0000.06017.93
5.5.320.0030.08318.22
5.5.310.0030.06717.93
5.5.300.0070.03318.25
5.5.290.0000.05018.05
5.5.280.0000.04717.91
5.5.270.0070.05318.07
5.5.260.0070.06018.09
5.5.250.0030.04018.04
5.5.240.0170.04017.49
5.5.230.0030.07717.30
5.5.220.0000.04017.50
5.5.210.0070.04717.51
5.5.200.0070.05317.43
5.5.190.0000.04317.28
5.5.180.0030.03717.61
5.5.160.0100.07317.31
5.5.150.0070.07317.42
5.5.140.0000.04017.45
5.5.130.0070.07317.48
5.5.120.0030.03717.57
5.5.110.0030.07317.25
5.5.100.0100.05317.39
5.5.90.0030.03717.38
5.5.80.0030.07017.34
5.5.70.0070.03717.15
5.5.60.0070.07017.47
5.5.50.0000.05317.15
5.5.40.0070.07017.36
5.5.30.0030.06017.37
5.5.20.0000.07717.14
5.5.10.0070.04717.33
5.5.00.0070.07017.19
5.4.450.0070.07719.37
5.4.440.0070.04019.48
5.4.430.0000.08319.44
5.4.420.0030.04019.59
5.4.410.0000.08019.37
5.4.400.0070.06719.09
5.4.390.0070.04719.14
5.4.380.0030.05719.09
5.4.370.0070.03318.93
5.4.360.0070.05019.24
5.4.350.0100.03019.27
5.4.340.0030.06019.16
5.4.320.0000.05718.89
5.4.310.0030.07018.89
5.4.300.0100.04018.94
5.4.290.0000.07318.93
5.4.280.0070.06319.03
5.4.270.0000.07018.86
5.4.260.0070.08018.98
5.4.250.0000.04019.13
5.4.240.0000.08018.90
5.4.230.0030.06319.16
5.4.220.0030.03718.88
5.4.210.0030.07019.11
5.4.200.0030.07019.03
5.4.190.0030.06718.93
5.4.180.0000.07318.95
5.4.170.0030.07318.98
5.4.160.0030.05718.88
5.4.150.0000.05018.87
5.4.140.0000.07016.54
5.4.130.0100.06316.32
5.4.120.0100.06716.33
5.4.110.0000.06316.39
5.4.100.0030.07016.45
5.4.90.0030.04316.45
5.4.80.0070.05716.48
5.4.70.0100.05716.25
5.4.60.0030.04016.53
5.4.50.0000.07316.51
5.4.40.0070.07016.40
5.4.30.0000.07016.33
5.4.20.0030.07016.34
5.4.10.0100.05716.45
5.4.00.0030.06315.84
5.3.290.0030.06014.71
5.3.280.0000.04014.71
5.3.270.0070.07014.61
5.3.260.0030.07014.60
5.3.250.0070.04714.62
5.3.240.0030.05014.67
5.3.230.0000.05014.63
5.3.220.0070.05014.62
5.3.210.0030.03714.61
5.3.200.0000.06314.54
5.3.190.0070.05714.67
5.3.180.0030.03714.59
5.3.170.0030.06714.58
5.3.160.0030.06314.73
5.3.150.0000.08014.67
5.3.140.0000.07314.45
5.3.130.0030.07714.58
5.3.120.0000.07714.60
5.3.110.0000.06014.65
5.3.100.0000.06314.19
5.3.90.0070.06714.04
5.3.80.0070.06314.03
5.3.70.0100.06714.11
5.3.60.0070.03714.09
5.3.50.0100.07014.00
5.3.40.0070.06314.04
5.3.30.0070.07313.92
5.3.20.0100.06713.70
5.3.10.0000.05013.70
5.3.00.0030.05713.68
5.2.170.0070.06311.18
5.2.160.0030.02711.18
5.2.150.0000.03011.14
5.2.140.0000.06711.15
5.2.130.0070.06011.13
5.2.120.0030.06011.18
5.2.110.0000.06711.20
5.2.100.0030.06011.27
5.2.90.0100.05711.14
5.2.80.0070.05711.09
5.2.70.0130.05011.07
5.2.60.0100.05311.05
5.2.50.0000.06310.89
5.2.40.0030.06010.87
5.2.30.0000.05710.95
5.2.20.0070.04310.98
5.2.10.0100.06010.89
5.2.00.0070.05710.80
5.1.60.0070.02710.02
5.1.50.0000.04010.00
5.1.40.0030.0379.96
5.1.30.0030.05310.45
5.1.20.0030.04310.34
5.1.10.0000.04710.08
5.1.00.0100.04710.15
5.0.50.0070.0409.79
5.0.40.0000.0409.79
5.0.30.0000.0379.79
5.0.20.0030.0379.79
5.0.10.0000.0279.79
5.0.00.0100.0409.79
4.4.90.0070.0279.79
4.4.80.0070.0139.79
4.4.70.0000.0379.79
4.4.60.0070.0139.79
4.4.50.0000.0379.79
4.4.40.0000.0279.79
4.4.30.0000.0179.79
4.4.20.0030.0339.79
4.4.10.0000.0239.79
4.4.00.0030.0379.79
4.3.110.0030.0239.79
4.3.100.0000.0309.79
4.3.90.0000.0239.79
4.3.80.0000.0379.79
4.3.70.0000.0179.79
4.3.60.0030.0339.79
4.3.50.0070.0339.79
4.3.40.0030.0479.79
4.3.30.0000.0279.79
4.3.20.0030.0339.79
4.3.10.0030.0339.79
4.3.00.0030.0239.79

preferences:
53.36 ms | 401 KiB | 5 Q