3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Function to check if margin is OK or not function check_margin($vpc, $bruto_margin_avg) { if ($vpc >= 1 && $vpc <= 15000) { if ($bruto_margin_avg >= 33 && $bruto_margin_avg <= 40) { //IF VPC is between 0-15000kn and bruto margin is between 33-40% $bruto = 'OK'; $comment = '1'; } else { $bruto = 'NO'; $comment = '33% - 40%'; } } if ($vpc >= 15000 && $vpc <= 50000) { if ($bruto_margin_avg >= 0 && $bruto_margin_avg <= 2) { $bruto = 'OK'; $comment = '2'; } else { $bruto = 'NO'; $comment = '25% - 30%'; } } if ($vpc >= 50000 && $vpc <= 80000) { if ($bruto_margin_avg >= 23 && $bruto_margin_avg <= 27) { $bruto = 'OK'; $comment = '3'; } else { $bruto = 'NO'; $comment = '23% - 27%'; } } if ($vpc > 80000) { if ($bruto_margin_avg > 21) { $bruto = 'OK'; $comment = ''; } else { $bruto = 'NO'; $comment = '> 21%'; } } return array($bruto, $comment); } $vpc = 1560.00; $bruto_margin_avg = 14.952937358001; print_r(check_margin($vpc, $bruto_margin_avg));

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.0140.00718.30
8.3.50.0060.00918.37
8.3.40.0040.01418.75
8.3.30.0150.00018.57
8.3.20.0080.00018.65
8.3.10.0040.00423.68
8.3.00.0080.00020.75
8.2.180.0140.00318.11
8.2.170.0070.00722.96
8.2.160.0070.00719.28
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0070.00019.83
8.2.120.0040.00426.35
8.2.110.0030.00622.26
8.2.100.0100.00317.72
8.2.90.0040.00417.75
8.2.80.0050.00517.97
8.2.70.0040.00418.03
8.2.60.0060.00318.22
8.2.50.0050.00318.10
8.2.40.0000.00819.31
8.2.30.0000.00719.17
8.2.20.0040.00418.12
8.2.10.0030.00517.95
8.2.00.0060.00617.58
8.1.280.0070.01525.92
8.1.270.0070.01319.01
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00023.82
8.1.230.0070.00317.83
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0090.00017.23
8.1.190.0040.00717.00
8.1.180.0040.00418.10
8.1.170.0000.00818.44
8.1.160.0070.00018.84
8.1.150.0040.00418.82
8.1.140.0050.00322.15
8.1.130.0040.00420.07
8.1.120.0070.00017.37
8.1.110.0070.00017.43
8.1.100.0000.00717.36
8.1.90.0040.00417.41
8.1.80.0040.00417.36
8.1.70.0030.00617.46
8.1.60.0030.00617.59
8.1.50.0030.00517.49
8.1.40.0040.00417.52
8.1.30.0030.00517.59
8.1.20.0030.00617.64
8.1.10.0030.00517.55
8.1.00.0030.00617.47
8.0.300.0050.00218.77
8.0.290.0040.00416.63
8.0.280.0040.00418.46
8.0.270.0040.00417.14
8.0.260.0000.00720.24
8.0.250.0040.00716.97
8.0.240.0030.00517.01
8.0.230.0000.00716.84
8.0.220.0000.00716.89
8.0.210.0030.00316.81
8.0.200.0030.00316.80
8.0.190.0000.00916.98
8.0.180.0000.00716.95
8.0.170.0030.00616.88
8.0.160.0000.00716.86
8.0.150.0000.00816.75
8.0.140.0080.00016.90
8.0.130.0030.00313.29
8.0.120.0030.00516.80
8.0.110.0040.00416.84
8.0.100.0040.00416.89
8.0.90.0000.00716.77
8.0.80.0120.00516.89
8.0.70.0040.00416.75
8.0.60.0000.00716.78
8.0.50.0040.00416.71
8.0.30.0050.01216.95
8.0.20.0060.01317.40
8.0.10.0040.00417.01
8.0.00.0110.01016.92
7.4.330.0060.00015.55
7.4.320.0060.00016.50
7.4.300.0030.00316.58
7.4.290.0030.00316.51
7.4.280.0040.00416.55
7.4.270.0040.00416.51
7.4.260.0030.00616.42
7.4.250.0030.00316.55
7.4.240.0030.00316.58
7.4.230.0030.00516.51
7.4.220.0040.00416.51
7.4.210.0050.01016.53
7.4.200.0040.00416.31
7.4.160.0090.00816.52
7.4.140.0090.00917.86
7.4.130.0060.01016.63
7.4.120.0100.00916.45
7.3.330.0000.00513.39
7.3.320.0060.00013.12
7.3.310.0030.00616.16
7.3.300.0030.00316.30
7.3.290.0030.00316.30
7.3.280.0070.00716.19
7.3.260.0070.01316.53
7.3.240.0110.00716.48
7.2.110.0230.00614.40

preferences:
59.89 ms | 400 KiB | 5 Q