3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Model { public $string; public function __construct() { $this->string = 'MVC + PHP = Awesome!'; } } class View { private $model; private $controller; public function __construct($controller,$model) { $this->controller = $controller; $this->model = $model; } public function output() { return '<p><a href="?action=clicked"'.$this->model->string.'</a></p>'; } } class Controller { private $model; public function __construct($model){ $this->model = $model; } public function clicked() { $this->model->string = 'Updated String!'; } } $model = new Model(); $controller = new Controller($model); $view = new View($controller, $model); if(isset($_GET['action']) && !empty($_GET['action'])) { $controller->{$_GET['action']}(); } echo $view->output(); ?>

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.0180.00418.30
8.3.50.0110.01117.13
8.3.40.0130.00918.85
8.3.30.0110.00318.54
8.3.20.0090.00018.88
8.3.10.0030.00620.71
8.3.00.0100.00017.38
8.2.180.0090.00618.54
8.2.170.0080.00822.96
8.2.160.0100.00720.52
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00818.72
8.2.110.0090.00320.53
8.2.100.0070.00417.91
8.2.90.0030.00517.97
8.2.80.0000.00917.97
8.2.70.0040.00417.50
8.2.60.0000.00818.16
8.2.50.0040.00418.07
8.2.40.0060.00318.22
8.2.30.0000.01118.15
8.2.20.0000.00919.34
8.2.10.0000.00717.80
8.2.00.0040.00417.63
8.1.280.0120.00925.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0100.00728.09
8.1.240.0000.00920.79
8.1.230.0120.00020.99
8.1.220.0040.00417.74
8.1.210.0000.00919.03
8.1.200.0090.00017.22
8.1.190.0040.00417.41
8.1.180.0040.00418.10
8.1.170.0040.00418.89
8.1.160.0090.00018.77
8.1.150.0040.00418.61
8.1.140.0040.00417.45
8.1.130.0000.00717.73
8.1.120.0070.00017.52
8.1.110.0000.00717.52
8.1.100.0040.00417.49
8.1.90.0050.00217.36
8.1.80.0040.00417.48
8.1.70.0040.00417.45
8.1.60.0070.00417.60
8.1.50.0040.00417.45
8.1.40.0000.00717.52
8.1.30.0060.00317.70
8.1.20.0050.00317.62
8.1.10.0030.00617.49
8.1.00.0060.00317.51
8.0.300.0050.00220.04
8.0.290.0040.00416.63
8.0.280.0040.00418.36
8.0.270.0040.00417.17
8.0.260.0080.00016.71
8.0.250.0070.00016.90
8.0.240.0000.00716.87
8.0.230.0000.00716.96
8.0.220.0000.00816.95
8.0.210.0030.00316.88
8.0.200.0000.00616.82
8.0.190.0040.00416.95
8.0.180.0070.00016.88
8.0.170.0080.00016.77
8.0.160.0000.00716.84
8.0.150.0050.00316.73
8.0.140.0120.00016.74
8.0.130.0030.00313.29
8.0.120.0040.00416.84
8.0.110.0070.00016.81
8.0.100.0040.00416.98
8.0.90.0040.00416.93
8.0.80.0070.01416.83
8.0.70.0000.00716.85
8.0.60.0070.00016.92
8.0.50.0060.00316.87
8.0.30.0100.00717.05
8.0.20.0120.00817.38
8.0.10.0040.00417.05
8.0.00.0120.00716.82
7.4.330.0000.00512.97
7.4.320.0050.00216.52
7.4.300.0000.00616.41
7.4.290.0030.00316.61
7.4.280.0040.00416.57
7.4.270.0070.00016.51
7.4.260.0030.00313.26
7.4.250.0040.00416.62
7.4.240.0030.00316.50
7.4.230.0000.00816.70
7.4.220.0030.00316.51
7.4.210.0090.00616.54
7.4.200.0000.00716.42
7.4.190.0000.00716.73
7.4.160.0090.00616.59
7.4.150.0110.00716.55
7.4.140.0090.00916.57
7.4.130.0120.00916.70
7.4.120.0120.00616.64
7.4.110.0090.00916.60
7.4.100.0030.01316.48
7.4.90.0130.00616.52
7.4.80.0090.00916.34
7.4.70.0080.00816.54
7.4.60.0030.01316.62
7.4.50.0000.00516.53
7.4.40.0030.01416.57
7.4.30.0000.01716.40
7.4.00.0090.00314.90
7.3.330.0030.00313.08
7.3.320.0030.00313.25
7.3.310.0030.00316.14
7.3.300.0030.00316.17
7.3.290.0050.01016.30
7.3.280.0070.01216.26
7.3.270.0130.00416.41
7.3.260.0070.01016.37
7.3.250.0050.01316.56
7.3.240.0030.01216.50
7.3.230.0100.00716.31
7.3.210.0080.01216.53
7.3.200.0200.00319.39
7.3.190.0120.00916.34
7.3.180.0040.01216.46
7.3.170.0070.01416.55
7.3.160.0110.00616.59
7.3.120.0100.00714.92
7.2.330.0140.00316.75
7.2.320.0110.00516.53
7.2.310.0150.00316.71
7.2.300.0100.01016.87
7.2.290.0130.00316.50
7.2.60.0100.00617.02
7.1.200.0110.00715.70
7.1.100.0040.00918.19
7.1.70.0000.01017.08
7.1.60.0060.01619.31
7.1.50.0030.01016.57
7.1.00.0000.08022.31
7.0.200.0040.00416.72
7.0.140.0070.07021.95
7.0.120.0070.05322.16
7.0.60.0030.04721.61
7.0.50.0000.06317.87
7.0.40.0100.08320.21
7.0.30.0330.04720.25
7.0.20.0270.06720.09
7.0.10.0030.06320.23
7.0.00.0100.08020.19
5.6.280.0100.06721.07
5.6.210.0100.07720.54
5.6.200.0030.04318.29
5.6.190.0130.08320.43
5.6.180.0200.05020.47
5.6.170.0270.07720.57
5.6.160.0100.08020.44
5.6.150.0070.08018.27
5.6.140.0030.03718.11
5.6.130.0100.06318.28
5.6.120.0070.08021.03
5.6.110.0070.06720.89
5.6.100.0100.06720.98
5.6.90.0100.07721.11
5.6.80.0200.06320.38
5.5.350.0030.06720.31
5.5.340.0000.08317.97
5.5.330.0000.08720.19
5.5.320.0200.05320.51
5.5.310.0230.04020.25
5.5.300.0070.05017.97
5.5.290.0100.08717.97
5.5.280.0030.05320.75
5.5.270.0100.06720.69
5.5.260.0070.03720.74
5.5.250.0130.07320.51
5.5.240.0130.07020.09
5.4.450.0130.07019.31
5.4.440.0130.06319.53
5.4.430.0000.05319.19
5.4.420.0100.06019.56
5.4.410.0070.08019.44
5.4.400.0100.07019.01
5.4.390.0100.04018.87
5.4.380.0070.07319.18
5.4.370.0000.08018.85
5.4.360.0130.07019.17
5.4.350.0070.06719.15
5.4.340.0130.07319.12
5.4.320.0130.06019.23
5.4.310.0100.06019.00
5.4.300.0070.07319.16
5.4.290.0130.04019.08
5.4.280.0070.07719.07
5.4.270.0270.06018.87
5.4.260.0100.05318.92
5.4.250.0130.06719.14
5.4.240.0030.03719.14
5.4.230.0170.06718.97
5.4.220.0070.07319.14
5.4.210.0070.06019.11
5.4.200.0070.05718.86
5.4.190.0000.08019.15
5.4.180.0030.07019.19
5.4.170.0130.04018.96
5.4.160.0070.06319.21
5.4.150.0130.03319.18
5.4.140.0100.03016.55
5.4.130.0070.03316.59
5.4.120.0130.02716.34
5.4.110.0030.03716.35
5.4.100.0000.04016.35
5.4.90.0030.03316.35
5.4.80.0030.03316.43
5.4.70.0030.03316.44
5.4.60.0030.03316.39
5.4.50.0030.03316.27
5.4.40.0030.03316.42
5.4.30.0070.03016.38
5.4.20.0030.04016.66
5.4.10.0000.04016.46
5.4.00.0030.03715.85
5.3.290.0070.08014.64
5.3.280.0070.07314.66
5.3.270.0000.08014.65
5.3.260.0100.07014.64
5.3.250.0070.06014.67
5.3.240.0000.04014.68
5.3.230.0030.03714.60
5.3.220.0030.03714.61
5.3.210.0000.04014.61
5.3.200.0070.03314.59
5.3.190.0030.04014.60
5.3.180.0070.03714.71
5.3.170.0070.03314.49
5.3.160.0030.04014.57
5.3.150.0030.03714.62
5.3.140.0000.03714.63
5.3.130.0000.04014.58
5.3.120.0100.04014.56
5.3.110.0100.03014.71
5.3.100.0000.04014.07
5.3.90.0000.03714.05
5.3.80.0130.03314.20
5.3.70.0030.04014.10
5.3.60.0030.03314.16
5.3.50.0030.03314.02
5.3.40.0000.04313.96
5.3.30.0030.03313.92
5.3.20.0000.03713.74
5.3.10.0000.03713.72
5.3.00.0070.03313.80
5.2.170.0030.02711.11
5.2.160.0100.02011.12
5.2.150.0030.03011.21
5.2.140.0000.03011.15
5.2.130.0000.03311.17
5.2.120.0000.03011.12
5.2.110.0000.03011.27
5.2.100.0030.02711.15
5.2.90.0000.03011.04
5.2.80.0000.03011.11
5.2.70.0000.03311.14
5.2.60.0000.03011.11
5.2.50.0000.03011.19
5.2.40.0030.02711.16
5.2.30.0000.03710.95
5.2.20.0030.02710.98
5.2.10.0070.02310.94
5.2.00.0000.03710.88
5.1.60.0030.02310.05
5.1.50.0100.02310.15
5.1.40.0030.02710.05
5.1.30.0000.03310.36
5.1.20.0000.03010.37
5.1.10.0100.04710.06
5.1.00.0000.04010.10
5.0.50.0000.0478.55
5.0.40.0070.0438.46
5.0.30.0000.0478.28
5.0.20.0030.0208.12
5.0.10.0000.0238.24
5.0.00.0070.0278.18
4.4.90.0030.0137.72
4.4.80.0000.0207.72
4.4.70.0000.0177.72
4.4.60.0030.0137.72
4.4.50.0030.0107.72
4.4.40.0070.0377.72
4.4.30.0070.0107.72
4.4.20.0000.0377.72
4.4.10.0000.0207.72
4.4.00.0100.0237.72
4.3.110.0030.0277.72
4.3.100.0070.0277.72
4.3.90.0000.0207.72
4.3.80.0030.0577.72
4.3.70.0030.0277.72
4.3.60.0000.0377.72
4.3.50.0030.0237.72
4.3.40.0000.0537.72
4.3.30.0030.0237.72
4.3.20.0030.0377.72
4.3.10.0030.0377.72
4.3.00.0030.0277.72

preferences:
40.88 ms | 401 KiB | 5 Q