3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CustomArrayIterator extends ArrayIterator { public function current(){ return "CustomArrayIterator::current called"; } } class Some extends ArrayObject { function __construct(){ parent::__construct(array("key"=>"storged value"),ArrayObject::ARRAY_AS_PROPS,CustomArrayIterator::class); } } $obj=new Some(); print $obj->key."<br>"; foreach($obj as $key=>$val){ print $val."<br>"; }

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.0090.00616.63
8.3.60.0070.00716.88
8.3.50.0130.00521.30
8.3.40.0070.00718.79
8.3.30.0030.01018.57
8.3.20.0040.00420.73
8.3.10.0070.00021.90
8.3.00.0080.00020.61
8.2.190.0060.01216.71
8.2.180.0110.00318.29
8.2.170.0150.00022.96
8.2.160.0100.00721.20
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0000.00721.02
8.2.110.0070.01022.08
8.2.100.0120.00017.78
8.2.90.0000.00819.10
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0040.00417.93
8.2.50.0030.00618.10
8.2.40.0040.00422.32
8.2.30.0040.00419.30
8.2.20.0070.00017.70
8.2.10.0070.00018.11
8.2.00.0040.00417.94
8.1.280.0090.00625.92
8.1.270.0040.00424.02
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0120.00423.92
8.1.230.0080.00317.45
8.1.220.0030.00617.79
8.1.210.0060.00318.77
8.1.200.0060.00317.47
8.1.190.0040.00417.35
8.1.180.0090.00018.10
8.1.170.0060.00318.59
8.1.160.0000.00722.04
8.1.150.0000.00818.88
8.1.140.0070.00019.50
8.1.130.0070.00017.75
8.1.120.0030.00517.50
8.1.110.0040.00417.38
8.1.100.0040.00417.42
8.1.90.0050.00317.35
8.1.80.0000.00817.49
8.1.70.0040.00417.43
8.1.60.0040.00417.46
8.1.50.0080.00017.49
8.1.40.0000.01217.52
8.1.30.0000.00817.62
8.1.20.0080.00017.55
8.1.10.0040.00417.52
8.1.00.0000.00817.41
8.0.300.0060.00318.77
8.0.290.0000.00816.75
8.0.280.0040.00418.38
8.0.270.0030.00517.21
8.0.260.0030.00317.13
8.0.250.0030.00316.99
8.0.240.0000.00816.91
8.0.230.0030.00316.99
8.0.220.0000.00716.76
8.0.210.0040.00416.75
8.0.200.0060.00017.01
8.0.190.0000.00716.86
8.0.180.0040.00416.84
8.0.170.0040.00416.90
8.0.160.0050.00216.93
8.0.150.0040.00416.82
8.0.140.0100.00016.73
8.0.130.0000.00513.35
8.0.120.0080.00016.87
8.0.110.0030.00616.84
8.0.100.0050.00316.82
8.0.90.0030.00316.80
8.0.80.0040.01116.89
8.0.70.0070.00016.71
8.0.60.0000.00716.89
8.0.50.0070.00016.77
8.0.30.0100.01017.03
8.0.20.0090.01217.40
8.0.10.0000.00816.94
8.0.00.0070.01116.89
7.4.330.0050.00015.16
7.4.320.0040.00416.51
7.4.300.0060.00016.60
7.4.290.0030.00316.49
7.4.280.0040.00416.50
7.4.270.0050.00316.49
7.4.260.0000.00716.42
7.4.250.0050.00316.48
7.4.240.0040.00416.39
7.4.230.0030.00316.45
7.4.220.0150.00416.51
7.4.210.0100.00616.58
7.4.200.0030.00316.67
7.4.160.0080.00816.52
7.4.150.0200.00517.40
7.4.140.0130.00617.86
7.4.130.0070.01016.48
7.4.120.0070.01016.51
7.4.110.0070.01016.55
7.4.100.0090.00916.51
7.4.90.0140.00416.55
7.4.80.0030.01419.39
7.4.70.0030.01516.37
7.4.60.0050.01116.46
7.4.50.0090.00616.28
7.4.40.0060.01216.55
7.4.30.0100.00716.47
7.4.00.0070.01015.08
7.3.330.0000.00613.18
7.3.320.0000.00513.15
7.3.310.0000.00816.29
7.3.300.0040.00416.19
7.3.290.0080.00916.33
7.3.280.0100.00816.26
7.3.270.0050.01317.40
7.3.260.0110.00516.58
7.3.250.0110.00516.35
7.3.240.0110.00816.49
7.3.230.0090.00916.40
7.3.210.0090.00916.60
7.3.200.0060.00916.45
7.3.190.0160.00716.26
7.3.180.0130.01016.31
7.3.170.0110.00716.32
7.3.160.0100.01016.42
7.3.120.0100.01014.86
7.3.110.0040.01314.83
7.3.100.0070.01015.02
7.3.90.0040.00715.06
7.3.80.0040.01114.79
7.3.70.0040.00714.92
7.3.60.0120.00414.95
7.3.50.0070.00414.98
7.3.40.0060.00614.92
7.3.30.0140.00014.64
7.3.20.0150.00416.69
7.3.10.0100.00716.66
7.3.00.0060.00616.63
7.2.330.0100.01416.47
7.2.320.0070.01416.72
7.2.310.0030.01416.84
7.2.300.0030.01416.58
7.2.290.0090.00616.80
7.2.250.0140.00715.32
7.2.240.0040.01814.98
7.2.230.0030.01414.88
7.2.220.0000.01515.30
7.2.210.0060.00615.08
7.2.200.0040.00815.25
7.2.190.0090.00614.86
7.2.180.0030.00615.22
7.2.170.0040.00814.84
7.2.60.0030.01016.96
7.2.00.0060.00919.32
7.1.330.0040.01115.89
7.1.320.0000.01315.48
7.1.310.0120.00316.02
7.1.300.0030.01415.86
7.1.290.0090.00015.82
7.1.280.0100.00315.73
7.1.270.0110.00715.82
7.1.260.0030.00915.68
7.1.200.0110.00015.66
7.1.70.0080.00317.17
7.1.60.0000.01119.81
7.1.00.0070.07322.30
7.0.200.0040.00714.81
7.0.100.0430.08319.96
7.0.90.0900.07719.75
7.0.80.0630.06320.05
7.0.70.0230.06719.96
7.0.60.0700.07720.00
7.0.50.0200.05720.06
7.0.40.1770.06720.18
7.0.30.1700.05020.32
7.0.20.1400.06320.09
7.0.10.0230.05720.30
7.0.00.1030.05720.23
5.6.250.0170.08020.44
5.6.240.0070.08720.69
5.6.230.0130.08020.79
5.6.220.0100.07020.50
5.6.210.0100.07020.64
5.6.200.0130.08321.04
5.6.190.0230.06021.06
5.6.180.0170.05721.14
5.6.170.0130.07721.02
5.6.160.0170.07321.09
5.6.150.0230.08321.17
5.6.140.0270.07721.07
5.6.130.0170.08720.98
5.6.120.0170.05720.99
5.6.110.0130.06320.96
5.6.100.0100.07321.12
5.6.90.0200.07021.15
5.6.80.0170.06020.27
5.6.70.0300.07320.48
5.6.60.0170.08320.46
5.6.50.0070.06720.58
5.6.40.0130.05320.40
5.6.30.0070.08320.52
5.6.20.0130.08020.45
5.6.10.0200.07020.44
5.6.00.0170.07320.54

preferences:
91.69 ms | 401 KiB | 5 Q