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; print_r($controller); //$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.60.0100.01016.48
8.3.50.0110.00822.10
8.3.40.0070.00718.77
8.3.30.0110.00419.14
8.3.20.0050.00320.34
8.3.10.0040.00423.65
8.3.00.0040.00419.25
8.2.180.0100.01316.63
8.2.170.0040.01122.96
8.2.160.0030.01020.35
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0140.00420.72
8.2.110.0000.00922.23
8.2.100.0040.00817.84
8.2.90.0030.00619.22
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0080.00017.91
8.2.50.0040.00718.07
8.2.40.0000.00818.22
8.2.30.0040.00418.40
8.2.20.0050.00317.81
8.2.10.0040.00418.03
8.2.00.0000.00817.63
8.1.280.0040.01125.92
8.1.270.0000.00823.83
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0040.00719.15
8.1.220.0000.00917.79
8.1.210.0050.00318.77
8.1.200.0070.00417.23
8.1.190.0050.00317.23
8.1.180.0030.00618.10
8.1.170.0040.00418.59
8.1.160.0020.00522.02
8.1.150.0000.00818.71
8.1.140.0050.00217.45
8.1.130.0000.00817.77
8.1.120.0000.00717.51
8.1.110.0110.00017.48
8.1.100.0040.00417.50
8.1.90.0000.00717.39
8.1.80.0000.00717.39
8.1.70.0030.00317.44
8.1.60.0040.00417.58
8.1.50.0050.00317.40
8.1.40.0040.00417.50
8.1.30.0000.00817.66
8.1.20.0080.00017.64
8.1.10.0030.00517.59
8.1.00.0040.00417.54
8.0.300.0050.00318.77
8.0.290.0000.00917.05
8.0.280.0080.00018.47
8.0.270.0030.00316.85
8.0.260.0060.00017.20
8.0.250.0030.00316.88
8.0.240.0030.00316.88
8.0.230.0030.00316.92
8.0.220.0000.00716.91
8.0.210.0030.00316.96
8.0.200.0060.00016.93
8.0.190.0040.00417.00
8.0.180.0000.00716.89
8.0.170.0000.00817.00
8.0.160.0070.00016.80
8.0.150.0000.00716.84
8.0.140.0080.00016.91
8.0.130.0000.00613.41
8.0.120.0050.00216.94
8.0.110.0040.00416.83
8.0.100.0000.00716.77
8.0.90.0070.00016.90
8.0.80.0030.01716.98
8.0.70.0030.00516.75
8.0.60.0000.00716.98
8.0.50.0030.00516.87
8.0.30.0170.00417.21
8.0.20.0110.00717.40
8.0.10.0070.00016.89
8.0.00.0110.00916.83
7.4.330.0030.00215.00
7.4.320.0030.00316.43
7.4.300.0060.00316.68
7.4.290.0070.00016.54
7.4.280.0080.00016.65
7.4.270.0030.00316.55
7.4.260.0000.00716.59
7.4.250.0040.00416.43
7.4.240.0050.00316.59
7.4.230.0040.00416.28
7.4.220.0100.01016.40
7.4.210.0050.00816.47
7.4.200.0000.00716.53
7.4.190.0000.00716.49
7.4.160.0090.00616.30
7.4.150.0090.00917.40
7.4.140.0080.01017.86
7.4.130.0110.00616.64
7.4.120.0070.01016.60
7.4.110.0140.00316.50
7.4.100.0120.00616.50
7.4.90.0100.01016.66
7.4.80.0110.00619.39
7.4.70.0090.00916.66
7.4.60.0090.00916.41
7.4.50.0000.00416.34
7.4.40.0030.01616.41
7.4.30.0100.00716.57
7.4.00.0050.01314.82
7.3.330.0000.00613.25
7.3.320.0000.00713.45
7.3.310.0030.00316.29
7.3.300.0030.00316.34
7.3.290.0030.01016.36
7.3.280.0100.00916.37
7.3.270.0030.01417.40
7.3.260.0120.00616.56
7.3.250.0130.00716.53
7.3.240.0130.00316.46
7.3.230.0160.00716.45
7.3.210.0070.01016.36
7.3.200.0060.01619.39
7.3.190.0030.01616.52
7.3.180.0100.01016.68
7.3.170.0130.00616.49
7.3.160.0070.01016.47
7.3.120.0100.00714.87
7.3.110.0040.01514.92
7.3.100.0070.00714.82
7.3.90.0030.01014.66
7.3.80.0070.00715.12
7.3.70.0000.01314.91
7.3.60.0070.00714.96
7.3.50.0030.01214.57
7.3.40.0040.01114.93
7.3.30.0090.00314.57
7.3.20.0040.00816.88
7.3.10.0100.00316.46
7.3.00.0070.00716.37
7.2.330.0070.01116.74
7.2.320.0100.01016.85
7.2.310.0160.00016.57
7.2.300.0070.01716.51
7.2.290.0090.00916.78
7.2.250.0130.00614.80
7.2.240.0100.01015.32
7.2.230.0100.00315.04
7.2.220.0100.00315.02
7.2.210.0090.00614.99
7.2.200.0100.00315.05
7.2.190.0060.00914.90
7.2.180.0060.00914.91
7.2.170.0120.00014.79
7.2.60.0040.01116.77
7.2.00.0090.00619.54
7.1.330.0100.00615.96
7.1.320.0040.01115.91
7.1.310.0060.00616.02
7.1.300.0030.01415.87
7.1.290.0000.01615.62
7.1.280.0040.01215.80
7.1.270.0040.00815.75
7.1.260.0070.00716.07
7.1.200.0110.00415.90
7.1.100.0030.00618.23
7.1.70.0100.00317.03
7.1.60.0060.00617.25
7.1.50.0090.01216.63
7.1.00.0030.07322.36
7.0.200.0000.01716.53
7.0.140.0000.07721.96
7.0.60.0100.07319.81
7.0.50.0070.05017.89
7.0.40.0030.08720.27
7.0.30.0270.03720.15
7.0.20.0330.08020.11
7.0.10.0030.09320.15
7.0.00.0030.04020.27
5.6.280.0030.07020.97
5.6.210.0030.09020.62
5.6.200.0030.07018.27
5.6.190.0070.04320.48
5.6.180.0330.06320.75
5.6.170.0200.04020.71
5.6.160.0070.04320.45
5.6.150.0000.05018.21
5.6.140.0030.04018.29
5.6.130.0130.05018.18
5.6.120.0030.08721.14
5.6.110.0030.04320.99
5.6.100.0100.08020.91
5.6.90.0070.08720.99
5.6.80.0070.07020.43
5.5.350.0270.07720.54
5.5.340.0070.07017.98
5.5.330.0000.05720.21
5.5.320.0300.04720.24
5.5.310.0300.08720.30
5.5.300.0070.08017.98
5.5.290.0000.05018.01
5.5.280.0130.08020.71
5.5.270.0070.05720.90
5.5.260.0100.08320.79
5.5.250.0000.06020.49
5.5.240.0130.07320.30
5.4.450.0300.03719.52
5.4.440.0100.05019.52
5.4.430.0330.04319.38
5.4.420.0770.03319.52
5.4.410.0330.04719.17
5.4.400.0200.03349.64
5.4.390.0200.04745.53
5.4.380.0270.05318.53
5.4.370.0100.06718.62
5.4.360.0170.04718.76
5.4.350.0100.05718.74
5.4.340.0130.05318.75
5.4.320.0070.03712.53
5.4.310.0090.03812.52
5.4.300.0110.04412.52
5.4.290.0130.09312.52
5.4.280.0110.06212.42
5.4.270.0140.04812.42
5.4.260.0100.05312.41
5.4.250.0110.05012.41
5.4.240.0110.03812.41
5.4.230.0100.04012.41
5.4.220.0080.04612.40
5.4.210.0060.04812.41
5.4.200.0080.04712.41
5.4.190.0070.04812.40
5.4.180.0080.04412.40
5.4.170.0080.04912.41
5.4.160.0160.04212.41
5.4.150.0110.04512.40
5.4.140.0100.05212.09
5.4.130.0090.04812.08
5.4.120.0150.06412.04
5.4.110.0120.05112.03
5.4.100.0100.04812.03
5.4.90.0090.04812.03
5.4.80.0040.05512.03
5.4.70.0110.05812.03
5.4.60.0130.04312.03
5.4.50.0060.05112.02
5.4.40.0130.04112.02
5.4.30.0160.06812.01
5.4.20.0040.06912.01
5.4.10.0150.09212.01
5.4.00.0150.05511.50
5.3.290.0080.04412.80
5.3.280.0180.08612.71
5.3.270.0140.06112.72
5.3.260.0130.04612.72
5.3.250.0090.04512.72
5.3.240.0050.04812.72
5.3.230.0100.04212.71
5.3.220.0080.04512.68
5.3.210.0090.04812.68
5.3.200.0120.05312.68
5.3.190.0090.04412.68
5.3.180.0070.04212.68
5.3.170.0130.04612.67
5.3.160.0100.04712.67
5.3.150.0110.04612.68
5.3.140.0050.05012.66
5.3.130.0080.04712.66
5.3.120.0070.05512.66
5.3.110.0140.04312.66
5.3.100.0070.05312.14
5.3.90.0140.04812.12
5.3.80.0110.04912.12
5.3.70.0090.05712.12
5.3.60.0080.05212.09
5.3.50.0110.04612.05
5.3.40.0090.04712.05
5.3.30.0060.05412.00
5.3.20.0100.07411.79
5.3.10.0170.09411.75
5.3.00.0110.06111.74
5.2.170.0110.0409.25
5.2.160.0100.0439.25
5.2.150.0060.0479.25
5.2.140.0060.0429.24
5.2.130.0070.0409.20
5.2.120.0090.0419.20
5.2.110.0080.0369.21
5.2.100.0050.0409.20
5.2.90.0060.0399.21
5.2.80.0080.0409.20
5.2.70.0090.0379.20
5.2.60.0080.0389.14
5.2.50.0130.0349.12
5.2.40.0100.0369.09
5.2.30.0060.0439.08
5.2.20.0100.0349.06
5.2.10.0080.0358.97
5.2.00.0060.0388.83
5.1.60.0100.0288.12
5.1.50.0050.0338.11
5.1.40.0060.0338.09
5.1.30.0080.0328.45
5.1.20.0060.0388.46
5.1.10.0110.0438.20
5.1.00.0080.0558.20
5.0.50.0090.0296.67
5.0.40.0050.0326.53
5.0.30.0030.0376.34
5.0.20.0030.0236.30
5.0.10.0030.0256.29
5.0.00.0050.0346.28
4.4.90.0020.0204.78
4.4.80.0050.0144.76
4.4.70.0000.0204.75
4.4.60.0040.0184.75
4.4.50.0050.0204.77
4.4.40.0060.0414.71
4.4.30.0070.0184.76
4.4.20.0050.0204.85
4.4.10.0030.0234.85
4.4.00.0090.0284.76
4.3.110.0090.0314.67
4.3.100.0060.0194.66
4.3.90.0040.0194.63
4.3.80.0040.0304.59
4.3.70.0040.0204.63
4.3.60.0040.0194.63
4.3.50.0050.0204.63
4.3.40.0040.0414.54
4.3.30.0030.0223.31
4.3.20.0020.0223.29
4.3.10.0030.0213.25
4.3.00.0070.01743.84

preferences:
50.6 ms | 401 KiB | 5 Q