3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stores_open_starts="{\"monday\":\"13:00\",\"tuesday\":false,\"wednesday\":\"15:00\",\"thursday\":false,\"friday\":false,\"saturday\":\"17:00\",\"sunday\":\"18:00\"}"; $stores_open_ends="{\"monday\":\"21:40\",\"tuesday\":false,\"wednesday\":\"15:00\",\"thursday\":false,\"friday\":false,\"saturday\":\"15:00\",\"sunday\":\"15:00\"}"; //This is Json Decode Code With Pick data by Day $stores_open_starts=!empty($stores_open_starts)?(array)json_decode($stores_open_starts):false; $stores_open_ends=!empty($stores_open_ends)?(array)json_decode($stores_open_ends):false; $monday_open_rawtime=timeFormat($stores_open_starts['monday'],true); $tuesday_open_rawtime=timeFormat($stores_open_starts['tuesday'],true); $wednesday_open_rawtime=timeFormat($stores_open_starts['wednesday'],true); $thursday_open_rawtime=timeFormat($stores_open_starts['thursday'],true); $friday_open_rawtime=timeFormat($stores_open_starts['friday'],true); $saturday_open_rawtime=timeFormat($stores_open_starts['saturday'],true); $sunday_open_rawtime=timeFormat($stores_open_starts['sunday'],true); //timeFormat function function timeFormat($time='',$is_display=false) { if(empty($time)){ return false; } $time_format=12; switch ($time_format){ case "12": if ( $is_display==true){ return date("g:i A", strtotime($time)); } else return date("G:i", strtotime($time)); break; default: if ( $is_display==true){ return date("G:i", strtotime($time)); } else return date("G:i", strtotime($time)); break; } return $time; } $day=date("l"); $today_bar=strtolower($day); $today_time = date("g:i A"); //$today_bar = "monday"; $datetime1 = new DateTime('tomorrow - 2day'); $prvday=$datetime1->format('l'); $day1=strtotime($today_bar); $day2=strtotime($prvday); $tol=$day1-$day2; $datetime = new DateTime('tomorrow'); $nextday=$datetime->format('l'); $off_day=""; if(empty($monday_open_rawtime) && !empty($tuesday_open_rawtime) && $nextday='Tuesday' && ($tol>='-518400' || $tol='0') && $tol!='0' && $tol<='0' ){ $off_day="Next Open At : ".$tuesday_open_rawtime." ,Tuesday."; }else if(empty($tuesday_open_rawtime) && !empty($wednesday_open_rawtime) && $nextday='Wednesday' && ($tol>='-518400' || $tol='0') && $tol!='0' && $tol<='0' ){ $off_day="Next Open At : ".$wednesday_open_rawtime." ,Wednesday."; }else if(empty($wednesday_open_rawtime) && !empty($thursday_open_rawtime) && $nextday='Thursday' && ($tol>='-518400' || $tol='0') && $tol!='0' ){ $off_day="Next Open At : ".$thursday_open_rawtime." ,Thursday."; }else if(empty($thursday_open_rawtime) && !empty($friday_open_rawtime) && $nextday='Friday' && ($tol>='-518400' || $tol='0') && $tol!='0' ){ $off_day="Next Open At : ".$friday_open_rawtime." ,Friday."; }else if(empty($friday_open_rawtime) && !empty($saturday_open_rawtime) && $nextday='Saturday' && ($tol>='-518400' || $tol='0') && $tol!='0'){ $off_day="Next Open At : ".$saturday_open_rawtime." ,Saturday."; }else if(empty($saturday_open_rawtime) && !empty($sunday_open_rawtime) && $nextday='Sunday' && ($tol>='-518400' || $tol='0') && $tol!='0'){ $off_day="Next Open At : ".$sunday_open_rawtime." ,Sunday."; }else if(empty($sunday_open_rawtime) && !empty($monday_open_rawtime) && $nextday='Monday' && ($tol>='-518400' || $tol='0') && $tol!='0'){ $off_day="Next Open At : ".$monday_open_rawtime." ,Monday."; } echo $off_day;

Abusive script

