3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Anagrafica { protected $contactableFrom; protected $contactableTo; public function getContactableFrom() { return $this->contactableFrom; } public function setContactableFrom($contactableFrom) { $this->contactableFrom = $contactableFrom; } public function getContactableTo() { return $this->contactableTo; } public function setContactableTo($contactableTo) { $this->contactableTo = $contactableTo; } } $anagrafica = new Anagrafica(); $anagrafica->setContactableFrom(\DateTime::createFromFormat('H:i:s', '12:00:00')); $anagrafica->setContactableTo(\DateTime::createFromFormat('H:i:s', '15:00:00')); $contactableFrom = $anagrafica->getContactableFrom(); $contactableFrom = ($contactableFrom instanceof \DateTime) ? $anagrafica->getContactableFrom()->format('His') : '080000'; $contactableTo = $anagrafica->getContactableTo(); $contactableTo = ($contactableTo instanceof \DateTime) ? $anagrafica->getContactableTo()->format('His') : '220000'; $currentTime = (new \DateTime())->format('His'); if ($currentTime < $contactableFrom || $currentTime > $contactableTo) { echo "FALSE"; } else { echo "TRUE"; }

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.40.0120.00318.92
8.3.30.0160.00318.96
8.3.20.0000.00720.16
8.3.10.0050.00320.66
8.3.00.0080.00021.90
8.2.170.0040.01122.96
8.2.160.0100.01022.11
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00420.75
8.2.120.0030.00526.35
8.2.110.0070.00322.24
8.2.100.0090.00317.97
8.2.90.0090.00017.97
8.2.80.0000.00918.03
8.2.70.0040.00417.75
8.2.60.0000.00917.80
8.2.50.0050.00318.09
8.2.40.0000.00920.47
8.2.30.0070.00019.54
8.2.20.0040.00417.94
8.2.10.0040.00418.02
8.2.00.0070.00018.11
8.1.270.0090.00922.24
8.1.260.0000.00728.09
8.1.250.0000.00728.09
8.1.240.0040.00719.47
8.1.230.0060.00620.86
8.1.220.0040.00417.78
8.1.210.0000.00818.84
8.1.200.0050.00517.60
8.1.190.0000.00817.25
8.1.180.0060.00318.10
8.1.170.0030.00618.78
8.1.160.0040.00420.88
8.1.150.0030.00518.96
8.1.140.0000.00819.62
8.1.130.0030.00317.67
8.1.120.0040.00417.70
8.1.110.0050.00317.58
8.1.100.0000.00817.58
8.1.90.0040.00417.68
8.1.80.0030.00517.66
8.1.70.0040.00417.66
8.1.60.0040.00417.66
8.1.50.0060.00317.57
8.1.40.0000.00817.65
8.1.30.0040.00417.85
8.1.20.0090.00017.61
8.1.10.0000.00717.64
8.1.00.0080.00017.66
8.0.300.0050.00219.98
8.0.290.0050.00216.88
8.0.280.0000.00718.53
8.0.270.0030.00617.27
8.0.260.0030.00317.27
8.0.250.0030.00317.15
8.0.240.0030.00317.18
8.0.230.0000.00717.04
8.0.220.0000.00717.09
8.0.210.0000.00817.06
8.0.200.0070.00017.18
8.0.190.0020.00717.19
8.0.180.0000.00717.01
8.0.170.0000.00817.15
8.0.160.0030.00517.13
8.0.150.0000.00817.14
8.0.140.0040.00417.08
8.0.130.0030.00313.43
8.0.120.0030.00517.13
8.0.110.0000.00717.12
8.0.100.0050.00516.93
8.0.90.0000.00817.01
8.0.80.0140.00417.03
8.0.70.0070.00016.87
8.0.60.0030.00517.02
8.0.50.0040.00416.99
8.0.30.0110.00717.21
8.0.20.0140.00417.47
8.0.10.0040.00417.29
8.0.00.0070.01116.85
7.4.330.0050.00016.83
7.4.320.0000.00616.65
7.4.300.0030.00316.79
7.4.290.0030.00616.75
7.4.280.0000.00816.57
7.4.270.0000.00716.68
7.4.260.0050.00316.63
7.4.250.0000.00716.72
7.4.240.0040.00416.67
7.4.230.0070.00016.70
7.4.220.0150.00916.70
7.4.210.0030.01216.71
7.4.200.0030.00316.75
7.4.160.0100.00716.65
7.4.150.0110.01417.40
7.4.140.0100.01117.86
7.4.130.0130.00916.62
7.4.120.0100.00716.64
7.4.110.0070.01016.80
7.4.100.0190.00616.70
7.4.90.0080.00816.79
7.4.80.0130.00719.39
7.4.70.0120.00616.81
7.4.60.0120.00616.61
7.4.50.0070.00716.53
7.4.40.0030.01316.57
7.4.30.0070.01516.72
7.4.00.0070.01015.24
7.3.330.0000.00513.28
7.3.320.0050.00313.38
7.3.310.0040.00416.44
7.3.300.0040.00416.39
7.3.290.0110.00516.42
7.3.280.0110.00916.47
7.3.270.0060.01117.40
7.3.260.0070.01316.72
7.3.250.0110.00916.53
7.3.240.0100.00716.58
7.3.230.0100.01316.63
7.3.210.0040.01316.59
7.3.200.0110.00616.53
7.3.190.0150.00316.38
7.3.180.0040.01216.68
7.3.170.0090.00916.71
7.3.160.0060.01016.56
7.2.330.0100.01416.91
7.2.320.0030.01916.84
7.2.310.0090.00916.95
7.2.300.0070.01016.88
7.2.290.0060.01016.76
7.2.120.0110.00416.84
7.2.110.0110.00016.94
7.2.100.0070.00716.91
7.2.90.0070.01016.94
7.2.80.0070.01016.74
7.2.70.0000.01516.81
7.2.60.0050.00716.91
7.2.50.0120.00016.87
7.2.40.0090.00617.27
7.2.30.0110.00716.88
7.2.20.0060.00616.94
7.2.10.0040.00717.18
7.2.00.0080.00618.31
7.1.240.0130.00615.85
7.1.230.0030.00615.98
7.1.220.0060.00615.84
7.1.210.0100.00015.85
7.1.200.0040.00915.85
7.1.190.0060.00315.54
7.1.180.0110.00315.74
7.1.170.0080.00415.76
7.1.160.0040.00815.88
7.1.150.0070.00315.84
7.1.140.0110.00315.88
7.1.130.0090.00316.00
7.1.120.0070.00715.68
7.1.110.0030.01215.77
7.1.100.0080.00616.99
7.1.90.0050.00515.81
7.1.80.0060.00315.86
7.1.70.0050.00716.43
7.1.60.0100.00817.46
7.1.50.0100.01016.44
7.1.40.0060.00615.92
7.1.30.0030.00815.66
7.1.20.0030.00715.95
7.1.10.0070.00315.75
7.1.00.0020.04119.15
7.0.320.0070.00715.65
7.0.310.0000.01715.63
7.0.300.0150.00015.58
7.0.290.0040.00715.48
7.0.280.0000.01515.46
7.0.270.0030.01015.59
7.0.260.0030.00615.65
7.0.250.0000.01215.79
7.0.240.0000.01115.47
7.0.230.0060.00315.67
7.0.220.0060.00615.50
7.0.210.0100.00315.66
7.0.200.0090.00515.39
7.0.190.0000.01115.71
7.0.180.0060.00915.65
7.0.170.0070.00415.67
7.0.160.0030.01015.66
7.0.150.0040.00715.58
7.0.140.0000.01315.66
7.0.130.0030.01015.42
7.0.120.0060.00615.52
7.0.110.0140.00015.50
7.0.100.0000.00915.41
7.0.90.0090.00315.69
7.0.80.0100.00315.60
7.0.70.0040.00715.61
7.0.60.0140.03018.61
7.0.50.0080.04116.75
7.0.40.0020.02816.78
7.0.30.0130.03816.96
7.0.20.0100.04516.86
7.0.10.0080.03817.00
7.0.00.0050.02716.81
5.6.380.0040.00814.79
5.6.370.0120.00314.53
5.6.360.0110.00414.74
5.6.350.0090.00914.66
5.6.340.0160.00614.69
5.6.330.0110.00914.45
5.6.320.0160.00014.56
5.6.310.0120.00314.41
5.6.300.0040.01214.46
5.6.290.0050.01014.46
5.6.280.0100.02017.81
5.6.270.0080.00814.36
5.6.260.0130.00414.65
5.6.250.0090.00914.62
5.6.240.0080.00614.41
5.6.230.0090.00614.73
5.6.220.0050.00914.73
5.6.210.0050.02917.74
5.6.200.0080.04616.45
5.6.190.0090.02217.61
5.6.180.0200.01817.52
5.6.170.0220.04117.46
5.6.160.0030.04517.51
5.6.150.0090.02416.40
5.6.140.0080.02416.34
5.6.130.0050.02516.50
5.6.120.0100.04417.79
5.6.110.0070.04417.95
5.6.100.0070.03017.75
5.6.90.0130.03717.79
5.6.80.0070.02717.38
5.6.70.0130.00914.37
5.6.60.0030.01414.60
5.6.50.0120.00414.38
5.6.40.0090.00914.49
5.6.30.0120.00314.52
5.6.20.0100.00514.35
5.6.10.0120.00414.52
5.6.00.0100.00514.59
5.5.380.0110.00411.13
5.5.370.0100.00711.57
5.5.360.0130.00011.21
5.5.350.0230.03415.97
5.5.340.0050.02214.69
5.5.330.0100.02715.91
5.5.320.0150.02415.88
5.5.310.0140.03616.02
5.5.300.0070.02214.70
5.5.290.0050.02514.81
5.5.280.0040.03916.01
5.5.270.0050.02416.21
5.5.260.0170.04016.06
5.5.250.0140.03016.02
5.5.240.0060.03415.84
5.5.230.0070.00711.36
5.5.220.0130.00011.41
5.5.210.0080.00411.05
5.5.200.0110.00311.31
5.5.190.0060.00511.23
5.5.180.0140.00011.47
5.5.170.0150.00014.45
5.5.160.0070.00411.32
5.5.150.0080.00511.43
5.5.140.0040.00811.30
5.5.130.0000.00911.44
5.5.120.0050.00611.47
5.5.110.0090.00411.02
5.5.100.0080.00311.23
5.5.90.0070.00711.32
5.5.80.0060.00611.42
5.5.70.0080.00611.55
5.5.60.0130.00311.40
5.5.50.0060.00611.32
5.5.40.0140.00011.44
5.5.30.0140.00011.43
5.5.20.0070.00211.47
5.5.10.0090.00411.15
5.5.00.0070.00711.43

preferences:
53.42 ms | 400 KiB | 5 Q