3v4l.org

run code in 300+ PHP versions simultaneously
<?php print("PDO::FETCH_ASSOC: "); print("Return next row as an array indexed by column name\n"); $result = $sth->fetch(PDO::FETCH_ASSOC); print_r($result); print("\n"); print("PDO::FETCH_BOTH: "); print("Return next row as an array indexed by both column name and number\n"); $result = $sth->fetch(PDO::FETCH_BOTH); print_r($result); print("\n"); print("PDO::FETCH_LAZY: "); print("Return next row as an anonymous object with column names as properties\n"); $result = $sth->fetch(PDO::FETCH_LAZY); print_r($result); print("\n"); print("PDO::FETCH_OBJ: "); print("Return next row as an anonymous object with column names as properties\n"); $result = $sth->fetch(PDO::FETCH_OBJ); print $result->NAME; print("\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.0110.01118.43
8.3.50.0110.00317.86
8.3.40.0090.00618.62
8.3.30.0130.00318.67
8.3.20.0080.00018.78
8.3.10.0050.00321.72
8.3.00.0040.00421.89
8.2.180.0100.00718.29
8.2.170.0120.00622.96
8.2.160.0070.00720.99
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0050.00322.25
8.2.120.0080.00026.16
8.2.110.0090.00020.22
8.2.100.0110.00517.78
8.2.90.0080.00017.84
8.2.80.0040.00417.97
8.2.70.0040.00418.04
8.2.60.0030.00518.09
8.2.50.0040.00918.10
8.2.40.0030.00621.19
8.2.30.0070.00020.72
8.2.20.0050.00218.03
8.2.10.0040.00418.01
8.2.00.0000.00819.45
8.1.280.0150.00025.92
8.1.270.0070.00020.38
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00617.52
8.1.230.0120.00022.68
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0110.00017.22
8.1.190.0050.00317.22
8.1.180.0080.00018.10
8.1.170.0030.00618.50
8.1.160.0040.00418.80
8.1.150.0000.00718.81
8.1.140.0000.00718.83
8.1.130.0000.00717.30
8.1.120.0030.00517.36
8.1.110.0000.00717.41
8.1.100.0030.00517.27
8.1.90.0030.00317.27
8.1.80.0050.00317.41
8.1.70.0000.00717.30
8.1.60.0030.00617.52
8.1.50.0000.00817.48
8.1.40.0030.00617.44
8.1.30.0000.00817.45
8.1.20.0000.00717.50
8.1.10.0000.00817.41
8.1.00.0040.00417.44
8.0.300.0020.00519.79
8.0.290.0090.00016.75
8.0.280.0030.00318.41
8.0.270.0000.00717.17
8.0.260.0070.00016.93
8.0.250.0030.00316.96
8.0.240.0030.00616.93
8.0.230.0030.00317.02
8.0.220.0040.00416.86
8.0.210.0070.00016.96
8.0.200.0040.00416.86
8.0.190.0000.00717.04
8.0.180.0030.00516.86
8.0.170.0030.00616.96
8.0.160.0000.00716.98
8.0.150.0100.00516.79
8.0.140.0030.00316.86
8.0.130.0000.00613.32
8.0.120.0020.00516.87
8.0.110.0000.00716.88
8.0.100.0000.00816.75
8.0.90.0040.00416.91
8.0.80.0100.00716.92
8.0.70.0000.00716.72
8.0.60.0000.00716.88
8.0.50.0000.00716.99
8.0.30.0060.01016.88
8.0.20.0070.01317.40
8.0.10.0070.00017.01
8.0.00.0080.01116.73
7.4.330.0050.00015.55
7.4.320.0000.00616.48
7.4.300.0000.00616.44
7.4.290.0000.00716.56
7.4.280.0110.00016.38
7.4.270.0070.00016.61
7.4.260.0030.00316.32
7.4.250.0030.00316.50
7.4.240.0000.00716.58
7.4.230.0030.00316.69
7.4.220.0030.00616.68
7.4.210.0090.00616.46
7.4.200.0000.00716.61
7.4.160.0060.01116.61
7.4.140.0100.00817.86
7.4.130.0180.00516.34
7.4.120.0120.00616.51
7.4.110.0100.00616.74
7.4.100.0100.00716.55
7.4.90.0130.00616.32
7.4.80.0130.00819.39
7.4.70.0060.01216.71
7.4.60.0060.01516.26
7.4.50.0150.00416.66
7.4.40.0100.00716.26
7.4.00.0070.01014.95
7.3.330.0000.00513.22
7.3.320.0020.00213.05
7.3.310.0000.00716.17
7.3.300.0000.00716.29
7.3.290.0040.00416.30
7.3.280.0110.00816.36
7.3.260.0100.00916.48
7.3.240.0110.00716.43
7.3.230.0090.00916.48
7.3.210.0130.01016.20
7.3.200.0100.00716.50
7.3.190.0060.01016.27
7.3.180.0090.01316.51
7.3.170.0150.00616.37
7.3.160.0090.00716.55
7.3.120.0110.00514.94
7.3.110.0060.01014.73
7.3.100.0050.01114.78
7.3.90.0060.00614.84
7.3.80.0100.00314.94
7.3.70.0070.00514.73
7.3.60.0070.00514.71
7.3.50.0070.00514.86
7.3.40.0080.00514.77
7.3.30.0070.00614.80
7.3.20.0050.01016.43
7.3.10.0080.00716.48
7.3.00.0060.00516.64
7.2.330.0130.01016.26
7.2.320.0060.01316.54
7.2.310.0100.00716.61
7.2.300.0070.01016.64
7.2.290.0070.01016.18
7.2.250.0080.00814.90
7.2.240.0060.01314.81
7.2.230.0050.01115.10
7.2.220.0060.00815.06
7.2.210.0050.01014.64
7.2.200.0040.00615.00
7.2.190.0060.00914.98
7.2.180.0100.00514.96
7.2.170.0080.00914.96
7.2.160.0070.00714.88
7.2.150.0100.00316.70
7.2.140.0030.01216.88
7.2.130.0090.00616.77
7.2.120.0030.00716.85
7.2.110.0030.00616.85
7.2.100.0640.00815.48
7.2.90.0390.01215.54
7.2.80.0410.01215.53
7.2.70.0640.00915.76
7.2.60.0500.00615.82
7.2.50.0500.00715.70
7.2.40.0560.00715.84
7.2.30.0530.01015.80
7.2.20.0590.00215.79
7.2.10.0510.00915.60
7.2.00.1120.01015.96
7.1.330.0080.00815.71
7.1.320.0050.01015.50
7.1.310.0070.01015.42
7.1.300.0070.00815.71
7.1.290.0060.00815.71
7.1.280.0030.00815.61
7.1.270.0030.01015.57
7.1.260.0050.00615.66
7.1.250.0040.01415.49
7.1.240.0030.01215.65
7.1.230.0110.00415.58
7.1.220.0330.00914.62
7.1.210.0320.00714.74
7.1.200.0350.01114.68
7.1.190.0530.00514.48
7.1.180.0520.01014.60
7.1.170.0520.00814.67
7.1.160.0460.00314.59
7.1.150.0320.01014.51
7.1.140.0560.00314.55
7.1.130.0380.00914.63
7.1.120.0600.00314.73
7.1.110.0590.00514.43
7.1.100.0650.00214.71
7.1.90.0390.00814.83
7.1.80.0570.00814.67
7.1.70.0620.00514.56
7.1.60.0680.01123.55
7.1.50.0810.00623.81
7.1.40.0670.01123.58
7.1.30.0670.00923.54
7.1.20.0610.00923.72
7.1.10.0600.00914.67
7.1.00.0540.00614.71
7.0.330.0100.00715.51
7.0.320.0060.01015.33
7.0.310.0100.00715.43
7.0.300.0030.01015.13
7.0.290.0000.01315.22
7.0.280.0030.01315.31
7.0.270.0120.00015.33
7.0.260.0060.00315.33
7.0.250.0060.00615.44
7.0.240.0090.00315.54
7.0.230.0030.00715.32
7.0.220.0000.01515.34
7.0.210.0060.00915.41
7.0.200.0040.00415.31
7.0.190.0000.00915.20
7.0.180.0050.00515.28
7.0.170.0000.01115.06
7.0.160.0030.01015.43
7.0.150.0030.01015.20
7.0.140.0030.00714.98
7.0.130.0000.01414.99
7.0.120.0030.01015.45
7.0.110.0060.00315.26
7.0.100.0070.00315.14
7.0.90.0030.00615.45
7.0.80.0000.01115.29
7.0.70.0030.01015.44
7.0.60.0030.00715.41
7.0.50.0030.00715.35
7.0.40.0040.00713.30
7.0.30.0030.00913.04
7.0.20.0070.00713.27
7.0.10.0080.00613.13
7.0.00.0030.01013.48
5.6.400.0090.00614.15
5.6.390.0000.01514.32
5.6.380.0110.00314.19
5.6.370.0100.00314.31
5.6.360.0090.00614.34
5.6.350.0090.00613.99
5.6.340.0030.01014.02
5.6.330.0000.01213.91
5.6.320.0030.01314.32
5.6.310.0120.00314.42
5.6.300.0060.00314.12
5.6.290.0000.01014.34
5.6.280.0040.01114.32
5.6.270.0030.01014.08
5.6.260.0090.00314.54
5.6.250.0040.00414.03
5.6.240.0090.00014.18
5.6.230.0100.00314.11
5.6.220.0040.01114.16
5.6.210.0000.00914.17
5.6.200.0040.00414.15
5.6.190.0000.01314.41
5.6.180.0040.00714.19
5.6.170.0030.01114.27
5.6.160.0030.01414.40
5.6.150.0030.00614.44
5.6.140.0040.01414.20
5.6.130.0030.01014.23
5.6.120.0100.00614.18
5.6.110.0120.00414.05
5.6.100.0030.01414.28
5.6.90.0060.00614.15
5.6.80.0070.01014.30
5.6.70.0040.01114.09
5.6.60.0070.01014.07
5.6.50.0100.00714.14
5.6.40.0040.00813.93
5.6.30.0030.00914.09
5.6.20.0060.01014.02
5.6.10.0160.00014.02
5.6.00.0040.00714.16

preferences:
87.96 ms | 400 KiB | 5 Q