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(); //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() { $books = Book::all(); } function show() { $id = 1; $books = 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 = '/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.70.0110.00416.88
8.3.60.0100.01018.55
8.3.50.0100.00822.18
8.3.40.0170.00318.96
8.3.30.0040.01119.30
8.3.20.0060.00320.29
8.3.10.0090.00023.69
8.3.00.0030.00519.02
8.2.180.0060.00916.75
8.2.170.0040.01122.96
8.2.160.0000.01320.52
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0100.00620.79
8.2.110.0000.00922.31
8.2.100.0060.00617.84
8.2.90.0080.00019.21
8.2.80.0000.00817.97
8.2.70.0100.00317.38
8.2.60.0090.00017.93
8.2.50.0000.01018.07
8.2.40.0000.00718.34
8.2.30.0070.00018.37
8.2.20.0000.00717.91
8.2.10.0040.00418.04
8.2.00.0020.00517.88
8.1.280.0070.01425.92
8.1.270.0100.00023.88
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0000.01021.90
8.1.230.0040.00819.02
8.1.220.0020.00517.74
8.1.210.0040.00418.77
8.1.200.0000.00817.35
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0000.00818.66
8.1.160.0000.00722.04
8.1.150.0040.00418.67
8.1.140.0080.00017.39
8.1.130.0000.00717.78
8.1.120.0030.00317.49
8.1.110.0040.00817.53
8.1.100.0000.00717.50
8.1.90.0030.00517.38
8.1.80.0000.00817.45
8.1.70.0030.00317.38
8.1.60.0070.00017.52
8.1.50.0050.00317.55
8.1.40.0070.00017.59
8.1.30.0040.00417.69
8.1.20.0000.00817.65
8.1.10.0040.00417.60
8.1.00.0000.00817.43
8.0.300.0040.00418.77
8.0.290.0040.00417.05
8.0.280.0000.00818.47
8.0.270.0000.00817.18
8.0.260.0030.00317.25
8.0.250.0050.00316.94
8.0.240.0000.00716.95
8.0.230.0050.00216.91
8.0.220.0050.00216.89
8.0.210.0000.00716.98
8.0.200.0000.00616.92
8.0.190.0000.00917.03
8.0.180.0000.00716.84
8.0.170.0050.00216.99
8.0.160.0000.00816.88
8.0.150.0030.00516.89
8.0.140.0020.00516.94
8.0.130.0030.00313.42
8.0.120.0000.00716.96
8.0.110.0000.00816.82
8.0.100.0040.00417.00
8.0.90.0050.00217.01
8.0.80.0040.01116.95
8.0.70.0000.00717.00
8.0.60.0070.00017.02
8.0.50.0030.00516.95
8.0.30.0070.01417.31
8.0.20.0130.00617.40
8.0.10.0050.00217.14
8.0.00.0060.01216.78
7.4.330.0050.00015.00
7.4.320.0000.00616.54
7.4.300.0080.00016.55
7.4.290.0050.00316.64
7.4.280.0080.00016.63
7.4.270.0000.00716.64
7.4.260.0000.00816.62
7.4.250.0070.00016.45
7.4.240.0060.00116.64
7.4.230.0050.00216.46
7.4.220.0210.00316.68
7.4.210.0060.00916.66
7.4.200.0070.00016.53
7.4.190.0030.00316.35
7.4.160.0070.01116.37
7.4.150.0140.00317.40
7.4.140.0080.01217.86
7.4.130.0090.00816.68
7.4.120.0170.00516.60
7.4.110.0100.01316.44
7.4.100.0140.00516.61
7.4.90.0060.01216.62
7.4.80.0070.01119.39
7.4.70.0110.00616.39
7.4.60.0120.00616.38
7.4.50.0000.00816.59
7.4.40.0070.01716.47
7.4.30.0100.00616.75
7.4.00.0070.01014.79
7.3.330.0050.00013.48
7.3.320.0030.00313.46
7.3.310.0030.00316.46
7.3.300.0040.00416.34
7.3.290.0030.01116.51
7.3.280.0080.01116.48
7.3.270.0100.00717.40
7.3.260.0100.01316.64
7.3.250.0110.00716.50
7.3.240.0140.00416.71
7.3.230.0180.00616.51
7.3.210.0110.00716.51
7.3.200.0070.01119.39
7.3.190.0090.01316.38
7.3.180.0030.01516.55
7.3.170.0120.00316.39
7.3.160.0150.00616.59
7.3.120.0000.01415.11
7.2.330.0100.00716.70
7.2.320.0120.00416.37
7.2.310.0100.00616.70
7.2.300.0090.01316.37
7.2.290.0120.00916.56
7.2.60.0120.00317.07
7.2.00.0060.00819.44
7.1.200.0000.00915.94
7.1.100.0000.00918.11
7.1.70.0060.00616.98
7.1.60.0000.02419.70
7.1.50.0080.01216.92
7.1.00.0100.06322.55
7.0.200.0120.00416.79
7.0.140.0100.06722.08
7.0.60.0170.03720.06
7.0.50.0030.07017.91
7.0.40.0000.06320.11
7.0.30.0300.06320.25
7.0.20.0100.05320.11
7.0.10.0130.05020.23
7.0.00.0130.06720.02
5.6.280.0000.07720.93
5.6.210.0070.07720.73
5.6.200.0130.05018.16
5.6.190.0000.04720.63
5.6.180.0000.07720.48
5.6.170.0100.04720.71
5.6.160.0030.05720.44
5.6.150.0100.07018.16
5.6.140.0030.08318.13
5.6.130.0070.07718.16
5.6.120.0030.08021.14
5.6.110.0130.07320.99
5.6.100.0170.05321.06
5.6.90.0070.08721.12
5.6.80.0070.05320.38
5.5.350.0170.05720.39
5.5.340.0070.07717.99
5.5.330.0030.04320.28
5.5.320.0470.07020.51
5.5.310.0270.08020.41
5.5.300.0000.04317.98
5.5.290.0200.05718.04
5.5.280.0130.07720.89
5.5.270.0100.06720.88
5.5.260.0030.05020.74
5.5.250.0070.08320.72
5.5.240.0330.07320.26
5.4.450.0270.04319.64
5.4.440.0630.05319.42
5.4.430.0330.03719.30
5.4.420.0570.03019.40
5.4.410.0300.04019.24
5.4.400.0170.03751.95
5.4.390.0500.03749.59
5.4.380.0800.06018.80
5.4.370.0600.06018.74
5.4.360.0730.05718.78
5.4.350.0700.06018.53
5.4.340.0870.05718.54
5.4.320.0060.03612.52
5.4.310.0100.04612.52
5.4.300.0110.04712.52
5.4.290.0150.04812.52
5.4.280.0100.04212.41
5.4.270.0090.04512.41
5.4.260.0110.04012.41
5.4.250.0090.04012.41
5.4.240.0140.05112.41
5.4.230.0090.05612.40
5.4.220.0140.04312.41
5.4.210.0070.04612.41
5.4.200.0040.04412.41
5.4.190.0080.04512.40
5.4.180.0100.05112.40
5.4.170.0080.05712.41
5.4.160.0070.05112.41
5.4.150.0080.03612.41
5.4.140.0100.04812.09
5.4.130.0090.05212.08
5.4.120.0090.05512.04
5.4.110.0130.04912.03
5.4.100.0090.04912.03
5.4.90.0090.05212.03
5.4.80.0100.05012.03
5.4.70.0130.04512.03
5.4.60.0170.04112.03
5.4.50.0060.05512.03
5.4.40.0210.08312.02
5.4.30.0130.04512.01
5.4.20.0110.05012.02
5.4.10.0120.04712.02
5.4.00.0120.05111.51
5.3.290.0050.04212.80
5.3.280.0100.04712.71
5.3.270.0110.04312.72
5.3.260.0100.05512.72
5.3.250.0120.05412.72
5.3.240.0090.05012.72
5.3.230.0060.04812.71
5.3.220.0120.04812.68
5.3.210.0090.05212.68
5.3.200.0200.07212.68
5.3.190.0080.06112.68
5.3.180.0140.05712.67
5.3.170.0140.04912.67
5.3.160.0100.05812.67
5.3.150.0100.05412.68
5.3.140.0080.05412.66
5.3.130.0080.05512.66
5.3.120.0080.06012.66
5.3.110.0070.05612.66
5.3.100.0090.05412.14
5.3.90.0090.05912.12
5.3.80.0080.05912.12
5.3.70.0150.05612.12
5.3.60.0110.05612.10
5.3.50.0090.05312.05
5.3.40.0120.06312.05
5.3.30.0120.05712.01
5.3.20.0060.05811.79
5.3.10.0080.06211.75
5.3.00.0120.07611.74
5.2.170.0080.0589.25
5.2.160.0080.0509.25
5.2.150.0080.0579.25
5.2.140.0100.0489.25
5.2.130.0080.0489.20
5.2.120.0050.0499.20
5.2.110.0080.0449.20
5.2.100.0090.0519.21
5.2.90.0100.0419.21
5.2.80.0050.0519.20
5.2.70.0070.0419.21
5.2.60.0090.0339.16
5.2.50.0080.0309.13
5.2.40.0080.0299.10
5.2.30.0050.0409.08
5.2.20.0050.0409.06
5.2.10.0070.0298.97
5.2.00.0050.0358.84
5.1.60.0100.0228.12
5.1.50.0020.0308.12
5.1.40.0050.0308.09
5.1.30.0110.0468.45
5.1.20.0050.0318.48
5.1.10.0020.0348.20
5.1.00.0040.0378.20
5.0.50.0040.0396.67
5.0.40.0040.0326.54
5.0.30.0040.0386.35
5.0.20.0040.0236.31
5.0.10.0050.0236.29
5.0.00.0040.0366.29
4.4.90.0060.0144.77
4.4.80.0050.0254.76
4.4.70.0040.0254.75
4.4.60.0040.0234.76
4.4.50.0110.0334.77
4.4.40.0130.0914.71
4.4.30.0060.0194.76
4.4.20.0060.0174.84
4.4.10.0050.0174.85
4.4.00.0070.0304.76
4.3.110.0030.0244.67
4.3.100.0060.0214.67
4.3.90.0070.0184.64
4.3.80.0030.0344.58
4.3.70.0050.0204.63
4.3.60.0070.0174.63
4.3.50.0050.0214.63
4.3.40.0070.0304.53
4.3.30.0050.0213.31
4.3.20.0030.0273.29
4.3.10.0050.0213.25
4.3.00.0070.01346.74

preferences:
38.88 ms | 401 KiB | 5 Q