3v4l.org

run code in 300+ PHP versions simultaneously
<?php $long_total_profit_loss = -900; $short_sell_total_profit_loss = 29000; if($long_total_profit_loss > $short_sell_total_profit_loss) { if($long_total_profit_loss > 0) { echo "long has higher in profit"; } else { // $long_total_profit_loss<0 or =0 echo "short has higher loss"; } } else { // $long_total_profit_loss < $short_sell_total_profit_loss or equal if($short_sell_total_profit_loss > 0) { echo "short has higher in profit"; } else { // $long_total_profit_loss<0 or =0 echo "long has higher loss"; } }

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.70.0070.00716.63
8.3.60.0070.01118.47
8.3.50.0110.00418.28
8.3.40.0110.00418.51
8.3.30.0100.00318.71
8.3.20.0090.00018.91
8.3.10.0020.00523.48
8.3.00.0070.00022.39
8.2.190.0060.01216.75
8.2.180.0170.00018.29
8.2.170.0090.00622.96
8.2.160.0100.00321.06
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00722.21
8.2.120.0080.00026.35
8.2.110.0070.00319.32
8.2.100.0040.00717.78
8.2.90.0050.00317.75
8.2.80.0050.00317.97
8.2.70.0050.00317.80
8.2.60.0040.00418.22
8.2.50.0000.00818.10
8.2.40.0000.00821.06
8.2.30.0080.00020.64
8.2.20.0070.00018.02
8.2.10.0070.00017.89
8.2.00.0000.00719.36
8.1.280.0100.01025.92
8.1.270.0050.00322.18
8.1.260.0030.00526.35
8.1.250.0000.00728.09
8.1.240.0090.00021.29
8.1.230.0070.00418.86
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0040.00417.10
8.1.190.0060.00318.88
8.1.180.0040.00418.10
8.1.170.0090.00018.80
8.1.160.0070.00018.79
8.1.150.0040.00418.82
8.1.140.0040.00419.00
8.1.130.0070.00020.88
8.1.120.0040.00417.30
8.1.110.0000.00717.45
8.1.100.0000.00717.28
8.1.90.0040.00417.44
8.1.80.0000.00717.32
8.1.70.0000.00717.23
8.1.60.0040.00417.52
8.1.50.0040.00417.48
8.1.40.0040.00417.46
8.1.30.0080.00017.63
8.1.20.0000.00717.56
8.1.10.0000.00817.50
8.1.00.0040.00417.43
8.0.300.0070.00018.77
8.0.290.0040.00716.58
8.0.280.0070.00018.43
8.0.270.0050.00316.75
8.0.260.0030.00620.16
8.0.250.0040.00416.87
8.0.240.0040.00416.95
8.0.230.0030.00316.93
8.0.220.0080.00016.85
8.0.210.0070.00016.81
8.0.200.0030.00316.89
8.0.190.0040.00416.93
8.0.180.0080.00016.86
8.0.170.0090.00016.86
8.0.160.0000.00816.89
8.0.150.0040.00416.66
8.0.140.0070.00016.77
8.0.130.0000.00513.26
8.0.120.0000.00816.65
8.0.110.0080.00016.72
8.0.100.0000.00716.64
8.0.90.0040.00416.84
8.0.80.0070.01216.87
8.0.70.0040.00416.70
8.0.60.0030.00516.86
8.0.50.0000.00716.81
8.0.30.0110.00617.05
8.0.20.0170.00317.40
8.0.10.0000.00716.77
8.0.00.0110.00616.64
7.4.330.0000.00515.55
7.4.320.0060.00016.45
7.4.300.0040.00416.50
7.4.290.0000.00716.33
7.4.280.0070.00016.44
7.4.270.0030.00316.50
7.4.260.0070.00016.53
7.4.250.0000.00716.54
7.4.240.0030.00316.46
7.4.230.0070.00016.44
7.4.220.0000.00816.54
7.4.210.0070.00916.56
7.4.200.0070.00016.32
7.4.160.0110.00816.47
7.4.140.0100.01017.86
7.4.130.0120.00616.45
7.4.120.0090.01016.32
7.4.110.0160.00616.48
7.4.100.0090.00916.37
7.4.90.0060.01216.39
7.4.80.0000.01619.39
7.4.70.0130.00316.56
7.4.60.0160.00616.39
7.4.50.0030.01416.55
7.4.40.0090.01416.66
7.4.00.0070.00314.74
7.3.330.0050.00012.96
7.3.320.0000.00613.04
7.3.310.0060.00016.05
7.3.300.0000.00716.13
7.3.290.0000.00716.10
7.3.280.0080.00716.17
7.3.260.0120.00716.32
7.3.240.0100.01216.31
7.3.230.0100.00716.51
7.3.210.0030.01316.25
7.3.200.0080.00816.16
7.3.190.0040.01116.20
7.3.180.0150.00616.44
7.3.170.0110.00516.25
7.3.160.0050.01116.39
7.3.120.0100.00314.84
7.3.110.0090.00614.73
7.3.100.0030.01314.84
7.3.90.0030.01214.94
7.3.80.0110.00714.74
7.3.70.0100.00314.75
7.3.60.0080.00414.61
7.3.50.0070.00714.66
7.3.40.0080.00814.66
7.3.30.0000.01314.80
7.3.20.0070.00716.64
7.3.10.0030.01016.56
7.3.00.0060.00916.59
7.2.330.0130.00316.58
7.2.320.0120.00616.67
7.2.310.0080.00816.66
7.2.300.0090.00916.32
7.2.290.0030.01416.25
7.2.240.0070.01014.88
7.2.230.0030.01414.78
7.2.220.0130.00315.18
7.2.210.0000.01014.75
7.2.200.0090.00614.97
7.2.190.0060.01014.99
7.2.180.0030.00514.88
7.2.170.0070.01015.09
7.2.160.0070.01015.12
7.2.150.0000.01316.70
7.2.140.0030.01316.64
7.2.130.0140.00416.68
7.2.120.0030.01316.86
7.2.110.0070.00716.89
7.2.100.0000.01516.01
7.2.90.0550.00715.47
7.2.80.0690.01215.58
7.2.70.0270.01015.90
7.2.60.0520.01215.74
7.2.50.0070.01215.81
7.2.40.0140.01016.06
7.2.30.0150.00715.87
7.2.20.0130.00915.89
7.2.10.0200.00915.89
7.2.00.0180.00615.70
7.1.330.0070.00715.57
7.1.320.0030.01015.45
7.1.310.0060.00615.77
7.1.300.0040.00715.42
7.1.290.0060.00915.70
7.1.280.0030.00715.73
7.1.270.0000.01015.50
7.1.260.0070.00715.50
7.1.250.0100.00715.50
7.1.210.1600.01013.51
7.1.200.0880.00713.62
7.1.190.0200.00713.68
7.1.180.0380.00913.65
7.1.170.0210.00913.67
7.1.160.1120.00314.00
7.1.150.0190.00013.77
7.1.140.0190.00013.69
7.1.130.0240.01013.77
7.1.120.0310.01213.75
7.1.110.0900.01013.36
7.1.100.1090.00313.79
7.1.90.0480.00413.76
7.1.80.0900.00914.02
7.1.70.0030.01613.76
7.1.60.0680.00031.91
7.1.50.0270.01331.59
7.1.40.0610.01331.84
7.1.30.0330.01031.63
7.1.20.0720.01231.41
7.1.10.1020.00713.66
7.1.00.0100.00713.79

preferences:
21.3 ms | 401 KiB | 5 Q