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(); } } $php7 = '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":19:{x:i:0;r:2;;m:a:0:{}}}'; $container = unserialize($php7); 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.0040.01118.55
8.3.60.0100.00716.75
8.3.50.0120.01018.30
8.3.40.0130.00318.81
8.3.30.0140.00318.72
8.3.20.0060.00920.21
8.3.10.0040.00422.09
8.3.00.0070.01123.52
8.2.190.0130.00616.75
8.2.180.0120.00318.18
8.2.170.0100.00622.96
8.2.160.0060.00919.46
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00419.27
8.2.120.0040.00426.35
8.2.110.0000.01021.18
8.2.100.0080.00317.91
8.2.90.0030.00618.16
8.2.80.0050.00317.97
8.2.70.0080.00017.50
8.2.60.0000.00817.63
8.2.50.0030.00718.00
8.2.40.0030.00619.35
8.2.30.0050.00520.91
8.2.20.0030.00618.19
8.2.10.0080.00018.06
8.2.00.0000.00718.20
8.1.280.0130.00625.92
8.1.270.0000.00823.79
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.88
8.1.230.0040.00720.97
8.1.220.0030.00617.79
8.1.210.0050.00318.77
8.1.200.0000.00817.64
8.1.190.0000.00817.35
8.1.180.0050.00518.10
8.1.170.0050.00317.62
8.1.160.0070.00018.95
8.1.150.0000.00720.07
8.1.140.0000.00819.61
8.1.130.0040.00420.67
8.1.120.0040.00417.52
8.1.110.0050.00317.33
8.1.100.0040.00417.51
8.1.90.0040.00417.45
8.1.80.0040.00417.50
8.1.70.0070.00017.36
8.1.60.0030.00617.59
8.1.50.0080.00017.43
8.1.40.0030.00517.42
8.1.30.0000.00817.65
8.1.20.0060.00317.55
8.1.10.0040.00417.51
8.1.00.0000.00717.38
8.0.300.0040.00420.14
8.0.290.0000.00816.63
8.0.280.0000.00918.45
8.0.270.0040.00416.95
8.0.260.0030.00318.57
8.0.250.0030.00317.01
8.0.240.0040.00416.91
8.0.230.0110.00017.06
8.0.220.0030.00317.00
8.0.210.0040.00417.01
8.0.200.0050.00316.92
8.0.190.0000.00816.91
8.0.180.0000.00816.88
8.0.170.0030.00716.88
8.0.160.0000.00716.94
8.0.150.0040.00416.98
8.0.140.0040.00416.83
8.0.130.0030.00613.43
8.0.120.0000.00716.92
8.0.110.0040.00416.89
8.0.100.0070.00016.95
8.0.90.0070.00016.92
8.0.80.0030.01116.89
8.0.70.0040.00416.84
8.0.60.0000.00716.92
8.0.50.0070.00016.87
8.0.30.0130.00717.18
8.0.20.0110.00917.40
8.0.10.0040.00416.92
8.0.00.0030.01416.83
7.4.330.0000.00515.55
7.4.320.0030.00316.65
7.4.300.0000.00616.56
7.4.290.0030.00716.62
7.4.280.0000.00716.56
7.4.270.0100.00016.60
7.4.260.0070.00016.63
7.4.250.0000.00816.59
7.4.240.0040.00416.55
7.4.230.0070.00016.69
7.4.220.0070.01116.46
7.4.210.0030.01216.64
7.4.200.0030.00316.40
7.4.160.0040.01216.44
7.4.150.0120.00917.40
7.4.140.0110.00717.86
7.4.130.0090.00916.55
7.4.120.0100.00816.54
7.4.110.0070.01116.42
7.4.100.0110.01116.60
7.4.90.0070.01016.62
7.4.80.0090.01219.39
7.4.70.0150.00616.39
7.4.60.0100.00616.51
7.4.50.0080.00816.50
7.4.40.0060.01116.71
7.4.30.0080.00816.28
7.4.00.0030.01014.98
7.3.330.0050.00013.28
7.3.320.0000.00513.25
7.3.310.0030.00316.27
7.3.300.0030.00316.24
7.3.290.0090.00616.29
7.3.280.0090.00716.33
7.3.270.0130.01017.40
7.3.260.0080.01116.46
7.3.250.0080.01016.44
7.3.240.0130.00816.53
7.3.230.0100.00616.45
7.3.210.0060.00916.25
7.3.200.0040.01216.41
7.3.190.0120.00416.46
7.3.180.0330.02416.35
7.3.170.0140.00716.23
7.3.160.0030.01316.37
7.2.330.0090.00916.75
7.2.320.0120.00916.70
7.2.310.0130.01016.41
7.2.300.0100.00716.75
7.2.290.0130.00916.53
7.2.60.0030.01316.74
7.1.200.0030.00915.73
7.1.100.2170.01316.15
7.1.90.2340.01016.04
7.1.80.3390.00615.88
7.1.70.2830.00715.09
7.1.60.3800.01033.18
7.1.50.3850.01032.91
7.1.40.4220.01732.49
7.1.30.5150.02332.42
7.1.20.4580.01332.61
7.1.10.3630.00714.75
7.1.00.3230.01614.75
7.0.240.2300.00715.28
7.0.230.2480.00315.75
7.0.220.2950.00715.91
7.0.210.3010.01014.60
7.0.200.5390.01315.16
7.0.190.5000.00714.96
7.0.180.2890.01714.63
7.0.170.6810.00614.32
7.0.160.5060.01014.47
7.0.150.3460.01314.35
7.0.140.3490.01314.62
7.0.130.3270.00314.90
7.0.120.4130.01014.63
7.0.110.4010.01314.39
7.0.100.3650.01014.50
7.0.90.0130.00914.31
7.0.80.0290.01014.30
7.0.70.0210.00714.39
7.0.60.5290.01014.33
7.0.50.0200.01014.60
7.0.40.0080.01214.83
7.0.30.0410.01914.80
7.0.20.0080.01114.39
7.0.10.0270.00914.76
7.0.00.0570.01214.64

preferences:
29.29 ms | 401 KiB | 5 Q