3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __construct() { $item = $this->itemResolver(); $counter = 0; $thumbnails = []; $preview = []; foreach(iterator_to_array($item,true) as $field){ ++$counter; //if needed $thumbnails[] = $ImageThumbNailPath = sprintf('%s_thumbnail.jpg',$field->value); //$field->value should be same as $feth[0][0]; $preview[] = $previewImagePath = sprintf('%s_preview',$field->value); //same as $feth[0][0] +1; } } public function itemResolver(): \Generator { $stmt = mysqli_query($db_connect, "select pk_i_id from oc_t_item_resource ORDER by pk_i_id desc"); $records = mysqli_fetch_all($stmt); foreach($records as $record){ yield $record; } } }

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.0160.00618.31
8.3.50.0060.00818.19
8.3.40.0100.01018.80
8.3.30.0090.00918.39
8.3.20.0090.00019.18
8.3.10.0000.00821.94
8.3.00.0000.00820.71
8.2.180.0110.00417.99
8.2.170.0100.00322.96
8.2.160.0110.00420.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00419.76
8.2.110.0090.00019.36
8.2.100.0090.00317.97
8.2.90.0030.00617.38
8.2.80.0030.00617.97
8.2.70.0050.00317.63
8.2.60.0000.00818.03
8.2.50.0000.00818.10
8.2.40.0020.00519.22
8.2.30.0040.00419.06
8.2.20.0070.00317.92
8.2.10.0000.00718.07
8.2.00.0040.00417.64
8.1.280.0040.01125.92
8.1.270.0000.00818.82
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.19
8.1.230.0080.00418.86
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0040.00417.10
8.1.180.0050.00318.10
8.1.170.0050.00318.52
8.1.160.0040.00418.80
8.1.150.0030.00418.82
8.1.140.0000.00722.18
8.1.130.0070.00020.26
8.1.120.0000.00817.32
8.1.110.0070.00017.29
8.1.100.0060.00317.34
8.1.90.0040.00417.29
8.1.80.0000.00717.30
8.1.70.0040.00417.22
8.1.60.0050.00317.43
8.1.50.0000.00717.41
8.1.40.0000.00817.38
8.1.30.0060.00317.46
8.1.20.0040.00417.48
8.1.10.0040.00417.29
8.1.00.0050.00217.37
8.0.300.0000.00918.77
8.0.290.0040.00416.63
8.0.280.0030.00518.22
8.0.270.0030.00317.18
8.0.260.0030.00318.35
8.0.250.0030.00616.75
8.0.240.0000.00616.87
8.0.230.0030.00316.80
8.0.220.0000.00816.80
8.0.210.0000.00716.75
8.0.200.0040.00416.77
8.0.190.0060.00316.70
8.0.180.0050.00216.81
8.0.170.0000.00816.80
8.0.160.0030.00316.85
8.0.150.0000.00716.82
8.0.140.0030.00316.66
8.0.130.0000.00513.26
8.0.120.0080.00016.69
8.0.110.0000.00816.64
8.0.100.0000.00816.76
8.0.90.0040.00416.73
8.0.80.0030.01316.71
8.0.70.0070.00016.74
8.0.60.0050.00216.71
8.0.50.0000.00716.71
8.0.30.0040.01417.02
8.0.20.0100.00817.40
8.0.10.0080.00016.67
8.0.00.0080.01016.64
7.4.330.0050.00015.55
7.4.320.0000.00616.39
7.4.300.0040.00416.38
7.4.290.0000.00716.38
7.4.280.0000.00816.28
7.4.270.0070.00016.39
7.4.260.0000.00816.47
7.4.250.0060.00316.28
7.4.240.0040.00416.33
7.4.230.0030.00316.48
7.4.220.0070.00016.38
7.4.210.0060.00916.51
7.4.200.0000.00716.19
7.4.160.0070.01016.34
7.4.140.0080.01017.86
7.4.130.0120.00916.32
7.4.120.0100.00816.38
7.4.110.0060.01816.42
7.4.100.0080.00816.42
7.4.90.0060.01116.21
7.4.80.0030.01319.39
7.4.70.0080.01416.52
7.4.60.0090.00916.42
7.4.50.0130.00316.33
7.4.40.0040.01216.32
7.4.00.0120.00014.78
7.3.330.0020.00212.96
7.3.320.0000.00612.96
7.3.310.0030.00616.00
7.3.300.0050.00216.06
7.3.290.0000.00716.05
7.3.280.0070.01416.16
7.3.260.0110.00916.22
7.3.240.0090.00916.26
7.3.230.0080.00816.16
7.3.210.0030.01316.33
7.3.200.0040.01316.25
7.3.190.0040.01516.24
7.3.180.0090.00616.12
7.3.170.0080.00916.30
7.3.160.0100.00716.39
7.3.10.0060.00616.29
7.3.00.0050.00316.42
7.2.330.0070.01016.17
7.2.320.0120.00816.63
7.2.310.0130.00616.36
7.2.300.0090.00916.39
7.2.290.0120.00616.32
7.2.130.0000.01716.69
7.2.120.0100.00316.45
7.2.110.0140.00615.58
7.2.100.0100.00715.38
7.2.90.0130.00515.74
7.2.80.0130.00515.67
7.2.70.0150.00615.72
7.2.60.0120.01015.71
7.2.50.0180.00315.89
7.2.40.0100.00815.61
7.2.30.0120.00615.72
7.2.20.0130.00715.78
7.2.10.0120.00615.71
7.2.00.0080.01015.52
7.1.250.0070.00315.39
7.1.230.0260.00313.67
7.1.220.0220.00713.69
7.1.210.0140.00613.64
7.1.200.0150.00513.75
7.1.190.0100.01313.70
7.1.180.0250.00413.68
7.1.170.0200.01113.78
7.1.160.0180.01113.64
7.1.150.0240.00313.45
7.1.140.0170.00613.49
7.1.130.0150.01013.69
7.1.120.0280.00613.61
7.1.110.0250.00313.76
7.1.100.0240.00313.58
7.1.90.0200.00713.92
7.1.80.0210.00613.80
7.1.70.0230.00813.61
7.1.60.0380.00631.61
7.1.50.0400.00731.91
7.1.40.0330.01031.71
7.1.30.0300.01431.44
7.1.20.0380.00631.72
7.1.10.0200.00613.65
7.1.00.0170.00613.56
5.6.380.0090.00614.16

preferences:
45.31 ms | 400 KiB | 5 Q