3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateWithHtmlEntities = 'Dec&nbsp;27&nbsp;2017,&nbsp;22:46:15&nbsp;CET'; $dateWithUTF8Chars = html_entity_decode($dateWithHtmlEntities); $dateInPlainASCII = iconv('UTF-8', 'US-ASCII//TRANSLIT//IGNORE', $dateWithUTF8Chars); $dateTimeObject = DateTime::createFromFormat('M d Y, H:i:s T', $dateInPlainASCII); if (!$dateTimeObject) { // TODO handle errors your own way throw new InvalidArgumentException('Date could not be parsed: ' . $decodedDate); } echo 'Final date: ' . $dateTimeObject->format('Y-m-d H:i:s');

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.4.130.0140.00617.84
8.4.120.0160.00520.64
8.4.110.0100.01022.31
8.4.100.0080.00318.13
8.4.90.0100.01118.95
8.4.80.0160.00517.80
8.4.70.0060.00417.74
8.4.60.0090.00718.86
8.4.50.0090.00720.61
8.4.40.0000.02017.59
8.4.30.0140.00722.30
8.4.20.0070.01318.10
8.4.10.0080.00822.11
8.3.260.0110.00616.60
8.3.250.0120.00618.85
8.3.240.0100.00916.61
8.3.230.0100.00916.86
8.3.220.0100.00817.09
8.3.210.0050.00516.52
8.3.200.0060.00316.47
8.3.190.0110.00817.41
8.3.180.0130.00616.51
8.3.170.0110.00417.27
8.3.160.0150.00418.37
8.3.150.0160.00320.91
8.3.140.0040.00420.53
8.3.130.0100.00016.56
8.3.120.0060.01018.88
8.3.110.0050.00320.94
8.3.100.0090.00016.48
8.3.90.0090.00026.77
8.3.80.0060.00318.18
8.3.70.0060.01218.32
8.3.60.0110.00718.42
8.3.50.0070.00716.71
8.3.40.0060.00922.08
8.3.30.0070.00719.22
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0050.00326.16
8.2.290.0070.00420.84
8.2.280.0110.00818.56
8.2.270.0120.00617.51
8.2.260.0040.00419.02
8.2.250.0140.00016.57
8.2.240.0040.00420.74
8.2.230.0050.00322.58
8.2.220.0040.00424.06
8.2.210.0000.01026.77
8.2.200.0100.00018.18
8.2.190.0090.00616.58
8.2.180.0100.00717.00
8.2.170.0090.00618.85
8.2.160.0040.01122.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0050.00322.26
8.2.110.0090.00021.11
8.2.100.0070.00418.03
8.2.90.0120.00017.88
8.2.80.0330.00017.13
8.2.70.0240.00717.50
8.2.60.0150.01517.63
8.2.50.0270.00517.49
8.2.40.0230.00517.48
8.2.30.0170.00817.38
8.2.20.0190.00817.61
8.2.10.0190.00817.84
8.2.00.0190.00717.50
8.1.330.0110.00821.89
8.1.320.0100.00916.29
8.1.310.0110.00716.54
8.1.300.0000.00917.67
8.1.290.0050.00530.84
8.1.280.0120.00325.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00323.92
8.1.230.0060.00620.91
8.1.220.0240.00417.50
8.1.210.0190.00817.22
8.1.200.0250.00317.12
8.1.190.0190.00717.25
8.1.180.0320.00317.00
8.1.170.0270.00017.25
8.1.160.0220.00417.38
8.1.150.0240.00317.25
8.1.140.0270.00017.38
8.1.130.0220.00517.25
8.1.120.0200.00717.50
8.1.110.0170.01017.48
8.1.100.0210.00617.23
8.1.90.0160.01117.23
8.1.80.0210.00717.13
8.1.70.0220.00417.24
8.1.60.0220.00617.50
8.1.50.0260.00017.25
8.1.40.0270.00317.60
8.1.30.0240.00917.63
8.1.20.0310.00017.22
8.1.10.0200.00617.25
8.1.00.0240.00317.25
8.0.300.0180.00916.84
8.0.290.0240.00316.74
8.0.280.0230.00316.85
8.0.270.0210.00716.86
8.0.260.0230.00316.75
8.0.250.0270.00016.75
8.0.240.0260.00317.00
8.0.230.0240.00316.61
8.0.220.0240.00316.63
8.0.210.0150.01116.73
8.0.200.0170.01016.88
8.0.190.0270.00616.75
8.0.180.0200.00516.73
8.0.170.0360.00716.63
8.0.160.0240.00316.88
8.0.150.0160.01216.75
8.0.140.0220.00516.59
8.0.130.0230.00316.75
8.0.120.0210.00516.75
8.0.110.0260.00016.63
8.0.100.0220.00516.72
8.0.90.0240.00316.75
8.0.80.0240.00416.63
8.0.70.0230.00416.55
8.0.60.0250.00316.75
8.0.50.0250.00316.63
8.0.30.0280.00416.55
8.0.20.0270.00316.55
8.0.10.0290.00016.85

preferences:
73.02 ms | 403 KiB | 5 Q