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.30
8.3.50.0100.01021.97
8.3.40.0110.00418.79
8.3.30.0070.00720.34
8.3.20.0080.00018.90
8.3.10.0040.00421.10
8.3.00.0040.00423.51
8.2.180.0070.01116.63
8.2.170.0040.01122.96
8.2.160.0090.00620.52
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00819.70
8.2.110.0080.00420.95
8.2.100.0120.00017.78
8.2.90.0030.00517.63
8.2.80.0050.00317.97
8.2.70.0040.00417.91
8.2.60.0030.00617.80
8.2.50.0080.00018.10
8.2.40.0030.00522.28
8.2.30.0000.00719.62
8.2.20.0000.00717.61
8.2.10.0000.00817.67
8.2.00.0000.00817.67
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0060.00320.92
8.1.230.0120.00019.28
8.1.220.0080.00017.79
8.1.210.0050.00918.77
8.1.200.0060.00317.35
8.1.190.0050.00317.35
8.1.180.0050.00318.10
8.1.170.0080.00018.63
8.1.160.0040.00418.89
8.1.150.0040.00418.51
8.1.140.0000.00717.31
8.1.130.0000.00717.83
8.1.120.0000.00817.49
8.1.110.0040.00417.35
8.1.100.0040.00417.29
8.1.90.0040.00417.31
8.1.80.0030.00417.46
8.1.70.0000.00717.30
8.1.60.0100.00017.54
8.1.50.0000.00917.42
8.1.40.0040.00417.55
8.1.30.0000.00817.56
8.1.20.0080.00017.64
8.1.10.0040.00417.61
8.1.00.0090.00317.52
8.0.300.0080.00019.81
8.0.290.0000.00816.88
8.0.280.0000.00718.35
8.0.270.0070.00017.19
8.0.260.0030.00316.96
8.0.250.0040.00416.92
8.0.240.0080.00017.03
8.0.230.0030.00317.05
8.0.220.0000.00716.88
8.0.210.0040.00416.94
8.0.200.0060.00017.03
8.0.190.0040.00416.90
8.0.180.0080.00016.88
8.0.170.0000.00716.86
8.0.160.0000.00816.93
8.0.150.0030.00616.99
8.0.140.0050.00216.83
8.0.130.0060.00013.38
8.0.120.0030.00616.94
8.0.110.0000.00716.81
8.0.100.0000.00717.01
8.0.90.0040.00417.04
8.0.80.0060.01516.86
8.0.70.0040.00416.84
8.0.60.0040.00416.85
8.0.50.0040.00416.80
8.0.30.0100.00917.15
8.0.20.0120.01017.40
8.0.10.0000.00816.91
8.0.00.0050.01616.89
7.4.330.0050.00016.71
7.4.320.0000.00616.31
7.4.300.0030.00316.58
7.4.290.0050.00216.59
7.4.280.0030.00316.51
7.4.270.0030.00316.67
7.4.260.0000.00513.40
7.4.250.0000.00816.38
7.4.240.0070.00016.51
7.4.230.0030.00316.58
7.4.220.0090.00916.63
7.4.210.0060.01216.54
7.4.200.0000.00716.64
7.4.190.0040.00416.63
7.4.160.0060.01216.36
7.4.150.0100.00817.40
7.4.140.0100.00817.86
7.4.130.0100.00716.62
7.4.120.0110.00716.57
7.4.110.0060.01216.45
7.4.100.0070.01016.39
7.4.90.0160.00916.36
7.4.80.0100.00719.39
7.4.70.0070.01116.57
7.4.60.0170.00616.63
7.4.50.0080.00016.53
7.4.40.0030.01422.77
7.4.30.0140.00716.40
7.4.10.0040.01414.69
7.4.00.0080.00915.09
7.3.330.0050.00013.07
7.3.320.0050.00013.27
7.3.310.0020.00516.32
7.3.300.0000.00716.34
7.3.290.0150.00016.36
7.3.280.0070.00916.32
7.3.270.0100.00717.40
7.3.260.0060.01218.24
7.3.250.0120.00616.57
7.3.240.0060.01016.55
7.3.230.0080.00816.45
7.3.210.0150.00316.46
7.3.200.0110.01119.39
7.3.190.0100.00716.45
7.3.180.0090.00616.38
7.3.170.0030.01316.63
7.3.160.0060.01216.49
7.3.130.0030.01414.95
7.3.120.0050.00914.77
7.3.110.0090.00914.74
7.3.100.0000.01114.68
7.3.90.0000.01414.94
7.3.80.0070.00315.07
7.3.70.0040.00814.94
7.3.60.0040.00414.84
7.3.50.0080.00814.86
7.3.40.0070.00714.90
7.3.30.0030.01314.81
7.3.20.0070.00716.70
7.3.10.0040.01216.56
7.3.00.0040.01116.63
7.2.330.0090.01016.64
7.2.320.0090.01316.21
7.2.310.0110.00616.61
7.2.300.0030.01316.36
7.2.290.0060.01016.69
7.2.260.0140.00714.69
7.2.250.0110.00714.92
7.2.240.0130.00314.96
7.2.230.0040.00714.63
7.2.220.0070.01014.78
7.2.210.0070.00714.94
7.2.200.0040.01115.10
7.2.190.0060.00614.98
7.2.180.0120.00314.78
7.2.170.0030.01414.91
7.2.160.0070.00714.97
7.2.150.0120.00616.88
7.2.140.0070.01016.58
7.2.130.0060.00616.75
7.2.120.0030.01016.83
7.2.110.0060.00616.54
7.2.100.0040.01516.69
7.2.90.0000.01316.66
7.2.80.0000.01516.67
7.2.70.0070.01116.84
7.2.60.0020.01216.63
7.2.50.0040.01516.85
7.2.40.0040.00916.77
7.2.30.0040.00916.84
7.2.20.0080.00316.88
7.2.10.0030.01016.65
7.2.00.0040.01118.04
7.1.330.0000.01515.86
7.1.320.0110.00415.59
7.1.310.0040.01215.85
7.1.300.0030.00915.66
7.1.290.0100.00315.54
7.1.280.0030.01015.59
7.1.270.0030.00615.69
7.1.260.0060.00615.58
7.1.250.0070.00715.54
7.1.240.0040.01115.58
7.1.230.0050.00515.65
7.1.220.0030.01015.64
7.1.210.0000.01415.61
7.1.200.0030.01215.50
7.1.190.0090.00615.60
7.1.180.0070.01115.59
7.1.170.0030.01015.65
7.1.160.0110.00015.59
7.1.150.0060.00915.57
7.1.140.0040.00815.79
7.1.130.0090.00315.53
7.1.120.0060.00915.39
7.1.110.0120.00315.82
7.1.100.0020.00916.71
7.1.90.0120.00315.46
7.1.80.0130.00615.63
7.1.70.0020.01116.38
7.1.60.0100.00517.35
7.1.50.0050.00916.15
7.1.40.0040.01115.60
7.1.30.0090.00615.35
7.1.20.0030.01015.44
7.1.10.0080.00015.44
7.1.00.0070.03619.12
7.0.330.0030.01015.36
7.0.320.0030.01414.88
7.0.310.0040.00715.33
7.0.300.0030.00515.43
7.0.290.0030.00715.54
7.0.280.0100.00715.02
7.0.270.0000.01415.47
7.0.260.0070.00715.31
7.0.250.0090.00315.50
7.0.240.0040.00415.32
7.0.230.0090.00614.92
7.0.220.0070.00415.34
7.0.210.0000.01515.41
7.0.200.0060.00315.97
7.0.190.0040.00415.11
7.0.180.0030.00615.38
7.0.170.0000.01215.12
7.0.160.0000.00915.39
7.0.150.0040.00815.24
7.0.140.0020.04218.76
7.0.130.0040.00815.00
7.0.120.0040.00415.33
7.0.110.0080.00615.40
7.0.100.0120.02317.59
7.0.90.0030.02517.71
7.0.80.0030.02517.66
7.0.70.0020.02117.54
7.0.60.0100.02317.67
7.0.50.0060.02417.89
7.0.40.0110.01816.76
7.0.30.0080.02416.71
7.0.20.0040.02416.64
7.0.10.0000.02916.69
7.0.00.0080.02216.74
5.6.400.0030.01414.00
5.6.390.0070.00613.93
5.6.380.0070.01114.43
5.6.370.0030.01414.04
5.6.360.0030.01013.94
5.6.350.0090.00614.17
5.6.340.0120.00313.94
5.6.330.0060.00914.06
5.6.320.0000.01614.18
5.6.310.0140.00314.03
5.6.300.0070.00714.27
5.6.290.0030.01013.92
5.6.280.0060.03517.46
5.6.270.0050.00514.34
5.6.260.0100.00314.18
5.6.250.0050.02617.33
5.6.240.0030.02617.28
5.6.230.0050.02517.38
5.6.220.0090.01917.45
5.6.210.0070.02217.31
5.6.200.0100.02017.57
5.6.190.0080.02317.69
5.6.180.0060.02317.51
5.6.170.0030.02217.61
5.6.160.0080.02317.52
5.6.150.0030.02217.49
5.6.140.0070.04317.61
5.6.130.0070.03317.56
5.6.120.0050.04017.71
5.6.110.0080.04117.66
5.6.100.0080.04617.67
5.6.90.0030.04017.62
5.6.80.0060.02817.24
5.6.70.0070.03217.36
5.6.60.0020.04617.22
5.6.50.0050.04817.26
5.6.40.0040.03117.20
5.6.30.0080.02517.19
5.6.20.0090.03617.21
5.6.10.0150.03617.18
5.6.00.0030.04517.18
5.5.380.0030.02517.21
5.5.370.0050.01817.23
5.5.360.0020.02217.30
5.5.350.0080.02317.16
5.5.340.0070.02217.46
5.5.330.0050.02517.41
5.5.320.0050.02017.37
5.5.310.0030.02517.68
5.5.300.0050.04217.45
5.5.290.0040.02817.33
5.5.280.0110.04217.56
5.5.270.0130.03417.43
5.5.260.0070.03717.44
5.5.250.0080.04317.24
5.5.240.0040.04616.99
5.5.230.0160.03617.16
5.5.220.0080.03917.02
5.5.210.0070.04417.01
5.5.200.0050.04717.12
5.5.190.0080.04217.19
5.5.180.0070.03917.07
5.5.170.0100.00314.10
5.5.160.0030.02917.12
5.5.150.0070.04616.98
5.5.140.0100.03616.90
5.5.130.0030.03817.00
5.5.120.0090.04217.15
5.5.110.0060.03017.11
5.5.100.0020.03017.12
5.5.90.0100.02717.13
5.5.80.0110.03317.06
5.5.70.0100.02316.96
5.5.60.0150.03616.97
5.5.50.0120.02717.04
5.5.40.0030.03516.92
5.5.30.0070.03316.86
5.5.20.0100.03116.85
5.5.10.0070.03516.76
5.5.00.0060.02816.98
5.4.450.0030.02914.90
5.4.440.0050.04015.01
5.4.430.0050.04215.05
5.4.420.0050.03715.05
5.4.410.0070.03715.10
5.4.400.0050.02714.75
5.4.390.0070.04114.83
5.4.380.0050.04314.88
5.4.370.0090.03514.86
5.4.360.0050.03314.91
5.4.350.0070.02314.82
5.4.340.0070.04214.95
5.4.330.0040.00710.59
5.4.320.0000.02814.83
5.4.310.0080.03814.98
5.4.300.0050.03014.82
5.4.290.0050.03714.97
5.4.280.0060.03915.00
5.4.270.0050.03814.95
5.4.260.0030.02514.99
5.4.250.0020.04014.98
5.4.240.0070.02214.89
5.4.230.0140.03014.65
5.4.220.0080.04014.98
5.4.210.0060.03814.95
5.4.200.0050.03014.73
5.4.190.0050.03014.88
5.4.180.0030.03414.60
5.4.170.0000.03814.96
5.4.160.0170.01814.89
5.4.150.0070.02214.89
5.4.140.0070.02813.45
5.4.130.0050.04113.39
5.4.120.0030.02313.55
5.4.110.0060.02613.65
5.4.100.0100.03213.62
5.4.90.0030.04213.47
5.4.80.0000.03113.44
5.4.70.0100.02313.62
5.4.60.0020.04413.53
5.4.50.0050.03313.51
5.4.40.0060.03713.52
5.4.30.0060.02413.54
5.4.20.0080.01513.52
5.4.10.0070.03913.50
5.4.00.0080.03513.25
5.3.290.0020.03812.54
5.3.280.0100.03712.35
5.3.270.0060.02212.45
5.3.260.0020.04012.44
5.3.250.0060.02212.34
5.3.240.0110.01812.32
5.3.230.0070.03012.36
5.3.220.0020.02112.40
5.3.210.0020.04112.28
5.3.200.0030.02512.30
5.3.190.0050.04412.37
5.3.180.0060.03812.38
5.3.170.0040.03112.38
5.3.160.0070.04212.39
5.3.150.0040.04012.44
5.3.140.0070.04012.42
5.3.130.0060.02312.34
5.3.120.0060.02212.28
5.3.110.0080.03612.39
5.3.100.0060.02812.29
5.3.90.0070.02812.30
5.3.80.0000.04112.20
5.3.70.0070.03512.17
5.3.60.0050.03312.24
5.3.50.0060.03012.16
5.3.40.0040.03712.20
5.3.30.0020.04012.18
5.3.20.0070.03612.16
5.3.10.0030.04112.16
5.3.00.0080.03512.16
5.2.170.0030.04714.17
5.2.160.0000.05714.17
5.2.150.0000.05314.17
5.2.140.0030.04714.17
5.2.130.0100.05714.17
5.2.120.0070.03014.17
5.2.110.0100.05714.17
5.2.100.0030.05714.17
5.2.90.0130.05014.17
5.2.80.0100.05714.17
5.2.70.0030.05014.17
5.2.60.0130.05314.17
5.2.50.0030.05714.17
5.2.40.0070.04014.17
5.2.30.0000.04014.17
5.2.20.0100.04314.17
5.2.10.0100.05014.17
5.2.00.0070.04714.17
5.1.60.0030.02714.17
5.1.50.0070.03714.17
5.1.40.0030.05314.17
5.1.30.0100.04714.17
5.1.20.0030.05314.17
5.1.10.0070.05014.17
5.1.00.0070.04714.17
5.0.50.0000.02714.17
5.0.40.0070.04314.17
5.0.30.0070.06014.17
5.0.20.0070.03714.17
5.0.10.0030.04714.17
5.0.00.0000.06714.17
4.4.90.0100.02714.17
4.4.80.0000.02714.17
4.4.70.0000.02014.17
4.4.60.0030.02014.17
4.4.50.0000.02014.17
4.4.40.0030.05014.17
4.4.30.0000.03014.17
4.4.20.0000.02014.17
4.4.10.0070.03314.17
4.4.00.0030.02714.17
4.3.110.0030.03714.17
4.3.100.0000.03314.17
4.3.90.0000.03014.17
4.3.80.0030.04314.17
4.3.70.0030.03014.17
4.3.60.0070.02714.17
4.3.50.0030.03014.17
4.3.40.0000.05314.17
4.3.30.0000.03714.17
4.3.20.0030.03314.17
4.3.10.0030.03014.17
4.3.00.0030.02314.17

preferences:
44.5 ms | 401 KiB | 5 Q