3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dow = 2; $x = new \DateTime('midnight'); $x->setTime(12, 0); var_dump($x); var_dump($x->format('w')); //$x->setDate((int) $x->format('Y'), (int) $x->format('m'), (int) ) $y = new \DateTime("Sunday +0 days"); var_dump($y); var_dump($y->format('w'));

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.01718.43
8.3.50.0110.00418.14
8.3.40.0080.00818.66
8.3.30.0080.00818.67
8.3.20.0040.00418.91
8.3.10.0040.00421.77
8.3.00.0050.00320.65
8.2.180.0150.00018.36
8.2.170.0110.01122.96
8.2.160.0140.00322.25
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0080.00019.95
8.2.120.0040.00426.35
8.2.110.0120.00919.24
8.2.100.0080.00417.97
8.2.90.0000.00719.61
8.2.80.0090.00017.97
8.2.70.0050.00317.93
8.2.60.0040.00418.34
8.2.50.0000.00818.10
8.2.40.0000.00819.50
8.2.30.0040.00419.26
8.2.20.0030.00618.14
8.2.10.0040.00418.11
8.2.00.0040.00717.99
8.1.280.0070.01125.92
8.1.270.0050.00318.86
8.1.260.0090.00626.35
8.1.250.0090.00028.09
8.1.240.0130.00023.88
8.1.230.0000.01121.00
8.1.220.0080.00017.74
8.1.210.0090.00018.96
8.1.200.0000.00817.48
8.1.190.0030.00617.48
8.1.180.0000.00818.10
8.1.170.0040.00418.73
8.1.160.0050.00318.96
8.1.150.0030.00618.97
8.1.140.0050.00222.11
8.1.130.0030.00320.33
8.1.120.0040.00417.68
8.1.110.0000.00717.63
8.1.100.0080.00017.70
8.1.90.0030.00617.61
8.1.80.0030.00617.65
8.1.70.0070.00017.63
8.1.60.0040.00417.70
8.1.50.0030.00517.60
8.1.40.0000.00817.56
8.1.30.0040.00417.76
8.1.20.0000.00817.74
8.1.10.0000.00817.70
8.1.00.0000.00817.63
8.0.300.0000.00719.90
8.0.290.0000.00716.88
8.0.280.0000.00818.45
8.0.270.0000.00717.32
8.0.260.0000.00818.41
8.0.250.0080.00017.06
8.0.240.0040.00417.13
8.0.230.0020.00517.14
8.0.220.0000.00716.98
8.0.210.0000.00717.07
8.0.200.0070.00017.16
8.0.190.0040.00417.13
8.0.180.0040.00416.99
8.0.170.0060.00317.00
8.0.160.0070.00017.00
8.0.150.0000.00816.85
8.0.140.0000.00717.07
8.0.130.0000.00513.46
8.0.120.0060.00317.06
8.0.110.0050.00317.07
8.0.100.0000.00717.11
8.0.90.0000.00717.13
8.0.80.0070.00817.08
8.0.70.0070.00017.08
8.0.60.0000.00717.00
8.0.50.0050.00316.99
8.0.30.0060.01117.17
8.0.20.0060.01217.40
8.0.10.0040.00417.06
8.0.00.0080.01016.82
7.4.330.0000.00515.55
7.4.320.0000.00816.65
7.4.300.0030.00316.55
7.4.290.0000.00716.70
7.4.280.0080.00016.57
7.4.270.0030.00316.72
7.4.260.0000.00716.61
7.4.250.0040.00416.66
7.4.240.0000.00716.55
7.4.230.0000.00716.71
7.4.220.0050.00216.76
7.4.210.0090.01016.61
7.4.200.0050.00216.71
7.4.160.0100.00716.54
7.4.140.0120.00717.86
7.4.130.0180.00616.52
7.4.120.0110.00816.62
7.3.330.0000.00513.21
7.3.320.0000.00613.16
7.3.310.0080.00016.47
7.3.300.0000.00716.36
7.3.290.0000.00716.32
7.3.280.0090.00616.31
7.3.260.0090.00916.57
7.3.240.0100.00816.47
7.2.80.0900.01015.02

preferences:
55.71 ms | 401 KiB | 5 Q