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::getRoute($this->url)) { list($controller, $action) = $route; $controllerObj = new $controller; $controllerObj->$action(); print_r(get_object_vars($controllerObj)); //template } else { print_r('404'); } } } class Routes { static $routes = array(); static function add($route, $controller, $action) { self::$routes[$route] = array($controller.'Controller', $action); } static function getRoutes() { return self::$routes; } static function getRoute($url) { return self::$routes[$url]; } } abstract class Model { // connect to DB and etc. } // controllers/BookController.php class BooksController { function index() { $this->books = Book::all(); } function show() { $id = 1; $this->book = Book::find(1); } } // models/Book.php class Book { static function all() { $books = array('Book', 'Book', 'Book'); return $books; } static function find() { $book = 'Book'; return $book; } } Routes::add('/books', 'Books', 'index'); Routes::add('/books/:id', 'Books', 'show'); $url = '/books2'; 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.0070.01118.68
8.3.50.0100.00722.11
8.3.40.0090.00619.01
8.3.30.0170.00019.21
8.3.20.0040.00420.26
8.3.10.0000.00823.48
8.3.00.0030.00519.12
8.2.180.0160.00316.86
8.2.170.0140.00722.96
8.2.160.0130.00020.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0050.00320.89
8.2.110.0000.00920.53
8.2.100.0080.00418.03
8.2.90.0050.00319.26
8.2.80.0000.00917.97
8.2.70.0100.00017.63
8.2.60.0050.00318.00
8.2.50.0050.00518.07
8.2.40.0000.00818.16
8.2.30.0040.00418.27
8.2.20.0030.00617.78
8.2.10.0030.00518.16
8.2.00.0000.00817.84
8.1.280.0000.01425.92
8.1.270.0060.00323.79
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0060.00323.91
8.1.230.0040.00721.01
8.1.220.0000.00817.78
8.1.210.0080.00018.77
8.1.200.0000.00917.36
8.1.190.0040.00417.38
8.1.180.0000.00918.10
8.1.170.0040.00418.64
8.1.160.0060.00322.04
8.1.150.0000.00718.64
8.1.140.0040.00417.39
8.1.130.0000.00717.96
8.1.120.0030.00417.52
8.1.110.0030.00617.54
8.1.100.0070.00017.48
8.1.90.0000.00717.52
8.1.80.0030.00517.54
8.1.70.0060.00317.45
8.1.60.0030.00617.52
8.1.50.0040.00417.50
8.1.40.0040.00417.44
8.1.30.0030.00517.64
8.1.20.0000.00917.58
8.1.10.0050.00317.67
8.1.00.0000.00817.52
8.0.300.0000.00818.77
8.0.290.0040.00417.28
8.0.280.0000.00718.47
8.0.270.0040.00417.19
8.0.260.0030.00317.16
8.0.250.0000.00616.96
8.0.240.0000.00617.05
8.0.230.0030.00317.04
8.0.220.0030.00316.98
8.0.210.0070.00316.96
8.0.200.0060.00017.04
8.0.190.0030.00316.88
8.0.180.0070.00017.06
8.0.170.0040.00416.94
8.0.160.0040.00416.99
8.0.150.0000.00816.96
8.0.140.0040.00416.98
8.0.130.0000.00713.40
8.0.120.0040.00416.96
8.0.110.0000.00716.91
8.0.100.0000.00816.89
8.0.90.0000.00716.88
8.0.80.0130.00917.05
8.0.70.0040.00417.00
8.0.60.0040.00416.95
8.0.50.0040.00416.82
8.0.30.0070.01217.12
8.0.20.0140.00717.40
8.0.10.0040.00417.06
8.0.00.0100.00816.60
7.4.330.0050.00015.00
7.4.320.0000.00716.65
7.4.300.0070.00016.65
7.4.290.0070.00016.68
7.4.280.0000.00716.66
7.4.270.0030.00316.54
7.4.260.0030.00316.66
7.4.250.0030.00616.54
7.4.240.0020.00516.48
7.4.230.0000.00716.39
7.4.220.0110.00816.70
7.4.210.0000.01416.43
7.4.200.0040.00416.72
7.4.190.0070.00016.80
7.4.160.0030.01216.68
7.4.150.0120.00617.40
7.4.140.0080.00917.86
7.4.130.0120.00816.59
7.4.120.0060.01116.56
7.4.110.0120.00616.50
7.4.100.0170.00916.61
7.4.90.0130.00616.48
7.4.80.0030.01319.39
7.4.70.0120.00916.53
7.4.60.0090.00816.43
7.4.50.0080.00016.54
7.4.40.0040.01916.36
7.4.30.0060.01016.66
7.4.00.0000.01714.95
7.3.330.0000.00713.45
7.3.320.0000.00713.40
7.3.310.0000.00716.35
7.3.300.0070.00016.32
7.3.290.0130.00616.41
7.3.280.0110.00816.47
7.3.270.0070.01117.40
7.3.260.0170.00016.40
7.3.250.0070.01016.54
7.3.240.0110.00716.51
7.3.230.0030.01316.55
7.3.210.0030.01416.48
7.3.200.0150.00319.39
7.3.190.0050.01916.63
7.3.180.0060.00916.43
7.3.170.0120.00916.46
7.3.160.0040.01216.47
7.3.120.0060.00915.14
7.2.330.0030.01516.80
7.2.320.0060.01516.75
7.2.310.0130.00916.82
7.2.300.0030.01316.70
7.2.290.0110.00616.75
7.2.00.0070.01019.44
7.1.100.0090.00318.25
7.1.70.0020.00517.04
7.1.60.0090.01619.70
7.1.50.0190.00434.87
7.1.00.0070.07022.40
7.0.200.0220.00714.82
7.0.140.0130.06322.16
7.0.60.0030.06719.81
7.0.50.0100.07018.00
7.0.40.0000.05720.21
7.0.30.0400.08020.25
7.0.20.0200.06020.12
7.0.10.0100.07720.07
7.0.00.0030.04320.05
5.6.280.0030.07320.95
5.6.210.0030.05020.62
5.6.200.0100.08318.19
5.6.190.0030.05720.43
5.6.180.0400.06720.68
5.6.170.0200.08020.45
5.6.160.0030.09020.50
5.6.150.0030.07018.25
5.6.140.0030.04018.21
5.6.130.0070.04718.27
5.6.120.0070.08321.01
5.6.110.0030.04021.15
5.6.100.0030.06720.99
5.6.90.0030.05321.14
5.6.80.0200.07020.43
5.5.350.0230.07020.34
5.5.340.0070.07318.11
5.5.330.0130.06720.28
5.5.320.0430.06020.24
5.5.310.0330.03320.41
5.5.300.0070.06717.95
5.5.290.0130.03718.05
5.5.280.0030.04720.79
5.5.270.0030.08720.75
5.5.260.0100.07320.82
5.5.250.0030.08320.57
5.5.240.0030.03320.18
5.4.450.0130.04719.52
5.4.440.0300.05019.52
5.4.430.0270.04719.57
5.4.420.0270.04319.52
5.4.410.0200.04319.17
5.4.400.0070.04019.07
5.4.390.0730.04718.88
5.4.380.0070.06318.77
5.4.370.0130.05318.77
5.4.360.0070.05718.51
5.4.350.0130.05318.75
5.4.340.0170.07018.50
5.4.320.0120.03212.53
5.4.310.0090.03912.52
5.4.300.0080.05012.52
5.4.290.0040.05812.52
5.4.280.0120.06012.41
5.4.270.0120.04912.41
5.4.260.0080.05712.41
5.4.250.0080.05512.41
5.4.240.0080.05712.41
5.4.230.0060.04012.41
5.4.220.0080.03712.40
5.4.210.0060.03512.41
5.4.200.0080.04012.41
5.4.190.0050.03712.40
5.4.180.0110.03712.40
5.4.170.0130.04012.41
5.4.160.0030.04712.41
5.4.150.0050.04812.41
5.4.140.0060.06412.09
5.4.130.0070.04912.08
5.4.120.0070.04112.03
5.4.110.0040.04212.03
5.4.100.0030.03912.03
5.4.90.0080.03912.03
5.4.80.0030.04412.04
5.4.70.0030.03812.03
5.4.60.0090.03212.03
5.4.50.0030.03912.03
5.4.40.0050.03512.02
5.4.30.0060.03512.01
5.4.20.0090.04212.01
5.4.10.0040.03612.02
5.4.00.0070.03711.50
5.3.290.0050.04012.80
5.3.280.0070.05112.71
5.3.270.0090.05412.72
5.3.260.0060.05312.72
5.3.250.0060.03912.72
5.3.240.0090.05612.72
5.3.230.0110.03512.71
5.3.220.0050.04112.68
5.3.210.0080.04812.68
5.3.200.0080.04512.69
5.3.190.0070.04912.67
5.3.180.0080.05012.68
5.3.170.0080.04212.67
5.3.160.0070.03512.67
5.3.150.0070.03712.67
5.3.140.0040.04112.66
5.3.130.0070.04212.66
5.3.120.0040.04612.66
5.3.110.0050.04412.66
5.3.100.0030.04012.14
5.3.90.0080.03812.12
5.3.80.0030.04212.11
5.3.70.0070.03912.11
5.3.60.0060.03912.09
5.3.50.0040.03712.05
5.3.40.0080.03412.05
5.3.30.0060.03512.00
5.3.20.0080.03311.79
5.3.10.0050.03611.75
5.3.00.0050.03811.74
5.2.170.0050.0369.24
5.2.160.0060.0309.24
5.2.150.0050.0339.24
5.2.140.0070.0369.24
5.2.130.0070.0379.20
5.2.120.0070.0359.20
5.2.110.0070.0389.21
5.2.100.0050.0399.21
5.2.90.0080.0379.20
5.2.80.0090.0409.20
5.2.70.0070.0409.20
5.2.60.0040.0409.15
5.2.50.0020.0369.12
5.2.40.0050.0309.09
5.2.30.0090.0319.08
5.2.20.0070.0299.06
5.2.10.0060.0298.97
5.2.00.0050.0328.83
5.1.60.0080.0258.12
5.1.50.0070.0338.12
5.1.40.0040.0378.10
5.1.30.0030.0408.45
5.1.20.0060.0388.47
5.1.10.0080.0348.19
5.1.00.0080.0358.19
5.0.50.0040.0286.68
5.0.40.0040.0286.53
5.0.30.0040.0426.34
5.0.20.0040.0276.31
5.0.10.0040.0236.29
5.0.00.0050.0346.28
4.4.90.0050.0144.78
4.4.80.0020.0184.76
4.4.70.0030.0164.75
4.4.60.0060.0144.76
4.4.50.0020.0194.77
4.4.40.0010.0324.71
4.4.30.0030.0194.76
4.4.20.0040.0214.84
4.4.10.0040.0214.85
4.4.00.0030.0314.76
4.3.110.0010.0244.67
4.3.100.0050.0194.67
4.3.90.0030.0214.63
4.3.80.0050.0754.59
4.3.70.0040.0154.63
4.3.60.0020.0184.63
4.3.50.0020.0194.63
4.3.40.0040.0254.54
4.3.30.0050.0153.31
4.3.20.0020.0173.29
4.3.10.0040.0163.25
4.3.00.0070.01316.92

preferences:
41.98 ms | 401 KiB | 5 Q