3v4l.org

run code in 300+ PHP versions simultaneously
<?php $curtime = '0010'; var_dump($curtime); $trading_hour['AT_open'] = '1715'; $trading_hour['AT_close'] = '2500'; $result = 'N'; if ($curtime <= '0100' || ($curtime >= '0830' && $curtime <= '2359')) { $isOverMidnight = false; $AT_close = $trading_hour['AT_close']; if ($AT_close > '2359') { $isOverMidnight = true; $AT_close = $AT_close - '2400'; $AT_close = sprintf('%04d', $AT_close); } if ($isOverMidnight) { if ($curtime <= $AT_close) { $result = 'AT'; } } else { if ($curtime >= $trading_hour['AT_open'] && $curtime <= $AT_close) { $result = 'AT'; } } echo $result; } else { echo 'stop'; }

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.0070.00716.63
8.3.50.0090.00616.51
8.3.40.0070.01018.66
8.3.30.0070.01018.82
8.3.20.0040.00420.29
8.3.10.0040.00423.61
8.3.00.0040.00417.84
8.2.180.0110.00418.54
8.2.170.0110.00322.96
8.2.160.0040.01120.28
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00420.35
8.2.120.0050.00226.35
8.2.110.0000.00919.27
8.2.100.0040.00818.16
8.2.90.0000.00819.30
8.2.80.0030.00618.03
8.2.70.0080.00017.63
8.2.60.0030.00618.05
8.2.50.0080.00018.10
8.2.40.0000.00820.40
8.2.30.0040.00421.05
8.2.20.0000.00718.03
8.2.10.0000.00718.13
8.2.00.0000.00718.18
8.1.280.0070.01325.92
8.1.270.0040.00422.02
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00023.87
8.1.230.0080.00417.57
8.1.220.0050.00317.78
8.1.210.0040.00418.77
8.1.200.0060.00317.13
8.1.190.0040.00417.23
8.1.180.0100.00018.10
8.1.170.0040.00418.45
8.1.160.0000.00718.93
8.1.150.0000.00820.71
8.1.140.0050.00319.58
8.1.130.0070.00018.77
8.1.120.0050.00317.51
8.1.110.0000.00817.49
8.1.100.0040.00417.49
8.1.90.0070.00017.48
8.1.80.0000.00817.49
8.1.70.0030.00317.48
8.1.60.0030.00617.54
8.1.50.0040.00417.55
8.1.40.0000.00817.54
8.1.30.0080.01217.55
8.1.20.0040.00417.61
8.1.10.0090.00017.54
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0050.00318.43
8.0.270.0030.00617.21
8.0.260.0030.00316.87
8.0.250.0030.00316.90
8.0.240.0000.00716.90
8.0.230.0000.01016.91
8.0.220.0040.00416.98
8.0.210.0030.00316.95
8.0.200.0030.00317.01
8.0.190.0040.00417.01
8.0.180.0000.00816.86
8.0.170.0040.00416.89
8.0.160.0030.00416.95
8.0.150.0000.00717.01
8.0.140.0040.00416.93
8.0.130.0000.00613.42
8.0.120.0000.00816.93
8.0.110.0050.00216.84
8.0.100.0000.00716.92
8.0.90.0040.00417.05
8.0.80.0040.01117.02
8.0.70.0000.00716.93
8.0.60.0050.00317.07
8.0.50.0000.00816.94
8.0.30.0110.00817.04
8.0.20.0100.00917.40
8.0.10.0070.00017.14
8.0.00.0120.00916.50
7.4.330.0050.00015.55
7.4.320.0030.00316.52
7.4.300.0030.00316.61
7.4.290.0070.00016.56
7.4.280.0040.00416.51
7.4.270.0070.00016.50
7.4.260.0000.00613.34
7.4.250.0040.00416.54
7.4.240.0030.00616.52
7.4.230.0040.00416.61
7.4.220.0120.00316.46
7.4.210.0110.00816.55
7.4.200.0040.00416.67
7.4.160.0130.00516.50
7.4.150.0090.00917.40
7.4.140.0100.00917.86
7.4.130.0110.00616.68
7.4.120.0150.00616.54
7.3.330.0020.00213.05
7.3.320.0060.00013.13
7.3.310.0030.00316.20
7.3.300.0000.00616.21
7.3.290.0000.00716.17
7.3.280.0090.00716.32
7.3.270.0060.01217.40
7.3.260.0080.00916.49
7.3.250.0120.00616.40
7.3.240.0130.00816.34

preferences:
53.16 ms | 401 KiB | 5 Q