3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getthistime($type, $modify = null){ $now = new DateTime(null, new DateTimeZone('Asia/Baghdad')); if($modify){ $now->modify($modify); } if(!isset($type) || $type == 'datetime'){ return $now->format('Y-m-d H:i:s'); } if($type == 'time'){ return $now->format('H:i:s'); } if($type == 'timestamp'){ return $now->getTimestamp(); } } function timestampfromdate($date){ return DateTime::createFromFormat('Y-m-d H:i:s', $date, new DateTimeZone('Asia/Baghdad'))->getTimestamp(); } echo getthistime('timestamp')."--".timestampfromdate(getthistime('datetime'))."--".strtotime(getthistime('datetime'));

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.140.0150.00016.73
8.3.130.0120.00318.50
8.3.120.0100.01019.02
8.3.110.0140.00720.94
8.3.100.0120.00024.06
8.3.90.0070.00726.77
8.3.80.0030.00618.68
8.3.70.0060.01017.00
8.3.60.0110.00416.73
8.3.50.0080.01322.24
8.3.40.0120.00918.91
8.3.30.0090.00618.68
8.3.20.0040.00421.04
8.3.10.0070.00021.89
8.3.00.0030.00519.67
8.2.250.0030.00517.06
8.2.240.0040.00419.16
8.2.230.0030.00622.58
8.2.220.0060.00337.54
8.2.210.0070.00726.77
8.2.200.0060.00317.13
8.2.190.0070.01118.39
8.2.180.0160.00625.92
8.2.170.0150.00319.11
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.90
8.2.110.0070.00419.26
8.2.100.0070.00318.16
8.2.90.0030.00619.46
8.2.80.0030.00519.29
8.2.70.0000.00818.05
8.2.60.0050.00318.34
8.2.50.0080.00018.07
8.2.40.0080.00018.35
8.2.30.0040.00418.30
8.2.20.0000.00817.84
8.2.10.0050.00318.13
8.2.00.0090.00318.27
8.1.300.0150.00420.22
8.1.290.0030.00630.84
8.1.280.0120.00425.92
8.1.270.0060.00324.66
8.1.260.0040.00426.35
8.1.250.0020.00528.09
8.1.240.0060.00322.02
8.1.230.0000.01120.93
8.1.220.0080.00017.78
8.1.210.0040.00418.84
8.1.200.0040.00417.47
8.1.190.0050.00317.48
8.1.180.0040.00418.10
8.1.170.0030.00718.78
8.1.160.0070.00019.00
8.1.150.0040.00419.04
8.1.140.0050.00319.69
8.1.130.0040.00417.60
8.1.120.0070.00017.77
8.1.110.0000.00717.64
8.1.100.0070.00017.72
8.1.90.0080.00017.72
8.1.80.0040.00417.72
8.1.70.0000.00717.79
8.1.60.0000.00817.84
8.1.50.0030.00617.71
8.1.40.0000.00817.77
8.1.30.0040.00417.86
8.1.20.0020.00517.89
8.1.10.0030.00517.77
8.1.00.0060.00317.67
8.0.300.0000.00820.16
8.0.290.0060.00316.88
8.0.280.0030.00318.66
8.0.270.0030.00517.09
8.0.260.0030.00317.05
8.0.250.0030.00517.30
8.0.240.0000.01117.20
8.0.230.0000.00717.20
8.0.220.0030.00617.23
8.0.210.0070.00017.15
8.0.200.0070.00017.12
8.0.190.0050.00517.22
8.0.180.0060.00317.10
8.0.170.0040.00417.21
8.0.160.0000.00817.22
8.0.150.0000.00717.13
8.0.140.0030.00917.09
8.0.130.0030.00313.51
8.0.120.0080.00017.18
8.0.110.0050.00417.20
8.0.100.0000.00717.16
8.0.90.0070.00017.16
8.0.80.0130.01017.14
8.0.70.0030.00517.28
8.0.60.0040.00417.16
8.0.50.0050.00317.11
8.0.30.0130.00717.41
8.0.20.0100.00917.40
8.0.10.0050.00317.31
8.0.00.0110.00717.15
7.4.330.0000.00515.08
7.4.320.0030.00316.79
7.4.300.0040.00416.70
7.4.290.0000.00816.71
7.4.280.0060.00316.70
7.4.270.0030.00316.71
7.4.260.0050.00316.63
7.4.250.0050.00316.70
7.4.240.0020.00516.80
7.4.230.0070.00016.89
7.4.220.0160.01016.73
7.4.210.0090.00616.79
7.4.200.0040.00416.89
7.4.160.0030.01316.79
7.4.150.0060.01117.40
7.4.140.0090.00817.86
7.4.130.0130.01016.72
7.4.120.0130.00516.77
7.4.110.0070.01116.89
7.4.100.0030.01216.75
7.4.90.0100.00716.70
7.4.80.0090.00919.39
7.4.70.0070.01016.59
7.4.60.0030.01416.71
7.4.50.0000.01616.61
7.4.40.0040.01216.78
7.4.30.0070.01016.79
7.4.00.0040.00815.24
7.3.330.0030.00313.51
7.3.320.0030.00313.43
7.3.310.0030.00316.53
7.3.300.0060.00016.37
7.3.290.0000.00816.48
7.3.280.0130.00616.47
7.3.270.0110.01417.40
7.3.260.0090.00916.73
7.3.250.0120.00616.73
7.3.240.0120.00616.85
7.3.230.0170.00016.82
7.3.210.0030.01416.65
7.3.200.0160.00016.64
7.3.190.0060.00916.50
7.3.180.0210.00016.54
7.3.170.0140.00416.76
7.3.160.0130.01016.67
7.3.10.0140.00716.52
7.3.00.0090.00916.95
7.2.330.0130.00316.66
7.2.320.0140.01017.04
7.2.310.0090.01216.96
7.2.300.0070.01116.71
7.2.290.0090.01516.90
7.2.130.0160.00916.93
7.2.120.0140.01117.15
7.2.110.0170.00616.82
7.2.100.0120.00816.66
7.2.90.0120.01216.99
7.2.80.0090.00917.03
7.2.70.0100.01416.97
7.2.60.0150.01016.84
7.2.50.0150.00616.95
7.2.40.0160.00817.06
7.2.30.0160.00017.06
7.2.20.0130.00917.05
7.2.10.0070.01016.91
7.2.00.0110.00418.22
7.1.250.0130.00715.92
7.1.240.0140.01015.92
7.1.230.0070.01415.69
7.1.220.0140.00915.58
7.1.210.0070.01315.61
7.1.200.0120.00915.76
7.1.190.0030.00915.86
7.1.180.0150.00315.83
7.1.170.0100.01015.72
7.1.160.0100.00715.74
7.1.150.0140.00315.84
7.1.140.0100.00715.60
7.1.130.0070.00716.04
7.1.120.0110.00717.33
7.1.110.0090.00817.57
7.1.100.0120.00917.46
7.1.90.0090.00817.61
7.1.80.0080.01017.53
7.1.70.0230.00516.77
7.1.60.0140.01026.01
7.1.50.0150.01225.82
7.1.40.0160.00825.58
7.1.30.0130.01125.52
7.1.20.0160.00925.61
7.1.10.0080.00716.54
7.1.00.0070.01016.55
7.0.330.0120.00915.14
7.0.320.0090.00915.46
7.0.310.0120.00615.52
7.0.300.0060.00915.31
7.0.290.0100.01015.38
7.0.280.0000.01415.36
7.0.270.0150.00015.30
7.0.260.0090.00817.04
7.0.250.0110.00817.00
7.0.240.0110.01016.99
7.0.230.0090.00917.15
7.0.220.0050.01117.04
7.0.210.0090.00716.44
7.0.200.0060.00916.72
7.0.190.0050.01016.33
7.0.180.0050.01116.28
7.0.170.0060.01116.34
7.0.160.0060.01116.30
7.0.150.0080.00816.17
7.0.140.0040.01116.22
7.0.130.0080.00816.33
7.0.120.0100.00516.33
7.0.110.0100.00616.23
7.0.100.0060.00916.36
7.0.90.0070.00816.27
7.0.80.0090.00516.28
7.0.70.0050.01016.13
7.0.60.0080.00916.13
7.0.50.0100.00616.34
7.0.40.0060.00815.82
7.0.30.0070.00815.75
7.0.20.0060.00815.84
7.0.10.0040.00915.91
7.0.00.0050.00915.93
5.6.380.0070.01214.34
5.6.370.0090.00314.37
5.6.360.0100.01014.61
5.6.350.0040.00814.48
5.6.340.0060.01314.55
5.6.330.0140.01014.15
5.6.320.0060.00614.24
5.6.310.0030.01614.18
5.6.300.0080.04519.20
5.6.290.0120.04219.16
5.6.280.0090.04519.29
5.6.270.0050.04419.35
5.6.260.0120.03719.21
5.6.250.0070.04419.28
5.6.240.0080.03919.25
5.6.230.0060.04619.22
5.6.220.0070.04619.26
5.6.210.0100.04219.35
5.6.200.0140.04919.29
5.6.190.0080.04219.17
5.6.180.0090.04019.32
5.6.170.0060.04719.24
5.6.160.0070.04219.15
5.6.150.0020.05319.30
5.6.140.0030.04619.24
5.6.130.0070.04219.32
5.6.120.0080.04519.23
5.6.110.0080.04319.20
5.6.100.0060.05019.11
5.6.90.0080.05519.21
5.6.80.0090.04118.76
5.6.70.0080.05118.88
5.6.60.0080.04018.78
5.6.50.0090.03718.67
5.6.40.0070.04818.65
5.6.30.0110.04018.78
5.6.20.0090.04418.76
5.6.10.0070.03918.70
5.6.00.0050.04518.60
5.5.380.0070.04115.92
5.5.370.0060.04215.93
5.5.360.0050.04916.04
5.5.350.0040.04815.95
5.5.340.0060.04516.22
5.5.330.0050.04216.36
5.5.320.0050.04116.28
5.5.310.0120.04016.32
5.5.300.0070.04016.23
5.5.290.0050.04216.28
5.5.280.0080.03916.23
5.5.270.0030.04516.21
5.5.260.0110.03816.27
5.5.250.0070.03816.20
5.5.240.0060.04715.84
5.5.230.0050.04415.83
5.5.220.0070.04115.72
5.5.210.0070.04015.75
5.5.200.0070.04115.70
5.5.190.0080.04315.83
5.5.180.0050.04215.77
5.5.170.0070.00011.15
5.5.160.0080.04315.82
5.5.150.0080.03615.72
5.5.140.0040.04415.80
5.5.130.0080.04015.72
5.5.120.0110.04415.73
5.5.110.0080.03715.71
5.5.100.0040.05315.64
5.5.90.0030.04515.78
5.5.80.0080.04115.75
5.5.70.0090.03715.67
5.5.60.0080.03515.75
5.5.50.0070.04415.67
5.5.40.0060.03715.65
5.5.30.0090.03415.79
5.5.20.0100.03615.75
5.5.10.0060.03815.71
5.5.00.0080.03615.82
5.4.450.0080.04217.31
5.4.440.0080.04217.13
5.4.430.0070.03817.18
5.4.420.0100.03717.42
5.4.410.0110.03617.18
5.4.400.0100.04417.13
5.4.390.0070.03916.98
5.4.380.0070.04217.11
5.4.370.0080.03817.09
5.4.360.0040.04217.16
5.4.350.0050.04017.11
5.4.340.0100.03817.11
5.4.330.0170.00210.96
5.4.320.0110.03517.04
5.4.310.0070.03717.05
5.4.300.0100.04017.02
5.4.290.0100.03517.01
5.4.280.0060.03917.05
5.4.270.0120.04116.97
5.4.260.0080.04417.09
5.4.250.0060.03817.10
5.4.240.0040.04016.99
5.4.230.0070.03716.97
5.4.220.0130.04217.02
5.4.210.0100.03416.96
5.4.200.0070.04516.96
5.4.190.0080.04217.06
5.4.180.0080.03917.05
5.4.170.0080.03617.10
5.4.160.0080.03417.05
5.4.150.0110.03516.91
5.4.140.0040.04015.16
5.4.130.0120.03615.21
5.4.120.0070.03915.28
5.4.110.0110.03015.31
5.4.100.0060.03515.32
5.4.90.0070.03915.23
5.4.80.0110.03515.23
5.4.70.0070.03415.21
5.4.60.0060.03715.12
5.4.50.0110.03015.14
5.4.40.0070.03415.32
5.4.30.0070.03415.30
5.4.20.0050.03615.30
5.4.10.0060.03715.34
5.4.00.0110.04115.02
5.3.290.0100.03514.33
5.3.280.0050.03914.24
5.3.270.0070.03714.31
5.3.260.0080.03514.23
5.3.250.0100.03914.25
5.3.240.0080.03514.31
5.3.230.0060.03514.24
5.3.220.0070.03614.23
5.3.210.0080.03514.19
5.3.200.0090.03714.17
5.3.190.0060.03614.10
5.3.180.0050.03914.25
5.3.170.0070.03614.12
5.3.160.0060.04214.21
5.3.150.0050.04014.29
5.3.140.0080.03914.16
5.3.130.0080.03614.19
5.3.120.0040.04514.26
5.3.110.0100.04014.23
5.3.100.0080.03514.01
5.3.90.0040.04713.95
5.3.80.0090.03813.87
5.3.70.0060.03814.02
5.3.60.0080.03614.00
5.3.50.0050.03513.82
5.3.40.0080.03213.92
5.3.30.0070.03613.86
5.3.20.0090.03113.79
5.3.10.0080.03813.70
5.3.00.0080.03213.71
5.2.170.0060.03012.36
5.2.160.0070.02512.29
5.2.150.0080.02712.30
5.2.140.0050.03512.25
5.2.130.0060.02912.31
5.2.120.0060.02812.29
5.2.110.0030.02812.28
5.2.100.0070.02512.30
5.2.90.0020.03012.25
5.2.80.0080.02812.31
5.2.70.0040.02912.25
5.2.60.0060.02712.30
5.2.50.0050.02812.27
5.2.40.0050.02712.20
5.2.30.0020.03212.13
5.2.20.0060.02812.25
5.2.10.0040.02812.16
5.2.00.0030.02912.10
5.1.60.0060.02211.69
5.1.50.0060.02311.71
5.1.40.0060.02411.73
5.1.30.0040.02711.83
5.1.20.0060.02511.79
5.1.10.0060.02411.78
5.1.00.0040.02511.70
5.0.50.0050.01911.06
5.0.40.0060.01910.91
5.0.30.0060.02810.89
5.0.20.0060.01810.81
5.0.10.0050.01910.79
5.0.00.0120.02510.86
4.4.90.0030.01610.44
4.4.80.0040.01410.44
4.4.70.0010.01710.44
4.4.60.0040.01510.44
4.4.50.0020.01610.44
4.4.40.0040.02210.44
4.4.30.0020.01610.44
4.4.20.0040.01510.44
4.4.10.0030.01610.44
4.4.00.0020.02410.44
4.3.110.0020.01710.44
4.3.100.0030.01510.44
4.3.90.0040.01310.44
4.3.80.0040.02310.44
4.3.70.0040.01510.44
4.3.60.0020.01710.44
4.3.50.0040.01410.44
4.3.40.0040.02110.44
4.3.30.0040.01810.44
4.3.20.0010.01910.44
4.3.10.0040.01510.44
4.3.00.0060.01410.44

preferences:
23.88 ms | 403 KiB | 5 Q