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.60.0100.01018.64
8.3.50.0100.00821.99
8.3.40.0120.00318.94
8.3.30.0070.01118.95
8.3.20.0050.00220.21
8.3.10.0040.00421.85
8.3.00.0000.00722.45
8.2.180.0100.00718.54
8.2.170.0070.00722.96
8.2.160.0000.01420.93
8.2.150.0050.00324.18
8.2.140.0150.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.23
8.2.110.0030.00622.20
8.2.100.0000.01219.51
8.2.90.0040.00419.07
8.2.80.0040.00417.97
8.2.70.0040.00417.61
8.2.60.0060.00317.93
8.2.50.0040.00418.07
8.2.40.0070.00018.22
8.2.30.0070.00018.02
8.2.20.0050.00217.82
8.2.10.0080.00019.53
8.2.00.0040.00417.64
8.1.280.0090.00925.92
8.1.270.0060.00322.20
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.01820.91
8.1.230.0030.00717.64
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0130.00017.36
8.1.190.0000.00817.53
8.1.180.0060.00318.72
8.1.170.0000.00818.46
8.1.160.0040.00422.04
8.1.150.0070.00018.71
8.1.140.0050.00217.45
8.1.130.0000.00717.81
8.1.120.0040.00417.54
8.1.110.0030.00617.47
8.1.100.0000.00717.46
8.1.90.0000.00717.50
8.1.80.0000.00717.50
8.1.70.0000.00717.45
8.1.60.0000.00817.52
8.1.50.0040.00417.39
8.1.40.0000.00817.56
8.1.30.0040.00417.66
8.1.20.0040.00417.60
8.1.10.0040.00417.64
8.1.00.0030.00517.46
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0000.00718.47
8.0.270.0000.00817.21
8.0.260.0040.00416.74
8.0.250.0040.00416.99
8.0.240.0030.00316.95
8.0.230.0030.00317.02
8.0.220.0030.00316.79
8.0.210.0000.00716.84
8.0.200.0030.00316.90
8.0.190.0070.00016.86
8.0.180.0000.00716.89
8.0.170.0000.00716.86
8.0.160.0040.00416.78
8.0.150.0030.00316.78
8.0.140.0040.00416.92
8.0.130.0030.00313.35
8.0.120.0060.00316.80
8.0.110.0000.00816.84
8.0.100.0000.00716.77
8.0.90.0050.00216.98
8.0.80.0070.00716.80
8.0.70.0040.00416.77
8.0.60.0040.00416.98
8.0.50.0040.00416.78
8.0.30.0110.01116.91
8.0.20.0130.00917.40
8.0.10.0000.00716.90
8.0.00.0140.00816.85
7.4.330.0000.00615.09
7.4.320.0000.00616.61
7.4.300.0060.00016.62
7.4.290.0000.00616.49
7.4.280.0030.00316.62
7.4.270.0030.00316.68
7.4.260.0070.00016.55
7.4.250.0000.00716.35
7.4.240.0030.00416.47
7.4.230.0050.00316.52
7.4.220.0090.00916.59
7.4.210.0080.00616.53
7.4.200.0040.00416.46
7.4.190.0000.00716.75
7.4.160.0120.00416.57
7.4.150.0030.01317.40
7.4.140.0120.00717.86
7.4.130.0120.00816.59
7.4.120.0090.01216.56
7.4.110.0100.00716.52
7.4.100.0060.01216.39
7.4.90.0110.00716.62
7.4.80.0070.01019.39
7.4.70.0080.00816.57
7.4.60.0000.01516.70
7.4.50.0040.00016.64
7.4.40.0130.00322.77
7.4.30.0100.00716.58
7.4.00.0060.01115.10
7.3.330.0000.00513.10
7.3.320.0000.00513.31
7.3.310.0040.00416.35
7.3.300.0030.00516.32
7.3.290.0070.00716.28
7.3.280.0060.01116.29
7.3.270.0130.00317.40
7.3.260.0100.00716.51
7.3.250.0140.00616.26
7.3.240.0140.00316.23
7.3.230.0040.01316.57
7.3.210.0090.01516.48
7.3.200.0100.00719.39
7.3.190.0070.01416.57
7.3.180.0000.01716.45
7.3.170.0110.01016.65
7.3.160.0080.00916.49
7.3.120.0090.00714.96
7.3.110.0140.00415.01
7.3.100.0030.00714.75
7.3.90.0060.00614.75
7.3.80.0030.01014.78
7.3.70.0080.00314.92
7.3.60.0090.00614.79
7.3.50.0060.00914.91
7.3.40.0080.00814.79
7.3.30.0060.00314.70
7.3.20.0070.01016.34
7.3.10.0040.00716.67
7.3.00.0150.00016.33
7.2.330.0170.00016.82
7.2.320.0030.01416.71
7.2.310.0130.00316.85
7.2.300.0070.01416.85
7.2.290.0100.01316.84
7.2.250.0110.00714.97
7.2.240.0100.01015.36
7.2.230.0070.01015.22
7.2.220.0030.01214.80
7.2.210.0130.00014.94
7.2.200.0090.00914.73
7.2.190.0040.00815.11
7.2.180.0060.00915.02
7.2.170.0070.01015.05
7.2.60.0090.00616.89
7.2.50.0000.01116.67
7.2.00.0060.00919.62
7.1.330.0090.00615.83
7.1.320.0080.00415.77
7.1.310.0030.00715.95
7.1.300.0100.00315.60
7.1.290.0040.00415.90
7.1.280.0070.00715.96
7.1.270.0080.00415.84
7.1.260.0090.00615.60
7.1.200.0070.00715.88
7.1.100.0040.00817.99
7.1.70.0070.01017.02
7.1.60.0070.01319.82
7.1.50.0060.01316.73
7.1.00.0100.07022.57
7.0.200.0000.01116.71
7.0.140.0070.07021.95
7.0.60.0070.08719.93
7.0.50.0130.06717.88
7.0.40.0100.08720.23
7.0.30.0270.03320.10
7.0.20.0330.07720.25
7.0.10.0000.05020.06
7.0.00.0100.05720.16
5.6.280.0000.07721.14
5.6.210.0130.07320.51
5.6.200.0100.05018.25
5.6.190.0100.07720.58
5.6.180.0330.07720.51
5.6.170.0130.04720.54
5.6.160.0070.08720.51
5.6.150.0130.07318.29
5.6.140.0130.07718.24
5.6.130.0030.04018.24
5.6.120.0030.09321.02
5.6.110.0100.07720.92
5.6.100.0070.06320.97
5.6.90.0170.05720.97
5.6.80.0030.08720.38
5.5.350.0000.08720.32
5.5.340.0030.04318.07
5.5.330.0030.09020.35
5.5.320.0300.05020.24
5.5.310.0300.05320.28
5.5.300.0030.04318.05
5.5.290.0100.08317.93
5.5.280.0200.07320.88
5.5.270.0070.06020.64
5.5.260.0070.07020.79
5.5.250.0170.06720.63
5.5.240.0300.06720.18
5.4.450.0730.08319.54
5.4.440.0770.04719.32
5.4.430.0170.05719.31
5.4.420.0070.05719.60
5.4.410.0130.05718.95
5.4.400.0300.05718.63
5.4.390.0330.04718.76
5.4.380.0270.05718.74
5.4.370.0030.04018.70
5.4.360.0070.03718.71
5.4.350.0050.03512.02
5.4.340.0170.04712.01
5.4.320.0100.03712.51
5.4.310.0080.04512.50
5.4.300.0090.03712.51
5.4.290.0040.04112.50
5.4.280.0100.04012.40
5.4.270.0120.04212.40
5.4.260.0030.05718.78
5.4.250.0170.05718.65
5.4.240.0100.05318.90
5.4.230.0130.05019.01
5.4.220.0070.06019.00
5.4.210.0170.07018.98
5.4.200.0130.04718.65
5.4.190.0100.05018.95
5.4.180.0030.05718.80
5.4.170.0130.06718.94
5.4.160.0030.07319.08
5.4.150.0200.04718.95
5.4.140.0130.06316.56
5.4.130.0070.05716.54
5.4.120.0070.07316.54
5.4.110.0100.04716.35
5.4.100.0100.05016.48
5.4.90.0100.04716.61
5.4.80.0100.04316.48
5.4.70.0030.05716.38
5.4.60.0100.04716.38
5.4.50.0100.05316.49
5.4.40.0070.06016.49
5.4.30.0170.06016.45
5.4.20.0070.05316.35
5.4.10.0070.05316.38
5.4.00.0030.06015.96
5.3.290.0060.04612.80
5.3.280.0100.07014.68
5.3.270.0170.05314.43
5.3.260.0070.08014.60
5.3.250.0230.04014.68
5.3.240.0070.05014.69
5.3.230.0130.04714.60
5.3.220.0000.05714.65
5.3.210.0070.05314.58
5.3.200.0030.06714.72
5.3.190.0100.07714.55
5.3.180.0030.05314.72
5.3.170.0030.05714.54
5.3.160.0070.05314.55
5.3.150.0070.05014.65
5.3.140.0130.07014.59
5.3.130.0200.04314.57
5.3.120.0030.06314.53
5.3.110.0100.06714.62
5.3.100.0170.04314.11
5.3.90.0130.05014.10
5.3.80.0130.05314.00
5.3.70.0070.06013.92
5.3.60.0100.05014.10
5.3.50.0000.07714.02
5.3.40.0000.06014.02
5.3.30.0070.05013.92
5.3.20.0130.05713.77
5.3.10.0030.07313.66
5.3.00.0070.07313.73

preferences:
42.36 ms | 401 KiB | 5 Q