3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Item { private $notifier; public function __construct(callable $notifier) { $this->notifier = $notifier; } private function setTtl($time) { call_user_func($this->notifier, $time); } } class Pool { private $ttls = []; public function getItem($id) { return new Item(function ($ttl) use ($id) { $this->ttls[$id] = $ttl; }); } public function getTtl($id) { return $this->ttls[$id]; } } $pool = new Pool; $item = $pool->getItem('foo'); $item->setTtl(60); echo $pool->getTtl('foo');

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.0160.00616.63
8.3.50.0110.00718.32
8.3.40.0210.00018.84
8.3.30.0060.00918.92
8.3.20.0070.00020.21
8.3.10.0070.00023.53
8.3.00.0040.00419.97
8.2.180.0030.01216.63
8.2.170.0100.00722.96
8.2.160.0140.00020.28
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0050.00521.11
8.2.120.0040.00426.35
8.2.110.0030.00722.31
8.2.100.0110.00017.80
8.2.90.0000.00919.11
8.2.80.0030.00517.97
8.2.70.0030.00617.63
8.2.60.0090.00017.93
8.2.50.0030.00618.07
8.2.40.0040.00422.15
8.2.30.0000.00820.52
8.2.20.0040.00417.82
8.2.10.0040.00418.00
8.2.00.0000.00718.01
8.1.270.0090.00620.38
8.1.260.0000.00828.09
8.1.250.0060.00328.09
8.1.240.0040.00423.92
8.1.230.0040.00819.01
8.1.220.0030.00517.77
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0000.00818.59
8.1.160.0080.00020.79
8.1.150.0000.00718.90
8.1.140.0040.00419.59
8.1.130.0030.00317.63
8.1.120.0040.00417.38
8.1.110.0050.00217.53
8.1.100.0030.00517.36
8.1.90.0000.00917.46
8.1.80.0080.00017.50
8.1.70.0000.00717.41
8.1.60.0050.00517.63
8.1.50.0040.00417.60
8.1.40.0040.00417.45
8.1.30.0040.00417.60
8.1.20.0080.00017.63
8.1.10.0040.00417.60
8.1.00.0080.00017.50
8.0.300.0030.00618.77
8.0.290.0000.00716.63
8.0.280.0000.00818.28
8.0.270.0040.00417.20
8.0.260.0030.00317.21
8.0.250.0030.00316.95
8.0.240.0040.00417.03
8.0.230.0040.00416.92
8.0.220.0080.00016.86
8.0.210.0070.00016.80
8.0.200.0070.00016.97
8.0.190.0030.00617.04
8.0.180.0040.00416.89
8.0.170.0030.00616.96
8.0.160.0000.00716.98
8.0.150.0040.00316.89
8.0.140.0040.00416.93
8.0.130.0060.00013.36
8.0.120.0080.00016.93
8.0.110.0050.00216.99
8.0.100.0040.00416.77
8.0.90.0070.00016.96
8.0.80.0030.01216.98
8.0.70.0070.00016.78
8.0.60.0040.00416.96
8.0.50.0070.00016.89
8.0.30.0150.00416.99
8.0.20.0090.01217.40
8.0.10.0000.00716.95
8.0.00.0080.01016.66
7.4.330.0050.00016.77
7.4.320.0000.00716.50
7.4.300.0070.00016.47
7.4.290.0000.00816.63
7.4.280.0000.00816.45
7.4.270.0000.00716.53
7.4.260.0000.00816.60
7.4.250.0040.00416.50
7.4.240.0020.00516.57
7.4.230.0000.00716.61
7.4.220.0060.01116.53
7.4.210.0040.01116.62
7.4.200.0030.00516.66
7.4.160.0060.00916.60
7.4.150.0100.00717.40
7.4.140.0170.00517.86
7.4.130.0090.01116.57
7.4.120.0080.01116.58
7.4.110.0100.00716.55
7.4.100.0110.01116.51
7.4.90.0150.00816.56
7.4.80.0070.01019.39
7.4.70.0030.01316.54
7.4.60.0070.01016.45
7.4.50.0080.00616.65
7.4.40.0000.01616.59
7.4.30.0100.00716.59
7.4.00.0080.00915.08
7.3.330.0040.00413.37
7.3.320.0000.00613.37
7.3.310.0030.00316.38
7.3.300.0070.00016.20
7.3.290.0070.01016.33
7.3.280.0090.00816.33
7.3.270.0130.00317.40
7.3.260.0140.01116.38
7.3.250.0090.01116.38
7.3.240.0050.01216.48
7.3.230.0070.01016.45
7.3.210.0100.00716.25
7.3.200.0110.00816.30
7.3.190.0100.01016.43
7.3.180.0070.01016.57
7.3.170.0080.00816.52
7.3.160.0030.01416.34
7.3.120.0030.01414.91
7.3.110.0040.01514.74
7.3.100.0150.00014.96
7.3.90.0030.00914.68
7.3.80.0110.00414.88
7.3.70.0100.00714.67
7.3.60.0060.00614.77
7.3.50.0080.00414.85
7.3.40.0030.00914.71
7.3.30.0070.00714.81
7.3.20.0070.00716.38
7.3.10.0060.00916.58
7.3.00.0120.00316.47
7.2.330.0180.00616.77
7.2.320.0130.01016.28
7.2.310.0060.01116.40
7.2.300.0090.00916.61
7.2.290.0150.00316.45
7.2.250.0060.01315.18
7.2.240.0070.01415.24
7.2.230.0030.01414.66
7.2.220.0030.01514.78
7.2.210.0070.00715.16
7.2.200.0070.00715.09
7.2.190.0070.00714.76
7.2.180.0000.01314.94
7.2.170.0070.00715.01
7.2.60.0040.01116.80
7.2.00.0060.01019.47
7.1.330.0060.01215.44
7.1.320.0030.01015.71
7.1.310.0030.01215.91
7.1.300.0040.01115.66
7.1.290.0030.01415.86
7.1.280.0070.00715.89
7.1.270.0140.00415.56
7.1.260.0030.01015.96
7.1.200.0080.00315.57
7.1.100.0000.00918.12
7.1.70.0000.00917.16
7.1.60.0140.01019.52
7.1.50.0060.01016.96
7.1.00.0000.07722.42
7.0.200.0030.00814.92
7.0.60.0070.08319.96
7.0.50.0100.03317.86
7.0.40.0130.08020.23
7.0.30.0270.06320.07
7.0.20.0070.05020.15
7.0.10.0130.07320.05
7.0.00.0100.07320.25
5.6.280.0070.04321.13
5.6.210.0100.07720.58
5.6.200.0070.07318.29
5.6.190.0000.05020.46
5.6.180.0330.06720.50
5.6.170.0170.04320.60
5.6.160.0100.05320.52
5.6.150.0070.06318.14
5.6.140.0100.04318.18
5.6.130.0070.04718.21
5.6.120.0070.03721.03
5.6.110.0070.04021.13
5.6.100.0070.09021.14
5.6.90.0100.07721.12
5.6.80.0100.07720.43
5.5.350.0200.07720.44
5.5.340.0030.06318.05
5.5.330.0130.08020.42
5.5.320.0570.05720.36
5.5.310.0230.08320.42
5.5.300.0130.07017.95
5.5.290.0100.07317.95
5.5.280.0000.05020.86
5.5.270.0130.05320.74
5.5.260.0000.05720.73
5.5.250.0100.05320.71
5.5.240.0230.08020.15

preferences:
52.4 ms | 400 KiB | 5 Q