3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Context { private $context = null; private $data = []; public function __construct(Context $context = null) { $this->context = $context; } public function get($name) { if (isset($this->data[$name])) { return $this->data[$name]; } if (isset($this->context)) { return $this->context->get($name); } return null; } public function set($name, $value) { $this->data[$name] = $value; } public function wrap() { return new Context($this); } public function call(callable $function) { call_user_func($function, $this); } } (new Context)->call(function(Context $c) { $c->set('foo', 1); $c->set('bar', 2); $c->call(function(Context $c) { $c->set('bar', 3); $c->set('qux', 4); $c->call(function(Context $c) { $c->set('qux', 5); $c->set('zip', 6); var_dump($c); }); var_dump($c); }); var_dump($c); });

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.0170.00016.63
8.3.50.0090.01321.98
8.3.40.0110.00718.61
8.3.30.0110.00418.90
8.3.20.0000.00818.90
8.3.10.0040.00420.48
8.3.00.0110.00321.82
8.2.180.0140.00016.88
8.2.170.0100.01022.96
8.2.160.0040.01222.08
8.2.150.0090.00624.18
8.2.140.0030.00624.66
8.2.130.0000.00726.16
8.2.120.0000.00819.36
8.2.110.0070.00322.20
8.2.100.0060.00618.03
8.2.90.0040.00419.24
8.2.80.0040.00418.05
8.2.70.0030.00517.63
8.2.60.0040.00418.03
8.2.50.0000.00818.07
8.2.40.0000.00918.22
8.2.30.0050.00319.89
8.2.20.0000.00817.79
8.2.10.0000.00817.81
8.2.00.0020.00517.63
8.1.280.0100.00725.92
8.1.270.0060.00323.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0130.00020.65
8.1.230.0080.00420.95
8.1.220.0090.00018.77
8.1.210.0030.00619.04
8.1.200.0060.00317.47
8.1.190.0030.00617.53
8.1.180.0050.00318.10
8.1.170.0000.00818.61
8.1.160.0040.00418.84
8.1.150.0000.00718.45
8.1.140.0080.00017.44
8.1.130.0000.00717.78
8.1.120.0000.00717.39
8.1.110.0070.00017.37
8.1.100.0000.00717.36
8.1.90.0030.00517.47
8.1.80.0070.00017.52
8.1.70.0030.00317.48
8.1.60.0050.00517.48
8.1.50.0030.00517.48
8.1.40.0040.00417.48
8.1.30.0000.00817.55
8.1.20.0000.00917.67
8.1.10.0030.00517.41
8.1.00.0090.00317.46
8.0.300.0040.00419.93
8.0.290.0030.00617.16
8.0.280.0000.00718.37
8.0.270.0030.00317.16
8.0.260.0070.00016.86
8.0.250.0030.00516.94
8.0.240.0080.00316.86
8.0.230.0000.00716.83
8.0.220.0030.00316.90
8.0.210.0070.00016.80
8.0.200.0000.00816.91
8.0.190.0040.00417.04
8.0.180.0060.00316.88
8.0.170.0040.00416.98
8.0.160.0000.00716.94
8.0.150.0040.00416.86
8.0.140.0050.00516.89
8.0.130.0060.00013.38
8.0.120.0030.00616.96
8.0.110.0050.00317.02
8.0.100.0040.00416.81
8.0.90.0040.00416.86
8.0.80.0070.01416.84
8.0.70.0070.00017.07
8.0.60.0000.00717.02
8.0.50.0000.00716.95
8.0.30.0170.00617.11
8.0.20.0140.00717.40
8.0.10.0040.00416.90
8.0.00.0140.00616.63
7.4.330.0000.00514.82
7.4.320.0000.00716.60
7.4.300.0000.00616.50
7.4.290.0040.00416.57
7.4.280.0000.00716.52
7.4.270.0070.00016.58
7.4.260.0080.00013.34
7.4.250.0040.00416.57
7.4.240.0000.00716.60
7.4.230.0060.00316.48
7.4.220.0070.01416.56
7.4.210.0090.00516.56
7.4.200.0030.00616.72
7.4.190.0030.00316.77
7.4.160.0040.01216.59
7.4.150.0060.01217.40
7.4.140.0140.00317.86
7.4.130.0090.00916.45
7.4.120.0070.01016.56
7.4.110.0040.01416.48
7.4.100.0120.00816.51
7.4.90.0090.00916.35
7.4.80.0130.00619.04
7.4.70.0070.01016.50
7.4.60.0100.01016.44
7.4.50.0060.00316.38
7.4.40.0060.01022.27
7.4.30.0140.00516.38
7.4.00.0060.01214.69
7.3.330.0000.00513.45
7.3.320.0030.00313.18
7.3.310.0030.00316.42
7.3.300.0040.00416.39
7.3.290.0070.00716.40
7.3.280.0090.00816.39
7.3.270.0070.01117.40
7.3.260.0100.00918.24
7.3.250.0130.01016.45
7.3.240.0090.00916.43
7.3.230.0180.00016.64
7.3.210.0160.00316.57
7.3.200.0100.01319.39
7.3.190.0070.01316.46
7.3.180.0110.01316.68
7.3.170.0080.00816.32
7.3.160.0100.00716.54
7.3.120.0060.00914.86
7.2.330.0080.00816.65
7.2.320.0000.01616.43
7.2.310.0060.01716.66
7.2.300.0100.01016.68
7.2.290.0070.01316.74
7.2.00.0090.00618.78
7.1.100.0080.00818.05
7.1.70.0030.00717.01
7.1.60.0090.00316.93
7.1.50.0060.01616.99
7.1.00.0030.06722.45
7.0.200.0030.01316.64
7.0.140.0070.07022.09
7.0.60.0170.06020.07
7.0.50.0030.08017.95
7.0.40.0100.03717.71
7.0.30.0100.07717.76
7.0.20.0030.05717.75
7.0.10.0070.08017.73
7.0.00.0100.08717.71
5.6.280.0000.07721.11
5.6.210.0170.06320.64
5.6.200.0030.05318.16
5.6.190.0130.06018.17
5.6.180.0000.04718.29
5.6.170.0030.07718.23
5.6.160.0030.05318.17
5.6.150.0100.08018.24
5.6.140.0070.08018.14
5.6.130.0000.08018.15
5.6.120.0200.07018.16
5.6.110.0100.03718.16
5.6.100.0030.04018.26
5.6.90.0030.04018.11
5.6.80.0000.04017.56
5.6.70.0070.04317.56
5.6.60.0000.04017.52
5.6.50.0070.03317.52
5.6.40.0100.03017.60
5.6.30.0030.03717.53
5.6.20.0030.03717.64
5.6.10.0030.03717.48
5.6.00.0070.03317.54
5.5.350.0200.08020.34
5.5.340.0030.08017.98
5.5.330.0070.07017.93
5.5.320.0070.05717.99
5.5.310.0130.07718.07
5.5.300.0130.07317.98
5.5.290.0100.08318.04
5.5.280.0070.06318.01
5.5.270.0000.04317.98
5.5.260.0000.04318.07
5.5.250.0030.04017.86
5.5.240.0070.03317.37
5.5.230.0070.03317.47
5.5.220.0100.03017.34
5.5.210.0030.03717.37
5.5.200.0030.03717.29
5.5.190.0030.03717.31
5.5.180.0030.03717.44
5.5.160.0030.03717.30
5.5.150.0070.03717.30
5.5.140.0070.03317.36
5.5.130.0070.03317.37
5.5.120.0000.04317.40
5.5.110.0000.04017.30
5.5.100.0000.04017.20
5.5.90.0000.04317.34
5.5.80.0030.03717.34
5.5.70.0000.04017.29
5.5.60.0030.03317.26
5.5.50.0070.04317.30
5.5.40.0030.07717.20
5.5.30.0070.05317.30
5.5.20.0000.04317.20
5.5.10.0070.08017.32
5.5.00.0070.06317.32
5.4.450.0070.08319.32
5.4.440.0070.06019.38
5.4.430.0000.04319.38
5.4.420.0030.04019.35
5.4.410.0100.03319.52
5.4.400.0030.04319.04
5.4.390.0030.04019.13
5.4.380.0030.03719.09
5.4.370.0070.03718.98
5.4.360.0000.04019.10
5.4.350.0030.04319.03
5.4.340.0100.04019.31
5.4.320.0100.03019.12
5.4.310.0000.04019.14
5.4.300.0000.04019.01
5.4.290.0070.03318.88
5.4.280.0000.04019.05
5.4.270.0000.04019.03
5.4.260.0100.03019.03
5.4.250.0030.04019.04
5.4.240.0000.04019.01
5.4.230.0100.03018.98
5.4.220.0000.04019.09
5.4.210.0030.04019.04
5.4.200.0100.04018.95
5.4.190.0000.04719.02
5.4.180.0000.08019.11
5.4.170.0030.07019.11
5.4.160.0030.05319.07
5.4.150.0030.04719.09
5.4.140.0100.06316.46
5.4.130.0130.06716.59
5.4.120.0100.07316.62
5.4.110.0030.07016.46
5.4.100.0130.07016.48
5.4.90.0000.07016.50
5.4.80.0070.07716.46
5.4.70.0070.07316.46
5.4.60.0100.06316.47
5.4.50.0030.07716.28
5.4.40.0030.06316.48
5.4.30.0170.05716.31
5.4.20.0030.08016.56
5.4.10.0100.07316.46
5.4.00.0130.05715.83
5.3.290.0000.04014.62
5.3.280.0030.03714.61
5.3.270.0100.07314.65
5.3.260.0030.07714.45
5.3.250.0100.07014.67
5.3.240.0100.06714.71
5.3.230.0030.07714.44
5.3.220.0100.06014.59
5.3.210.0070.07714.57
5.3.200.0130.06714.59
5.3.190.0030.04714.53
5.3.180.0000.04314.59
5.3.170.0000.07014.58
5.3.160.0030.05014.58
5.3.150.0030.05014.59
5.3.140.0100.07014.63
5.3.130.0030.07014.50
5.3.120.0200.06714.50
5.3.110.0100.07714.64
5.3.100.0030.08013.88
5.3.90.0100.07714.00
5.3.80.0170.06013.99
5.3.70.0030.08014.21
5.3.60.0030.08013.98
5.3.50.0130.06714.02
5.3.40.0030.07714.15
5.3.30.0070.04713.91
5.3.20.0030.06313.56
5.3.10.0030.07713.54
5.3.00.0070.05713.61
5.2.170.0000.07011.10
5.2.160.0130.05311.17
5.2.150.0070.05311.14
5.2.140.0070.06311.35
5.2.130.0200.02311.14
5.2.120.0100.05711.16
5.2.110.0030.05311.14
5.2.100.0000.03711.15
5.2.90.0070.06011.14
5.2.80.0100.06011.09
5.2.70.0000.04011.10
5.2.60.0030.06311.06
5.2.50.0000.03311.06
5.2.40.0030.06011.03
5.2.30.0030.06310.98
5.2.20.0000.06010.94
5.2.10.0070.06310.89
5.2.00.0100.04710.55
5.1.60.0000.03010.20
5.1.50.0030.02710.00
5.1.40.0070.04710.04
5.1.30.0100.05010.34
5.1.20.0070.03710.41
5.1.10.0030.03010.04
5.1.00.0000.04710.14
5.0.50.0000.0278.45
5.0.40.0100.0308.25
5.0.30.0070.0538.21
5.0.20.0000.0378.20
5.0.10.0000.0278.23
5.0.00.0000.0438.18
4.4.90.0000.0177.86
4.4.80.0000.0207.86
4.4.70.0000.0337.86
4.4.60.0000.0307.86
4.4.50.0030.0277.86
4.4.40.0070.0507.86
4.4.30.0000.0407.86
4.4.20.0030.0337.86
4.4.10.0000.0207.86
4.4.00.0000.0577.86
4.3.110.0030.0377.86
4.3.100.0000.0337.86
4.3.90.0030.0237.86
4.3.80.0000.0377.86
4.3.70.0070.0137.86
4.3.60.0000.0207.86
4.3.50.0000.0207.86
4.3.40.0030.0277.86
4.3.30.0030.0207.86
4.3.20.0000.0377.86
4.3.10.0000.0237.86
4.3.00.0030.0207.86

preferences:
41.43 ms | 401 KiB | 5 Q