3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo extends IteratorIterator { function __construct( $items ) { if ( is_array( $items ) ) { $items = new ArrayIterator( $items ); } } function __debugInfo() { throw new \Exception(); return [ "count" => iterator_count( $this ) ]; } } $a = new Foo( [ 1,2,3 ] ); var_dump( $a ); ?>

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.0040.01416.63
8.3.50.0110.01021.95
8.3.40.0000.01418.70
8.3.30.0030.01018.63
8.3.20.0030.00621.89
8.3.10.0040.00420.67
8.3.00.0040.00421.80
8.2.180.0090.01218.66
8.2.170.0140.00422.96
8.2.160.0030.01319.37
8.2.150.0040.00425.66
8.2.140.0000.00724.66
8.2.130.0040.00421.00
8.2.120.0040.00426.35
8.2.110.0060.00321.00
8.2.100.0060.00617.72
8.2.90.0040.00417.59
8.2.80.0030.00619.16
8.2.70.0040.00417.93
8.2.60.0040.00417.80
8.2.50.0060.00318.10
8.2.40.0040.00419.17
8.2.30.0040.00419.18
8.2.20.0040.00418.02
8.2.10.0050.00218.15
8.2.00.0080.00017.75
8.1.280.0060.00925.92
8.1.270.0080.00023.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0070.01022.13
8.1.230.0110.00020.84
8.1.220.0040.00417.74
8.1.210.0080.00019.03
8.1.200.0060.00317.35
8.1.190.0050.00317.22
8.1.180.0000.00818.10
8.1.170.0040.00418.88
8.1.160.0040.00422.06
8.1.150.0040.00418.77
8.1.140.0040.00419.51
8.1.130.0050.00317.77
8.1.120.0000.00717.36
8.1.110.0070.00017.47
8.1.100.0000.00717.46
8.1.90.0000.00717.36
8.1.80.0000.00917.45
8.1.70.0030.00517.48
8.1.60.0070.00017.57
8.1.50.0030.00517.51
8.1.40.0050.00217.54
8.1.30.0000.00917.67
8.1.20.0040.00417.62
8.1.10.0080.00017.62
8.1.00.0050.00317.36
8.0.300.0020.00520.04
8.0.290.0080.00016.75
8.0.280.0030.00318.27
8.0.270.0030.00517.07
8.0.260.0070.00317.39
8.0.250.0000.00816.95
8.0.240.0090.00016.84
8.0.230.0000.00717.00
8.0.220.0030.00316.91
8.0.210.0040.00316.91
8.0.200.0000.00816.96
8.0.190.0040.00416.84
8.0.180.0070.00016.87
8.0.170.0080.00016.89
8.0.160.0000.00716.95
8.0.150.0000.00716.88
8.0.140.0040.00416.88
8.0.130.0030.00313.34
8.0.120.0090.00016.82
8.0.110.0030.00616.83
8.0.100.0040.00416.78
8.0.90.0040.00416.82
8.0.80.0130.00616.84
8.0.70.0040.00416.92
8.0.60.0000.00716.79
8.0.50.0040.00416.86
8.0.30.0100.00617.00
8.0.20.0100.01117.41
8.0.10.0070.00017.08
8.0.00.0140.00316.66
7.4.330.0050.00015.21
7.4.320.0000.00616.59
7.4.300.0030.00316.59
7.4.290.0070.00016.61
7.4.280.0000.00816.60
7.4.270.0030.00316.48
7.4.260.0070.00016.60
7.4.250.0040.00416.34
7.4.240.0000.00716.50
7.4.230.0030.00316.70
7.4.220.0100.00716.60
7.4.210.0100.00816.54
7.4.200.0000.00816.58
7.4.160.0090.00616.50
7.4.150.0140.00317.40
7.4.140.0130.00717.86
7.4.130.0180.01016.57
7.4.120.0130.00516.55
7.4.110.0110.00816.41
7.4.100.0200.00316.62
7.4.90.0030.02016.51
7.4.80.0180.00619.39
7.4.70.0060.01016.43
7.4.60.0040.01216.45
7.4.50.0120.00616.18
7.4.40.0130.00316.44
7.4.30.0120.00616.26
7.4.00.0140.00315.00
7.3.330.0020.00213.43
7.3.320.0050.00013.14
7.3.310.0040.00416.32
7.3.300.0040.00416.22
7.3.290.0030.00316.36
7.3.280.0090.00816.33
7.3.270.0030.01317.40
7.3.260.0140.01116.36
7.3.250.0100.00716.52
7.3.240.0090.01216.30
7.3.230.0200.00016.39
7.3.210.0080.00816.38
7.3.200.0120.00616.61
7.3.190.0140.00716.61
7.3.180.0190.01016.61
7.3.170.0090.01216.43
7.3.160.0140.00316.66
7.2.330.0060.01216.77
7.2.320.0120.00616.80
7.2.310.0040.01216.82
7.2.300.0040.01316.47
7.2.290.0120.00416.49
7.2.80.0100.00616.73
7.2.60.0120.00317.05
7.1.200.0030.00915.82
7.1.100.0100.00017.95
7.1.70.0030.00717.29
7.1.60.0060.00617.25
7.1.50.0230.01334.48
7.1.00.0130.06722.45
7.0.200.0570.00714.64
7.0.120.0900.04020.28
7.0.110.0070.03720.17
7.0.100.0100.07320.19
7.0.90.0030.05320.13
7.0.80.0130.03020.42
7.0.70.0030.04320.18
7.0.60.0030.05720.25
7.0.50.0100.06320.37
7.0.40.0070.06720.03
7.0.30.0070.08320.01
7.0.20.0070.04019.98
7.0.10.0000.04720.02
7.0.00.0100.04720.00
5.6.270.0030.09320.94
5.6.260.0100.08321.00
5.6.250.0100.07021.05
5.6.240.0130.04321.09
5.6.230.0000.05320.95
5.6.220.0070.04720.96
5.6.210.0070.05020.91
5.6.200.0030.05020.97
5.6.190.0070.08320.96
5.6.180.0070.04721.00
5.6.170.0100.06321.04
5.6.160.0070.06321.04
5.6.150.0030.05320.89
5.6.140.0130.03320.72
5.6.130.0070.04321.04
5.6.120.0070.03721.01
5.6.110.0000.04320.75
5.6.100.0030.04720.80
5.6.90.0070.03721.00
5.6.80.0070.03720.27
5.6.70.0000.05320.34
5.6.60.0030.04320.34
5.6.50.0170.02720.38
5.6.40.0070.03720.25
5.6.30.0000.04320.14
5.6.20.0100.02720.40
5.6.10.0000.04020.35
5.6.00.0030.03320.14

preferences:
61.35 ms | 401 KiB | 5 Q