3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Container implements Iterator { private $container; private $iterator; public function __construct() { $this->container = new ArrayObject(); $this->iterator = $this->container->getIterator(); } public function append($element) { $this->container->append($element); } public function current() { return $this->iterator->current(); } public function next() { $this->iterator->next(); } public function key() { return $this->iterator->key(); } public function valid() { return $this->iterator->valid(); } public function rewind() { $this->iterator->rewind(); } } $php5 = 'O:9:"Container":2:{s:20:"Containercontainer";C:11:"ArrayObject":53:{x:i:0;a:2:{i:0;s:5:"test1";i:1;s:5:"test2";};m:a:0:{}}s:19:"Containeriterator";C:13:"ArrayIterator":26:{x:i:16777216;r:2;;m:a:0:{}}}'; $container = unserialize($php5); var_dump($container); foreach ($container as $key => $value) { echo $key . ' => ' . $value . PHP_EOL; }

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.0080.01218.43
8.3.60.0120.00616.63
8.3.50.0130.00818.41
8.3.40.0140.00018.71
8.3.30.0150.00018.72
8.3.20.0140.00020.13
8.3.10.0080.00022.05
8.3.00.0050.00323.48
8.2.190.0040.01117.00
8.2.180.0040.01118.16
8.2.170.0090.00622.96
8.2.160.0030.01019.29
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0170.00019.21
8.2.120.0040.00426.35
8.2.110.0050.00520.38
8.2.100.0060.00617.78
8.2.90.0030.00517.88
8.2.80.0050.00318.73
8.2.70.0030.00517.50
8.2.60.0040.00417.50
8.2.50.0050.00317.80
8.2.40.0040.00417.92
8.2.30.0080.00419.29
8.2.20.0050.00217.99
8.2.10.0080.00018.14
8.2.00.0000.00718.02
8.1.280.0110.00425.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0100.00023.80
8.1.230.0080.00420.88
8.1.220.0030.00618.68
8.1.210.0050.00318.77
8.1.200.0000.00817.35
8.1.190.0100.00317.10
8.1.180.0040.00418.10
8.1.170.0080.00017.62
8.1.160.0000.00818.92
8.1.150.0020.00520.27
8.1.140.0050.00319.54
8.1.130.0070.00020.81
8.1.120.0050.00217.39
8.1.110.0000.00817.37
8.1.100.0040.00417.40
8.1.90.0050.00317.46
8.1.80.0070.00017.47
8.1.70.0040.00417.41
8.1.60.0030.00517.48
8.1.50.0040.00417.50
8.1.40.0000.00717.52
8.1.30.0040.00417.70
8.1.20.0040.00417.62
8.1.10.0050.00317.39
8.1.00.0040.00417.45
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.01018.46
8.0.270.0070.00016.90
8.0.260.0000.00618.43
8.0.250.0000.00717.03
8.0.240.0000.00717.02
8.0.230.0030.00717.06
8.0.220.0050.00216.99
8.0.210.0000.00716.96
8.0.200.0000.00817.07
8.0.190.0040.00417.10
8.0.180.0040.00416.95
8.0.170.0030.00317.06
8.0.160.0030.00317.07
8.0.150.0050.00216.95
8.0.140.0070.00016.89
8.0.130.0030.00313.41
8.0.120.0040.00416.92
8.0.110.0000.00816.80
8.0.100.0000.00717.04
8.0.90.0070.00016.80
8.0.80.0080.00617.05
8.0.70.0050.00216.97
8.0.60.0000.00816.80
8.0.50.0040.00416.98
8.0.30.0090.01017.07
8.0.20.0160.00517.40
8.0.10.0000.00716.88
8.0.00.0100.00716.74
7.4.330.0000.00515.55
7.4.320.0000.00616.68
7.4.300.0070.00016.38
7.4.290.0000.00916.62
7.4.280.0000.00816.51
7.4.270.0030.00616.60
7.4.260.0050.00316.49
7.4.250.0030.00316.48
7.4.240.0000.00716.54
7.4.230.0080.00016.42
7.4.220.0160.00716.39
7.4.210.0110.00416.60
7.4.200.0070.00016.50
7.4.160.0060.01016.40
7.4.150.0110.00717.40
7.4.140.0080.01017.86
7.4.130.0090.00916.71
7.4.120.0070.01216.54
7.4.110.0120.00616.61
7.4.100.0110.00916.64
7.4.90.0130.01016.67
7.4.80.0090.00919.39
7.4.70.0110.00716.47
7.4.60.0080.01016.35
7.4.50.0030.00916.68
7.4.40.0060.01016.59
7.4.30.0030.01316.42
7.4.10.0040.01414.91
7.4.00.0100.00915.06
7.3.330.0000.00513.15
7.3.320.0000.00513.09
7.3.310.0040.00416.32
7.3.300.0000.00616.33
7.3.290.0070.00816.35
7.3.280.0080.00916.30
7.3.270.0060.01217.40
7.3.260.0090.01016.36
7.3.250.0120.00816.40
7.3.240.0070.01116.60
7.3.230.0090.00916.41
7.3.210.0080.01116.41
7.3.200.0120.00316.63
7.3.190.0060.00916.44
7.3.180.0120.00816.29
7.3.170.0100.00616.30
7.3.160.0080.01216.32
7.3.130.0030.01614.81
7.3.120.0100.00814.85
7.3.110.0100.00514.98
7.3.100.0060.00814.77
7.3.90.0020.01115.03
7.3.80.0050.00814.92
7.3.70.0100.00214.82
7.3.60.0040.01114.59
7.3.50.0060.00614.74
7.3.40.0060.01014.75
7.3.30.0060.00914.89
7.3.20.0080.00416.59
7.3.10.0030.01216.48
7.3.00.0070.00816.61
7.2.330.0070.01116.53
7.2.320.0100.00716.68
7.2.310.0120.00616.43
7.2.300.0000.02216.61
7.2.290.0110.00716.76
7.2.260.0150.00415.04
7.2.250.0150.00015.18
7.2.240.0060.01115.22
7.2.230.0090.00714.95
7.2.220.0000.01315.13
7.2.210.0070.00514.77
7.2.200.0050.00514.97
7.2.190.0030.01214.86
7.2.180.0060.00815.12
7.2.170.0050.00914.97
7.2.160.0050.01114.94
7.2.150.0060.00716.86
7.2.140.0080.00816.92
7.2.130.0090.00916.80
7.2.120.0080.01116.68
7.2.110.0080.00916.81
7.2.100.0080.00916.75
7.2.90.0090.00716.87
7.2.80.0060.00716.71
7.2.70.0040.00916.83
7.2.60.0070.00716.77
7.2.50.0080.01216.82
7.2.40.0070.00716.88
7.2.30.0060.00816.72
7.2.20.0060.00916.85
7.2.10.0030.01216.72
7.2.00.0070.00816.76
7.1.330.0050.01215.64
7.1.320.0040.01015.80
7.1.310.0050.00815.71
7.1.300.0090.00515.83
7.1.290.0020.01315.83
7.1.280.0060.00515.77
7.1.270.0060.00615.66
7.1.260.0090.00615.77
7.1.250.0070.01015.61
7.1.240.0160.00015.83
7.1.230.0030.01515.93
7.1.220.0060.01215.80
7.1.210.0090.00615.74
7.1.200.0020.01215.64
7.1.190.0040.01215.66
7.1.180.0030.01015.43
7.1.170.0060.00615.77
7.1.160.0030.00615.93
7.1.150.0110.00015.45
7.1.140.0100.00315.92
7.1.130.0090.00315.87
7.1.120.0000.01115.95
7.1.110.0080.00415.54
7.1.100.1010.00615.73
7.1.90.0130.00915.72
7.1.80.0320.00815.82
7.1.70.0110.00815.32
7.1.60.1200.01024.48
7.1.50.0310.01424.33
7.1.40.0890.01224.12
7.1.30.1240.01524.26
7.1.20.0860.01524.16
7.1.10.0960.01415.23
7.1.00.0870.01315.30
7.0.330.0050.00515.59
7.0.320.0030.01015.23
7.0.310.0030.00515.09
7.0.300.0030.01015.19
7.0.290.0030.01015.38
7.0.280.0090.00015.35
7.0.270.0040.01115.42
7.0.260.0030.00915.30
7.0.250.0080.00615.48
7.0.240.1180.00815.57
7.0.230.0790.01015.49
7.0.220.0330.00815.55
7.0.210.1120.01215.07
7.0.200.1180.01115.15
7.0.190.0110.01415.19
7.0.180.0290.01014.86
7.0.170.1180.01314.83
7.0.160.0780.01014.88
7.0.150.1130.01114.94
7.0.140.0880.00514.95
7.0.130.1190.01014.86
7.0.120.1220.00715.06
7.0.110.0970.00614.84
7.0.100.0050.01314.70
7.0.90.1300.00814.87
7.0.80.0120.00915.04
7.0.70.0150.01014.86
7.0.60.0450.01314.74
7.0.50.0080.00715.06
7.0.40.0240.00813.92
7.0.30.0070.00814.02
7.0.20.0080.00814.07
7.0.10.0070.00914.07
7.0.00.0250.01114.05
5.6.400.0100.00714.16
5.6.390.0040.00814.46
5.6.380.0030.00614.69
5.6.370.0080.00514.67
5.6.360.0040.00814.41
5.6.350.0100.00314.58
5.6.340.0000.01214.36
5.6.330.0110.00714.58
5.6.320.0140.00014.63
5.6.310.0030.01014.44
5.6.300.0090.00614.36
5.6.290.0050.00814.18
5.6.280.0040.01214.41
5.6.270.0060.01114.43
5.6.260.0030.01414.10
5.6.250.0050.00514.62
5.6.240.0060.00614.23
5.6.230.0030.01314.41
5.6.220.0110.00614.44
5.6.210.0060.00314.39
5.6.200.0030.00914.21
5.6.190.0030.01014.34
5.6.180.0070.00414.60
5.6.170.0070.01014.31
5.6.160.0070.01014.14
5.6.150.0090.00314.62
5.6.140.0030.00614.23
5.6.130.0030.00814.52
5.6.120.0100.00314.21
5.6.110.0080.00414.23
5.6.100.0150.00014.19
5.6.90.0000.00914.34
5.6.80.0100.00314.11
5.6.70.0030.00614.37
5.6.60.0070.01014.22
5.6.50.0040.01114.29
5.6.40.0060.00614.18
5.6.30.0000.00914.26
5.6.20.0030.00713.93
5.6.10.0030.00913.93
5.6.00.0030.00614.15

preferences:
50.72 ms | 401 KiB | 5 Q