3v4l.org

run code in 300+ PHP versions simultaneously
<?php $messages = [['action', ['...']], new StdClass(), new StdClass(), ['action', ['...']], new StdClass(), ['action', ['...']]]; end($messages); do { $current = current($messages); if(is_object($current)) { print_r($current) ."\r"; echo 'break !!'."\r"; break; } echo 'iterate'."\r" . 'prev !'; prev($messages); } while(true);

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.40.0120.00318.65
8.3.30.0150.00318.85
8.3.20.0030.00519.34
8.3.10.0000.00821.77
8.3.00.0030.00519.53
8.2.170.0150.00022.96
8.2.160.0030.01019.08
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00420.44
8.2.120.0000.00826.35
8.2.110.0170.00320.39
8.2.100.0080.00417.84
8.2.90.0060.00417.41
8.2.80.0050.00318.05
8.2.70.0040.00417.92
8.2.60.0040.00418.22
8.2.50.0040.00418.10
8.2.40.0040.00420.34
8.2.30.0000.00719.25
8.2.20.0000.00718.00
8.2.10.0080.00018.07
8.2.00.0000.00718.24
8.1.270.0070.00022.19
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00620.86
8.1.230.0120.00020.95
8.1.220.0050.00320.89
8.1.210.0060.00218.77
8.1.200.0000.01017.35
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0040.00418.90
8.1.160.0000.00818.83
8.1.150.0000.00820.18
8.1.140.0040.00419.58
8.1.130.0000.00718.80
8.1.120.0000.00717.51
8.1.110.0040.00417.44
8.1.100.0030.00517.37
8.1.90.0030.00517.49
8.1.80.0000.00717.41
8.1.70.0000.00817.37
8.1.60.0030.00617.63
8.1.50.0050.00317.43
8.1.40.0050.00217.55
8.1.30.0040.00417.54
8.1.20.0050.00217.55
8.1.10.0000.00717.56
8.1.00.0000.00717.55
8.0.300.0040.00421.95
8.0.290.0000.00816.61
8.0.280.0040.00418.49
8.0.270.0000.00717.18
8.0.260.0080.00018.89
8.0.250.0030.00317.02
8.0.240.0060.00317.04
8.0.230.0000.00717.04
8.0.220.0070.00017.00
8.0.210.0000.00716.95
8.0.200.0000.00717.07
8.0.190.0030.00617.04
8.0.180.0070.00016.96
8.0.170.0040.00416.87
8.0.160.0070.00017.01
8.0.150.0040.00416.85
8.0.140.0000.00716.93
8.0.130.0000.00613.38
8.0.120.0050.00316.92
8.0.110.0040.00416.95
8.0.100.0040.00416.98
8.0.90.0000.00716.81
8.0.80.0120.00316.93
8.0.70.0030.00516.95
8.0.60.0030.00517.02
8.0.50.0050.00316.84
8.0.30.0050.01117.13
8.0.20.0100.00817.40
8.0.10.0050.00317.00
8.0.00.0100.00716.86
7.4.330.0050.00015.55
7.4.320.0000.00616.37
7.4.300.0000.00716.41
7.4.290.0040.00416.50
7.4.280.0040.00416.59
7.4.270.0070.00016.50
7.4.260.0030.00316.58
7.4.250.0040.00416.56
7.4.240.0040.00316.45
7.4.230.0030.00316.70
7.4.220.0140.01116.45
7.4.210.0070.00716.55
7.4.200.0030.00316.61
7.4.160.0100.00816.53
7.4.150.0140.01017.40
7.4.140.0090.01017.86
7.4.130.0060.01616.49
7.4.120.0120.01016.57
7.4.110.0160.00716.60
7.4.100.0160.00316.52
7.4.90.0130.00516.58
7.4.80.0140.00619.39
7.4.70.0060.01316.62
7.4.60.0030.01316.47
7.4.50.0070.00716.42
7.4.40.0120.00316.41
7.4.30.0100.00716.68
7.4.00.0060.00614.73
7.3.330.0060.00013.18
7.3.320.0000.00513.12
7.3.310.0070.00016.09
7.3.300.0030.00316.17
7.3.290.0000.00816.30
7.3.280.0080.00916.28
7.3.270.0090.00917.40
7.3.260.0130.00716.31
7.3.240.0060.01416.32
7.3.230.0100.00716.29
7.3.210.0100.00716.30
7.3.200.0070.01016.14
7.3.190.0140.00416.20
7.3.180.0080.00816.14
7.3.170.0150.00816.22
7.3.160.0060.00916.23
7.2.330.0100.00916.71
7.2.320.0120.00916.56
7.2.310.0060.01216.76
7.2.300.0150.00916.36
7.2.290.0100.01316.85
7.2.110.0250.00016.61
7.2.100.0160.00616.50
7.2.90.0190.00416.71
7.2.80.0100.00516.53
7.2.70.0130.00816.67
7.2.60.0050.01016.92
7.2.50.0140.00816.85
7.2.40.0210.00616.72
7.2.30.0190.00016.91
7.2.20.0130.00717.02
7.2.10.0160.00816.71
7.2.00.0070.00618.17
7.1.230.0180.00315.88
7.1.220.0170.00315.55
7.1.210.0180.00315.66
7.1.200.0070.01015.84
7.1.190.0220.00615.88
7.1.180.0130.00915.66
7.1.170.0090.00915.45
7.1.160.0080.00815.70
7.1.150.0100.00415.82
7.1.140.0110.00815.58
7.1.130.0140.00615.54
7.1.120.0150.00215.89
7.1.110.0130.00315.70
7.1.100.0100.00617.05
7.1.90.0250.00415.70
7.1.80.0060.00915.45
7.1.70.0130.00216.42
7.1.60.0050.01216.43
7.1.50.0180.00925.26
7.1.40.0190.01625.23
7.1.30.0130.01325.14
7.1.20.0220.01225.05
7.1.10.0120.00715.96
7.1.00.0050.01316.09
7.0.310.0180.00415.41
7.0.300.0210.00315.21
7.0.290.0090.00515.17
7.0.280.0050.00815.53
7.0.270.0060.00815.36
7.0.260.0140.00315.53
7.0.250.0150.00415.43
7.0.240.0140.00315.45
7.0.230.0090.01015.19
7.0.220.0160.00615.34
7.0.210.0160.00415.26
7.0.200.0140.00816.12
7.0.190.0130.00216.02
7.0.180.0080.00715.81
7.0.170.0060.00915.83
7.0.160.0040.01115.83
7.0.150.0090.01315.65
7.0.140.0100.01315.75
7.0.130.0070.01115.82
7.0.120.0080.01115.89
7.0.110.0060.00915.92
7.0.100.0080.01115.81
7.0.90.0090.00915.84
7.0.80.0100.00915.91
7.0.70.0150.00815.58
7.0.60.0050.00915.64
7.0.50.0070.01015.93
7.0.40.0090.00314.89
7.0.30.0040.01214.87
7.0.20.0110.00414.78
7.0.10.0040.01114.70
7.0.00.0070.00914.90
5.6.380.0120.00614.18

preferences:
59.6 ms | 400 KiB | 5 Q