3v4l.org

run code in 300+ PHP versions simultaneously
<?php // example to show the magic date 1937-07-01 change in the NL // the Zend\Validate\DateStep does not account for this difference class Blar_DateTime extends DateTime { /** * Return Date in ISO8601 format * * @return String */ public function __toString() { return $this->format('Y-m-d H:i:s'); } /** * Return difference between $this and $now * * @param Datetime|String $now * @return DateInterval */ public function diff($now = 'NOW', $absolute = NULL) { if(!($now instanceOf DateTime)) { $now = new DateTime($now); } return parent::diff($now); } /** * Return Age in Years * * @param Datetime|String $now * @return Integer */ public function getAge($now = 'NOW') { return $this->diff($now)->format('%y'); } } $birthday = new Blar_DateTime('1879-03-14 00:00:00', new DateTimeZone("Europe/Amsterdam")); echo $birthday . "\n"; echo '<p>In the Netherlands Albert Einstein would now be ', $birthday->diff(new DateTime('00:00:00', new DateTimeZone("Europe/Amsterdam")))->format('%y Years, %m Months, %d Days, %h Hours, %i Minutes, %s Seconds'), ' old.</p>'; $birthday = new Blar_DateTime('1879-03-14 00:00:00', new DateTimeZone("Europe/London")); echo $birthday . "\n"; echo '<p>In the United Kingdom Albert Einstein would now be ', $birthday->diff(new DateTime('00:00:00', new DateTimeZone("Europe/London")))->format('%y Years, %m Months, %d Days, %h Hours, %i Minutes, %s Seconds'), ' old.</p>'; $birthday = new Blar_DateTime('1950-03-14 00:00:00', new DateTimeZone("Europe/Amsterdam")); echo $birthday . "\n"; echo '<p>the Netherlands mr. Anonymous would now be ', $birthday->diff(new DateTime('00:00:00', new DateTimeZone("Europe/Amsterdam")))->format('%y Years, %m Months, %d Days, %h Hours, %i Minutes, %s Seconds'), ' old.</p>'; $birthday = new Blar_DateTime('1950-03-14 00:00:00', new DateTimeZone("Europe/London")); echo $birthday . "\n"; echo '<p>In the mr. Anonymous would now be ', $birthday->diff(new DateTime('00:00:00', new DateTimeZone("Europe/London")))->format('%y Years, %m Months, %d Days, %h Hours, %i Minutes, %s Seconds'), ' old.</p>'; // output /* 1879-03-14 00:00:00 In the Netherlands Albert Einstein would now be 134 Years, 5 Months, 14 Days, 17 Hours, 54 Minutes, 49 Seconds old. 1879-03-14 00:00:00 In the United Kingdom Albert Einstein would now be 134 Years, 5 Months, 14 Days, 16 Hours, 55 Minutes, 17 Seconds old. 1950-03-14 00:00:00 the Netherlands mr. Anonymous would now be 63 Years, 5 Months, 14 Days, 17 Hours, 55 Minutes, 17 Seconds old. 1950-03-14 00:00:00 In the mr. Anonymous would now be 63 Years, 5 Months, 14 Days, 16 Hours, 55 Minutes, 17 Seconds old. now note the difference in seconds between example 1 and 2 of 28 seconds... exactly the time that does not exists in the netherlands on 1937-07-01 I conclude PHP does it correctly and Zend\Validate\DateStep should account for this. */

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.0100.01018.68
8.3.50.0090.00721.98
8.3.40.0070.01418.96
8.3.30.0130.00719.17
8.3.20.0000.00820.16
8.3.10.0170.00023.78
8.3.00.0080.00022.45
8.2.180.0160.00316.75
8.2.170.0040.01122.96
8.2.160.0070.00722.08
8.2.150.0040.01124.18
8.2.140.0090.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00418.00
8.2.110.0100.00022.32
8.2.100.0000.01217.84
8.2.90.0000.00819.32
8.2.80.0000.00817.97
8.2.70.0030.00717.88
8.2.60.0000.00918.05
8.2.50.0080.00018.07
8.2.40.0040.00418.22
8.2.30.0040.00418.09
8.2.20.0030.00517.78
8.2.10.0060.00317.77
8.2.00.0060.00318.03
8.1.280.0120.00325.92
8.1.270.0060.00324.02
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00818.98
8.1.230.0120.00019.28
8.1.220.0040.00417.91
8.1.210.0080.00018.77
8.1.200.0060.00617.60
8.1.190.0050.00517.54
8.1.180.0040.00418.10
8.1.170.0030.00618.65
8.1.160.0000.00822.11
8.1.150.0050.00318.88
8.1.140.0040.00417.78
8.1.130.0070.00017.88
8.1.120.0000.00717.68
8.1.110.0040.00417.72
8.1.100.0000.00717.61
8.1.90.0040.00417.62
8.1.80.0000.00817.73
8.1.70.0030.00317.69
8.1.60.0000.00817.77
8.1.50.0000.00817.77
8.1.40.0050.00217.73
8.1.30.0030.00617.71
8.1.20.0000.00817.84
8.1.10.0060.00317.76
8.1.00.0040.00417.83
8.0.300.0000.00718.77
8.0.290.0050.00317.27
8.0.280.0000.00718.50
8.0.270.0020.00517.35
8.0.260.0000.00717.14
8.0.250.0070.00017.28
8.0.240.0100.00017.24
8.0.230.0000.00717.31
8.0.220.0030.00317.26
8.0.210.0070.00017.23
8.0.200.0040.00417.13
8.0.190.0040.00417.14
8.0.180.0000.00717.13
8.0.170.0000.00817.29
8.0.160.0040.00417.28
8.0.150.0030.00617.21
8.0.140.0000.00717.20
8.0.130.0030.00313.64
8.0.120.0050.00317.22
8.0.110.0040.00417.16
8.0.100.0050.00217.19
8.0.90.0000.00717.22
8.0.80.0110.00417.14
8.0.70.0040.00417.25
8.0.60.0000.00717.01
8.0.50.0050.00317.09
8.0.30.0110.00917.42
8.0.20.0140.00617.40
8.0.10.0030.00517.18
8.0.00.0060.01317.05
7.4.330.0060.00015.09
7.4.320.0000.00716.82
7.4.300.0030.00316.74
7.4.290.0030.00316.89
7.4.280.0030.00316.64
7.4.270.0040.00416.66
7.4.260.0000.00716.66
7.4.250.0000.00816.81
7.4.240.0020.00616.80
7.4.230.0000.00816.95
7.4.220.0030.01516.66
7.4.210.0070.01016.78
7.4.200.0000.00816.59
7.4.190.0040.00416.79
7.4.160.0130.00416.86
7.4.150.0120.00617.40
7.4.140.0070.01517.86
7.4.130.0160.00616.79
7.4.120.0100.01116.82
7.4.110.0150.00416.80
7.4.100.0040.01416.66
7.4.90.0110.00616.74
7.4.80.0000.02316.54
7.4.70.0040.01316.96
7.4.60.0070.01016.71
7.4.50.0040.00416.86
7.4.40.0060.00922.77
7.4.30.0150.00616.76
7.4.00.0090.00815.24
7.3.330.0030.00313.40
7.3.320.0000.00513.40
7.3.310.0040.00416.43
7.3.300.0070.00016.42
7.3.290.0030.01016.55
7.3.280.0060.01216.54
7.3.270.0120.00617.40
7.3.260.0110.01116.61
7.3.250.0110.00816.65
7.3.240.0120.00616.71
7.3.230.0070.01116.59
7.3.210.0090.00916.62
7.3.200.0140.00719.39
7.3.190.0060.01216.82
7.3.180.0110.01116.79
7.3.170.0080.00816.64
7.3.160.0090.00916.76
7.3.120.0090.00914.94
7.3.110.0110.00714.82
7.3.100.0040.01415.10
7.3.90.0090.00615.08
7.3.80.0000.01415.25
7.3.70.0030.00914.86
7.3.60.0140.00015.07
7.3.50.0060.00915.12
7.3.40.0030.01215.15
7.3.30.0090.00614.80
7.3.20.0080.00416.92
7.3.10.0100.00716.90
7.3.00.0100.00316.92
7.2.330.0150.00516.80
7.2.320.0100.00716.71
7.2.310.0100.00716.80
7.2.300.0070.01016.63
7.2.290.0130.00316.89
7.2.250.0160.00315.14
7.2.240.0110.01115.58
7.2.230.0040.01115.36
7.2.220.0060.00915.60
7.2.210.0000.01615.32
7.2.200.0100.00615.13
7.2.190.0000.01215.43
7.2.180.0070.00715.34
7.2.170.0070.00715.41
7.2.160.0060.00915.39
7.2.150.0040.00717.02
7.2.140.0090.00917.14
7.2.130.0080.00617.15
7.2.120.0060.00917.30
7.2.110.0150.00317.27
7.2.100.0090.00917.19
7.2.90.0080.00817.26
7.2.80.0100.00717.27
7.2.70.0090.00617.16
7.2.60.0070.00517.13
7.2.50.0030.01417.25
7.2.40.0000.01617.35
7.2.30.0000.01417.22
7.2.20.0050.01017.09
7.2.10.0100.01017.19
7.2.00.0080.00818.28
7.1.330.0070.01116.07
7.1.320.0120.00315.79
7.1.310.0030.00716.04
7.1.300.0070.01015.89
7.1.290.0000.00916.13
7.1.280.0060.00315.84
7.1.270.0080.00515.82
7.1.260.0100.00715.88
7.1.250.0030.01016.04
7.1.240.0030.01015.88
7.1.230.0000.01215.88
7.1.220.0070.01015.75
7.1.210.0060.00615.81
7.1.200.0060.00715.79
7.1.190.0030.01315.98
7.1.180.0040.01416.02
7.1.170.0100.00315.86
7.1.160.0040.01115.83
7.1.150.0030.00615.95
7.1.140.0090.00616.09
7.1.130.0000.01616.01
7.1.120.0040.01116.07
7.1.110.0060.00815.86
7.1.100.0060.00817.12
7.1.90.0070.01015.84
7.1.80.0070.01016.14
7.1.70.0020.00816.66
7.1.60.0080.01017.68
7.1.50.0080.01016.61
7.1.40.0040.01116.02
7.1.30.0080.00015.99
7.1.20.0060.00615.84
7.1.10.0040.00715.89
7.1.00.0070.03819.14
7.0.330.0120.00015.41
7.0.320.0100.00315.54
7.0.310.0030.01015.44
7.0.300.0060.01115.81
7.0.290.0030.01015.60
7.0.280.0090.00315.39
7.0.270.0030.01415.54
7.0.260.0080.00615.68
7.0.250.0060.00915.72
7.0.240.0070.00715.53
7.0.230.0000.01115.77
7.0.220.0090.00615.62
7.0.210.0060.00615.45
7.0.200.0060.01016.35
7.0.190.0000.01715.65
7.0.180.0070.00715.79
7.0.170.0040.01415.65
7.0.160.0040.00815.58
7.0.150.0040.01115.63
7.0.140.0020.04318.97
7.0.130.0000.01815.77
7.0.120.0070.01115.38
7.0.110.0100.04217.83
7.0.100.0020.04617.91
7.0.90.0160.03617.79
7.0.80.0080.04317.83
7.0.70.0050.04417.92
7.0.60.0050.03517.82
7.0.50.0050.04717.95
7.0.40.0030.04516.96
7.0.30.0100.04616.82
7.0.20.0050.03516.90
7.0.10.0140.03517.00
7.0.00.0080.04316.87
5.6.400.0100.00714.71
5.6.390.0070.01014.64
5.6.380.0070.00714.41
5.6.370.0030.01014.52
5.6.360.0090.00914.37
5.6.350.0030.01014.50
5.6.340.0030.01014.47
5.6.330.0030.01414.84
5.6.320.0040.00414.54
5.6.310.0040.00414.73
5.6.300.0030.01214.59
5.6.290.0040.01514.42
5.6.280.0080.03617.78
5.6.270.0000.01414.91
5.6.260.0000.01514.54
5.6.250.0050.04417.57
5.6.240.0100.04317.57
5.6.230.0070.04417.54
5.6.220.0050.03917.59
5.6.210.0050.04817.55
5.6.200.0070.04317.77
5.6.190.0050.04317.97
5.6.180.0070.03017.87
5.6.170.0110.04017.77
5.6.160.0030.03017.83
5.6.150.0080.03917.79
5.6.140.0100.02717.79
5.6.130.0090.04017.71
5.6.120.0100.04317.77
5.6.110.0070.04317.76
5.6.100.0050.02817.88
5.6.90.0150.04017.72
5.6.80.0030.02917.43
5.6.70.0070.04317.65
5.6.60.0080.02317.37
5.6.50.0030.02317.38
5.6.40.0030.03017.61
5.6.30.0070.02617.31
5.6.20.0050.02317.30
5.6.10.0060.02317.64
5.6.00.0030.02517.48
5.5.380.0120.04217.32
5.5.370.0050.04617.47
5.5.360.0060.02817.59
5.5.350.0080.03917.44
5.5.340.0080.04017.77
5.5.330.0110.04017.81
5.5.320.0160.03817.73
5.5.310.0080.03517.77
5.5.300.0070.03717.72
5.5.290.0060.04117.64
5.5.280.0080.04417.66
5.5.270.0070.04517.60
5.5.260.0030.04817.73
5.5.250.0060.04617.62
5.5.240.0080.03917.49
5.5.230.0060.04217.37
5.5.220.0080.02817.39
5.5.210.0080.01817.22
5.5.200.0020.02717.30
5.5.190.0050.02817.27
5.5.180.0050.02417.24
5.5.170.0030.01714.60
5.5.160.0050.04517.46
5.5.150.0040.02117.23
5.5.140.0050.02717.36
5.5.130.0130.03517.18
5.5.120.0040.03417.25
5.5.110.0050.04017.33
5.5.100.0030.04317.33
5.5.90.0050.02317.04
5.5.80.0020.04117.20
5.5.70.0030.02617.20
5.5.60.0020.02817.39
5.5.50.0050.02517.13
5.5.40.0090.03117.22
5.5.30.0030.02517.08
5.5.20.0050.02717.27
5.5.10.0030.02717.32
5.5.00.0050.02717.08
5.4.450.0060.04315.44
5.4.440.0060.04015.27
5.4.430.0100.03315.26
5.4.420.0030.04315.38
5.4.410.0070.02715.19
5.4.400.0080.03515.27
5.4.390.0050.04115.27
5.4.380.0080.03115.19
5.4.370.0050.02215.12
5.4.360.0030.03515.20
5.4.350.0020.02515.35
5.4.340.0040.02815.22
5.4.330.0040.00411.09
5.4.320.0050.02715.05
5.4.310.0030.02415.16
5.4.300.0030.02415.37
5.4.290.0080.03315.25
5.4.280.0080.04115.06
5.4.270.0020.03815.13
5.4.260.0100.03715.11
5.4.250.0080.01815.19
5.4.240.0020.02015.21
5.4.230.0030.03215.19
5.4.220.0030.02315.12
5.4.210.0020.02215.11
5.4.200.0040.02015.12
5.4.190.0050.01814.96
5.4.180.0020.02715.16
5.4.170.0030.02214.92
5.4.160.0050.02015.13
5.4.150.0070.02215.05
5.4.140.0050.02013.80
5.4.130.0000.02613.91
5.4.120.0070.01713.65
5.4.110.0040.02013.87
5.4.100.0110.02213.69
5.4.90.0030.01813.85
5.4.80.0020.02313.74
5.4.70.0010.02313.88
5.4.60.0070.02313.75
5.4.50.0030.02013.88
5.4.40.0060.02013.72
5.4.30.0020.02213.68
5.4.20.0020.02313.80
5.4.10.0040.02213.75
5.4.00.0030.02213.43
5.3.290.0080.01812.91
5.3.280.0050.02212.76
5.3.270.0030.02212.79
5.3.260.0030.02312.82
5.3.250.0050.02012.78
5.3.240.0050.02712.88
5.3.230.0040.02212.82
5.3.220.0020.02512.75
5.3.210.0030.03312.75
5.3.200.0020.02412.79
5.3.190.0030.02512.73
5.3.180.0090.01712.75
5.3.170.0030.04312.74
5.3.160.0040.02012.86
5.3.150.0000.02412.85
5.3.140.0050.02012.74
5.3.130.0030.03512.71
5.3.120.0030.02312.77
5.3.110.0030.02512.80
5.3.100.0050.02112.46
5.3.90.0080.03312.39
5.3.80.0030.02712.51
5.3.70.0020.03112.51
5.3.60.0070.02212.46
5.3.50.0100.03212.44
5.3.40.0050.04012.47
5.3.30.0090.03912.50
5.3.20.0030.04012.31
5.3.10.0060.02612.35
5.3.00.0050.02512.29
5.2.170.0030.06711.25
5.2.160.0030.02711.15
5.2.150.0130.05011.23
5.2.140.0030.06311.03
5.2.130.0070.06311.14
5.2.120.0070.06010.99
5.2.110.0070.06311.14
5.2.100.0100.05711.23
5.2.90.0030.04311.12
5.2.80.0030.04711.13
5.2.70.0070.03711.26
5.2.60.0030.06311.06
5.2.50.0100.05711.04
5.2.40.0070.06311.25
5.2.30.0070.06010.99
5.2.20.0100.05011.00
5.2.10.0030.04010.86
5.2.00.0100.05310.70
5.1.60.0030.03310.09
5.1.50.0000.05710.00
5.1.40.0030.05710.00
5.1.30.0000.06010.37
5.1.20.0100.04710.47
5.1.10.0070.03010.27
5.1.00.0030.05310.17
5.0.50.0030.0478.82
5.0.40.0030.0378.43
5.0.30.0070.0608.33
5.0.20.0070.0378.48
5.0.10.0070.0338.20
5.0.00.0030.0608.27
4.4.90.0000.0207.87
4.4.80.0070.0307.87
4.4.70.0000.0407.87
4.4.60.0100.0237.87
4.4.50.0030.0377.87
4.4.40.0000.0577.87
4.4.30.0000.0277.87
4.4.20.0000.0277.87
4.4.10.0070.0337.87
4.4.00.0000.0537.87
4.3.110.0000.0377.87
4.3.100.0000.0377.87
4.3.90.0000.0337.87
4.3.80.0070.0437.87
4.3.70.0070.0307.87
4.3.60.0000.0307.87
4.3.50.0030.0307.87
4.3.40.0070.0507.87
4.3.30.0000.0377.87
4.3.20.0030.0337.87
4.3.10.0000.0377.87
4.3.00.0030.0307.87

preferences:
59.02 ms | 400 KiB | 5 Q