3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$connection = mysql_connect('localhost', 'root','abcABC123'); //mysql_select_db('pearson', $connection); //ini_set('date.timezone', 'US/Eastern'); //date_default_timezone_set('Europe/London'); echo "PHP INI SETTING : " . ini_get('date.timezone') . "</br>"; echo "Current timezone: " . date_default_timezone_get() . "</br>"; $date = new DateTime(); var_dump(new DateTime()); echo "</br>------------------------------------ DateTime Constants -------------------------------------------------</br>"; echo "DATE_ATOM - " . $date->format(DATE_ATOM) . "</br>" ; echo "DATE_ISO8601 - " . $date->format(DATE_ISO8601) . "</br>" ; echo "DATE_RFC822 - " . $date->format(DATE_RFC822) . "</br>" ; echo "DATE_RSS - " . $date->format(DATE_RSS) . "</br>" ; echo "</br>-------------------------------------- Operation with Date -----------------------------------------------</br>"; echo "Offset to GMT - " . $date->getOffset() . "</br>" ; echo "Date modify - " . $date->modify('+2 week')->format(DATE_RSS) . "</br>" ; echo "</br>-------------------------------------- Operation with Timezone -----------------------------------------------</br>"; echo "http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone </br>" ; echo "Timestamp - " . $date->getTimestamp(). "</br>" ; $timeZone = new DateTimeZone("Europe/Moscow"); $date->setTimezone($timeZone); //var_dump($timeZone->getTransitions()); //var_dump(timezone_identifiers_list()); var_dump($date); echo "Timezone offset to GMT - " . $timeZone->getOffset(new DateTime()) . "</br>" ; echo "</br>-------------------------------------- MYSQL -----------------------------------------------</br>" ; $sql = "INSERT INTO date_date(my_timestamp, datetime) VALUES(\"". CURRENT_TIMESTAMP . "\",\"" . $date->format("d-m-y H:i:s") . "\")"; echo $sql . "</br>"; mysql_query($sql); $result = mysql_query('SELECT datetime FROM date_date'); while ($row = mysql_fetch_assoc($result)) { $userTimeZone = new DateTimeZone('Europe/Oslo'); if (!empty($row["datetime"])) { $dt = new DateTime($row["datetime"]); $dt->setTimezone($userTimeZone); echo "</br>" . $dt->format("r") . "</br>"; } } echo "</br>-------------------------------------- Prooof links-----------------------------------------------</br>" ; echo "http://www.worldtimezone.com/index24.php </br>" ; echo "http://www.sitepoint.com/forums/showthread.php?450107-Difference-between-GMT-and-PST#post3243632</br>" ;

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.81
8.3.50.0100.01021.20
8.3.40.0110.00719.22
8.3.30.0190.00320.34
8.3.20.0080.00019.05
8.3.10.0090.00021.23
8.3.00.0080.00023.53
8.2.180.0150.00416.88
8.2.170.0110.00422.96
8.2.160.0060.00920.44
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00420.02
8.2.110.0060.00320.70
8.2.100.0000.01218.16
8.2.90.0030.00517.88
8.2.80.0000.00819.13
8.2.70.0040.00417.88
8.2.60.0060.00318.00
8.2.50.0000.00818.29
8.2.40.0040.00419.85
8.2.30.0000.00819.62
8.2.20.0080.00018.02
8.2.10.0040.00418.18
8.2.00.0050.00317.98
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0050.00328.09
8.1.240.0070.00319.73
8.1.230.0090.00321.13
8.1.220.0060.00319.07
8.1.210.0050.00318.77
8.1.200.0060.00317.73
8.1.190.0080.00017.73
8.1.180.0030.00618.10
8.1.170.0050.00317.88
8.1.160.0060.00319.09
8.1.150.0030.00519.10
8.1.140.0000.00717.70
8.1.130.0000.00717.90
8.1.120.0100.00017.75
8.1.110.0050.00217.78
8.1.100.0000.00717.75
8.1.90.0000.00717.71
8.1.80.0040.00417.78
8.1.70.0030.00317.77
8.1.60.0030.00617.78
8.1.50.0000.00817.66
8.1.40.0040.00417.85
8.1.30.0040.00417.93
8.1.20.0000.00817.86
8.1.10.0060.00317.78
8.1.00.0090.00617.82
8.0.300.0040.00418.77
8.0.290.0000.00717.53
8.0.280.0040.00418.72
8.0.270.0030.00617.29
8.0.260.0000.00717.25
8.0.250.0000.00817.33
8.0.240.0060.00317.40
8.0.230.0080.00017.43
8.0.220.0060.00317.34
8.0.210.0030.00617.36
8.0.200.0060.00017.33
8.0.190.0040.00417.50
8.0.180.0070.00017.39
8.0.170.0000.00717.28
8.0.160.0050.00217.39
8.0.150.0000.00717.30
8.0.140.0090.00017.32
8.0.130.0000.00613.74
8.0.120.0040.00417.22
8.0.110.0070.00017.26
8.0.100.0000.00717.30
8.0.90.0000.00817.23
8.0.80.0060.00917.39
8.0.70.0000.00717.31
8.0.60.0040.00417.21
8.0.50.0040.00417.16
8.0.30.0120.00917.34
8.0.20.0130.00817.40
8.0.10.0090.00017.50
8.0.00.0110.01017.16
7.4.330.0020.00216.75
7.4.320.0030.00316.79
7.4.300.0040.00416.98
7.4.290.0000.00716.94
7.4.280.0050.00216.84
7.4.270.0030.00516.69
7.4.260.0030.00313.60
7.4.250.0000.00816.84
7.4.240.0000.00816.70
7.4.230.0070.00016.66
7.4.220.0070.01016.86
7.4.210.0040.01016.87
7.4.200.0030.00316.76
7.4.190.0040.00416.94
7.4.160.0080.01016.79
7.4.150.0090.01517.40
7.4.140.0170.00317.86
7.4.130.0090.01017.00
7.4.120.0130.00616.88
7.4.110.0100.00816.90
7.4.100.0080.00816.80
7.4.90.0140.00617.01
7.4.80.0130.00919.39
7.4.70.0160.00617.03
7.4.60.0060.01217.01
7.4.50.0000.00916.73
7.4.40.0000.01322.77
7.4.30.0150.00616.89
7.4.00.0030.01015.31
7.3.330.0050.00013.46
7.3.320.0060.00013.50
7.3.310.0040.00416.79
7.3.300.0050.00316.70
7.3.290.0070.01016.65
7.3.280.0050.01116.56
7.3.270.0060.01217.40
7.3.260.0150.00918.24
7.3.250.0150.00616.78
7.3.240.0130.00316.72
7.3.230.0030.01616.76
7.3.210.0140.00316.78
7.3.200.0190.00019.39
7.3.190.0150.00916.82
7.3.180.0090.00916.87
7.3.170.0170.00016.93
7.3.160.0070.01016.79
7.3.120.0070.01015.09
7.2.330.0070.01117.16
7.2.320.0150.00916.64
7.2.310.0130.00617.23
7.2.300.0070.01016.90
7.2.290.0070.01117.17
7.2.60.0090.00617.43
7.2.00.0060.00619.75
7.1.200.0060.00916.23
7.1.100.0060.00618.38
7.1.70.0070.00017.25
7.1.60.0070.01119.24
7.1.50.0060.01617.37
7.1.00.0070.07322.54
7.0.200.0040.01117.06
7.0.140.0030.07322.16
7.0.80.0770.06019.96
7.0.70.0570.07719.96
7.0.60.0500.08720.06
7.0.50.0100.08020.41
7.0.40.0070.08320.18
7.0.30.0100.08020.15
7.0.20.0070.08320.14
7.0.10.0130.06320.16
7.0.00.0130.06020.13
5.6.280.0070.07020.88
5.6.230.0070.09020.71
5.6.220.0070.04320.66
5.6.210.0070.07720.48
5.6.200.0100.03721.07
5.6.190.0100.07721.04
5.6.180.0030.08020.95
5.6.170.0070.08021.02
5.6.160.0100.04721.14
5.6.150.0170.04021.04
5.6.140.0100.08021.05
5.6.130.0130.06021.04
5.6.120.0130.04321.11
5.6.110.0100.07721.01
5.6.100.0100.08021.05
5.6.90.0000.08721.01
5.6.80.0170.04320.45
5.6.70.0130.06720.44
5.6.60.0070.08020.41
5.6.50.0070.07320.42
5.6.40.0070.08720.42
5.6.30.0000.05320.41
5.6.20.0130.07720.50
5.6.10.0130.04020.54
5.6.00.0100.07320.40
5.5.370.0070.08720.41
5.5.360.0170.07320.57
5.5.350.0030.05720.48
5.5.340.0070.04720.93
5.5.330.0130.08320.89
5.5.320.0070.07720.92
5.5.310.0100.05720.88
5.5.300.0070.08720.85
5.5.290.0070.08320.93
5.5.280.0030.08320.93
5.5.270.0100.08020.81
5.5.260.0070.05320.93
5.5.250.0100.07320.62
5.5.240.0070.04320.27
5.5.230.0070.06020.22
5.5.220.0000.08020.32
5.5.210.0070.04720.19
5.5.200.0070.07320.27
5.5.190.0100.08020.25
5.5.180.0070.08320.14
5.5.160.0100.07719.98
5.5.150.0170.07020.20
5.5.140.0200.05320.23
5.5.130.0130.06320.24
5.5.120.0070.08020.25
5.5.110.0030.08020.14
5.5.100.0130.07020.10
5.5.90.0130.07319.99
5.5.80.0000.08320.09
5.5.70.0070.06320.08
5.5.60.0170.05320.17
5.5.50.0100.08020.11
5.5.40.0100.05720.06
5.5.30.0070.07720.07
5.5.20.0100.04320.07
5.5.10.0130.07020.06
5.5.00.0130.04320.08
5.4.450.0070.08319.44
5.4.440.0030.08319.20
5.4.430.0170.07019.54
5.4.420.0100.07019.27
5.4.410.0000.04319.32
5.4.400.0030.08019.02
5.4.390.0030.04718.80
5.4.380.0030.04718.80
5.4.370.0000.08019.05
5.4.360.0100.07318.92
5.4.350.0100.07718.77
5.4.340.0170.07019.09
5.4.320.0030.05319.11
5.4.310.0100.07318.96
5.4.300.0030.08019.02
5.4.290.0070.07719.05
5.4.280.0070.08018.92
5.4.270.0100.07719.21
5.4.260.0070.06319.11
5.4.250.0100.06318.95
5.4.240.0000.08719.08
5.4.230.0170.06718.77
5.4.220.0100.07319.07
5.4.210.0130.07019.13
5.4.200.0030.07319.20
5.4.190.0200.06318.97
5.4.180.0070.04319.01
5.4.170.0070.07719.04
5.4.160.0100.07718.94
5.4.150.0130.04318.94
5.4.140.0100.07016.37
5.4.130.0170.03316.06
5.4.120.0100.06316.27
5.4.110.0130.04316.45
5.4.100.0030.04316.46
5.4.90.0030.06016.46
5.4.80.0100.04016.34
5.4.70.0000.06016.30
5.4.60.0000.08016.33
5.4.50.0030.04016.40
5.4.40.0030.07716.46
5.4.30.0070.06716.29
5.4.20.0100.07016.38
5.4.10.0070.05716.31
5.4.00.0030.04715.74
5.3.290.0100.04714.68
5.3.280.0070.08014.52
5.3.270.0070.07714.63
5.3.260.0130.06014.59
5.3.250.0100.03714.61
5.3.240.0170.06314.58
5.3.230.0070.04314.57
5.3.220.0100.07314.54
5.3.210.0130.06714.44
5.3.200.0070.07314.45
5.3.190.0030.06314.52
5.3.180.0100.04714.42
5.3.170.0070.07014.53
5.3.160.0170.05714.57
5.3.150.0030.07714.58
5.3.140.0070.07314.55
5.3.130.0070.05314.43
5.3.120.0100.03714.55
5.3.110.0030.08014.57
5.3.100.0070.06013.88
5.3.90.0000.06013.90
5.3.80.0100.06313.99
5.3.70.0000.04714.02
5.3.60.0170.06713.95
5.3.50.0200.06713.95
5.3.40.0030.07013.91
5.3.30.0030.04713.70
5.3.20.0100.03313.48
5.3.10.0130.06013.60
5.3.00.0070.07013.66
5.2.170.0070.06011.68
5.2.160.0100.06011.68
5.2.150.0070.05311.68
5.2.140.0070.04011.68
5.2.130.0100.05311.69
5.2.120.0030.06711.71
5.2.110.0030.06311.71
5.2.100.0070.06011.71
5.2.90.0100.04011.71
5.2.80.0070.05011.71
5.2.70.0030.06311.71
5.2.60.0100.05711.71
5.2.50.0070.04711.71
5.2.40.0070.06311.71
5.2.30.0070.04311.71
5.2.20.0100.03711.71
5.2.10.0070.05011.71
5.2.00.0070.04711.71
5.1.60.0100.05011.71
5.1.50.0030.03711.73
5.1.40.0030.04311.73
5.1.30.0070.04311.73
5.1.20.0070.04311.73
5.1.10.0070.05311.73
5.1.00.0000.05011.73
5.0.50.0070.03011.73
5.0.40.0070.03311.73
5.0.30.0100.06311.73
5.0.20.0030.03011.73
5.0.10.0070.03311.73
5.0.00.0030.05011.73
4.4.90.0000.03711.71
4.4.80.0030.03711.71
4.4.70.0000.04011.71
4.4.60.0070.03011.71
4.4.50.0000.03311.71
4.4.40.0070.04311.71
4.4.30.0000.03711.73
4.4.20.0000.03011.73
4.4.10.0070.02711.73
4.4.00.0070.05311.73
4.3.110.0030.03311.73
4.3.100.0070.02311.73
4.3.90.0100.01011.73
4.3.80.0030.03311.73
4.3.70.0070.01711.73
4.3.60.0000.03711.73
4.3.50.0000.03311.73
4.3.40.0030.05011.73
4.3.30.0030.03311.73
4.3.20.0000.03011.73
4.3.10.0030.02011.73
4.3.00.0000.02011.73

preferences:
43.4 ms | 401 KiB | 5 Q