3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { static $data = array( array('site_name' => 'bar'), array(), array('site_name' => 'baz') ); $current = current($data); next($data); return $current; } while ($bar = foo()) echo $bar['site_name']."\n"; echo '-------------------------------------------'."\n"; while (($bar = foo) !== false) echo $bar['site_name']."\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.70.0110.00418.56
8.3.60.0110.00725.92
8.3.50.0100.01025.92
8.3.40.0090.01325.92
8.2.190.0160.00318.54
8.2.180.0140.00725.92
8.2.170.0120.01225.92
8.1.280.0070.01425.92
7.4.10.0090.01314.91
7.4.00.0100.01015.14
7.3.130.0070.01314.89
7.3.120.0060.00914.79
7.3.110.0040.01514.89
7.3.100.0000.01514.79
7.3.90.0000.01114.52
7.3.80.0120.00014.84
7.3.70.0070.01114.77
7.3.60.0040.01114.86
7.3.50.0060.00914.82
7.3.40.0060.00614.81
7.3.30.0070.01114.84
7.3.20.0110.00416.59
7.3.10.0100.00316.44
7.3.00.0090.00316.76
7.2.260.0040.01215.31
7.2.250.0040.01314.97
7.2.240.0030.00914.84
7.2.230.0110.00415.04
7.2.220.0070.00314.88
7.2.210.0080.00815.02
7.2.200.0100.00515.21
7.2.190.0030.00814.93
7.2.180.0040.00715.14
7.2.170.0110.00615.22
7.2.160.0060.00614.63
7.2.150.0060.00617.04
7.2.140.0090.00916.52
7.2.130.0050.00516.68
7.2.120.0040.01116.72
7.2.110.0090.00316.91
7.2.100.0070.01316.73
7.2.90.0000.01416.74
7.2.80.0080.00816.59
7.2.70.0110.00416.62
7.2.60.0030.00816.96
7.2.50.0060.00616.82
7.2.40.0070.00716.98
7.2.30.0060.00917.11
7.2.20.0040.01116.86
7.2.10.0060.00616.68
7.2.00.0030.01216.86
7.1.330.0080.01115.84
7.1.320.0030.01015.46
7.1.310.0060.01215.86
7.1.300.0030.00715.55
7.1.290.0060.00315.86
7.1.280.0000.01115.80
7.1.270.0060.01115.69
7.1.260.0000.01516.02
7.1.250.0090.00615.82
7.1.240.0000.01215.55
7.1.230.0040.01515.89
7.1.220.0120.00315.82
7.1.210.0070.00715.44
7.1.200.0180.00015.74
7.1.190.0060.01015.90
7.1.180.0060.00315.55
7.1.170.0110.00015.76
7.1.160.0070.01015.76
7.1.150.0030.00915.87
7.1.140.0120.00915.59
7.1.130.0070.01015.95
7.1.120.0120.00615.51
7.1.110.0070.00715.78
7.1.100.0060.00915.86
7.1.90.0060.00615.93
7.1.80.0000.01815.86
7.1.70.0060.00615.82
7.1.60.0060.00615.79
7.1.50.0070.01515.77
7.1.40.0040.00915.76
7.1.30.0070.00415.80
7.1.20.0000.01115.48
7.1.10.0000.01715.86
7.1.00.0070.00715.76
7.0.330.0120.00315.21
7.0.320.0080.00815.24
7.0.310.0000.01615.18
7.0.300.0040.00915.32
7.0.290.0030.01415.21
7.0.280.0110.00715.49
7.0.270.0040.01115.43
7.0.260.0000.00915.39
7.0.250.0000.01515.51
7.0.240.0060.00615.50
7.0.230.0040.00815.49
7.0.220.0090.00015.39
7.0.210.0060.00315.25
7.0.200.0070.00715.29
7.0.190.0030.00915.46
7.0.180.0000.01215.22
7.0.170.0060.00615.43
7.0.160.0080.00515.39
7.0.150.0090.00315.29
7.0.140.0030.01015.28
7.0.130.0090.00615.52
7.0.120.0060.00315.32
7.0.110.0110.00815.47
7.0.100.0030.01015.16
7.0.90.0050.00515.41
7.0.80.0040.00415.44
7.0.70.0060.00615.52
7.0.60.0100.00015.53
7.0.50.0120.00015.24
7.0.40.0090.00613.38
7.0.30.0000.01013.56
7.0.20.0070.01413.42
7.0.10.0070.01113.48
7.0.00.0120.00913.55
5.6.400.0070.00714.38
5.6.390.0040.01114.76
5.6.380.0070.01114.75
5.6.370.0030.01314.48
5.6.360.0080.01214.84
5.6.350.0070.01114.68
5.6.340.0090.00914.66
5.6.330.0070.00714.63
5.6.320.0090.00914.24
5.6.310.0030.01414.13
5.6.300.0090.00914.63
5.6.290.0000.01314.47
5.6.280.0090.00914.54
5.6.270.0050.00614.31
5.6.260.0080.00814.56
5.6.250.0130.00414.57
5.6.240.0030.00514.50
5.6.230.0000.01414.56
5.6.220.0040.01214.36
5.6.210.0070.00714.36
5.6.200.0090.00414.70
5.6.190.0090.00014.41
5.6.180.0030.01314.43
5.6.170.0000.01414.13
5.6.160.0120.00314.46
5.6.150.0070.00714.30
5.6.140.0060.00614.50
5.6.130.0040.01114.07
5.6.120.0080.00414.13
5.6.110.0060.00614.53
5.6.100.0030.00914.43
5.6.90.0100.00714.30
5.6.80.0130.00014.35
5.6.70.0080.00414.49
5.6.60.0040.00814.59
5.6.50.0170.00314.47
5.6.40.0070.00314.38
5.6.30.0090.00614.37
5.6.20.0070.01414.35
5.6.10.0100.00514.50
5.6.00.0070.00714.27
5.5.380.0030.01214.30
5.5.370.0120.00814.29
5.5.360.0000.00814.40
5.5.350.0120.00314.27
5.5.340.0060.00614.11
5.5.330.0050.00514.14
5.5.320.0080.00814.16
5.5.310.0000.01114.26
5.5.300.0120.00014.57
5.5.290.0120.00014.53
5.5.280.0090.00614.66
5.5.270.0100.00014.41
5.5.260.0090.00914.26
5.5.250.0090.00914.18
5.5.240.0030.01014.33
5.5.230.0080.00814.48
5.5.220.0120.00814.13
5.5.210.0130.00314.33
5.5.200.0050.00314.20
5.5.190.0030.02114.05
5.5.180.0050.00514.20
5.5.170.0080.00314.48
5.5.160.0000.01014.18
5.5.150.0040.01314.36
5.5.140.0000.01014.07
5.5.130.0090.00914.08
5.5.120.0000.00914.13
5.5.110.0090.01214.49
5.5.100.0120.00314.44
5.5.90.0070.00314.46
5.5.80.0030.00914.47
5.5.70.0040.01313.91
5.5.60.0060.00314.34
5.5.50.0090.00914.37
5.5.40.0000.00814.59
5.5.30.0030.01014.48
5.5.20.0090.00914.26
5.5.10.0070.00714.27
5.5.00.0030.01514.41
5.4.450.0030.01011.65
5.4.440.0060.00611.65
5.4.430.0060.00911.65
5.4.420.0080.01111.65
5.4.410.0110.00011.65
5.4.400.0000.01411.66
5.4.390.0100.00311.66
5.4.380.0120.00611.66
5.4.370.0030.01011.66
5.4.360.0090.00611.66
5.4.350.0060.00611.66
5.4.340.0070.00311.66
5.4.330.0130.00311.66
5.4.320.0000.01111.66
5.4.310.0120.00811.66
5.4.300.0080.00811.66
5.4.290.0090.00311.66
5.4.280.0030.01011.66
5.4.270.0030.00911.66
5.4.260.0100.02915.43
5.4.250.1100.02615.34
5.4.240.1050.02415.23
5.4.230.0080.03315.37
5.4.220.0980.02615.35
5.4.210.0970.01915.45
5.4.200.1070.02715.34
5.4.190.1080.02615.33
5.4.180.0060.03315.41
5.4.170.0130.03715.27
5.4.160.0120.02815.26
5.4.150.0970.02015.32
5.4.140.0060.03114.05
5.4.130.1100.02213.98
5.4.120.1010.02014.04
5.4.110.1000.02614.03
5.4.100.0960.02314.05
5.4.90.0930.02614.09
5.4.80.1060.02113.94
5.4.70.0950.02314.08
5.4.60.1190.02214.03
5.4.50.0140.02614.09
5.4.40.0100.03814.07
5.4.30.1070.02214.07
5.4.20.0120.03714.05
5.4.10.0950.02613.93
5.4.00.1020.02413.69
5.3.290.0060.00011.66
5.3.280.1020.02513.00
5.3.270.1150.01813.01
5.3.260.1100.02913.00
5.3.250.1030.01813.05
5.3.240.1030.02013.11
5.3.230.0970.02513.15
5.3.220.1000.02213.03
5.3.210.1060.02313.07
5.3.200.0090.03213.04
5.3.190.0970.02613.07
5.3.180.1100.02712.98
5.3.170.1000.02813.14
5.3.160.0180.02613.03
5.3.150.0080.03113.02
5.3.140.0080.03013.05
5.3.130.0080.02512.98
5.3.120.0170.03613.04
5.3.110.0140.02013.08
5.3.100.0090.02412.76
5.3.90.0150.02212.72
5.3.80.0120.02212.72
5.3.70.0160.02112.72
5.3.60.0130.02212.67
5.3.50.0120.02412.65
5.3.40.0120.04112.68
5.3.30.0140.02012.66
5.3.20.0170.02312.55
5.3.10.0100.02712.49
5.3.00.0090.03312.56

preferences:
34.57 ms | 401 KiB | 5 Q