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); class A {} $a = "A"; new $$a;

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.0140.00718.16
8.3.50.0110.01021.91
8.3.40.0070.01118.73
8.3.30.0080.00819.18
8.3.20.0030.00620.30
8.3.10.0030.00623.53
8.3.00.0080.00018.89
8.2.180.0210.00016.73
8.2.170.0090.00622.96
8.2.160.0030.01020.39
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0100.00320.72
8.2.110.0000.00822.25
8.2.100.0120.00017.84
8.2.90.0000.00819.28
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0030.00617.93
8.2.50.0000.01118.07
8.2.40.0080.00019.95
8.2.30.0050.00318.33
8.2.20.0030.00517.93
8.2.10.0020.00518.11
8.2.00.0000.00817.69
8.1.280.0080.00825.92
8.1.270.0040.00423.71
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0080.00022.23
8.1.230.0080.00319.07
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0070.00317.48
8.1.190.0060.00317.35
8.1.180.0040.00418.10
8.1.170.0060.00318.60
8.1.160.0000.00822.04
8.1.150.0040.00418.58
8.1.140.0000.00717.39
8.1.130.0000.00717.85
8.1.120.0050.00317.32
8.1.110.0030.00717.48
8.1.100.0050.00317.54
8.1.90.0070.00017.50
8.1.80.0040.00417.36
8.1.70.0000.00717.36
8.1.60.0000.00817.51
8.1.50.0030.00617.42
8.1.40.0040.00417.43
8.1.30.0050.00317.55
8.1.20.0080.00017.70
8.1.10.0030.00517.56
8.1.00.0040.00417.45
8.0.300.0020.00518.77
8.0.290.0030.00617.05
8.0.280.0000.00718.49
8.0.270.0030.00317.20
8.0.260.0000.00617.30
8.0.250.0070.00016.98
8.0.240.0030.00316.91
8.0.230.0000.00716.90
8.0.220.0000.00816.82
8.0.210.0040.00416.97
8.0.200.0040.00416.93
8.0.190.0060.00316.98
8.0.180.0050.00217.06
8.0.170.0000.00817.02
8.0.160.0040.00417.05
8.0.150.0070.00016.88
8.0.140.0040.00416.96
8.0.130.0000.00613.48
8.0.120.0000.00817.01
8.0.110.0030.00516.98
8.0.100.0040.00416.85
8.0.90.0040.00417.05
8.0.80.0000.01416.98
8.0.70.0050.00316.82
8.0.60.0080.00016.77
8.0.50.0040.00416.97
8.0.30.0110.00817.05
8.0.20.0080.01017.40
8.0.10.0000.00717.10
8.0.00.0090.00816.87
7.4.330.0060.00015.00
7.4.320.0060.00016.53
7.4.300.0000.00616.53
7.4.290.0030.00316.48
7.4.280.0040.00416.57
7.4.270.0000.00816.52
7.4.260.0000.00716.62
7.4.250.0040.00416.60
7.4.240.0040.00416.49
7.4.230.0000.00816.61
7.4.220.0110.00716.64
7.4.210.0110.00816.55
7.4.200.0030.00316.65
7.4.190.0000.00716.69
7.4.160.0100.00616.55
7.4.150.0120.00617.40
7.4.140.0110.00617.86
7.4.130.0100.00616.66
7.4.120.0150.00316.54
7.4.110.0150.00616.77
7.4.100.0070.01116.52
7.4.90.0030.01516.45
7.4.80.0090.00919.39
7.4.70.0130.00316.54
7.4.60.0070.01016.67
7.4.50.0050.00316.48
7.4.40.0060.01316.63
7.4.30.0040.01316.59
7.4.00.0100.00715.16
7.3.330.0000.00713.47
7.3.320.0000.00613.32
7.3.310.0000.00716.48
7.3.300.0000.00616.46
7.3.290.0060.00816.51
7.3.280.0060.00916.49
7.3.270.0100.00717.40
7.3.260.0060.01216.67
7.3.250.0090.01016.54
7.3.240.0100.00716.54
7.3.230.0090.00816.39
7.3.210.0130.00516.66
7.3.200.0100.00719.39
7.3.190.0120.00916.40
7.3.180.0040.01216.57
7.3.170.0030.01716.56
7.3.160.0090.00616.53
7.3.120.0030.00714.96
7.2.330.0040.01416.77
7.2.320.0080.00816.67
7.2.310.0050.01116.55
7.2.300.0040.01216.54
7.2.290.0040.01516.67
7.2.60.0170.00416.95
7.1.200.0090.00315.61
7.1.100.0030.01018.05
7.1.70.0000.00817.14
7.1.60.0100.01319.70
7.1.50.0280.00734.82
7.1.00.0070.07322.46
7.0.200.0110.00016.71
7.0.140.0030.07322.09
7.0.60.0030.07020.07
7.0.50.0100.07717.91
7.0.40.0030.05020.21
7.0.30.0200.05720.06
7.0.20.0300.07320.19
7.0.10.0070.04720.33
7.0.00.0100.06020.08
5.6.280.0000.07320.94
5.6.210.0100.06720.73
5.6.200.0030.08018.14
5.6.190.0000.09020.48
5.6.180.0270.05720.34
5.6.170.0230.05020.54
5.6.160.0030.04320.52
5.6.150.0100.07718.27
5.6.140.0030.04018.15
5.6.130.0030.08718.25
5.6.120.0100.07321.14
5.6.110.0000.04720.99
5.6.100.0170.07721.11
5.6.90.0030.09021.12
5.6.80.0130.05720.43
5.5.350.0200.07720.43
5.5.340.0000.04318.05
5.5.330.0070.08720.35
5.5.320.0330.07020.35
5.5.310.0230.08320.27
5.5.300.0030.04017.93
5.5.290.0100.04317.98
5.5.280.0070.06020.67
5.5.270.0100.07320.89
5.5.260.0030.05321.00
5.5.250.0100.08020.68
5.5.240.0100.03320.36
5.4.450.0300.04319.64
5.4.440.0200.05319.50
5.4.430.0130.04719.46
5.4.420.0130.04019.21
5.4.410.0430.04319.39
5.4.400.0170.03719.23
5.4.390.0170.05319.14
5.4.380.0130.05318.76
5.4.370.0170.05018.75
5.4.360.0170.05018.71
5.4.350.0170.05718.78
5.4.340.0130.05318.59
5.4.320.0070.04312.52
5.4.310.0040.04012.52
5.4.300.0080.05112.52
5.4.290.0100.05012.52
5.4.280.0080.05012.41
5.4.270.0080.04912.41
5.4.260.0090.05112.41
5.4.250.0090.04412.41
5.4.240.0100.04312.41
5.4.230.0080.05212.41
5.4.220.0090.04912.40
5.4.210.0080.04912.41
5.4.200.0100.05412.40
5.4.190.0100.05212.40
5.4.180.0070.05712.40
5.4.170.0130.05212.42
5.4.160.0120.04512.41
5.4.150.0070.04912.41
5.4.140.0100.05312.09
5.4.130.0090.04712.08
5.4.120.0100.04712.03
5.4.110.0080.04912.03
5.4.100.0090.03712.03
5.4.90.0080.05012.03
5.4.80.0080.04512.03
5.4.70.0090.05312.03
5.4.60.0120.03812.03
5.4.50.0080.04312.03
5.4.40.0100.03912.02
5.4.30.0090.03712.01
5.4.20.0090.04112.01
5.4.10.0090.04012.02
5.4.00.0090.04211.50
5.3.290.0070.04512.80
5.3.280.0070.04812.71
5.3.270.0110.05312.73
5.3.260.0090.05412.72
5.3.250.0100.05212.72
5.3.240.0070.05512.72
5.3.230.0030.05812.71
5.3.220.0090.05412.68
5.3.210.0120.05212.68
5.3.200.0120.05012.68
5.3.190.0070.04412.68
5.3.180.0080.04512.68
5.3.170.0040.05712.67
5.3.160.0100.05112.68
5.3.150.0100.05312.68
5.3.140.0080.05212.66
5.3.130.0090.05512.65
5.3.120.0060.05712.66
5.3.110.0090.05512.66
5.3.100.0080.05212.14
5.3.90.0130.05212.12
5.3.80.0070.05712.12
5.3.70.0100.05212.12
5.3.60.0080.04912.10
5.3.50.0120.05612.05
5.3.40.0140.05412.05
5.3.30.0090.05612.01
5.3.20.0080.05311.79
5.3.10.0080.05211.75
5.3.00.0100.04911.75
5.2.170.0060.0449.25
5.2.160.0050.0439.25
5.2.150.0080.0429.25
5.2.140.0050.0459.25
5.2.130.0050.0459.21
5.2.120.0100.0399.20
5.2.110.0040.0449.21
5.2.100.0080.0419.21
5.2.90.0070.0439.21
5.2.80.0060.0459.21
5.2.70.0090.0429.20
5.2.60.0050.0469.16
5.2.50.0050.0459.13
5.2.40.0040.0439.10
5.2.30.0060.0449.08
5.2.20.0080.0399.07
5.2.10.0080.0388.97
5.2.00.0060.0438.84
5.1.60.0060.0388.12
5.1.50.0050.0368.12
5.1.40.0060.0368.09
5.1.30.0040.0418.44
5.1.20.0040.0418.47
5.1.10.0070.0368.20
5.1.00.0050.0398.20
5.0.50.0080.0266.67
5.0.40.0040.0306.54
5.0.30.0060.0426.35
5.0.20.0040.0286.30
5.0.10.0050.0296.29
5.0.00.0040.0426.29
4.4.90.0020.0264.78
4.4.80.0040.0244.75
4.4.70.0050.0214.76
4.4.60.0020.0234.76
4.4.50.0030.0234.77
4.4.40.0050.0254.71
4.4.30.0020.0174.76
4.4.20.0030.0184.84
4.4.10.0030.0164.85
4.4.00.0050.0364.76
4.3.110.0030.0174.67
4.3.100.0100.0304.66
4.3.90.0030.0204.63
4.3.80.0030.0274.59
4.3.70.0040.0284.63
4.3.60.0010.0244.63
4.3.50.0020.0234.63
4.3.40.0020.0274.54
4.3.30.0020.0173.31
4.3.20.0000.0193.29
4.3.10.0050.0173.25
4.3.00.0030.01016.92

preferences:
84.75 ms | 400 KiB | 5 Q