3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = array( false, 'sdfasas', '0000-00-00', '0000-00-00 00:00:00', '1231231', '2013-03-02 02:03:03', '2014-04-21', ); function getJsonDate($unixTimestamp = null) { if (is_null($unixTimestamp)) { $unixTimestamp = time(); } return '/Date(' . ($unixTimestamp * 1000) . date('O') . ')/'; } foreach($time as $s) { $iStartTime = ((strtotime($s) >= 0) ? strtotime($s) : 0); var_dump(getJsonDate($iStartTime)); }

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)
7.3.10.0060.00916.84
7.3.00.0120.00316.73
7.2.130.0040.01117.09
7.2.120.0090.00617.11
7.2.110.0030.01017.13
7.2.100.0070.00717.08
7.2.90.0090.00617.11
7.2.80.0070.00417.16
7.2.70.0040.01116.91
7.2.60.0080.00617.15
7.2.50.0000.01216.89
7.2.40.0060.00617.12
7.2.30.0070.01017.15
7.2.20.0100.00616.95
7.2.10.0100.00316.93
7.2.00.0020.01118.36
7.1.250.0000.01416.02
7.1.200.0030.00715.66
7.1.100.0030.01317.95
7.1.70.0030.01017.29
7.1.60.0070.00417.02
7.1.50.0030.02017.18
7.1.00.0000.08022.43
7.0.200.0040.00417.07
7.0.140.0070.07322.09
7.0.80.0100.07719.88
7.0.70.0030.04720.02
7.0.60.0070.04319.86
7.0.50.0070.08020.21
7.0.40.0100.07320.13
7.0.30.0100.07320.13
7.0.20.0000.07720.11
7.0.10.0030.08720.07
7.0.00.0100.08020.14
5.6.280.0030.07321.10
5.6.230.0070.08020.63
5.6.220.0000.04720.74
5.6.210.0000.04720.57
5.6.200.0070.05321.07
5.6.190.0270.06321.01
5.6.180.0070.08021.11
5.6.170.0030.08321.01
5.6.160.0070.08020.96
5.6.150.0070.07321.18
5.6.140.0030.06721.10
5.6.130.0170.07721.03
5.6.120.0130.05721.13
5.6.110.0030.08721.02
5.6.100.0100.07321.01
5.6.90.0070.04320.94
5.6.80.0030.08020.57
5.6.70.0130.06720.48
5.6.60.0030.04320.54
5.6.50.0000.07020.31
5.6.40.0070.08020.53
5.6.30.0030.07720.30
5.6.20.0030.03320.46
5.6.10.0030.04720.42
5.6.00.0070.07320.38
5.5.370.0070.08720.39
5.5.360.0030.08720.35
5.5.350.0030.08320.43
5.5.340.0070.07320.73
5.5.330.0070.08320.88
5.5.320.0070.04720.80
5.5.310.0070.08020.90
5.5.300.0000.04720.79
5.5.290.0100.05720.86
5.5.280.0000.04720.89
5.5.270.0070.07720.87
5.5.260.0070.08320.88
5.5.250.0070.04320.57
5.5.240.0030.08020.30
5.5.230.0070.06020.14
5.5.220.0100.05020.17
5.5.210.0030.04020.27
5.5.200.0070.07020.11
5.5.190.0070.07320.27
5.5.180.0030.04720.14
5.5.160.0130.06020.16
5.5.150.0100.07019.99
5.5.140.0100.04320.21
5.5.130.0070.06320.23
5.5.120.0030.04320.17
5.5.110.0000.04320.23
5.5.100.0030.06720.07
5.5.90.0170.06020.20
5.5.80.0030.05720.07
5.5.70.0070.07020.06
5.5.60.0070.08020.06
5.5.50.0100.04020.00
5.5.40.0000.07020.15
5.5.30.0030.05020.03
5.5.20.0030.04020.14
5.5.10.0070.08019.98
5.5.00.0030.03720.10
5.4.450.0070.06719.49
5.4.440.0170.03019.47
5.4.430.0100.08019.39
5.4.420.0000.08019.44
5.4.410.0030.07019.38
5.4.400.0030.07318.91
5.4.390.0100.07019.14
5.4.380.0070.07019.12
5.4.370.0070.03319.13
5.4.360.0030.04719.04
5.4.350.0030.08019.18
5.4.340.0000.04019.03
5.4.320.0030.07719.03
5.4.310.0100.03318.84
5.4.300.0030.04019.13
5.4.290.0130.07018.84
5.4.280.0070.03718.87
5.4.270.0070.03319.09
5.4.260.0030.05319.23
5.4.250.0030.06318.86
5.4.240.0130.07018.87
5.4.230.0100.07319.13
5.4.220.0000.07719.09
5.4.210.0070.06319.12
5.4.200.0070.03319.20
5.4.190.0070.05019.03
5.4.180.0030.07019.20
5.4.170.0000.04019.04
5.4.160.0100.06719.12
5.4.150.0130.06318.82
5.4.140.0000.04016.27
5.4.130.0070.06016.35
5.4.120.0030.04316.36
5.4.110.0070.04316.39
5.4.100.0070.03016.43
5.4.90.0030.03016.39
5.4.80.0070.03016.32
5.4.70.0030.03016.51
5.4.60.0030.03016.50
5.4.50.0030.03016.45
5.4.40.0100.06016.39
5.4.30.0030.03016.44
5.4.20.0030.05316.31
5.4.10.0070.02716.39
5.4.00.0000.03315.85
5.3.290.0070.07314.59
5.3.280.0030.07314.55
5.3.270.0030.04714.57
5.3.260.0030.03714.56
5.3.250.0070.07014.62
5.3.240.0070.05714.53
5.3.230.0070.05314.52
5.3.220.0030.03714.51
5.3.210.0030.07714.57
5.3.200.0070.02714.63
5.3.190.0070.06014.62
5.3.180.0000.03314.50
5.3.170.0030.03314.51
5.3.160.0130.02314.59
5.3.150.0070.03014.51
5.3.140.0000.03714.48
5.3.130.0030.03014.66
5.3.120.0000.05314.53
5.3.110.0070.02714.60
5.3.100.0030.07314.16
5.3.90.0070.05013.98
5.3.80.0100.07014.13
5.3.70.0170.03314.15
5.3.60.0030.07714.02
5.3.50.0070.03713.82
5.3.40.0100.05314.01
5.3.30.0070.03313.89
5.3.20.0030.04713.78
5.3.10.0000.03313.75
5.3.00.0100.07013.54
5.2.170.0000.06711.04
5.2.160.0000.03711.05
5.2.150.0070.03011.19
5.2.140.0030.04711.24
5.2.130.0000.03011.02
5.2.120.0070.06011.20
5.2.110.0070.05310.99
5.2.100.0030.06011.03
5.2.90.0030.05711.12
5.2.80.0000.03011.16
5.2.70.0130.01711.19
5.2.60.0000.02711.07
5.2.50.0070.03310.95
5.2.40.0070.05710.99
5.2.30.0030.06710.86
5.2.20.0030.06710.82
5.2.10.0000.06310.72
5.2.00.0030.02310.57
5.1.60.0030.04010.08
5.1.50.0000.0239.84
5.1.40.0070.02710.10
5.1.30.0070.01710.32
5.1.20.0000.04710.30
5.1.10.0030.05710.14
5.1.00.0030.05710.10
5.0.50.0000.0238.66
5.0.40.0000.0478.42
5.0.30.0030.0608.21
5.0.20.0000.0338.19
5.0.10.0030.0138.27
5.0.00.0000.0278.05
4.4.90.0030.0307.27
4.4.80.0000.0277.27
4.4.70.0070.0277.27
4.4.60.0030.0337.27
4.4.50.0100.0277.27
4.4.40.0000.0207.27
4.4.30.0030.0337.27
4.4.20.0000.0177.27
4.4.10.0030.0307.27
4.4.00.0030.0507.27
4.3.110.0030.0207.27
4.3.100.0030.0307.27
4.3.90.0000.0337.27
4.3.80.0030.0507.27
4.3.70.0000.0137.27
4.3.60.0030.0107.27
4.3.50.0030.0107.27
4.3.40.0000.0207.27
4.3.30.0000.0137.27
4.3.20.0000.0137.27
4.3.10.0000.0137.27
4.3.00.0000.0137.27

preferences:
37.09 ms | 400 KiB | 5 Q