3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '28/5/1972'; $formats = [ 'dd/MM/yyyy', 'd/m/Y', ]; foreach ($formats as $format) { var_dump($format); $intlDateFormatter = new IntlDateFormatter( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN, $format ); $intlDateFormatter->setLenient(false); var_dump($intlDateFormatter->parse($date)); var_dump($intlDateFormatter->getErrorMessage()); $intlDateFormatter->setLenient(true); var_dump($intlDateFormatter->parse($date)); var_dump($intlDateFormatter->getErrorMessage()); } $fmt = new IntlDateFormatter( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN, 'dd/MM/yyyy' ); echo 'lenient of the formatter is : '; if ($fmt->isLenient()) { echo 'TRUE'; } else { echo 'FALSE'; } $fmt->parse('35/13/1971'); echo "\n Trying to do parse('35/13/1971').\nResult is : " . $fmt->parse('35/13/1971');

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.0090.02520.50
8.3.50.0100.02420.38
8.3.40.0150.00321.13
8.3.30.0120.00420.79
8.3.20.0080.00022.38
8.3.10.0000.00923.90
8.3.00.0040.00425.73
8.2.180.0030.03120.50
8.2.170.0170.00722.96
8.2.160.0100.00722.60
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0090.00022.95
8.2.120.0030.00626.35
8.2.110.0070.00424.62
8.2.100.0000.01220.91
8.2.90.0030.00721.53
8.2.80.0040.00420.80
8.2.70.0030.00720.50
8.2.60.0030.00620.80
8.2.50.0080.00020.50
8.2.40.0000.01122.86
8.2.30.0080.00021.73
8.2.20.0030.00620.72
8.2.10.0050.00321.16
8.2.00.0060.00321.15
8.1.280.0100.03025.92
8.1.270.0130.00322.63
8.1.260.0060.00328.09
8.1.250.0000.00828.09
8.1.240.0080.00324.91
8.1.230.0060.00624.02
8.1.220.0030.00620.91
8.1.210.0090.00020.48
8.1.200.0050.00520.35
8.1.190.0040.00420.25
8.1.180.0040.00420.41
8.1.170.0090.00021.58
8.1.160.0050.00523.04
8.1.150.0060.00321.06
8.1.140.0090.00022.52
8.1.130.0000.00820.68
8.1.120.0000.00820.70
8.1.110.0030.00520.46
8.1.100.0030.00520.48
8.1.90.0000.00920.68
8.1.80.0040.00420.67
8.1.70.0030.00620.76
8.1.60.0030.00620.61
8.1.50.0030.00620.81
8.1.40.0060.00320.46
8.1.30.0040.00420.83
8.1.20.0030.00620.60
8.1.10.0040.00420.69
8.1.00.0060.00320.65
8.0.300.0040.00419.94
8.0.290.0080.00019.75
8.0.280.0050.00320.69
8.0.270.0000.00820.27
8.0.260.0060.00320.22
8.0.250.0040.00420.21
8.0.240.0040.00420.18
8.0.230.0030.00519.99
8.0.220.0000.01220.09
8.0.210.0040.00420.20
8.0.200.0040.00720.27
8.0.190.0060.00320.24
8.0.180.0050.00319.96
8.0.170.0090.00020.00
8.0.160.0000.00820.22
8.0.150.0040.00419.79
8.0.140.0000.00819.93
8.0.130.0000.00513.36
8.0.120.0060.00319.97
8.0.110.0000.00820.32
8.0.100.0060.00320.16
8.0.90.0080.00020.28
8.0.80.0130.01020.25
8.0.70.0080.00020.29
8.0.60.0030.00620.08
8.0.50.0030.00620.41
8.0.30.0130.00420.39
8.0.20.0070.01620.35
8.0.10.0090.00020.43
8.0.00.0140.00919.89
7.4.330.0000.00516.74
7.4.320.0000.00820.00
7.4.300.0060.00319.97
7.4.290.0000.00819.88
7.4.280.0040.00720.01
7.4.270.0000.00719.85
7.4.260.0060.00319.81
7.4.250.0040.00419.74
7.4.240.0040.00419.88
7.4.230.0080.00019.75
7.4.220.0130.00719.85
7.4.210.0060.01020.04
7.4.200.0040.00419.91
7.4.160.0230.00419.75
7.4.150.0030.01619.79
7.4.140.0120.01019.81
7.4.130.0100.01319.73
7.4.120.0100.01019.90
7.4.110.0080.01119.80
7.4.100.0060.01319.91
7.4.90.0230.00319.76
7.4.80.0080.01619.70
7.4.70.0100.00919.62
7.4.60.0130.01019.68
7.4.50.0040.01219.87
7.4.40.0130.00619.85
7.4.30.0120.00819.81
7.4.00.0000.01118.00
7.3.330.0000.00513.24
7.3.320.0030.00313.21
7.3.310.0030.00519.63
7.3.300.0050.00319.37
7.3.290.0080.01219.60
7.3.280.0090.00919.49
7.3.270.0100.01020.04
7.3.260.0000.01919.72
7.3.250.0110.00719.59
7.3.240.0120.01219.76
7.3.230.0060.01319.64
7.3.210.0100.01019.63
7.3.200.0100.01619.97
7.3.190.0160.00420.12
7.3.180.0140.00419.88
7.3.170.0080.01419.86
7.3.160.0090.00819.86
7.2.330.0110.01119.58
7.2.320.0100.01019.72
7.2.310.0150.00419.82
7.2.300.0070.01419.95
7.2.290.0080.01019.99
7.2.60.0030.01320.05
7.2.00.0000.01422.79
7.1.200.0000.01119.09
7.1.100.0100.00021.75
7.1.70.0000.00920.62
7.1.60.0040.01120.48
7.1.50.0100.01420.21
7.1.00.0070.07725.76
7.0.200.0000.00920.12
7.0.60.0130.04024.87
7.0.50.0100.04017.91
7.0.40.0070.08722.96
7.0.30.0400.06723.04
7.0.20.0200.05722.98
7.0.10.0100.08323.12
7.0.00.0030.05722.98
5.6.280.0030.03323.88
5.6.210.0000.07323.84
5.6.200.0070.03718.12
5.6.190.0200.09023.50
5.6.180.0300.04023.50
5.6.170.0300.07723.37
5.6.160.0100.08023.24
5.6.150.0030.04018.22
5.6.140.0170.07318.17
5.6.130.0030.08018.17
5.6.120.0070.04024.10
5.6.110.0100.08724.24
5.6.100.0130.07324.24
5.6.90.0200.05024.22
5.6.80.0030.04023.48
5.5.350.0070.06023.46
5.5.340.0070.04017.91
5.5.330.0000.04323.20
5.5.320.0570.06723.27
5.5.310.0130.04323.30
5.5.300.0100.08017.98
5.5.290.0030.04018.01
5.5.280.0000.09323.94
5.5.270.0030.07323.99
5.5.260.0030.07023.73
5.5.250.0070.07323.81
5.5.240.0100.08023.36

preferences:
50.38 ms | 400 KiB | 5 Q