3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkPositiveInt($var) { if (is_numeric($var)) { if (is_int($var)) { if ($var > 0) { return true; } } } return false; } $devidL = '05.08.2017'; $arrayInputsState['devid'] = ''; if ($devidL != '') { $arrayDate = explode(".", $devidL); $numberOfValid = 0; if (checkPositiveInt($arrayDate[0])) { $day = (int)$arrayDate[0]; ++$numberOfValid; } if (checkPositiveInt($arrayDate[1])) { $month = (int)$arrayDate[1]; ++$numberOfValid; } if (checkPositiveInt($arrayDate[2])) { $year = (int)$arrayDate[2]; ++$numberOfValid; } if ($numberOfValid == 3) { if (checkdate($month, $day, $year)) { $date = \DateTime::createFromFormat('d.m.Y', $devidL); if ($date) { $Zaznam->setDEVID($date); $arrayInputsState['devid'] = 'ok'; } else { $arrayInputsState['devid'] = 'error'; } } else { $arrayInputsState['devid'] = 'error'; } } } else { $arrayInputsState['devid'] = 'empty'; } var_dump($arrayInputsState['devid']);

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.0040.01116.50
8.3.50.0090.00616.04
8.3.40.0060.00918.68
8.3.30.0130.00318.52
8.3.20.0040.00420.36
8.3.10.0040.00421.76
8.3.00.0100.00019.53
8.2.180.0120.00618.41
8.2.170.0090.00622.96
8.2.160.0200.00020.45
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0050.00321.06
8.2.120.0070.00026.35
8.2.110.0060.00319.27
8.2.100.0000.01218.09
8.2.90.0080.00019.04
8.2.80.0030.00517.97
8.2.70.0060.00317.63
8.2.60.0000.00818.04
8.2.50.0000.00918.10
8.2.40.0000.00720.30
8.2.30.0040.00420.91
8.2.20.0050.00218.11
8.2.10.0070.00018.02
8.2.00.0030.00618.08
8.1.280.0040.01125.92
8.1.270.0060.00323.80
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0040.00422.19
8.1.230.0090.00317.42
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.13
8.1.180.0050.00318.10
8.1.170.0070.00318.50
8.1.160.0040.00419.03
8.1.150.0030.00520.68
8.1.140.0040.00419.65
8.1.130.0030.00318.91
8.1.120.0000.00717.53
8.1.110.0050.00317.40
8.1.100.0040.00417.40
8.1.90.0000.00717.47
8.1.80.0080.00017.41
8.1.70.0040.00417.38
8.1.60.0040.00417.66
8.1.50.0040.00417.43
8.1.40.0040.00417.55
8.1.30.0070.00017.66
8.1.20.0030.00617.65
8.1.10.0030.00517.58
8.1.00.0000.00817.43
8.0.300.0000.01018.77
8.0.290.0040.00416.63
8.0.280.0040.00418.31
8.0.270.0050.00317.15
8.0.260.0000.00716.80
8.0.250.0000.00716.84
8.0.240.0000.00716.95
8.0.230.0070.00016.80
8.0.220.0030.00516.70
8.0.210.0040.00416.82
8.0.200.0060.00016.80
8.0.190.0040.00416.88
8.0.180.0070.00016.74
8.0.170.0040.00416.85
8.0.160.0000.00716.86
8.0.150.0070.00016.83
8.0.140.0000.00816.77
8.0.130.0060.00013.21
8.0.120.0000.00716.86
8.0.110.0070.00016.79
8.0.100.0040.00416.75
8.0.90.0070.00016.70
8.0.80.0070.01016.73
8.0.70.0020.00516.68
8.0.60.0070.00016.93
8.0.50.0000.00816.91
8.0.30.0110.01017.09
8.0.20.0100.00917.40
8.0.10.0070.00016.98
8.0.00.0100.01016.77
7.4.330.0000.00515.55
7.4.320.0070.00016.50
7.4.300.0000.00616.53
7.4.290.0030.00616.61
7.4.280.0030.00616.65
7.4.270.0030.00316.64
7.4.260.0000.00613.31
7.4.250.0030.00316.41
7.4.240.0040.00416.63
7.4.230.0070.00016.43
7.4.220.0070.01116.40
7.4.210.0030.01116.65
7.4.200.0000.00716.50
7.4.160.0100.00816.47
7.4.150.0130.00417.40
7.4.140.0160.00717.86
7.4.130.0110.00716.47
7.4.120.0100.00816.52
7.4.110.0110.00716.63
7.4.100.0090.00916.53
7.4.90.0030.01416.51
7.4.80.0100.00619.39
7.4.70.0070.00916.58
7.4.60.0100.00716.55
7.4.50.0100.00716.54
7.4.40.0120.00316.52
7.4.30.0040.01416.62
7.4.00.0040.01214.76
7.3.330.0000.00613.35
7.3.320.0030.00313.30
7.3.310.0030.00316.44
7.3.300.0070.00016.44
7.3.290.0090.00616.40
7.3.280.0070.00916.38
7.3.270.0090.00917.40
7.3.260.0080.01016.49
7.3.250.0110.00616.53
7.3.240.0070.01016.55
7.3.230.0100.00616.59
7.3.210.0030.01316.32
7.3.200.0080.00816.40
7.3.190.0100.00616.79
7.3.180.0060.00916.46
7.3.170.0080.00816.46
7.3.160.0030.01316.30
7.2.330.0090.01016.59
7.2.320.0130.01016.66
7.2.310.0070.01016.71
7.2.300.0070.01016.90
7.2.290.0100.00716.51
7.2.60.0000.01316.55
7.1.200.0000.01515.97
7.1.70.0110.00816.88
7.1.60.0370.00635.04
7.1.50.0250.01434.91
7.1.40.0320.01334.34
7.1.30.0300.01634.48
7.1.20.0290.01634.77
7.1.10.0100.01016.54
7.1.00.0030.01216.57
7.0.200.0050.01416.57
7.0.190.0060.01216.71
7.0.180.0110.01216.51
7.0.170.0150.00616.14
7.0.160.0070.01316.32
7.0.150.0060.01116.19
7.0.140.0130.00316.25
7.0.130.0090.00616.50
7.0.120.0030.01316.56
7.0.110.0060.00916.24
7.0.100.0080.00816.26
7.0.90.0120.00416.23
7.0.80.0040.01116.31
7.0.70.0130.00316.09
7.0.60.0100.01416.21
7.0.50.0100.00616.12
7.0.40.0060.01016.60
7.0.30.0000.01616.52
7.0.20.0070.00716.55
7.0.10.0060.01016.36
7.0.00.0070.00716.31

preferences:
35.87 ms | 400 KiB | 5 Q