3v4l.org

run code in 300+ PHP versions simultaneously
<?php class InfiniteNumbers implements Iterator { public $start; public $current; public function __construct($start) { $this->start = $start; $this->current = $start; } public function next() { $this->current++; } public function current() { return $this->current; } public function key() { return $this->current; } public function rewind() { $this->current = $this->start; } public function valid() { return true; } } $infinite = new InfiniteNumbers(1); var_dump($infinite); /* foreach($infinite as $number) { if($number > 1000) { break; } echo $number."\n"; } */

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.0190.00317.00
8.3.50.0070.01316.36
8.3.40.0000.01518.79
8.3.30.0120.00618.77
8.3.20.0110.00420.20
8.3.10.0030.00521.82
8.3.00.0070.00317.38
8.2.180.0110.00416.75
8.2.170.0120.00922.96
8.2.160.0140.00719.29
8.2.150.0140.00724.18
8.2.140.0040.00424.66
8.2.130.0000.00720.35
8.2.120.0080.00026.35
8.2.110.0070.00321.00
8.2.100.0070.00418.03
8.2.90.0060.00319.21
8.2.80.0080.00017.97
8.2.70.0000.00917.38
8.2.60.0040.00418.03
8.2.50.0050.00318.10
8.2.40.0060.00322.14
8.2.30.0040.00419.20
8.2.20.0040.00418.08
8.2.10.0020.00518.16
8.2.00.0040.00418.26
8.1.280.0090.00625.92
8.1.270.0030.00622.06
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0060.00323.83
8.1.230.0080.00419.18
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0040.00418.62
8.1.160.0030.00518.89
8.1.150.0040.00420.15
8.1.140.0040.00417.45
8.1.130.0000.00717.50
8.1.120.0070.00017.40
8.1.110.0040.00417.43
8.1.100.0000.00717.37
8.1.90.0000.00717.34
8.1.80.0040.00417.46
8.1.70.0070.00017.36
8.1.60.0050.00317.63
8.1.50.0050.00317.45
8.1.40.0000.00717.46
8.1.30.0040.00417.72
8.1.20.0000.00817.65
8.1.10.0000.00717.48
8.1.00.0020.00517.47
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0000.00718.46
8.0.270.0040.00416.72
8.0.260.0080.00016.77
8.0.250.0030.00316.89
8.0.240.0030.00316.98
8.0.230.0030.00317.06
8.0.220.0000.00716.96
8.0.210.0030.00616.81
8.0.200.0060.00316.97
8.0.190.0030.00516.98
8.0.180.0040.00416.98
8.0.170.0030.00516.97
8.0.160.0000.00916.88
8.0.150.0030.00616.93
8.0.140.0050.00216.91
8.0.130.0030.00313.31
8.0.120.0040.00416.91
8.0.110.0040.00416.92
8.0.100.0000.00816.97
8.0.90.0000.00816.77
8.0.80.0090.01316.83
8.0.70.0040.00416.91
8.0.60.0070.00016.97
8.0.50.0000.00716.79
8.0.30.0110.00817.12
8.0.20.0110.00717.40
8.0.10.0000.00717.09
8.0.00.0080.01116.71
7.4.330.0000.00515.55
7.4.320.0000.00716.51
7.4.300.0060.00016.43
7.4.290.0030.00616.61
7.4.280.0060.00316.59
7.4.270.0040.00416.51
7.4.260.0050.00013.27
7.4.250.0040.00416.38
7.4.240.0070.00016.52
7.4.230.0030.00316.45
7.4.220.0070.01416.50
7.4.210.0100.00316.41
7.4.200.0000.00716.40
7.4.160.0060.00916.51
7.4.150.0070.01117.40
7.4.140.0090.01117.86
7.4.130.0140.01016.46
7.4.120.0150.00916.50
7.4.110.0070.01016.60
7.4.100.0060.01216.28
7.4.90.0090.00916.59
7.4.80.0060.01219.39
7.4.70.0070.01016.36
7.4.60.0100.00716.42
7.4.50.0070.01016.48
7.4.40.0120.00916.47
7.4.30.0110.00616.41
7.4.00.0070.00915.13
7.3.330.0000.00513.19
7.3.320.0060.00013.10
7.3.310.0000.00616.33
7.3.300.0000.00716.19
7.3.290.0080.00916.23
7.3.280.0060.01316.20
7.3.270.0030.01417.40
7.3.260.0100.00916.24
7.3.250.0150.00616.36
7.3.240.0120.00716.43
7.3.230.0110.00716.44
7.3.210.0090.01216.51
7.3.200.0070.01016.27
7.3.190.0130.00716.41
7.3.180.0120.00616.26
7.3.170.0090.00916.63
7.3.160.0060.00916.45
7.3.120.0120.00914.82
7.3.110.0070.01014.62
7.3.100.0100.00614.82
7.3.90.0140.00014.79
7.3.80.0030.00614.52
7.3.70.0040.00414.41
7.3.60.0060.00614.93
7.3.50.0130.00314.87
7.3.40.0000.01014.70
7.3.30.0000.01214.48
7.3.20.0110.00316.40
7.3.10.0180.00516.40
7.3.00.0140.00416.33
7.2.330.0070.01016.46
7.2.320.0030.01816.65
7.2.310.0070.01016.62
7.2.300.0060.01116.58
7.2.290.0090.00916.57
7.2.250.0070.01415.29
7.2.240.0070.01414.69
7.2.230.0000.01114.71
7.2.220.0070.00714.75
7.2.210.0000.01414.98
7.2.200.0030.01214.70
7.2.190.0000.01315.16
7.2.180.0030.00915.20
7.2.170.0100.00314.82
7.2.130.0200.01016.48
7.2.120.0220.01316.81
7.2.110.0370.00716.31
7.2.100.0210.01216.46
7.2.90.0280.00716.50
7.2.80.0280.00316.30
7.2.70.0380.01016.89
7.2.60.0150.01516.65
7.2.50.0310.00516.78
7.2.40.0230.01316.80
7.2.30.0290.00416.43
7.2.20.0170.01716.44
7.2.10.0210.01016.20
7.2.00.0300.01216.70
7.1.330.0070.00715.96
7.1.320.0060.00815.86
7.1.310.0030.00615.58
7.1.300.0090.00615.97
7.1.290.0070.00715.81
7.1.280.0030.01215.91
7.1.270.0090.00315.61
7.1.260.0100.00315.75
7.1.250.0220.01116.00
7.1.200.0120.00315.47
7.1.70.0040.00417.11
7.1.60.0030.00916.91
7.1.40.0470.00732.40
7.1.30.0530.00732.77
7.1.20.1130.00732.57
7.1.10.0400.00314.71
7.1.00.0300.01014.77
7.0.200.0030.01216.87
7.0.180.0370.00714.41
7.0.170.0400.01014.32
7.0.160.0400.01014.32
7.0.150.0370.00714.29
7.0.140.0400.00314.46
7.0.130.0330.00714.55
7.0.120.0330.01014.50
7.0.110.0330.00714.16
7.0.100.0300.01014.44
7.0.90.0300.00714.40
7.0.80.0300.01014.20
7.0.70.0270.01014.30
7.0.60.0800.00714.20
7.0.50.0330.00314.40
7.0.40.0300.01014.46
7.0.30.0370.01014.69
7.0.20.0330.01014.34
7.0.10.0400.00714.39
7.0.00.0270.01014.43

preferences:
60.37 ms | 400 KiB | 5 Q