3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Channel { private $data; public function set($data) { $this->data = $data; } public function get() { return $this->data; } } class Foo { private $channel; public function __construct($channel) { $this->channel = $channel; } public function writeToChannel($text) { $this->channel->set($text); } } class Bar { private $channel; public function __construct($channel) { $this->channel = $channel; } public function readFromChannel() { return $this->channel->get(); } } $channel = new Channel; $aaa = new Foo($channel); $bbb = new Bar($channel); $aaa->writeToChannel('test'); var_dump($bbb->readFromChannel()); $aaa->writeToChannel('foobar'); var_dump($bbb->readFromChannel());

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.80.0050.00516.37
8.3.70.0070.00716.63
8.3.60.0160.00618.55
8.3.50.0170.00221.09
8.3.40.0080.00818.57
8.3.30.0140.00318.67
8.3.20.0000.00720.16
8.3.10.0000.00821.64
8.3.00.0020.00522.50
8.2.200.0070.01116.75
8.2.190.0090.00916.58
8.2.180.0100.01025.92
8.2.170.0060.00922.96
8.2.160.0090.00919.28
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00421.05
8.2.110.0090.00019.38
8.2.100.0080.00417.66
8.2.90.0040.00419.51
8.2.80.0060.00617.97
8.2.70.0080.00017.50
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0000.00917.98
8.2.30.0000.00718.01
8.2.20.0050.00217.98
8.2.10.0000.00717.93
8.2.00.0040.00418.11
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0030.00624.00
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0060.00322.06
8.1.230.0000.01120.97
8.1.220.0000.00917.74
8.1.210.0000.00818.88
8.1.200.0060.00317.35
8.1.190.0060.00317.23
8.1.180.0030.00618.10
8.1.170.0000.00818.59
8.1.160.0070.00018.87
8.1.150.0040.00419.99
8.1.140.0100.00019.51
8.1.130.0070.00018.71
8.1.120.0000.00717.47
8.1.110.0080.00017.32
8.1.100.0070.00317.41
8.1.90.0000.00717.41
8.1.80.0040.00417.42
8.1.70.0000.00717.42
8.1.60.0050.00317.42
8.1.50.0040.00417.49
8.1.40.0060.00317.50
8.1.30.0050.00317.61
8.1.20.0030.00517.50
8.1.10.0040.00417.51
8.1.00.0000.00817.47
8.0.300.0050.00219.91
8.0.290.0040.00416.63
8.0.280.0000.00818.43
8.0.270.0050.00317.14
8.0.260.0030.00319.02
8.0.250.0030.00316.89
8.0.240.0040.00416.81
8.0.230.0000.00716.98
8.0.220.0030.00316.73
8.0.210.0040.00416.75
8.0.200.0030.00316.86
8.0.190.0050.00316.76
8.0.180.0030.00316.87
8.0.170.0070.00016.88
8.0.160.0040.00416.75
8.0.150.0000.00716.86
8.0.140.0040.00416.69
8.0.130.0000.00513.17
8.0.120.0040.00416.63
8.0.110.0040.00416.66
8.0.100.0040.00416.74
8.0.90.0040.00416.79
8.0.80.0100.00716.85
8.0.70.0040.00416.66
8.0.60.0000.00716.83
8.0.50.0030.00516.89
8.0.30.0100.00616.91
8.0.20.0080.01217.40
8.0.10.0080.00016.92
8.0.00.0110.00616.89
7.4.330.0050.00015.55
7.4.320.0060.00016.45
7.4.300.0000.00616.50
7.4.290.0000.00816.61
7.4.280.0040.00416.45
7.4.270.0000.00616.43
7.4.260.0030.00616.47
7.4.250.0070.00016.33
7.4.240.0070.00016.52
7.4.230.0040.00416.50
7.4.220.0180.00616.59
7.4.210.0070.00716.39
7.4.200.0070.00016.64
7.4.160.0120.00716.50
7.4.150.0090.01317.40
7.4.140.0140.00717.86
7.4.130.0080.01516.46
7.4.120.0130.01116.50
7.4.110.0140.00916.24
7.4.100.0140.00316.43
7.4.90.0120.00616.32
7.4.80.0070.01019.39
7.4.70.0040.01316.37
7.4.60.0150.00016.22
7.4.50.0000.01216.44
7.4.40.0080.01116.52
7.4.30.0080.00816.69
7.4.00.0070.01115.00
7.3.330.0000.00513.27
7.3.320.0000.00613.11
7.3.310.0000.00716.20
7.3.300.0000.00716.11
7.3.290.0080.00616.22
7.3.280.0090.01016.25
7.3.270.0120.00617.40
7.3.260.0110.01316.23
7.3.240.0130.00416.24
7.3.230.0070.01016.53
7.3.210.0130.00316.19
7.3.200.0030.01416.55
7.3.190.0080.01916.48
7.3.180.0130.00316.20
7.3.170.0140.00716.31
7.3.160.0190.00516.34
7.2.330.0110.00716.53
7.2.320.0110.01216.56
7.2.310.0040.01216.44
7.2.300.0090.00916.80
7.2.290.0060.01416.57
7.2.80.0030.00916.85
7.2.60.0080.00417.05
7.1.200.0000.01215.65
7.1.70.0000.00817.05
7.1.60.0060.00617.34
7.1.50.1070.01232.78
7.1.40.1030.01732.41
7.1.30.1200.01332.49
7.1.20.1400.01332.63
7.1.10.1170.02014.82
7.1.00.0800.01014.75
7.0.200.0000.01416.52
7.0.190.0030.02014.86
7.0.180.0830.01314.37
7.0.170.0900.00714.32
7.0.160.1430.01014.56
7.0.150.1070.01314.40
7.0.140.0930.01314.44
7.0.130.0700.01014.59
7.0.120.1100.01714.65
7.0.110.0770.01714.46
7.0.100.0870.00314.46
7.0.90.0770.01314.31
7.0.80.0630.01014.49
7.0.70.0800.01014.43
7.0.60.1170.01014.36
7.0.50.0630.00714.46
7.0.40.0530.01014.48
7.0.30.0500.01714.72
7.0.20.1130.00714.43
7.0.10.0800.01014.43
7.0.00.0800.01314.40

preferences:
29.24 ms | 401 KiB | 5 Q