This script was stopped while abusing our resources

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.110.0040.00420.94
8.3.100.0060.00624.06
8.3.90.0000.01426.77
8.3.80.0060.00316.88
8.3.70.0110.00418.55
8.3.60.0110.01118.56
8.3.50.0110.00618.45
8.3.40.0100.00618.93
8.3.30.0110.00318.81
8.3.20.0040.00421.90
8.3.10.0060.00320.69
8.3.00.0040.00421.88
8.2.230.0040.01122.58
8.2.220.0090.00037.54
8.2.210.0040.00426.77
8.2.200.0040.00816.75
8.2.190.0090.00617.00
8.2.180.0140.00425.92
8.2.170.0040.01122.96
8.2.160.0120.00622.25
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00426.16
8.2.110.0060.00322.29
8.2.100.0150.00018.16
8.2.90.0000.00818.47
8.2.80.0040.00418.05
8.2.70.0030.00518.29
8.2.60.0080.00018.41
8.2.50.0070.00019.43
8.2.40.0060.00319.59
8.2.30.0080.00020.56
8.2.20.0050.00318.36
8.2.10.0050.00319.14
8.2.00.0050.00320.03
8.1.290.0100.00030.84
8.1.280.0170.00325.92
8.1.270.0080.00020.99
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0070.00324.01
8.1.230.0000.01119.27
8.1.220.0050.00318.02
8.1.210.0050.00318.77
8.1.200.0040.00417.73
8.1.190.0030.00517.72
8.1.180.0040.00418.10
8.1.170.0080.00019.03
8.1.160.0000.00818.98
8.1.150.0040.00419.07
8.1.140.0030.00520.48
8.1.130.0040.00420.38
8.1.120.0040.00417.72
8.1.110.0000.00717.79
8.1.100.0070.00017.72
8.1.90.0030.00517.78
8.1.80.0020.00517.79
8.1.70.0000.00817.76
8.1.60.0060.00317.80
8.1.50.0080.00417.61
8.1.40.0000.00917.78
8.1.30.0090.00017.96
8.1.20.0000.00817.87
8.1.10.0000.00817.82
8.1.00.0000.00917.70
8.0.300.0050.00319.94
8.0.290.0030.00517.00
8.0.280.0040.00418.55
8.0.270.0070.00017.50
8.0.260.0000.00718.69
8.0.250.0000.00817.23
8.0.240.0050.00317.23
8.0.230.0030.00317.13
8.0.220.0070.00017.09
8.0.210.0000.00717.27
8.0.200.0040.00417.12
8.0.190.0000.00817.27
8.0.180.0050.00317.29
8.0.170.0000.00817.24
8.0.160.0000.00817.10
8.0.150.0000.00817.10
8.0.140.0080.00017.16
8.0.130.0030.00313.54
8.0.120.0070.00017.09
8.0.110.0000.00817.04
8.0.100.0000.00717.07
8.0.90.0000.00817.20
8.0.80.0000.01317.16
8.0.70.0040.00417.06
8.0.60.0040.00417.15
8.0.50.0080.00017.21
8.0.30.0060.01217.09
8.0.20.0080.01317.30
8.0.10.0000.00717.22
8.0.00.0100.01117.02
7.4.330.0050.00015.55
7.4.320.0030.00316.77
7.4.300.0000.00616.75
7.4.290.0080.00016.78
7.4.280.0050.00316.75
7.4.270.0040.00416.68
7.4.260.0000.00716.69
7.4.250.0000.00716.73
7.4.240.0040.00416.77
7.4.230.0000.00716.55
7.4.220.0040.00416.92
7.4.210.0140.00916.79
7.4.200.0070.00016.64
7.4.140.0140.00317.86
7.4.130.0090.00916.82
7.4.120.0160.00616.79
7.4.110.0110.00916.77
7.4.100.0170.00716.78
7.4.90.0090.00916.82
7.4.80.0060.01519.39
7.4.70.0070.01016.83
7.4.60.0130.00316.65
7.4.50.0100.00616.84
7.4.40.0120.01216.70
7.4.00.0060.00915.32
7.3.330.0030.00313.39
7.3.320.0030.00313.60
7.3.310.0040.00416.46
7.3.300.0000.00716.56
7.3.290.0040.00216.55
7.3.280.0140.00816.63
7.3.260.0110.00816.67
7.3.230.0130.00316.60
7.3.210.0090.00916.63
7.3.200.0080.00816.75
7.3.190.0060.01016.63
7.3.180.0080.00816.69
7.3.170.0040.01316.71
7.3.160.0090.00916.86
7.3.50.0130.00714.96
7.3.40.0080.01515.02
7.3.30.0040.00715.20
7.3.20.0110.00415.07
7.3.10.0090.00615.05
7.3.00.0060.01115.18
7.2.330.0030.01617.14
7.2.320.0090.00917.13
7.2.310.0130.00316.91
7.2.300.0100.01317.17
7.2.290.0100.00716.92
7.2.180.0040.01115.27
7.2.170.0000.01315.13
7.2.160.0120.01515.27
7.2.150.0070.01015.44
7.2.140.0070.00715.39
7.2.130.0110.00715.14
7.2.120.0130.01615.50
7.2.110.0140.00915.47
7.2.100.0170.01015.43
7.2.90.0120.00815.36
7.2.80.0160.00315.36
7.2.70.0140.00715.39
7.2.60.0140.00515.48
7.2.50.0110.00715.28
7.2.40.0150.00315.58
7.2.30.0140.00415.38
7.2.20.0140.00415.35
7.2.10.0130.00615.52
7.2.00.0090.00915.36
7.1.280.0140.00013.98
7.1.270.0090.00614.15
7.1.260.0090.00314.25
7.1.250.0110.00714.39

preferences:
35.88 ms | 403 KiB | 5 Q