3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'start'; function recuperation_info_product_et_decrementation($reference, $qty, $isDeclinaison){ /* Fonction de récupèration et décrementation produit */ $product_infos = array(); $tables = array('product_attribute'); if($isDeclinaison === false) { array_unshift($tables, 'product'); } foreach($tables as $table) { $query = 'SELECT * FROM `'._DB_PREFIX_.$table.'` WHERE `reference` = "'.$reference.'";'; $result = Db::getInstance()->executeS($query); if($result !== false) { $product_infos = $result[0]; decremente_stock($product_infos['id_product'], $qty, $reference, $table); break; } } return $product_infos; } echo 'done';

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.0120.00616.38
8.3.50.0120.00822.09
8.3.40.0120.00318.56
8.3.30.0100.00618.72
8.3.20.0050.00220.30
8.3.10.0040.00421.95
8.3.00.0040.00419.25
8.2.180.0070.00718.43
8.2.170.0070.00722.96
8.2.160.0030.01320.39
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0110.00426.16
8.2.120.0040.00422.26
8.2.110.0080.00022.28
8.2.100.0080.00417.78
8.2.90.0040.00419.09
8.2.80.0000.00817.97
8.2.70.0000.00817.36
8.2.60.0020.00517.92
8.2.50.0000.01018.07
8.2.40.0040.00419.82
8.2.30.0000.00717.89
8.2.20.0030.00517.54
8.2.10.0090.00018.03
8.2.00.0070.00317.56
8.1.280.0040.01025.92
8.1.270.0080.00023.89
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00323.92
8.1.230.0000.01118.96
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0050.00317.51
8.1.180.0000.01218.10
8.1.170.0000.00818.50
8.1.160.0000.00721.98
8.1.150.0070.00018.59
8.1.140.0000.00717.41
8.1.130.0000.00717.81
8.1.120.0000.00817.27
8.1.110.0040.00417.25
8.1.100.0040.00317.32
8.1.90.0000.00717.43
8.1.80.0040.00417.35
8.1.70.0030.00517.32
8.1.60.0040.00417.54
8.1.50.0030.00617.44
8.1.40.0000.00817.31
8.1.30.0080.00017.42
8.1.20.0040.00417.57
8.1.10.0040.00417.36
8.1.00.0040.00417.28
8.0.300.0070.00018.77
8.0.290.0030.00617.18
8.0.280.0050.00318.35
8.0.270.0070.00017.22
8.0.260.0030.00317.23
8.0.250.0030.00316.87
8.0.240.0000.00616.77
8.0.230.0030.00316.83
8.0.220.0030.00316.72
8.0.210.0030.00316.67
8.0.200.0040.00416.86
8.0.190.0000.00816.87
8.0.180.0040.00416.73
8.0.170.0070.00016.89
8.0.160.0000.00816.75
8.0.150.0030.00716.64
8.0.140.0020.00516.83
8.0.130.0070.00013.16
8.0.120.0040.00416.63
8.0.110.0040.00416.83
8.0.100.0000.00716.76
8.0.90.0070.00016.76
8.0.80.0090.00616.77
8.0.70.0050.00316.71
8.0.60.0050.00316.68
8.0.50.0000.00816.70
8.0.30.0080.01217.15
8.0.20.0100.01217.40
8.0.10.0000.00816.83
8.0.00.0120.00516.67
7.4.330.0000.00515.00
7.4.320.0030.00316.36
7.4.300.0060.00016.43
7.4.290.0040.00416.46
7.4.280.0040.00416.40
7.4.270.0000.00716.45
7.4.260.0000.00716.40
7.4.250.0050.00316.30
7.4.240.0070.00016.42
7.4.230.0000.00716.23
7.4.220.0030.01616.50
7.4.210.0050.01016.39
7.4.200.0030.00316.61
7.4.190.0000.00716.37
7.4.160.0030.01316.33
7.4.150.0090.00917.40
7.4.140.0060.01217.86
7.4.130.0060.01216.31
7.4.120.0110.00616.42
7.4.110.0070.01016.38
7.4.100.0130.00316.54
7.4.90.0070.01016.31
7.4.80.0030.01519.39
7.4.70.0080.00816.39
7.4.60.0080.00816.41
7.4.50.0040.00416.13
7.4.40.0120.00322.77
7.4.30.0120.00416.50
7.4.00.0060.00915.11
7.3.330.0050.00013.07
7.3.320.0060.00013.07
7.3.310.0040.00416.21
7.3.300.0030.00316.20
7.3.290.0000.01416.16
7.3.280.0130.00616.21
7.3.270.0030.01317.40
7.3.260.0080.01116.57
7.3.250.0130.01316.30
7.3.240.0080.00816.18
7.3.230.0070.01016.39
7.3.210.0100.00716.50
7.3.200.0150.00619.39
7.3.190.0090.00816.23
7.3.180.0090.00616.43
7.3.170.0090.01416.27
7.3.160.0060.01016.55
7.3.120.0030.01014.70
7.3.10.0070.00716.71
7.3.00.0030.00716.32
7.2.330.0040.01516.53
7.2.320.0100.01416.54
7.2.310.0090.00616.34
7.2.300.0060.01216.55
7.2.290.0130.01016.52
7.2.130.0030.00916.88
7.2.120.0070.00316.65
7.2.110.0000.00816.65
7.2.100.0040.01116.91
7.2.90.0040.00816.42
7.2.80.0030.00916.60
7.2.70.0000.01416.45
7.2.60.0020.01216.85
7.2.50.0100.00316.80
7.2.40.0000.00916.95
7.2.30.0000.01416.86
7.2.20.0100.00716.89
7.2.10.0060.00616.89
7.2.00.0000.01316.88
7.1.250.0030.01015.59
7.1.200.0170.00015.20
7.1.100.0170.00617.83
7.1.70.0080.00016.68
7.1.60.0060.01919.46
7.1.50.0030.00816.61
7.1.00.0030.07722.50
7.0.200.0030.00616.63
7.0.140.0070.07021.95
7.0.60.0100.05019.97
7.0.50.0170.07717.93
7.0.40.0070.09020.21
7.0.30.0230.04320.21
7.0.20.0270.05020.16
7.0.10.0030.04720.23
7.0.00.0070.09020.16
5.6.280.0070.07021.00
5.6.210.0170.07020.73
5.6.200.0030.09318.14
5.6.190.0070.07720.61
5.6.180.0130.04020.51
5.6.170.0100.05720.62
5.6.160.0230.03720.49
5.6.150.0100.05718.16
5.6.140.0030.08718.19
5.6.130.0170.07718.23
5.6.120.0130.04321.00
5.6.110.0030.04020.99
5.6.100.0070.08021.13
5.6.90.0130.07321.14
5.6.80.0170.03320.54
5.5.350.0030.07320.34
5.5.340.0070.06717.98
5.5.330.0130.07720.42
5.5.320.0400.07320.24
5.5.310.0170.05020.30
5.5.300.0070.03717.96
5.5.290.0100.03318.07
5.5.280.0100.08020.79
5.5.270.0130.03720.80
5.5.260.0030.04320.89
5.5.250.0130.07720.72
5.5.240.0030.07320.36
5.4.450.0270.07019.46
5.4.440.0200.04019.30
5.4.430.0300.04319.57
5.4.420.0230.04019.38
5.4.410.0230.08019.44
5.4.400.0330.04719.25
5.4.390.0230.06719.06
5.4.380.0300.07319.20
5.4.370.0400.03718.95
5.4.360.0430.03719.15
5.4.350.0200.03719.20
5.4.340.0200.05019.24
5.4.320.0370.06719.14
5.4.310.0330.06018.84
5.4.300.0300.04319.08
5.4.290.0300.04019.14
5.4.280.0060.03612.37
5.4.270.0020.04012.38
5.4.260.0120.05212.38
5.4.250.0140.04712.38
5.4.240.0050.05412.38
5.4.230.0100.05212.37
5.4.220.0110.04912.37
5.4.210.0080.04812.36
5.4.200.0070.05412.37
5.4.190.0110.04812.36
5.4.180.0070.03812.37
5.4.170.0070.03612.37
5.4.160.0050.04012.37
5.4.150.0070.03812.36
5.4.140.0110.04112.04
5.4.130.0050.04012.04
5.4.120.0060.04212.00
5.4.110.0130.03311.99
5.4.100.0050.04311.98
5.4.90.0100.04311.99
5.4.80.0070.05011.99
5.4.70.0100.05011.99
5.4.60.0100.05111.98
5.4.50.0070.03411.98
5.4.40.0080.03611.98
5.4.30.0060.03911.97
5.4.20.0060.04511.97
5.4.10.0080.04611.97
5.4.00.0070.05011.45
5.3.290.4100.03014.63
5.3.280.0090.04912.71
5.3.270.0060.04912.73
5.3.260.0070.04512.72
5.3.250.0090.04212.72
5.3.240.0080.03912.72
5.3.230.0070.04812.71
5.3.220.0090.04512.68
5.3.210.0090.05012.68
5.3.200.0140.05312.68
5.3.190.0150.07112.68
5.3.180.0060.05812.67
5.3.170.0060.06112.67
5.3.160.0160.07812.67
5.3.150.0110.04912.67
5.3.140.0100.04812.66
5.3.130.0100.05212.66
5.3.120.0090.05512.66
5.3.110.0090.05212.66
5.3.100.0110.04612.12
5.3.90.0090.04912.08
5.3.80.0120.06312.08
5.3.70.0160.04612.07
5.3.60.0120.05012.07
5.3.50.0120.05212.00
5.3.40.0130.05412.00
5.3.30.0100.05211.95
5.3.20.0100.03611.74
5.3.10.0090.04911.70
5.3.00.0150.05511.70
5.2.170.0130.0449.18
5.2.160.0090.0569.19
5.2.150.0150.0519.18
5.2.140.0080.0449.18
5.2.130.0180.0939.14
5.2.120.0120.0489.14
5.2.110.0090.0419.15
5.2.100.0060.0439.15
5.2.90.0060.0489.14
5.2.80.0050.0459.14
5.2.70.0060.0459.14
5.2.60.0120.0609.09
5.2.50.0090.0449.07
5.2.40.0040.0409.04
5.2.30.0060.0389.01
5.2.20.0070.0369.00
5.2.10.0090.0338.92
5.2.00.0030.0348.78
5.1.60.0080.0248.07
5.1.50.0030.0288.06
5.1.40.0050.0298.05
5.1.30.0030.0328.39
5.1.20.0050.0358.42
5.1.10.0070.0298.14
5.1.00.0060.0308.14
5.0.50.0050.0296.63
5.0.40.0020.0296.50
5.0.30.0030.0366.30
5.0.20.0040.0186.28
5.0.10.0020.0226.26
5.0.00.0040.0316.25
4.4.90.0010.0204.78
4.4.80.0020.0184.75
4.4.70.0040.0314.75
4.4.60.0030.0224.76
4.4.50.0060.0194.77
4.4.40.0080.0304.71
4.4.30.0060.0214.76
4.4.20.0040.0224.85
4.4.10.0050.0214.85
4.4.00.0060.0274.75
4.3.110.0040.0154.67
4.3.100.0050.0144.67
4.3.90.0030.0154.64
4.3.80.0040.0254.59
4.3.70.0030.0184.63
4.3.60.0030.0224.63
4.3.50.0020.0234.63
4.3.40.0040.0304.54
4.3.30.0030.0173.29
4.3.20.0010.0173.27
4.3.10.0020.0163.24
4.3.00.0070.01313.91

preferences:
47.11 ms | 401 KiB | 5 Q