3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create two identical DateTime objects $a = new DateTime("2015-02-01 00:00:00", new DateTimeZone("PST")); $b = clone $a; // They should be equal (and they are) compare($a, $b); // Now change the timezone to EST. $b->setTimezone(new DateTimeZone("EST")); //The actual timestamp should not change (it does not in PHP 5.4) so $a should still be equal to $b, but it will say $a > $b. compare($a, $b); function compare($a, $b) { var_dump($a); var_dump($b); echo ($a > $b ? '$a > $b' : ($a < $b ? '$a < $b' : ($a == $b ? '$a == $b' : 'undefined'))) . "\n"; }

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.00716.50
8.3.50.0180.00321.94
8.3.40.0110.00418.73
8.3.30.0140.00019.05
8.3.20.0000.00820.05
8.3.10.0000.00821.80
8.3.00.0060.00617.63
8.2.180.0110.00425.92
8.2.170.0140.00018.88
8.2.160.0100.00322.20
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00319.55
8.2.110.0030.00621.00
8.2.100.0090.00317.71
8.2.90.0030.00619.23
8.2.80.0030.00617.97
8.2.70.0030.00617.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0080.00018.20
8.2.30.0030.00518.05
8.2.20.0030.00517.68
8.2.10.0050.00317.98
8.2.00.0000.00717.67
8.1.280.0150.00625.92
8.1.270.0040.00423.84
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0030.00622.13
8.1.230.0110.00018.95
8.1.220.0000.00817.76
8.1.210.0060.00318.77
8.1.200.0030.00617.48
8.1.190.0050.00317.48
8.1.180.0000.00818.10
8.1.170.0060.00320.43
8.1.160.0040.00422.05
8.1.150.0000.00718.89
8.1.140.0000.00817.61
8.1.130.0040.00417.86
8.1.120.0040.00417.58
8.1.110.0050.00317.63
8.1.100.0050.00317.57
8.1.90.0070.00017.49
8.1.80.0000.00717.62
8.1.70.0000.00817.50
8.1.60.0060.00317.52
8.1.50.0000.00917.49
8.1.40.0070.00017.46
8.1.30.0060.00317.64
8.1.20.0050.00317.66
8.1.10.0030.00517.45
8.1.00.0120.00017.61
8.0.300.0040.00418.77
8.0.290.0080.00016.88
8.0.280.0000.00718.38
8.0.270.0030.00317.25
8.0.260.0030.00317.25
8.0.250.0070.00017.09
8.0.240.0070.00017.12
8.0.230.0030.00317.11
8.0.220.0030.00316.86
8.0.210.0000.00716.98
8.0.200.0000.00716.96
8.0.190.0000.00817.08
8.0.180.0000.00717.00
8.0.170.0060.00316.93
8.0.160.0030.00516.94
8.0.150.0070.00016.98
8.0.140.0030.00416.97
8.0.130.0060.00013.43
8.0.120.0050.00216.94
8.0.110.0040.00416.99
8.0.100.0040.00416.86
8.0.90.0050.00316.88
8.0.80.0120.00916.93
8.0.70.0080.00016.90
8.0.60.0040.00416.91
8.0.50.0050.00217.04
8.0.30.0090.01017.17
8.0.20.0150.00917.41
8.0.10.0040.00417.06
8.0.00.0080.01216.83
7.4.330.0030.00315.15
7.4.320.0030.00316.65
7.4.300.0040.00416.57
7.4.290.0000.00716.59
7.4.280.0070.00316.55
7.4.270.0080.00016.67
7.4.260.0070.00016.64
7.4.250.0000.00716.62
7.4.240.0020.00616.61
7.4.230.0040.00416.64
7.4.220.0060.01216.63
7.4.210.0070.00916.73
7.4.200.0040.00416.77
7.4.160.0090.00916.50
7.4.150.0140.01417.40
7.4.140.0130.01317.86
7.4.130.0120.01016.59
7.4.120.0080.01116.50
7.4.110.0140.00816.77
7.4.100.0140.01116.69
7.4.90.0190.00016.64
7.4.80.0080.01119.39
7.4.70.0150.00916.61
7.4.60.0140.00716.56
7.4.50.0040.00416.27
7.4.40.0100.00916.61
7.4.30.0170.00416.55
7.4.10.0000.01915.27
7.4.00.0120.00515.15
7.3.330.0060.00013.23
7.3.320.0080.00813.21
7.3.310.0030.00316.26
7.3.300.0030.00316.29
7.3.290.0030.00316.33
7.3.280.0090.01016.38
7.3.270.0190.00317.40
7.3.260.0000.01916.56
7.3.250.0140.00616.59
7.3.240.0060.01316.56
7.3.230.0110.01416.50
7.3.210.0030.01416.67
7.3.200.0150.00719.39
7.3.190.0140.00416.49
7.3.180.0110.01116.54
7.3.170.0120.00616.64
7.3.160.0110.00416.43
7.3.130.0060.01214.94
7.3.120.0070.01114.84
7.3.110.0080.00914.84
7.3.100.0060.00814.95
7.3.90.0100.00414.99
7.3.80.0060.00914.94
7.3.70.0040.01014.72
7.3.60.0040.01114.91
7.3.50.0070.00714.87
7.3.40.0070.00615.01
7.3.30.0040.01114.95
7.3.20.0060.00916.70
7.3.10.0090.00516.68
7.3.00.0080.00816.74
7.2.330.0150.00316.46
7.2.320.0040.01416.57
7.2.310.0040.01416.94
7.2.300.0120.01216.57
7.2.290.0100.00816.62
7.2.260.0030.01515.19
7.2.250.0060.00915.02
7.2.240.0050.01115.23
7.2.230.0070.00715.14
7.2.220.0040.00915.24
7.2.210.0060.00915.17
7.2.200.0070.00815.13
7.2.190.0070.00615.05
7.2.180.0060.00815.07
7.2.170.0030.01215.17
7.2.160.0030.01114.98
7.2.150.0080.00717.00
7.2.140.0070.00817.05
7.2.130.0040.01216.93
7.2.120.0040.00916.80
7.2.110.0070.00916.86
7.2.100.0090.00916.82
7.2.90.0050.01016.98
7.2.80.0070.00816.88
7.2.70.0090.00416.92
7.2.60.0070.00816.78
7.2.50.0090.00716.86
7.2.40.0100.00516.98
7.2.30.0060.01016.96
7.2.20.0060.00816.94
7.2.10.0070.00916.85
7.2.00.0060.00817.36
7.1.330.0090.00615.82
7.1.320.0070.00615.88
7.1.310.0050.01015.97
7.1.300.0040.01015.84
7.1.290.0060.00815.82
7.1.280.0030.01215.75
7.1.270.0050.00915.92
7.1.260.0070.00615.81
7.1.250.0070.00615.85
7.1.240.0060.00615.79
7.1.230.0080.00515.96
7.1.220.0070.00415.78
7.1.210.0050.00815.85
7.1.200.0070.00615.89
7.1.190.0070.00515.72
7.1.180.0040.01115.85
7.1.170.0120.00315.82
7.1.160.0030.01015.73
7.1.150.0090.00315.75
7.1.140.0050.00515.97
7.1.130.0050.00815.82
7.1.120.0020.01115.79
7.1.110.0030.00716.00
7.1.100.0040.00916.56
7.1.90.0050.00715.86
7.1.80.0080.00416.07
7.1.70.0060.00716.33
7.1.60.0050.01117.16
7.1.50.0040.01516.20
7.1.40.0070.00715.69
7.1.30.0100.00315.94
7.1.20.0050.01015.82
7.1.10.0050.01015.85
7.1.00.0070.02918.06
7.0.330.0070.00715.36
7.0.320.0010.01115.53
7.0.310.0050.01115.41
7.0.300.0060.00615.52
7.0.290.0070.00615.46
7.0.280.0000.01415.28
7.0.270.0070.00715.48
7.0.260.0080.00315.35
7.0.250.0070.00815.49
7.0.240.0050.00915.59
7.0.230.0090.00515.66
7.0.220.0030.00915.66
7.0.210.0070.00515.59
7.0.200.0060.00716.01
7.0.190.0070.00515.64
7.0.180.0100.00415.67
7.0.170.0050.00515.61
7.0.160.0110.00315.37
7.0.150.0030.01515.43
7.0.140.0060.01717.65
7.0.130.0090.00715.31
7.0.120.0060.01215.48
7.0.110.0040.00915.55
7.0.100.0100.00615.39
7.0.90.0030.01215.46
7.0.80.0040.00715.48
7.0.70.1500.01517.07
7.0.60.0040.03516.93
7.0.50.0040.02416.37
7.0.40.0090.01615.96
7.0.30.0090.03615.92
7.0.20.0170.02715.87
7.0.10.0090.01915.94
7.0.00.0050.03616.06
5.6.400.0050.00514.58
5.6.390.0070.00614.55
5.6.380.0090.00414.36
5.6.370.0050.00814.57
5.6.360.0040.01114.48
5.6.350.0060.00914.30
5.6.340.0060.00714.40
5.6.330.0070.00814.58
5.6.320.0040.01314.55
5.6.310.0070.00814.37
5.6.300.0060.01114.47
5.6.290.0100.00614.42
5.6.280.0090.02916.61
5.6.270.0070.01114.51
5.6.260.0090.00714.46
5.6.250.0070.01014.54
5.6.240.0080.00814.36
5.6.230.0030.01214.49
5.6.220.0030.01214.26
5.6.210.0100.03116.51
5.6.200.0090.03115.69
5.6.190.0050.02516.29
5.6.180.0140.01916.52
5.6.170.0090.01816.39
5.6.160.0030.02216.43
5.6.150.0070.03115.66
5.6.140.0080.02415.70
5.6.130.0080.02015.67
5.6.120.0090.02916.63
5.6.110.0070.03516.64
5.6.100.0090.03216.62
5.6.90.0100.03116.57
5.6.80.0050.02516.39
5.6.70.0090.03316.30
5.6.60.0090.00614.49
5.6.50.0070.00914.29
5.6.40.0040.01014.26
5.6.30.0070.00814.22
5.6.20.0030.00914.35
5.6.10.0070.00714.25
5.6.00.0040.00814.23
5.5.380.0040.01414.41
5.5.370.0080.00514.46
5.5.360.0070.00814.13
5.5.350.0080.03116.40
5.5.340.0020.02315.55
5.5.330.0070.02516.33
5.5.320.0060.02816.31
5.5.310.0150.01216.42
5.5.300.0090.01515.71
5.5.290.0050.03215.67
5.5.280.0060.03416.43
5.5.270.0090.03116.55
5.5.260.0060.02616.60
5.5.250.0070.01516.55
5.5.240.0060.03316.26
5.5.230.0100.00614.11
5.5.220.0070.00714.17
5.5.210.0100.00514.33
5.5.200.0060.00514.30
5.5.190.0020.01114.21
5.5.180.0060.01014.23
5.5.170.0040.00914.29
5.5.160.0070.00714.28
5.5.150.0040.01114.33
5.5.140.0050.00914.38
5.5.130.0000.01514.37
5.5.120.0070.00714.11
5.5.110.0090.00514.26
5.5.100.0030.00914.43
5.5.90.0070.00714.38
5.5.80.0070.00914.19
5.5.70.0060.00814.36
5.5.60.0080.00614.32
5.5.50.0040.00914.36
5.5.40.0050.00914.63
5.5.30.0060.00914.41
5.5.20.0080.00814.13
5.5.10.0110.00514.13
5.5.00.0050.01214.09
5.4.450.0130.02215.24
5.4.440.0310.02415.28
5.4.430.0410.01715.34
5.4.420.0380.02115.36
5.4.410.0070.02315.27
5.4.400.0060.02515.05
5.4.390.0090.02415.06
5.4.380.0120.02215.06
5.4.370.0080.02615.06
5.4.360.0200.02215.06
5.4.350.0060.02615.03
5.4.340.0110.02215.04
5.4.330.0060.00213.19
5.4.320.0100.02115.04
5.4.310.0110.02014.95
5.4.300.0080.03015.00
5.4.290.0120.01815.04
5.4.280.0160.01814.97
5.4.270.0090.02215.04
5.4.260.0150.02014.99
5.4.250.0060.02515.06
5.4.240.0160.02115.06
5.4.230.0090.02315.02
5.4.220.0150.02115.04
5.4.210.0060.02415.04
5.4.200.0090.02514.30
5.4.190.0150.02115.04
5.4.180.0090.02514.96
5.4.170.0150.02214.97
5.4.160.0070.02114.99
5.4.150.0050.02515.05
5.4.140.0150.02014.29
5.4.130.0070.02314.29
5.4.120.0170.01914.22
5.4.110.0090.02014.22
5.4.100.0130.02214.22
5.4.90.0110.02414.28
5.4.80.0050.02314.23
5.4.70.0190.02414.24
5.4.60.0150.02114.24
5.4.50.0230.02414.21
5.4.40.0070.02314.26
5.4.30.0060.02314.19
5.4.20.0120.02814.20
5.4.10.0100.02014.26
5.4.00.0090.02114.09
5.3.290.0500.05714.71
5.3.280.0070.06314.65
5.3.270.0130.05714.65
5.3.260.0300.05714.79
5.3.250.0130.05714.71
5.3.240.0230.04314.64
5.3.230.0330.05714.71
5.3.220.0230.06314.57
5.3.210.0270.06014.70
5.3.200.0070.05714.61
5.3.190.0200.05014.69
5.3.180.0200.06014.77
5.3.170.0230.04314.63
5.3.160.0370.05314.62
5.3.150.0130.05314.73
5.3.140.0230.05714.66
5.3.130.0130.05314.67
5.3.120.0470.05014.78
5.3.110.0100.08014.72
5.3.100.0270.06714.05
5.3.90.0130.05314.15
5.3.80.0300.05314.22
5.3.70.0130.05314.09
5.3.60.0330.04314.04
5.3.50.0130.05314.04
5.3.40.0070.06013.99
5.3.30.0270.05014.02
5.3.20.0130.05313.69
5.3.10.0330.04013.68
5.3.00.0130.05013.76
5.2.170.0070.04711.37
5.2.160.0270.03711.14
5.2.150.0100.04311.16
5.2.140.0230.04011.25
5.2.130.0030.04711.13
5.2.120.0030.04711.13
5.2.110.0200.04311.20
5.2.100.0100.03711.15
5.2.90.0100.04011.09
5.2.80.0230.04011.08
5.2.70.0100.04711.11
5.2.60.0200.04711.17
5.2.50.0100.05011.05
5.2.40.0130.03711.13
5.2.30.0200.05011.04
5.2.20.0270.04010.93
5.2.10.0130.03710.98
5.2.00.0200.04010.85
5.1.60.0100.03010.20
5.1.50.0170.03710.03
5.1.40.0200.03310.00
5.1.30.0130.03310.38
5.1.20.0070.04010.45
5.1.10.0230.03310.27
5.1.00.0130.03310.17
5.0.50.0030.0308.55
5.0.40.0070.0278.45
5.0.30.0170.0478.29
5.0.20.0030.0308.23
5.0.10.0130.0308.31
5.0.00.0030.0478.20
4.4.90.0170.0105.83
4.4.80.0130.0135.85
4.4.70.0130.0275.90
4.4.60.0000.0275.86
4.4.50.0030.0235.87
4.4.40.0030.0375.86
4.4.30.0030.0235.90
4.4.20.0000.0275.88
4.4.10.0100.0175.91
4.4.00.0100.0305.92
4.3.110.0200.0205.84
4.3.100.0070.0175.74
4.3.90.0070.0205.79
4.3.80.0130.0375.79
4.3.70.0070.0235.79
4.3.60.0030.0305.89
4.3.50.0030.0305.87
4.3.40.0070.0335.87
4.3.30.0230.0234.59
4.3.20.0100.0204.56
4.3.10.0100.0204.48
4.3.00.0030.0236.93

preferences:
39.39 ms | 401 KiB | 5 Q