3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = mysql_query("SELECT `datetime` FROM `table`"); $row = mysql_fetch_row($result); $date = date_create($row[0]); echo date_format($date, 'Y-m-d H:i:s'); #output: 2012-03-24 17:45:12 echo date_format($date, 'd/m/Y H:i:s'); #output: 24/03/2012 17:45:12 echo date_format($date, 'd/m/y'); #output: 24/03/12 echo date_format($date, 'g:i A'); #output: 5:45 PM echo date_format($date, 'G:ia'); #output: 05:45pm echo date_format($date, 'g:ia \o\n l jS F Y'); #output: 5:45pm on Saturday 24th March 2012 ?>

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.00718.18
8.3.50.0140.00722.05
8.3.40.0110.00418.87
8.3.30.0040.01119.01
8.3.20.0080.00020.29
8.3.10.0050.00323.66
8.3.00.0030.00519.68
8.2.180.0150.00416.75
8.2.170.0150.00622.96
8.2.160.0130.00320.52
8.2.150.0050.00224.18
8.2.140.0090.00024.66
8.2.130.0070.00026.16
8.2.120.0070.00020.98
8.2.110.0000.01722.25
8.2.100.0060.00619.77
8.2.90.0000.00719.27
8.2.80.0060.00317.97
8.2.70.0030.00617.63
8.2.60.0000.00817.91
8.2.50.0060.00318.07
8.2.40.0000.00919.76
8.2.30.0030.00518.25
8.2.20.0060.00317.75
8.2.10.0080.00017.91
8.2.00.0040.00417.80
8.1.280.0090.00925.92
8.1.270.0040.00421.94
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00321.98
8.1.230.0030.00719.01
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0050.00317.11
8.1.180.0000.00818.10
8.1.170.0080.00018.52
8.1.160.0000.00721.98
8.1.150.0000.00718.52
8.1.140.0070.00017.25
8.1.130.0040.00417.70
8.1.120.0000.00717.20
8.1.110.0050.00317.26
8.1.100.0070.00017.30
8.1.90.0030.00317.24
8.1.80.0000.00717.25
8.1.70.0000.00817.32
8.1.60.0090.00017.51
8.1.50.0050.00317.46
8.1.40.0040.00417.47
8.1.30.0000.00817.67
8.1.20.0000.00717.58
8.1.10.0040.00417.53
8.1.00.0050.00317.34
8.0.300.0040.00418.77
8.0.290.0020.00516.63
8.0.280.0050.00218.40
8.0.270.0030.00317.20
8.0.260.0060.00017.07
8.0.250.0000.00716.83
8.0.240.0000.00716.92
8.0.230.0000.00816.88
8.0.220.0000.00616.92
8.0.210.0030.00316.82
8.0.200.0030.00316.98
8.0.190.0040.00416.97
8.0.180.0040.00416.96
8.0.170.0050.00316.95
8.0.160.0050.00216.91
8.0.150.0000.00716.94
8.0.140.0090.00616.81
8.0.130.0060.00013.38
8.0.120.0050.00316.76
8.0.110.0040.00416.84
8.0.100.0080.00016.95
8.0.90.0040.00416.97
8.0.80.0090.00616.98
8.0.70.0000.00716.76
8.0.60.0040.00416.89
8.0.50.0080.00016.80
8.0.30.0160.00717.06
8.0.20.0130.00717.40
8.0.10.0040.00416.83
8.0.00.0080.01016.77
7.4.330.0030.00315.01
7.4.320.0030.00316.54
7.4.300.0030.00316.50
7.4.290.0070.00016.45
7.4.280.0000.00716.45
7.4.270.0080.00016.50
7.4.260.0070.00016.53
7.4.250.0030.00516.32
7.4.240.0040.00416.46
7.4.230.0080.00016.44
7.4.220.0030.01416.45
7.4.210.0000.01416.33
7.4.200.0040.00416.63
7.4.160.0100.00616.64
7.4.150.0110.00817.40
7.4.140.0060.01217.86
7.4.130.0100.00716.54
7.4.120.0070.01016.65
7.4.110.0120.00816.52
7.4.100.0100.01116.67
7.4.90.0140.00416.43
7.4.80.0070.01319.39
7.4.70.0110.00816.37
7.4.60.0100.00716.31
7.4.50.0000.00416.55
7.4.40.0120.00916.44
7.4.30.0110.00516.28
7.4.00.0060.01214.97
7.3.330.0000.00613.18
7.3.320.0000.00613.12
7.3.310.0000.00716.13
7.3.300.0030.00316.12
7.3.290.0100.00716.29
7.3.280.0060.00916.26
7.3.270.0060.01317.40
7.3.260.0110.00816.23
7.3.250.0120.00816.39
7.3.240.0160.00016.27
7.3.230.0060.00916.39
7.3.210.0120.00616.43
7.3.200.0100.00619.39
7.3.190.0160.00616.29
7.3.180.0060.01016.46
7.3.170.0060.01016.45
7.3.160.0080.00816.33
7.3.120.0030.01314.46
7.3.10.0000.01416.55
7.3.00.0090.00616.32
7.2.330.0060.01316.29
7.2.320.0100.00716.35
7.2.310.0040.01716.18
7.2.300.0130.00416.57
7.2.290.0040.01116.48
7.2.130.0000.01216.62
7.2.120.0060.01016.44
7.2.110.0060.00916.25
7.2.100.0000.01216.31
7.2.90.0150.00616.61
7.2.80.0070.01016.66
7.2.70.0150.00016.71
7.2.60.0100.00716.55
7.2.50.0130.00316.66
7.2.40.0100.01016.40
7.2.30.0100.00616.56
7.2.20.0070.01016.57
7.2.10.0040.01116.45
7.2.00.0070.01218.13
7.1.250.0100.00715.53
7.1.200.0030.01015.48
7.1.100.0120.01217.95
7.1.70.0000.00716.86
7.1.60.0100.00719.70
7.1.50.0130.00716.77
7.1.00.0100.08022.45
7.0.200.0110.00016.85
7.0.140.0070.07021.96
7.0.60.0100.07720.07
7.0.50.0130.04717.89
7.0.40.0030.08720.13
7.0.30.0200.03720.16
7.0.20.0270.04720.09
7.0.10.0100.08020.13
7.0.00.0070.06320.02
5.6.280.0100.06720.82
5.6.210.0070.08720.52
5.6.200.0070.04318.22
5.6.190.0100.03720.39
5.6.180.0470.06020.27
5.6.170.0200.04320.33
5.6.160.0000.05320.40
5.6.150.0070.03718.18
5.6.140.0030.04018.09
5.6.130.0000.06018.18
5.6.120.0170.05021.09
5.6.110.0070.08720.89
5.6.100.0170.07320.97
5.6.90.0000.07020.98
5.6.80.0030.04020.48
5.5.350.0330.07020.38
5.5.340.0030.08717.99
5.5.330.0070.08320.38
5.5.320.0100.04320.32
5.5.310.0270.07720.19
5.5.300.0070.08017.89
5.5.290.0100.07717.89
5.5.280.0100.08020.65
5.5.270.0170.07320.84
5.5.260.0070.04020.83
5.5.250.0030.04320.66
5.5.240.0130.07020.26
5.4.450.0530.06019.13
5.4.440.0900.05319.27
5.4.430.0200.04719.10
5.4.420.0870.04719.57
5.4.410.0970.05719.36
5.4.400.1100.04319.08
5.4.390.0830.06719.22
5.4.380.0170.05018.59
5.4.370.0100.05018.68
5.4.360.0170.04718.46
5.4.350.0030.06318.71
5.4.340.0000.06718.71
5.4.320.0110.03112.45
5.4.310.0070.03612.45
5.4.300.0060.04012.45
5.4.290.0020.04212.45
5.4.280.0060.03512.35
5.4.270.0060.03612.35
5.4.260.0050.03912.35
5.4.250.0050.03812.35
5.4.240.0070.03512.35
5.4.230.0070.03712.34
5.4.220.0040.03712.34
5.4.210.0040.03612.34
5.4.200.0050.03812.34
5.4.190.0080.03312.34
5.4.180.0060.03512.34
5.4.170.0070.03412.35
5.4.160.0070.03412.34
5.4.150.0070.03412.34
5.4.140.0040.03812.02
5.4.130.0060.03512.01
5.4.120.0040.03611.97
5.4.110.0070.03411.96
5.4.100.0050.03611.96
5.4.90.0080.03411.97
5.4.80.0060.03511.97
5.4.70.0060.03411.97
5.4.60.0020.03911.96
5.4.50.0040.03611.96
5.4.40.0040.03711.95
5.4.30.0050.03711.95
5.4.20.0060.03511.95
5.4.10.0080.03211.95
5.4.00.0040.03811.44
5.3.290.0060.04312.80
5.3.280.0090.03612.71
5.3.270.0080.03712.73
5.3.260.0060.03912.72
5.3.250.0040.04112.72
5.3.240.0090.03312.72
5.3.230.0100.03412.71
5.3.220.0020.04112.68
5.3.210.0090.03612.68
5.3.200.0040.03812.68
5.3.190.0060.03812.68
5.3.180.0050.03912.67
5.3.170.0100.03212.67
5.3.160.0090.04612.68
5.3.150.0100.03312.67
5.3.140.0050.03812.66
5.3.130.0080.04412.66
5.3.120.0060.03812.66
5.3.110.0060.03812.66
5.3.100.0050.03912.12
5.3.90.0070.03712.09
5.3.80.0040.03912.07
5.3.70.0070.03612.07
5.3.60.0100.03312.07
5.3.50.0080.03612.00
5.3.40.0060.03712.00
5.3.30.0070.03411.95
5.3.20.0040.03711.72
5.3.10.0050.03511.69
5.3.00.0070.03711.68
5.2.170.0060.0399.18
5.2.160.0030.0329.18
5.2.150.0040.0379.18
5.2.140.0070.0379.18
5.2.130.0050.0299.14
5.2.120.0040.0299.14
5.2.110.0070.0389.14
5.2.100.0040.0309.14
5.2.90.0040.0309.14
5.2.80.0050.0319.14
5.2.70.0060.0289.14
5.2.60.0040.0309.09
5.2.50.0030.0319.06
5.2.40.0040.0299.04
5.2.30.0030.0319.01
5.2.20.0050.0329.00
5.2.10.0030.0298.92
5.2.00.0050.0308.78
5.1.60.0040.0258.07
5.1.50.0060.0228.06
5.1.40.0030.0258.05
5.1.30.0040.0268.39
5.1.20.0040.0278.41
5.1.10.0040.0258.14
5.1.00.0050.0258.14
5.0.50.0050.0206.61
5.0.40.0050.0186.48
5.0.30.0040.0336.29
5.0.20.0020.0216.26
5.0.10.0060.0166.24
5.0.00.0030.0316.23
4.4.90.0020.0174.77
4.4.80.0030.0184.76
4.4.70.0010.0184.75
4.4.60.0060.0124.75
4.4.50.0020.0164.77
4.4.40.0050.0244.71
4.4.30.0040.0154.76
4.4.20.0010.0194.84
4.4.10.0000.0194.85
4.4.00.0030.0254.76
4.3.110.0010.0184.67
4.3.100.0000.0184.66
4.3.90.0040.0134.63
4.3.80.0050.0234.58
4.3.70.0020.0164.63
4.3.60.0020.0154.63
4.3.50.0030.0204.63
4.3.40.0020.0264.54
4.3.30.0020.0173.30
4.3.20.0020.0173.28
4.3.10.0050.0133.25
4.3.00.0130.02043.78

preferences:
44 ms | 401 KiB | 5 Q