3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); final class CreateStatementRequest { private ?DateTimeImmutable $startDate, $endDate; public function __construct( DateTimeImmutable $startDate = null, DateTimeImmutable $endDate = null ) { $this->startDate = $startDate; $this->endDate = $endDate; // error: Property CreateStatementRequest::$endDate (DateTimeImmutable) does not accept DateTimeImmutable|null. } public function hasFilterStartDate(): bool { return $this->startDate !== null; } public function getFilterStartDate(): DateTimeImmutable { if ($this->startDate === null) { throw new RuntimeException('The start date filter is not defined.'); } return $this->startDate; } public function hasFilterEndDate(): bool { return $this->endDate !== null; } public function getFilterEndDate(): DateTimeImmutable { if ($this->endDate === null) { // error: Strict comparison using === between DateTimeImmutable and null will always evaluate to false. throw new RuntimeException('The end date filter is not defined.'); } return $this->endDate; } } $ref = new \ReflectionClass(CreateStatementRequest::class); foreach ($ref->getProperties() as $refProperty) { var_dump($refProperty->getName()); $refType = $refProperty->getType(); var_dump($refType->getName()); var_dump($refType->allowsNull()); var_dump('---'); }

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.0110.00418.43
8.3.60.0110.00718.18
8.3.50.0120.00316.34
8.3.40.0080.00818.66
8.3.30.0150.00018.78
8.3.20.0040.00420.80
8.3.10.0070.00421.66
8.3.00.0080.00023.61
8.2.180.0030.01616.38
8.2.170.0120.00322.96
8.2.160.0070.00720.43
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00026.16
8.2.110.0060.00319.13
8.2.100.0000.01117.91
8.2.90.0080.00017.63
8.2.80.0040.00718.84
8.2.70.0000.00917.50
8.2.60.0080.00018.03
8.2.50.0000.00818.10
8.2.40.0000.00719.48
8.2.30.0040.00419.19
8.2.20.0040.00418.15
8.2.10.0040.00419.28
8.2.00.0040.00419.22
8.1.280.0140.00725.92
8.1.270.0040.00422.20
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00622.04
8.1.230.0060.00620.96
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0050.00317.23
8.1.190.0080.00017.23
8.1.180.0050.00318.83
8.1.170.0000.00918.46
8.1.160.0000.00719.00
8.1.150.0000.00719.05
8.1.140.0070.00020.84
8.1.130.0030.00320.20
8.1.120.0030.00517.53
8.1.110.0070.00017.52
8.1.100.0000.00817.49
8.1.90.0070.00017.48
8.1.80.0030.00617.49
8.1.70.0040.00417.44
8.1.60.0030.00617.52
8.1.50.0000.00817.58
8.1.40.0050.00317.55
8.1.30.0000.00817.61
8.1.20.0040.00417.57
8.1.10.0000.00717.51
8.1.00.0000.00817.52
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0000.00718.43
8.0.270.0050.00318.62
8.0.260.0000.00720.15
8.0.250.0030.00516.97
8.0.240.0000.00616.99
8.0.230.0000.00716.98
8.0.220.0030.00316.86
8.0.210.0000.00616.94
8.0.200.0030.00317.02
8.0.190.0000.00717.00
8.0.180.0040.00416.93
8.0.170.0000.00917.00
8.0.160.0040.00416.98
8.0.150.0000.00816.91
8.0.140.0050.00316.82
8.0.130.0030.00313.31
8.0.120.0000.00716.90
8.0.110.0080.00016.79
8.0.100.0040.00416.81
8.0.90.0040.00416.95
8.0.80.0040.01116.88
8.0.70.0040.00416.77
8.0.60.0030.00616.80
8.0.50.0000.00716.80
8.0.30.0040.01317.11
8.0.20.0170.00317.32
8.0.10.0040.00416.95
8.0.00.0090.01116.76
7.4.330.0060.00016.85
7.4.320.0000.00616.54
7.4.300.0030.00316.64
7.4.290.0070.00016.59
7.4.280.0050.00316.62
7.4.270.0000.00716.44
7.4.260.0050.00013.25
7.4.250.0040.00416.57
7.4.240.0000.00816.54
7.4.230.0000.00816.61
7.4.220.0030.00316.58
7.4.210.0070.00916.50
7.4.200.0030.00316.44
7.4.130.0170.00616.47
7.4.120.0080.01116.30
7.4.110.0030.01416.53
7.4.100.0060.01116.66
7.4.90.0070.01016.53
7.4.80.0120.00619.39
7.4.70.0080.00816.43
7.4.60.0040.01116.49
7.4.50.0090.00616.38
7.4.40.0140.00916.48
7.4.30.0040.01416.46
7.4.20.0060.00916.65
7.4.10.0120.00816.42
7.4.00.0090.01216.52
7.3.330.0030.00316.13
7.3.320.0050.00013.23
7.3.310.0060.00016.23
7.3.300.0050.00216.16
7.3.290.0070.00916.16
7.3.260.0090.00916.30
7.3.240.0090.01016.35
7.3.230.0140.00316.37
7.3.210.0060.01016.30
7.3.200.0100.00716.19
7.3.190.0030.01416.30
7.3.180.0000.01616.06
7.3.170.0120.00416.20
7.3.160.0170.00016.26
7.3.150.0080.01216.19
7.3.140.0130.00316.29
7.3.130.0090.01216.05
7.3.120.0110.00816.26
7.3.110.0110.01016.15
7.3.100.0110.01016.18
7.3.90.0160.00316.33
7.3.80.0120.00816.11
7.3.70.0120.00615.96
7.3.60.0130.00316.01
7.3.50.0020.01416.12
7.3.40.0080.01116.09
7.3.30.0090.00816.24
7.3.20.0120.00616.08
7.3.10.0090.00816.26
7.3.00.0070.01016.15
7.2.330.0180.00616.45
7.2.320.0060.01116.23
7.2.310.0080.00816.47
7.2.300.0190.00316.29
7.2.290.0070.01316.44
7.2.280.0150.00616.07
7.2.270.0030.01316.12
7.2.260.0100.01116.37
7.2.250.0100.01016.27
7.2.240.0100.00716.25
7.2.230.0060.01016.31
7.2.220.0090.00616.31
7.2.210.0060.01316.23
7.2.200.0090.00716.17
7.2.190.0090.00816.33
7.2.180.0060.01016.20
7.2.170.0060.01016.31
7.2.160.0080.01116.27
7.2.150.0110.00816.33
7.2.140.0100.00716.40
7.2.130.0060.01216.33
7.2.120.0100.00916.41
7.2.110.0240.00616.41
7.2.100.0070.01116.35
7.2.90.0090.00916.29
7.2.80.0090.00716.41
7.2.70.0060.01016.15
7.2.60.0050.01116.18
7.2.50.0070.01016.32
7.2.40.0030.01216.30
7.2.30.0090.00716.50
7.2.20.0130.00516.29
7.2.10.0110.00816.30
7.2.00.0070.01216.25

preferences:
49.31 ms | 401 KiB | 5 Q