3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Entity { protected $_properties = []; public function &__get($property) { $value = null; return $value; } public function __set($property, $value) { $property = [$property => $value]; foreach ($property as $p => $value) { $this->_properties[$p] = $value; } } } class CustomIterator extends IteratorIterator { public $callback; public function __construct($items) { $this->callback = function ($a) { $a->foo .= ' world'; return $a; }; parent::__construct($items); } public function current() { $c = $this->callback; return $c(parent::current()); } } $entity = new Entity(); $it = new CustomIterator(new ArrayIterator([$entity])); $it->rewind(); var_dump($it->current());
based on S3fTZ

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.0.30.0100.00817.06
8.0.20.0090.01417.40
8.0.00.0120.00616.76
7.4.150.0090.00917.40
7.4.140.0110.00917.86
7.4.130.0080.01016.52
7.4.120.0090.00816.61
7.4.110.0120.00416.56
7.4.100.0090.00816.45
7.4.90.0090.01216.60
7.4.80.0110.00519.39
7.4.70.0090.00916.61
7.4.60.0120.00316.46
7.4.50.0030.00516.56
7.4.40.0040.01316.23
7.4.30.0100.00716.57
7.4.10.0030.01015.08
7.4.00.0070.00615.14
7.3.270.0070.01017.40
7.3.260.0100.00716.52
7.3.250.0050.01216.49
7.3.240.0070.01016.47
7.3.230.0060.01116.68
7.3.210.0100.00716.60
7.3.200.0060.01519.39
7.3.190.0030.01416.48
7.3.180.0100.00616.32
7.3.170.0110.01016.57
7.3.160.0130.00316.31
7.3.130.0140.00314.88
7.3.120.0110.00715.08
7.3.110.0000.01814.77
7.3.100.0100.00614.66
7.3.90.0040.01114.93
7.3.80.0090.00915.03
7.3.70.0100.00314.93
7.3.60.0000.00914.99
7.3.50.0110.00314.76
7.3.40.0070.01114.84
7.3.30.0030.00914.85
7.3.20.0000.01216.81
7.3.10.0030.00816.50
7.3.00.0050.00816.78
7.2.330.0060.01616.72
7.2.320.0110.00816.39
7.2.310.0060.01216.83
7.2.300.0050.01116.70
7.2.290.0100.00716.52
7.2.260.0070.01115.24
7.2.250.0070.00715.05
7.2.240.0000.01415.04
7.2.230.0140.00315.20
7.2.220.0070.01015.14
7.2.210.0060.00614.98
7.2.200.0110.00415.10
7.2.190.0070.00715.01
7.2.180.0080.00815.16
7.2.170.0000.01315.04
7.2.160.0030.01215.22
7.2.150.0030.00716.85
7.2.140.0060.00617.04
7.2.130.0050.00816.96
7.2.120.0090.00516.88
7.2.110.0060.00416.90
7.2.100.0100.00316.86
7.2.90.0080.00517.06
7.2.80.0070.00617.13
7.2.70.0060.00817.08
7.2.60.0070.00616.86
7.2.50.0050.00917.06
7.2.40.0080.00517.06
7.2.30.0080.00817.10
7.2.20.0050.00416.98
7.2.10.0030.00816.98
7.2.00.0050.00717.74
7.1.330.0030.01015.95
7.1.320.0060.00915.89
7.1.310.0030.00916.03
7.1.300.0030.00715.93
7.1.290.0080.01115.65
7.1.280.0090.00615.68
7.1.270.0120.00315.76
7.1.260.0090.00615.78
7.1.250.0040.00915.78
7.1.240.0060.01216.00
7.1.230.0060.00315.76
7.1.220.0040.01115.95
7.1.210.0040.00815.91
7.1.200.0090.00715.90
7.1.190.0030.00715.84
7.1.180.0030.01215.80
7.1.170.0080.00415.58
7.1.160.0030.01015.80
7.1.150.0070.00715.86
7.1.140.0070.00415.79
7.1.130.0090.00615.86
7.1.120.0030.00915.81
7.1.110.0030.00815.58
7.1.100.0060.00717.07
7.1.90.0100.00615.93
7.1.80.0030.00915.89
7.1.70.0070.00116.52
7.1.60.0130.00517.75
7.1.50.0070.01116.38
7.1.40.0090.00315.98
7.1.30.0040.00415.83
7.1.20.0000.01115.76
7.1.10.0060.00915.62
7.1.00.0030.04019.04
7.0.330.0000.01515.44
7.0.320.0080.00015.14
7.0.310.0100.00315.42
7.0.300.0040.00915.36
7.0.290.0110.00715.46
7.0.280.0040.01115.48
7.0.270.0040.01215.59
7.0.260.0070.00315.27
7.0.250.0060.00615.57
7.0.240.0000.01615.36
7.0.230.0070.00715.53
7.0.220.0060.00315.34
7.0.210.0090.00315.55
7.0.200.0020.00916.19
7.0.190.0070.00715.59
7.0.180.0090.00315.64
7.0.170.0040.00415.51
7.0.160.0090.00615.52
7.0.150.0080.00615.50
7.0.140.0090.03518.74
7.0.130.0030.01015.46
7.0.120.0040.01115.20
7.0.110.0030.00915.49
7.0.100.0040.00815.55
7.0.90.0070.00315.45
7.0.80.0060.00615.69
7.0.70.0110.00315.49
7.0.60.0020.02617.51
7.0.50.0050.04716.63
7.0.40.0050.04216.84
7.0.30.0150.02216.84
7.0.20.0080.02916.86
7.0.10.0080.03816.78
7.0.00.0100.04316.88
5.6.400.0030.00914.31
5.6.390.0160.00314.50
5.6.380.0040.00814.52
5.6.370.0080.00414.49
5.6.360.0070.00714.86
5.6.350.0060.01214.67
5.6.340.0090.00614.44
5.6.330.0000.00914.64
5.6.320.0070.01014.31
5.6.310.0100.00714.18
5.6.300.0040.00714.65
5.6.290.0040.00814.61
5.6.280.0080.03817.81
5.6.270.0060.00614.43
5.6.260.0050.00814.68
5.6.250.0070.00714.55
5.6.240.0030.01314.45
5.6.230.0040.01214.68
5.6.220.0030.00614.32
5.6.210.0080.04217.66
5.6.200.0050.02616.35
5.6.190.0110.02417.47
5.6.180.0270.04017.64
5.6.170.0130.02817.51
5.6.160.0050.02317.56
5.6.150.0050.04716.28
5.6.140.0100.03416.24
5.6.130.0080.03016.29
5.6.120.0100.03917.74
5.6.110.0060.02017.74
5.6.100.0040.03917.79
5.6.90.0090.04217.62
5.6.80.0030.04117.45
5.6.70.0090.00614.31
5.6.60.0060.00614.36
5.6.50.0030.01514.24
5.6.40.0060.00314.50
5.6.30.0070.00714.23
5.6.20.0030.01014.32
5.6.10.0000.01014.47
5.6.00.0100.00314.31
5.5.380.0040.01114.75
5.5.370.0040.00814.27
5.5.360.0060.00614.62
5.5.350.0180.04117.21
5.5.340.0050.02116.32
5.5.330.0050.04517.46
5.5.320.0070.02717.37
5.5.310.0170.04217.34
5.5.300.0070.03716.39
5.5.290.0050.04416.26
5.5.280.0120.02617.65
5.5.270.0080.04317.68
5.5.260.0090.04317.83
5.5.250.0050.03117.55
5.5.240.0160.04317.28
5.5.230.0060.00614.50
5.5.220.0040.01114.75
5.5.210.0070.01114.44
5.5.200.0130.00014.45
5.5.190.0040.01214.63
5.5.180.0100.00314.31
5.5.170.0000.01614.00
5.5.160.0000.01514.49
5.5.150.0000.01114.57
5.5.140.0100.00014.29
5.5.130.0030.00914.00
5.5.120.0000.01314.37
5.5.110.0060.00614.41
5.5.100.0030.00714.04
5.5.90.0090.00614.23
5.5.80.0030.01014.36
5.5.70.0120.00014.27
5.5.60.0090.00314.50
5.5.50.0110.00314.30
5.5.40.0120.00414.11
5.5.30.0000.01114.46
5.5.20.0050.00514.46
5.5.10.0070.00414.20
5.5.00.0040.00414.41
5.4.450.0400.03015.43
5.4.440.0310.03015.47
5.4.430.0400.03415.31
5.4.420.0420.03015.41
5.4.410.0400.03015.35
5.4.400.0630.02715.18
5.4.390.0070.03015.21
5.4.380.0070.03414.92
5.4.370.0080.03215.03
5.4.360.0100.02914.94
5.4.350.0050.03414.94
5.4.340.0100.02514.99
5.4.330.0030.00611.28
5.4.320.0070.03315.06
5.4.310.0080.03015.02
5.4.300.0050.03414.95
5.4.290.0060.03114.90
5.4.280.0050.03315.03
5.4.270.0050.03314.98
5.4.260.0070.03014.89
5.4.250.0110.02714.94
5.4.240.0100.03015.03
5.4.230.0070.02814.94
5.4.220.0120.02715.03
5.4.210.0080.03114.93
5.4.200.0100.02713.94
5.4.190.0120.02615.06
5.4.180.0100.02715.02
5.4.170.0100.02815.00
5.4.160.0110.02514.88
5.4.150.0100.02815.02
5.4.140.0040.03213.75
5.4.130.0160.02113.77
5.4.120.0100.03113.84
5.4.110.0100.02613.76
5.4.100.0100.02713.79
5.4.90.0080.02913.78
5.4.80.0070.02913.77
5.4.70.0070.03013.85
5.4.60.0100.02713.75
5.4.50.0100.02513.77
5.4.40.0100.02613.78
5.4.30.0100.02613.86
5.4.20.0070.02913.87
5.4.10.0170.02513.80
5.4.00.0090.02513.54
5.3.290.0170.05014.68
5.3.280.0100.05314.69
5.3.270.0170.05014.66
5.3.260.0130.05314.65
5.3.250.0070.06014.78
5.3.240.0070.05714.82
5.3.230.0170.04714.76
5.3.220.0200.04314.59
5.3.210.0130.05014.78
5.3.200.0100.07714.77
5.3.190.0100.07714.69
5.3.180.0170.04714.73
5.3.170.0100.05314.61
5.3.160.0170.04714.61
5.3.150.0170.04714.66
5.3.140.0170.04714.73
5.3.130.0100.05714.77
5.3.120.0130.05314.71
5.3.110.0130.05314.52
5.3.100.0130.05314.18
5.3.90.0170.06714.03
5.3.80.0070.05714.08
5.3.70.0130.05014.08
5.3.60.0200.04314.20
5.3.50.0200.05713.96
5.3.40.0130.05014.04
5.3.30.0130.04713.89
5.3.20.0170.05313.72
5.3.10.0170.04313.78
5.3.00.0070.05313.67
5.2.170.0170.03711.23
5.2.160.0130.03711.18
5.2.150.0100.04311.23
5.2.140.0070.04711.19
5.2.130.0130.03711.16
5.2.120.0030.04711.21
5.2.110.0070.04311.11
5.2.100.0100.04011.30
5.2.90.0100.04011.22
5.2.80.0170.04011.29
5.2.70.0130.04011.21
5.2.60.0130.04011.07
5.2.50.0100.05711.03
5.2.40.0100.04011.09
5.2.30.0130.04011.09
5.2.20.0200.04311.00
5.2.10.0130.03311.08
5.2.00.0130.03710.91
5.1.60.0170.02710.01
5.1.50.0030.04010.16
5.1.40.0070.03710.04
5.1.30.0170.04310.38
5.1.20.0070.03710.48
5.1.10.0200.03310.08
5.1.00.0200.02310.10
5.0.50.0030.0338.66
5.0.40.0030.0308.61
5.0.30.0030.0438.35
5.0.20.0070.0278.27
5.0.10.0030.0308.21
5.0.00.0130.0478.33
4.4.90.0070.0305.91
4.4.80.0000.0275.91
4.4.70.0130.0235.95
4.4.60.0000.0275.98
4.4.50.0070.0205.94
4.4.40.0100.0306.00
4.4.30.0030.0236.01
4.4.20.0100.0175.97
4.4.10.0070.0206.07
4.4.00.0000.0375.96
4.3.110.0070.0205.88
4.3.100.0100.0175.81
4.3.90.0000.0235.79
4.3.80.0000.0375.79
4.3.70.0030.0205.78
4.3.60.0100.0175.79
4.3.50.0070.0205.78
4.3.40.0030.0335.75
4.3.30.0000.0234.68
4.3.20.0000.0234.53
4.3.10.0000.0234.62
4.3.00.0030.01314.77