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() { $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.01018.68
8.3.50.0130.00522.06
8.3.40.0090.01218.92
8.3.30.0130.00319.34
8.3.20.0080.00020.29
8.3.10.0050.00323.42
8.3.00.0050.00319.16
8.2.180.0110.00716.88
8.2.170.0110.00322.96
8.2.160.0110.00320.57
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00620.73
8.2.110.0040.00422.14
8.2.100.0070.00417.84
8.2.90.0000.00919.34
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0030.00618.02
8.2.50.0000.01118.07
8.2.40.0030.00518.34
8.2.30.0000.00718.27
8.2.20.0050.00317.84
8.2.10.0040.00418.14
8.2.00.0000.00717.93
8.1.280.0150.00325.92
8.1.270.0000.00823.91
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0070.00321.98
8.1.230.0040.00819.23
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0060.00317.48
8.1.190.0060.00317.35
8.1.180.0030.00618.10
8.1.170.0000.00818.57
8.1.160.0030.00622.05
8.1.150.0000.00718.58
8.1.140.0000.00717.49
8.1.130.0040.00417.76
8.1.120.0030.00317.46
8.1.110.0030.00617.48
8.1.100.0000.00817.55
8.1.90.0000.00717.49
8.1.80.0000.00817.51
8.1.70.0000.00717.36
8.1.60.0050.00317.49
8.1.50.0030.00617.52
8.1.40.0040.00417.50
8.1.30.0050.00317.69
8.1.20.0030.00517.68
8.1.10.0050.00217.53
8.1.00.0000.00817.42
8.0.300.0070.00018.77
8.0.290.0070.00017.16
8.0.280.0000.00718.48
8.0.270.0030.00317.29
8.0.260.0030.00317.20
8.0.250.0030.00317.04
8.0.240.0040.00416.98
8.0.230.0030.00317.08
8.0.220.0030.00317.01
8.0.210.0070.00317.03
8.0.200.0060.00017.03
8.0.190.0040.00417.02
8.0.180.0070.00016.92
8.0.170.0040.00417.02
8.0.160.0040.00416.82
8.0.150.0020.00516.91
8.0.140.0040.00417.00
8.0.130.0060.00013.41
8.0.120.0040.00416.91
8.0.110.0000.00816.92
8.0.100.0040.00417.03
8.0.90.0040.00417.03
8.0.80.0060.00916.91
8.0.70.0000.00816.95
8.0.60.0000.00716.94
8.0.50.0030.00516.94
8.0.30.0090.00917.00
8.0.20.0110.00917.40
8.0.10.0000.00717.14
8.0.00.0110.00716.96
7.4.330.0050.00015.00
7.4.320.0030.00316.65
7.4.300.0060.00016.39
7.4.290.0000.00716.44
7.4.280.0000.00816.64
7.4.270.0040.00416.55
7.4.260.0000.00816.38
7.4.250.0070.00016.50
7.4.240.0040.00316.55
7.4.230.0000.00716.33
7.4.220.0160.01016.40
7.4.210.0100.01016.73
7.4.200.0030.00316.53
7.4.190.0000.00716.71
7.4.160.0130.00316.52
7.4.150.0050.01417.40
7.4.140.0080.01017.86
7.4.130.0070.01416.47
7.4.120.0100.01016.64
7.4.110.0100.00716.47
7.4.100.0040.01416.49
7.4.90.0090.00916.47
7.4.80.0160.00619.39
7.4.70.0100.00616.59
7.4.60.0130.00316.43
7.4.50.0040.00416.47
7.4.40.0110.01216.63
7.4.30.0030.01316.67
7.4.00.0130.00315.02
7.3.330.0000.00613.44
7.3.320.0000.00513.47
7.3.310.0000.00716.50
7.3.300.0000.00716.32
7.3.290.0000.01416.44
7.3.280.0080.00916.46
7.3.270.0100.00717.40
7.3.260.0100.01016.41
7.3.250.0130.00316.43
7.3.240.0040.01516.47
7.3.230.0060.01216.53
7.3.210.0100.00716.42
7.3.200.0120.00619.39
7.3.190.0110.01116.47
7.3.180.0090.00616.39
7.3.170.0000.01516.47
7.3.160.0100.01016.54
7.3.120.0050.01114.92
7.3.110.0000.01514.92
7.3.100.0090.00314.68
7.3.90.0060.00914.71
7.3.80.0000.01415.08
7.3.70.0040.01414.87
7.3.60.0040.01115.00
7.3.50.0070.01014.70
7.3.40.0030.01414.73
7.3.30.0030.00614.86
7.3.20.0030.00616.75
7.3.10.0090.00516.65
7.3.00.0070.00816.52
7.2.330.0140.00416.90
7.2.320.0070.01116.84
7.2.310.0140.00916.62
7.2.300.0030.01316.72
7.2.290.0030.02016.53
7.2.250.0050.01415.19
7.2.240.0130.00315.28
7.2.230.0030.01314.86
7.2.220.0070.00714.86
7.2.210.0100.00715.34
7.2.200.0000.01315.18
7.2.190.0000.01814.89
7.2.180.0060.00315.30
7.2.170.0100.01014.85
7.2.130.0040.01116.79
7.2.120.0030.01016.84
7.2.110.0090.00616.59
7.2.100.0040.01216.79
7.2.90.0100.00316.88
7.2.80.0060.00616.88
7.2.70.0060.00916.68
7.2.60.0000.01416.87
7.2.50.0130.00016.89
7.2.40.0000.01616.73
7.2.30.0090.00916.50
7.2.20.0030.00716.92
7.2.10.0070.00716.99
7.2.00.0060.00618.23
7.1.330.0000.01515.96
7.1.320.0070.00715.54
7.1.310.0040.01115.95
7.1.300.0040.00715.98
7.1.290.0000.01315.62
7.1.280.0100.00315.51
7.1.270.0090.00915.87
7.1.260.0070.00715.72
7.1.250.0060.00915.70
7.1.200.0140.00015.71
7.1.100.0000.01118.29
7.1.70.0090.00317.16
7.1.60.0110.01419.70
7.1.50.0250.01334.94
7.1.00.0000.08022.54
7.0.200.0080.00416.74
7.0.140.0030.07321.93
7.0.60.0130.07319.85
7.0.50.0070.05717.91
7.0.40.0070.08020.18
7.0.30.0270.08320.10
7.0.20.0370.07320.16
7.0.10.0200.03720.08
7.0.00.0000.05020.29
5.6.280.0070.07021.01
5.6.210.0170.03720.77
5.6.200.0100.08318.14
5.6.190.0070.04020.39
5.6.180.0030.07320.41
5.6.170.0100.04720.45
5.6.160.0100.08020.39
5.6.150.0000.08018.18
5.6.140.0000.05018.16
5.6.130.0170.02718.21
5.6.120.0070.08021.02
5.6.110.0030.04320.98
5.6.100.0100.04020.98
5.6.90.0030.05321.00
5.6.80.0200.07320.40
5.6.70.0230.07020.45
5.5.350.0070.08320.41
5.5.340.0170.06717.99
5.5.330.0070.04320.34
5.5.320.0470.07020.34
5.5.310.0300.06720.37
5.5.300.0130.07317.97
5.5.290.0030.08017.96
5.5.280.0100.07320.89
5.5.270.0030.06020.77
5.5.260.0030.04320.79
5.5.250.0070.05720.49
5.5.240.0070.06320.07
5.4.450.0500.04319.39
5.4.440.0270.03719.45
5.4.430.0270.05319.45
5.4.420.0200.03719.27
5.4.410.0270.04319.27
5.4.400.0500.03749.64
5.4.390.0730.03346.74
5.4.380.0770.05718.80
5.4.370.0930.04318.75
5.4.360.0830.05318.59
5.4.350.1200.04318.52
5.4.340.0870.05018.59
5.4.320.0070.03512.52
5.4.310.0100.03612.52
5.4.300.0070.05112.52
5.4.290.0080.05612.52
5.4.280.0080.05312.41
5.4.270.0090.05112.41
5.4.260.0080.05612.42
5.4.250.0130.05212.41
5.4.240.0060.05612.41
5.4.230.0110.05312.41
5.4.220.0110.05412.40
5.4.210.0100.06112.40
5.4.200.0060.06012.40
5.4.190.0100.05112.40
5.4.180.0120.05112.40
5.4.170.0050.06012.41
5.4.160.0180.11212.41
5.4.150.0120.09712.40
5.4.140.0110.04712.09
5.4.130.0110.05012.07
5.4.120.0100.05412.03
5.4.110.0070.05712.03
5.4.100.0090.05312.04
5.4.90.0080.06412.03
5.4.80.0100.05412.04
5.4.70.0080.05512.03
5.4.60.0100.05312.03
5.4.50.0120.05612.02
5.4.40.0100.05312.02
5.4.30.0070.05112.01
5.4.20.0070.05712.01
5.4.10.0110.05512.01
5.4.00.0100.03711.50
5.3.290.0060.04012.80
5.3.280.0100.04512.71
5.3.270.0100.04712.72
5.3.260.0110.05112.72
5.3.250.0090.06012.72
5.3.240.0040.04812.72
5.3.230.0180.05212.70
5.3.220.0250.08712.68
5.3.210.0110.07512.68
5.3.200.0090.06112.68
5.3.190.0140.05612.67
5.3.180.0120.05612.67
5.3.170.0160.07212.67
5.3.160.0100.05912.68
5.3.150.0060.06112.67
5.3.140.0090.04912.66
5.3.130.0100.05012.66
5.3.120.0090.05712.66
5.3.110.0070.06512.66
5.3.100.0150.05412.14
5.3.90.0100.05812.12
5.3.80.0070.05112.11
5.3.70.0110.04812.11
5.3.60.0120.04912.09
5.3.50.0120.04712.05
5.3.40.0070.05112.05
5.3.30.0120.04712.01
5.3.20.0080.04711.79
5.3.10.0130.04511.75
5.3.00.0060.05111.73
5.2.170.0090.0429.24
5.2.160.0120.0379.24
5.2.150.0080.0559.24
5.2.140.0060.0409.23
5.2.130.0120.0369.20
5.2.120.0110.0329.20
5.2.110.0080.0489.21
5.2.100.0090.0369.20
5.2.90.0060.0399.20
5.2.80.0110.0399.20
5.2.70.0060.0399.20
5.2.60.0050.0379.15
5.2.50.0050.0409.12
5.2.40.0050.0379.10
5.2.30.0080.0409.07
5.2.20.0100.0339.07
5.2.10.0080.0488.97
5.2.00.0100.0418.84
5.1.60.0150.0258.12
5.1.50.0120.0398.11
5.1.40.0080.0528.09
5.1.30.0160.0678.45
5.1.20.0080.0438.46
5.1.10.0080.0398.20
5.1.00.0090.0418.19
5.0.50.0050.0266.68
5.0.40.0090.0276.53
5.0.30.0050.0436.34
5.0.20.0050.0236.31
5.0.10.0060.0336.29
5.0.00.0090.0586.28
4.4.90.0060.0204.78
4.4.80.0040.0244.75
4.4.70.0060.0194.75
4.4.60.0030.0234.76
4.4.50.0050.0214.77
4.4.40.0050.0264.71
4.4.30.0050.0214.76
4.4.20.0010.0254.84
4.4.10.0040.0174.85
4.4.00.0030.0274.75
4.3.110.0040.0154.67
4.3.100.0040.0154.66
4.3.90.0040.0134.63
4.3.80.0030.0254.58
4.3.70.0020.0174.63
4.3.60.0020.0164.63
4.3.50.0030.0164.63
4.3.40.0030.0234.54
4.3.30.0050.0143.31
4.3.20.0010.0203.29
4.3.10.0030.0153.25
4.3.00.0030.01744.46

preferences:
43.14 ms | 401 KiB | 5 Q