3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = date("Y-m-d H:i:s"); // current time; viz since I'm in India, it'll set Current Indian Time i.e. 2014-04-28 02:31:58 (exactly like this) $info['lastboot'] = "2014-04-27 01:55:55"; // I'm assuming this as your last boot time stored in your DB //Now to compare both the time value, convert them to exact seconds using PHP buit-in function `strtotime()` //What strtotime() does is convert the string date viz. 2014-04-28 02:31:58 into seconds. //These seconds are counted from the UNIX EPOCH i.e since 01 Jan 1970 00:00:00 $date_to_sec_1 = strtotime($date); $date_to_sec_2 = strtotime($info['lastboot']); if($date_to_sec_1 > $date_to_sec_2) { echo "You need to wait for ".($date_to_sec_1-$date_to_sec_2)." seconds before next boot"; } else { // else part }

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.70.0160.00018.38
8.3.60.0110.00718.55
8.3.50.0080.01022.04
8.3.40.0180.00419.22
8.3.30.0110.00419.21
8.3.20.0040.00420.39
8.3.10.0080.00021.92
8.3.00.0080.00022.64
8.2.190.0110.00418.29
8.2.180.0120.00616.88
8.2.170.0110.00622.96
8.2.160.0160.00320.92
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0040.00419.39
8.2.110.0070.00321.00
8.2.100.0140.00017.78
8.2.90.0000.00819.17
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0000.00718.15
8.2.50.0040.00418.10
8.2.40.0090.00020.43
8.2.30.0030.00518.17
8.2.20.0040.00417.91
8.2.10.0040.00419.78
8.2.00.0060.00317.96
8.1.280.0040.01125.92
8.1.270.0040.00422.20
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00322.19
8.1.230.0100.00017.95
8.1.220.0050.00317.74
8.1.210.0000.00918.77
8.1.200.0060.00617.60
8.1.190.0050.00317.48
8.1.180.0040.00418.10
8.1.170.0040.00418.63
8.1.160.0070.00022.13
8.1.150.0050.00318.87
8.1.140.0040.00417.37
8.1.130.0030.00517.91
8.1.120.0000.00817.70
8.1.110.0040.00417.65
8.1.100.0040.00417.65
8.1.90.0040.00417.52
8.1.80.0070.00017.71
8.1.70.0040.00417.59
8.1.60.0060.00317.63
8.1.50.0030.00617.52
8.1.40.0000.00817.54
8.1.30.0080.00017.59
8.1.20.0030.00517.60
8.1.10.0000.00717.58
8.1.00.0060.00317.70
8.0.300.0070.00018.77
8.0.290.0000.00716.88
8.0.280.0070.00018.40
8.0.270.0020.00517.02
8.0.260.0030.00317.03
8.0.250.0000.00717.10
8.0.240.0030.00517.11
8.0.230.0000.00817.16
8.0.220.0050.00216.96
8.0.210.0070.00017.12
8.0.200.0000.00917.19
8.0.190.0050.00217.07
8.0.180.0000.00717.09
8.0.170.0000.00817.14
8.0.160.0000.00717.09
8.0.150.0040.00416.99
8.0.140.0040.00417.05
8.0.130.0030.00313.49
8.0.120.0040.00417.03
8.0.110.0000.00716.98
8.0.100.0040.00416.92
8.0.90.0040.00417.11
8.0.80.0100.00617.09
8.0.70.0000.00717.09
8.0.60.0070.00016.91
8.0.50.0000.00817.04
8.0.30.0130.00817.29
8.0.20.0120.01017.40
8.0.10.0090.00016.99
8.0.00.0100.01016.84
7.4.330.0060.00015.00
7.4.320.0000.00716.48
7.4.300.0000.00616.66
7.4.290.0040.00416.66
7.4.280.0070.00016.59
7.4.270.0000.00816.63
7.4.260.0040.00416.52
7.4.250.0040.00416.64
7.4.240.0040.00416.70
7.4.230.0000.00716.75
7.4.220.0190.00916.70
7.4.210.0050.00916.72
7.4.200.0070.00016.52
7.4.190.0030.00316.57
7.4.160.0090.00616.74
7.4.150.0090.00917.40
7.4.140.0040.01417.86
7.4.130.0050.01416.71
7.4.120.0080.01116.72
7.4.110.0060.01116.84
7.4.100.0070.01016.67
7.4.90.0130.00716.64
7.4.80.0000.02019.39
7.4.70.0100.01016.55
7.4.60.0080.01216.69
7.4.50.0000.00816.41
7.4.40.0060.01322.77
7.4.30.0110.00516.62
7.4.10.0000.01115.20
7.4.00.0090.00815.13
7.3.330.0000.00613.37
7.3.320.0030.00313.29
7.3.310.0000.00716.29
7.3.300.0000.00716.50
7.3.290.0070.01116.41
7.3.280.0100.00916.44
7.3.270.0100.00617.40
7.3.260.0180.00316.58
7.3.250.0060.01116.55
7.3.240.0070.01016.50
7.3.230.0060.01516.68
7.3.210.0100.01016.71
7.3.200.0120.00619.39
7.3.190.0150.01116.70
7.3.180.0120.00316.38
7.3.170.0100.01316.52
7.3.160.0130.00316.60
7.3.130.0070.01015.08
7.3.120.0110.00614.92
7.3.110.0100.00615.14
7.3.100.0030.00914.91
7.3.90.0070.00715.05
7.3.80.0080.00514.93
7.3.70.0080.00515.02
7.3.60.0090.00514.85
7.3.50.0040.00914.98
7.3.40.0110.00514.97
7.3.30.0040.01114.81
7.3.20.0030.01216.92
7.3.10.0050.00916.64
7.3.00.0100.00616.84
7.2.330.0080.00816.68
7.2.320.0140.00316.48
7.2.310.0070.01016.72
7.2.300.0140.00916.77
7.2.290.0140.00617.02
7.2.260.0000.01715.41
7.2.250.0120.00615.35
7.2.240.0030.01215.28
7.2.230.0090.00915.30
7.2.220.0070.00715.01
7.2.210.0010.01115.17
7.2.200.0110.00615.19
7.2.190.0070.00515.22
7.2.180.0090.00515.25
7.2.170.0070.00515.29
7.2.160.0060.00915.16
7.2.150.0050.01116.94
7.2.140.0070.00817.13
7.2.130.0080.00717.08
7.2.120.0070.00716.88
7.2.110.0090.00517.06
7.2.100.0070.01016.93
7.2.90.0070.01016.95
7.2.80.0060.00917.07
7.2.70.0070.00416.98
7.2.60.0090.00716.94
7.2.50.0090.00617.24
7.2.40.0070.00917.04
7.2.30.0110.00417.19
7.2.20.0060.01217.01
7.2.10.0080.00816.96
7.2.00.0060.01017.76
7.1.330.0040.01115.98
7.1.320.0090.00615.80
7.1.310.0070.00715.86
7.1.300.0110.00415.98
7.1.290.0040.00916.01
7.1.280.0040.00916.05
7.1.270.0020.00915.90
7.1.260.0050.01216.04
7.1.250.0080.00816.03
7.1.240.0070.00716.07
7.1.230.0000.01115.99
7.1.220.0030.00815.76
7.1.210.0090.00616.11
7.1.200.0030.01015.91
7.1.190.0070.00715.99
7.1.180.0000.01816.13
7.1.170.0070.01016.18
7.1.160.0030.00616.14
7.1.150.0070.00715.74
7.1.140.0030.01215.78
7.1.130.0030.01016.10
7.1.120.0040.00816.13
7.1.110.0040.01115.74
7.1.100.0030.01117.03
7.1.90.0030.01016.03
7.1.80.0000.01415.71
7.1.70.0040.00416.63
7.1.60.0110.00817.96
7.1.50.0050.01116.59
7.1.40.0070.00715.92
7.1.30.0040.00415.69
7.1.20.0090.00615.96
7.1.10.0030.01315.96
7.1.00.0040.04019.21
7.0.330.0070.00715.60
7.0.320.0060.00615.59
7.0.310.0070.01015.55
7.0.300.0000.00815.20
7.0.290.0080.00315.59
7.0.280.0130.00015.67
7.0.270.0000.01715.66
7.0.260.0070.00715.63
7.0.250.0060.00315.64
7.0.240.0090.00315.73
7.0.230.0050.00815.68
7.0.220.0030.01315.48
7.0.210.0040.01215.40
7.0.200.0060.00316.28
7.0.190.0100.00615.62
7.0.180.0120.00015.58
7.0.170.0070.00715.54
7.0.160.0050.00315.60
7.0.150.0040.01115.52
7.0.140.0040.04018.90
7.0.130.0000.01315.63
7.0.120.0030.00915.59
7.0.110.0000.01715.57
7.0.100.0000.01415.67
7.0.90.0030.01015.50
7.0.80.0370.04117.74
7.0.70.0310.03917.76
7.0.60.0330.04017.89
7.0.50.0330.04217.93
7.0.40.0110.04116.79
7.0.30.0040.04916.87
7.0.20.0070.04816.83
7.0.10.0050.03316.96
7.0.00.0100.04216.94
5.6.400.0030.00714.54
5.6.390.0000.01114.84
5.6.380.0080.00014.51
5.6.370.0000.01214.55
5.6.360.0110.00314.79
5.6.350.0120.00014.61
5.6.340.0000.01414.86
5.6.330.0080.00414.66
5.6.320.0000.00914.57
5.6.310.0060.01214.39
5.6.300.0080.00314.71
5.6.290.0000.01114.96
5.6.280.0100.03717.56
5.6.270.0000.01514.46
5.6.260.0030.01214.80
5.6.250.0040.01114.75
5.6.240.0060.00614.91
5.6.230.0030.04017.56
5.6.220.0020.05217.71
5.6.210.0110.04417.53
5.6.200.0090.04817.66
5.6.190.0120.04517.87
5.6.180.0050.04317.77
5.6.170.0050.05217.71
5.6.160.0130.04017.69
5.6.150.0030.04117.70
5.6.140.0100.04717.78
5.6.130.0030.03817.92
5.6.120.0110.04417.86
5.6.110.0050.04217.69
5.6.100.0100.03117.96
5.6.90.0070.04717.84
5.6.80.0080.04317.65
5.6.70.0050.02717.37
5.6.60.0070.04217.45
5.6.50.0000.03217.50
5.6.40.0030.04717.51
5.6.30.0100.04217.60
5.6.20.0060.03117.46
5.6.10.0070.03017.42
5.6.00.0070.04017.38
5.5.380.0060.00614.53
5.5.370.0020.02917.46
5.5.360.0080.04317.40
5.5.350.0050.02717.45
5.5.340.0080.04517.57
5.5.330.0100.03217.84
5.5.320.0030.03017.66
5.5.310.0050.03217.65
5.5.300.0120.04217.57
5.5.290.0110.02617.73
5.5.280.0050.03917.70
5.5.270.0060.04817.54
5.5.260.0100.02717.90
5.5.250.0080.04717.34
5.5.240.0070.02517.07
5.5.230.0090.04417.37
5.5.220.0050.02817.33
5.5.210.0070.02617.42
5.5.200.0080.03817.12
5.5.190.0120.04217.29
5.5.180.0030.04117.22
5.5.170.0070.00714.42
5.5.160.0070.04217.31
5.5.150.0100.03817.27
5.5.140.0000.04217.38
5.5.130.0120.04017.39
5.5.120.0070.04317.34
5.5.110.0090.02717.10
5.5.100.0020.02717.41
5.5.90.0070.04017.31
5.5.80.0040.03317.13
5.5.70.0030.04617.21
5.5.60.0060.02117.42
5.5.50.0030.04317.27
5.5.40.0070.04417.22
5.5.30.0090.04217.32
5.5.20.0020.03217.11
5.5.10.0030.04517.33
5.5.00.0050.04717.07
5.4.450.0050.04015.88
5.4.440.0100.02815.66
5.4.430.0070.03815.88
5.4.420.0070.03415.78
5.4.410.0030.04715.73
5.4.400.0120.04215.62
5.4.390.0050.04115.63
5.4.380.0070.04215.68
5.4.370.0080.03815.50
5.4.360.0050.04615.62
5.4.350.0060.04315.68
5.4.340.0070.03015.52
5.4.330.0040.00712.21
5.4.320.0100.03715.67
5.4.310.0060.04015.63
5.4.300.0100.03115.65
5.4.290.0020.04015.71
5.4.280.0050.03015.62
5.4.270.0100.04815.67
5.4.260.0080.02515.68
5.4.250.0050.04415.58
5.4.240.0070.04115.63
5.4.230.0050.04315.49
5.4.220.0050.04815.59
5.4.210.0070.04715.49
5.4.200.0080.04115.66
5.4.190.0020.04615.63
5.4.180.0080.04015.65
5.4.170.0100.04115.49
5.4.160.0070.02615.49
5.4.150.0070.04315.62
5.4.140.0030.04214.27
5.4.130.0080.03614.16
5.4.120.0050.02214.27
5.4.110.0030.03314.26
5.4.100.0050.04114.29
5.4.90.0030.02214.35
5.4.80.0070.03214.23
5.4.70.0000.04314.23
5.4.60.0050.02714.20
5.4.50.0040.02414.21
5.4.40.0040.03214.22
5.4.30.0040.04414.21
5.4.20.0090.03514.29
5.4.10.0100.03714.25
5.4.00.0030.03314.02
5.3.290.0090.04013.41
5.3.280.0070.02613.36
5.3.270.0030.03613.39
5.3.260.0060.03313.39
5.3.250.0010.04413.40
5.3.240.0060.02713.39
5.3.230.0030.02913.39
5.3.220.0080.02313.37
5.3.210.0050.02813.30
5.3.200.0100.04013.31
5.3.190.0050.02713.36
5.3.180.0020.03613.31
5.3.170.0030.03113.38
5.3.160.0100.03913.37
5.3.150.0020.03813.38
5.3.140.0020.02613.38
5.3.130.0050.03913.37
5.3.120.0060.04313.38
5.3.110.0050.04513.35
5.3.100.0120.02313.09
5.3.90.0030.04213.09
5.3.80.0050.04313.07
5.3.70.0070.03913.10
5.3.60.0070.03912.99
5.3.50.0030.04213.01
5.3.40.0080.02513.06
5.3.30.0050.02312.94
5.3.20.0090.02312.93
5.3.10.0090.03412.86
5.3.00.0060.04012.92
5.2.170.0070.06311.52
5.2.160.0030.06011.52
5.2.150.0030.05011.52
5.2.140.0130.05311.52
5.2.130.0100.05711.52
5.2.120.0070.05711.52
5.2.110.0030.04011.52
5.2.100.0130.03311.52
5.2.90.0100.04011.52
5.2.80.0070.05711.52
5.2.70.0030.04311.52
5.2.60.0100.06011.52
5.2.50.0070.06011.52
5.2.40.0030.05011.52
5.2.30.0000.06711.52
5.2.20.0100.06311.52
5.2.10.0030.05711.52
5.2.00.0000.06711.52
5.1.60.0070.04711.52
5.1.50.0030.05711.52
5.1.40.0070.05311.52
5.1.30.0030.05311.52
5.1.20.0000.05311.52
5.1.10.0100.05011.52
5.1.00.0070.04011.52
5.0.50.0070.04311.52
5.0.40.0070.04311.52
5.0.30.0030.05311.52
5.0.20.0000.04011.52
5.0.10.0000.04011.52
5.0.00.0070.04311.52
4.4.90.0030.03011.52
4.4.80.0030.03711.52
4.4.70.0200.02311.52
4.4.60.0100.02711.52
4.4.50.0030.02711.52
4.4.40.0000.06011.52
4.4.30.0000.02711.52
4.4.20.0030.03711.52
4.4.10.0000.02311.52
4.4.00.0030.05311.52
4.3.110.0000.03711.52
4.3.100.0030.02711.52
4.3.90.0030.03711.52
4.3.80.0030.03011.52
4.3.70.0070.02311.52
4.3.60.0070.03311.52
4.3.50.0030.03011.52
4.3.40.0000.04311.52
4.3.30.0030.02711.52
4.3.20.0030.03711.52
4.3.10.0030.02011.52
4.3.00.0000.03711.52

preferences:
38 ms | 401 KiB | 5 Q