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->wrap()->call(function(Context $c) { $c->set('bar', 3); $c->set('qux', 4); $c->wrap()->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.70.0100.00716.63
8.3.60.0160.00616.63
8.3.50.0110.01117.51
8.3.40.0160.00618.76
8.3.30.0070.01518.76
8.3.20.0070.01318.95
8.3.10.0100.01020.51
8.3.00.0070.01817.71
8.2.180.0090.00618.13
8.2.170.0070.00722.96
8.2.160.0100.01021.01
8.2.150.0070.00025.66
8.2.140.0000.00824.66
8.2.130.0150.00426.16
8.2.120.0040.01519.95
8.2.110.0060.00320.93
8.2.100.0040.00817.91
8.2.90.0030.00519.21
8.2.80.0040.00418.05
8.2.70.0000.00817.63
8.2.60.0110.00018.05
8.2.50.0000.00818.07
8.2.40.0050.00318.34
8.2.30.0000.00818.07
8.2.20.0030.00517.73
8.2.10.0050.00217.62
8.2.00.0050.00317.66
8.1.280.0150.00425.92
8.1.270.0040.00423.99
8.1.260.0090.00926.35
8.1.250.0030.00628.09
8.1.240.0110.00020.78
8.1.230.0120.00021.02
8.1.220.0000.00817.76
8.1.210.0000.01018.95
8.1.200.0060.00317.35
8.1.190.0000.00917.64
8.1.180.0090.00018.10
8.1.170.0090.00018.84
8.1.160.0040.00418.82
8.1.150.0080.00018.59
8.1.140.0030.00617.40
8.1.130.0040.00417.82
8.1.120.0080.00017.46
8.1.110.0040.00417.29
8.1.100.0000.00817.45
8.1.90.0000.00717.45
8.1.80.0000.00817.51
8.1.70.0000.00717.46
8.1.60.0060.00617.59
8.1.50.0060.00317.50
8.1.40.0060.00317.54
8.1.30.0030.00517.60
8.1.20.0030.00617.73
8.1.10.0060.00317.45
8.1.00.0040.00417.50
8.0.300.0080.00019.91
8.0.290.0020.00516.75
8.0.280.0000.00918.30
8.0.270.0030.00317.20
8.0.260.0000.00716.76
8.0.250.0040.00416.94
8.0.240.0080.00416.83
8.0.230.0070.00016.84
8.0.220.0000.00716.91
8.0.210.0000.00816.80
8.0.200.0040.00417.00
8.0.190.0030.00517.04
8.0.180.0050.00217.02
8.0.170.0060.00316.91
8.0.160.0000.00716.96
8.0.150.0000.00816.96
8.0.140.0030.00916.97
8.0.130.0060.00013.34
8.0.120.0000.00816.81
8.0.110.0030.00316.93
8.0.100.0000.00716.93
8.0.90.0000.00716.82
8.0.80.0000.01616.89
8.0.70.0040.00416.77
8.0.60.0040.00417.02
8.0.50.0000.00717.00
8.0.30.0080.01217.06
8.0.20.0080.01017.06
8.0.10.0080.00017.01
8.0.00.0190.00816.71
7.4.330.0050.00013.11
7.4.320.0070.00016.50
7.4.300.0060.00016.64
7.4.290.0030.00716.49
7.4.280.0070.00016.61
7.4.270.0000.00816.61
7.4.260.0030.00313.18
7.4.250.0060.00316.48
7.4.240.0040.00416.62
7.4.230.0040.00416.63
7.4.220.0060.01216.50
7.4.210.0110.00716.65
7.4.200.0000.00716.58
7.4.190.0050.00216.48
7.4.160.0110.01116.73
7.4.150.0070.01016.45
7.4.140.0060.01316.41
7.4.130.0100.01116.47
7.4.120.0120.00616.50
7.4.110.0100.01316.33
7.4.100.0090.00916.60
7.4.90.0130.01016.47
7.4.80.0070.01016.42
7.4.70.0110.00716.55
7.4.60.0130.00716.46
7.4.50.0040.00416.33
7.4.40.0070.00416.36
7.4.30.0050.01116.64
7.4.00.0110.00515.09
7.3.330.0030.00313.24
7.3.320.0000.00513.38
7.3.310.0040.00416.39
7.3.300.0020.00516.39
7.3.290.0120.00616.47
7.3.280.0080.00916.37
7.3.270.0070.01016.50
7.3.260.0120.00916.47
7.3.250.0160.00216.57
7.3.240.0050.01516.40
7.3.230.0110.00616.50
7.3.210.0100.00716.47
7.3.200.0070.01419.39
7.3.190.0070.01116.32
7.3.180.0080.00816.39
7.3.170.0040.01516.66
7.3.160.0140.00316.40
7.3.120.0070.00914.85
7.3.110.0100.01015.17
7.3.100.0040.00914.55
7.3.90.0040.00714.95
7.3.80.0090.00614.93
7.3.70.0100.00314.86
7.3.60.0030.01314.64
7.3.50.0070.00714.85
7.3.40.0070.00714.95
7.3.30.0030.01314.87
7.3.20.0060.00616.55
7.3.10.0040.01116.79
7.3.00.0060.01016.75
7.2.330.0110.00716.44
7.2.320.0110.00816.78
7.2.310.0080.01416.65
7.2.300.0060.01216.69
7.2.290.0030.01516.48
7.2.250.0030.01715.17
7.2.240.0070.01015.09
7.2.230.0060.00915.00
7.2.220.0060.01214.91
7.2.210.0000.01415.13
7.2.200.0070.00715.00
7.2.190.0070.01015.00
7.2.180.0030.00715.09
7.2.170.0070.00715.00
7.2.00.0060.00919.20
7.1.330.0100.00716.00
7.1.320.0040.01115.84
7.1.310.0110.00715.71
7.1.300.0060.00915.77
7.1.290.0000.00915.75
7.1.280.0060.01015.81
7.1.270.0030.00715.96
7.1.260.0040.00815.79
7.1.100.0030.01018.10
7.1.70.0000.00717.20
7.1.60.0030.02119.40
7.1.50.0060.01617.10
7.1.00.0000.05722.36
7.0.200.0000.01016.75
7.0.140.0100.06721.95
7.0.120.0070.07022.04
7.0.60.0100.07719.98
7.0.50.0070.04017.88
7.0.40.0030.06020.05
7.0.30.0270.04020.34
7.0.20.0270.08020.09
7.0.10.0000.04720.16
7.0.00.0070.06720.20
5.6.280.0030.07321.14
5.6.210.0030.08720.50
5.6.200.0030.04018.16
5.6.190.0130.06020.77
5.6.180.0370.07720.64
5.6.170.0200.03720.47
5.6.160.0070.09320.54
5.6.150.0130.07718.19
5.6.140.0070.05018.18
5.6.130.0170.06718.21
5.6.120.0130.08021.07
5.6.110.0030.09021.02
5.6.100.0070.04320.98
5.6.90.0100.05320.95
5.6.80.0030.04020.39
5.5.350.0070.08020.34
5.5.340.0030.08317.97
5.5.330.0070.04320.40
5.5.320.0500.06320.32
5.5.310.0270.04320.32
5.5.300.0100.07718.04
5.5.290.0070.05017.98
5.5.280.0070.06020.92
5.5.270.0070.04720.90
5.5.260.0100.08020.99
5.5.250.0170.07720.73
5.5.240.0130.03720.19
5.4.450.0030.04319.59
5.4.440.0070.08019.49
5.4.430.0130.08319.44
5.4.420.0000.08319.56
5.4.410.0030.08319.05
5.4.400.0100.07318.87
5.4.390.0100.06019.24
5.4.380.0070.08019.24
5.4.370.0030.05319.08
5.4.360.0130.07319.24
5.4.350.0070.08019.13
5.4.340.0100.04719.26
5.4.320.0070.08019.24
5.4.310.0100.05019.16
5.4.300.0130.05719.24
5.4.290.0130.07319.16
5.4.280.0130.07319.00
5.4.270.0070.07718.99
5.4.260.0070.08019.26
5.4.250.0130.05718.84
5.4.240.0100.06019.11
5.4.230.0170.06019.25
5.4.220.0070.05719.23
5.4.210.0000.06019.00
5.4.200.0100.04019.07
5.4.190.0170.05318.96
5.4.180.0100.07319.14
5.4.170.0170.06019.13
5.4.160.0100.03718.85
5.4.150.0070.04318.83
5.4.140.0070.08016.32
5.4.130.0070.07716.55
5.4.120.0070.07716.55
5.4.110.0100.06016.30
5.4.100.0070.07716.35
5.4.90.0070.06316.33
5.4.80.0070.06716.42
5.4.70.0070.05716.46
5.4.60.0070.07316.31
5.4.50.0000.04016.38
5.4.40.0030.03716.27
5.4.30.0000.04016.27
5.4.20.0000.03716.40
5.4.10.0100.03316.64
5.4.00.0030.03315.74
5.3.290.0070.04714.69
5.3.280.0030.08014.50
5.3.270.0030.07714.60
5.3.260.0000.05314.48
5.3.250.0070.06314.60
5.3.240.0030.08014.63
5.3.230.0030.08314.66
5.3.220.0070.03714.45
5.3.210.0030.05714.55
5.3.200.0030.05314.56
5.3.190.0000.07714.59
5.3.180.0000.08014.55
5.3.170.0100.03314.63
5.3.160.0030.04714.62
5.3.150.0070.04314.71
5.3.140.0000.04014.44
5.3.130.0100.03014.55
5.3.120.0070.04014.58
5.3.110.0100.03014.57
5.3.100.0030.03714.03
5.3.90.0030.03713.90
5.3.80.0000.03713.90
5.3.70.0030.03714.16
5.3.60.0000.04314.03
5.3.50.0030.03313.94
5.3.40.0030.03713.96
5.3.30.0070.03013.87
5.3.20.0000.03713.74
5.3.10.0070.04313.67
5.3.00.0070.03013.68
5.2.170.0000.03711.14
5.2.160.0000.03311.19
5.2.150.0000.03011.14
5.2.140.0000.03011.18
5.2.130.0000.03011.15
5.2.120.0100.02310.99
5.2.110.0000.03011.24
5.2.100.0000.03011.18
5.2.90.0000.03311.04
5.2.80.0000.03010.98
5.2.70.0030.03311.05
5.2.60.0030.02711.00
5.2.50.0070.02311.05
5.2.40.0000.03010.91
5.2.30.0030.02711.02
5.2.20.0070.02710.96
5.2.10.0030.02710.85
5.2.00.0070.02310.72
5.1.60.0030.02010.13
5.1.50.0100.01710.05
5.1.40.0000.02310.12
5.1.30.0070.02010.23
5.1.20.0030.02310.38
5.1.10.0000.03010.12
5.1.00.0000.02710.06
5.0.50.0000.0238.55
5.0.40.0070.0138.38
5.0.30.0000.0308.19
5.0.20.0000.0208.15
5.0.10.0000.0338.07
5.0.00.0000.0338.06
4.4.90.0030.0137.82
4.4.80.0000.0177.82
4.4.70.0000.0177.82
4.4.60.0130.0037.82
4.4.50.0000.0137.82
4.4.40.0000.0277.82
4.4.30.0030.0137.82
4.4.20.0030.0137.82
4.4.10.0000.0177.82
4.4.00.0000.0237.82
4.3.110.0030.0137.82
4.3.100.0000.0137.82
4.3.90.0000.0177.82
4.3.80.0030.0337.82
4.3.70.0000.0237.82
4.3.60.0000.0377.82
4.3.50.0000.0177.82
4.3.40.0000.0237.82
4.3.30.0000.0237.82
4.3.20.0030.0277.82
4.3.10.0000.0377.82
4.3.00.0000.0237.82

preferences:
59.88 ms | 401 KiB | 5 Q