3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dec2hex($number) { $number = strval($number); $hexvalues = array( '0','1','2','3','4','5','6','7', '8','9','A','B','C','D','E','F' ); $hexval = ''; while($number != '0') { $hexval = $hexvalues[bcmod($number, '16')] . $hexval; $number = bcdiv($number, '16', 0); } return $hexval; } $id = '14910855968770314426'; var_dump($id); $guid = dec2hex($id); var_dump($guid); $guid = wordwrap($guid, 4, '-', true); var_dump($guid);

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.0140.00718.43
8.3.50.0130.00321.97
8.3.40.0130.00318.77
8.3.30.0080.00818.59
8.3.20.0000.00818.60
8.3.10.0050.00321.14
8.3.00.0080.00023.70
8.2.180.0120.00316.63
8.2.170.0120.00322.96
8.2.160.0060.00920.44
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0050.00219.66
8.2.110.0000.00920.24
8.2.100.0080.00417.78
8.2.90.0000.00819.08
8.2.80.0050.00317.97
8.2.70.0070.00317.63
8.2.60.0000.00918.03
8.2.50.0080.00018.07
8.2.40.0050.00218.16
8.2.30.0050.00221.16
8.2.20.0040.00417.65
8.2.10.0040.00417.71
8.2.00.0040.00417.61
8.1.280.0100.00725.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00422.46
8.1.230.0000.01120.98
8.1.220.0080.00018.77
8.1.210.0030.00518.83
8.1.200.0080.00017.35
8.1.190.0080.00019.31
8.1.180.0090.00018.10
8.1.170.0040.00418.45
8.1.160.0000.00718.80
8.1.150.0000.00818.70
8.1.140.0080.00017.36
8.1.130.0030.00317.75
8.1.120.0070.00017.47
8.1.110.0000.00817.43
8.1.100.0040.00417.44
8.1.90.0070.00017.48
8.1.80.0070.00017.45
8.1.70.0030.00317.47
8.1.60.0000.00817.61
8.1.50.0040.00417.39
8.1.40.0040.00417.50
8.1.30.0030.00517.66
8.1.20.0060.00317.54
8.1.10.0050.00317.55
8.1.00.0040.00417.38
8.0.300.0080.00019.98
8.0.290.0070.00017.05
8.0.280.0000.00718.41
8.0.270.0000.00817.17
8.0.260.0080.00016.87
8.0.250.0060.00316.95
8.0.240.0050.00316.95
8.0.230.0040.00416.90
8.0.220.0040.00416.77
8.0.210.0030.00316.84
8.0.200.0030.00516.89
8.0.190.0000.00816.94
8.0.180.0040.00416.90
8.0.170.0000.00716.80
8.0.160.0030.00316.87
8.0.150.0000.00716.82
8.0.140.0040.00716.75
8.0.130.0000.00613.34
8.0.120.0040.00416.80
8.0.110.0080.00016.88
8.0.100.0070.00016.73
8.0.90.0000.00816.74
8.0.80.0160.00316.95
8.0.70.0040.00417.01
8.0.60.0000.00816.96
8.0.50.0040.00416.90
8.0.30.0100.01017.25
8.0.20.0080.01017.40
8.0.10.0050.00316.87
8.0.00.0130.00516.97
7.4.330.0000.00514.88
7.4.320.0030.00316.65
7.4.300.0060.00016.60
7.4.290.0000.00816.52
7.4.280.0000.00816.49
7.4.270.0000.00716.44
7.4.260.0030.00313.18
7.4.250.0040.00416.32
7.4.240.0000.00716.61
7.4.230.0030.00316.71
7.4.220.0040.01516.46
7.4.210.0050.01016.55
7.4.200.0030.00516.34
7.4.190.0000.00716.38
7.4.160.0150.00716.69
7.4.150.0130.01217.40
7.4.140.0100.01017.86
7.4.130.0080.01116.45
7.4.120.0050.01216.48
7.4.110.0070.01116.33
7.4.100.0160.00316.59
7.4.90.0180.00016.41
7.4.80.0030.01719.37
7.4.70.0080.00816.38
7.4.60.0130.00316.52
7.4.50.0060.00316.46
7.4.40.0060.01322.52
7.4.30.0170.00016.39
7.4.00.0080.01014.80
7.3.330.0000.00513.37
7.3.320.0130.00013.34
7.3.310.0040.00416.26
7.3.300.0040.00416.38
7.3.290.0100.00316.32
7.3.280.0070.01016.27
7.3.270.0140.00317.40
7.3.260.0130.01018.24
7.3.250.0080.01016.44
7.3.240.0100.01316.22
7.3.230.0120.00616.64
7.3.210.0000.01816.38
7.3.200.0030.02019.39
7.3.190.0070.01016.71
7.3.180.0090.00916.27
7.3.170.0120.00616.27
7.3.160.0120.00316.53
7.3.120.0090.00714.67
7.3.110.0070.01214.68
7.3.100.0090.00614.91
7.3.90.0080.00614.67
7.3.80.0090.00614.88
7.3.70.0040.00914.94
7.3.60.0060.00914.72
7.3.50.0090.00314.81
7.3.40.0050.00514.82
7.3.30.0070.00714.89
7.3.20.0050.00816.63
7.3.10.0080.00516.50
7.3.00.0120.00216.51
7.2.330.0170.00016.59
7.2.320.0070.01316.77
7.2.310.0100.01016.81
7.2.300.0070.01016.72
7.2.290.0090.01516.44
7.2.250.0100.01014.95
7.2.240.0080.01014.80
7.2.230.0060.00714.78
7.2.220.0080.00615.08
7.2.210.0080.00815.28
7.2.200.0140.00015.08
7.2.190.0030.00915.06
7.2.180.0080.00515.08
7.2.170.0060.01115.09
7.2.160.0110.00414.89
7.2.150.0030.00716.63
7.2.140.0070.00616.68
7.2.130.0090.00616.80
7.2.120.0070.00716.93
7.2.110.0130.00316.72
7.2.100.0030.00616.91
7.2.90.0040.01116.77
7.2.80.0040.01416.90
7.2.70.0070.00316.77
7.2.60.0110.00317.05
7.2.50.0070.01116.68
7.2.40.0070.01016.49
7.2.30.0060.00916.98
7.2.20.0060.00916.79
7.2.10.0030.01216.90
7.2.00.0040.01018.03
7.1.330.0050.01115.79
7.1.320.0060.00915.82
7.1.310.0040.00815.87
7.1.300.0050.00715.86
7.1.290.0050.00815.79
7.1.280.0040.00615.78
7.1.270.0050.00715.71
7.1.260.0060.00615.87
7.1.250.0030.00815.72
7.1.240.0110.00315.54
7.1.230.0060.00815.58
7.1.220.0000.01115.50
7.1.210.0070.00415.98
7.1.200.0070.00715.80
7.1.190.0110.00015.77
7.1.180.0080.00815.79
7.1.170.0000.01515.63
7.1.160.0000.01315.72
7.1.150.0030.00615.76
7.1.140.0110.00315.93
7.1.130.0000.01415.55
7.1.120.0070.00715.66
7.1.110.0030.01015.63
7.1.100.0030.00917.04
7.1.90.0000.01315.80
7.1.80.0060.00615.90
7.1.70.0050.00916.68
7.1.60.0060.01417.68
7.1.50.0050.01516.32
7.1.40.0110.00415.79
7.1.30.0030.01015.71
7.1.20.0030.00915.90
7.1.10.0060.00615.81
7.1.00.0090.03219.13
7.0.330.0060.00615.53
7.0.320.0030.00615.39
7.0.310.0100.00715.17
7.0.300.0070.00715.29
7.0.290.0040.01215.45
7.0.280.0070.00715.29
7.0.270.0000.01315.53
7.0.260.0090.00315.23
7.0.250.0070.00715.23
7.0.240.0070.00415.19
7.0.230.0100.00015.18
7.0.220.0070.01015.48
7.0.210.0000.01015.32
7.0.200.0030.01016.12
7.0.190.0070.00315.34
7.0.180.0040.00415.48
7.0.170.0040.00815.52
7.0.160.0070.00715.21
7.0.150.0040.00415.43
7.0.140.0070.03518.67
7.0.130.0030.01015.62
7.0.120.0080.00415.36
7.0.110.0060.00615.32
7.0.100.0030.01015.54
7.0.90.0000.01515.36
7.0.80.0070.01315.44
7.0.70.0050.04418.59
7.0.60.0030.04818.69
7.0.50.0050.03618.74
7.0.40.0080.03116.76
7.0.30.0050.02916.82
7.0.20.0050.02516.75
7.0.10.0080.04116.77
7.0.00.0020.03616.63
5.6.400.0070.00714.52
5.6.390.0100.00714.40
5.6.380.0100.00714.27
5.6.370.0070.00714.39
5.6.360.0060.00914.32
5.6.350.0070.00314.54
5.6.340.0050.00314.22
5.6.330.0110.00014.15
5.6.320.0090.00614.41
5.6.310.0100.00714.34
5.6.300.0080.00314.43
5.6.290.0060.00614.46
5.6.280.0070.03717.66
5.6.270.0060.00614.23
5.6.260.0080.00014.38
5.6.250.0030.00814.22
5.6.240.0030.00814.26
5.6.230.0140.00714.50
5.6.220.0030.04717.48
5.6.210.0100.03917.48
5.6.200.0020.02717.75
5.6.190.0080.04217.71
5.6.180.0080.04317.87
5.6.170.0020.04817.65
5.6.160.0050.03317.61
5.6.150.0080.04517.81
5.6.140.0060.04817.59
5.6.130.0050.04417.62
5.6.120.0020.05017.77
5.6.110.0060.02317.78
5.6.100.0070.03317.79
5.6.90.0070.03217.75
5.6.80.0070.02717.21
5.6.70.0040.02517.35
5.6.60.0030.03317.19
5.6.50.0060.03117.37
5.6.40.0050.02517.36
5.6.30.0030.04117.41
5.6.20.0060.03817.44
5.6.10.0030.03417.37
5.6.00.0030.04417.37
5.5.380.0040.01214.22
5.5.370.0040.00814.33
5.5.360.0070.03717.32
5.5.350.0000.05217.29
5.5.340.0060.02517.59
5.5.330.0100.04317.58
5.5.320.0050.04217.61
5.5.310.0020.04817.70
5.5.300.0050.04517.50
5.5.290.0050.04117.55
5.5.280.0070.04417.63
5.5.270.0050.04517.46
5.5.260.0050.04317.58
5.5.250.0050.03517.55
5.5.240.0050.02617.22
5.5.230.0040.03217.17
5.5.220.0060.03317.26
5.5.210.0010.02717.18
5.5.200.0030.03017.21
5.5.190.0020.04717.26
5.5.180.0050.04817.18
5.5.170.0060.00614.23
5.5.160.0050.02917.24
5.5.150.0050.04117.16
5.5.140.0060.04117.21
5.5.130.0020.04817.30
5.5.120.0050.04517.31
5.5.110.0030.04417.06
5.5.100.0050.04517.14
5.5.90.0080.03917.29
5.5.80.0100.03917.26
5.5.70.0080.04217.28
5.5.60.0040.04017.02
5.5.50.0050.04316.93
5.5.40.0060.04417.17
5.5.30.0070.02317.09
5.5.20.0090.02217.06
5.5.10.0090.04216.91
5.5.00.0040.03116.95
5.4.450.0080.03915.65
5.4.440.0050.04615.75
5.4.430.0090.02515.75
5.4.420.0050.04415.73
5.4.410.0030.04115.59
5.4.400.0010.04315.50
5.4.390.0090.01915.58
5.4.380.0060.03015.57
5.4.370.0050.02515.59
5.4.360.0020.02515.39
5.4.350.0020.03515.51
5.4.340.0030.03515.42
5.4.330.0040.00811.94
5.4.320.0030.04315.56
5.4.310.0050.04115.55
5.4.300.0050.03815.53
5.4.290.0070.03815.49
5.4.280.0050.04515.49
5.4.270.0020.03215.58
5.4.260.0100.03715.51
5.4.250.0060.04015.57
5.4.240.0040.04215.44
5.4.230.0000.04515.43
5.4.220.0090.04015.42
5.4.210.0050.03815.48
5.4.200.0010.03315.48
5.4.190.0020.02315.54
5.4.180.0050.02515.40
5.4.170.0030.04515.53
5.4.160.0030.04415.48
5.4.150.0060.04115.40
5.4.140.0070.03314.19
5.4.130.0090.03514.17
5.4.120.0100.02814.24
5.4.110.0060.02814.20
5.4.100.0020.03514.17
5.4.90.0020.03414.17
5.4.80.0030.04214.18
5.4.70.0020.04214.18
5.4.60.0020.03714.17
5.4.50.0080.03714.15
5.4.40.0030.04214.14
5.4.30.0040.04014.17
5.4.20.0070.03514.12
5.4.10.0000.04314.12
5.4.00.0070.03513.79
5.3.290.0000.03413.25
5.3.280.0060.04113.32
5.3.270.0010.02813.28
5.3.260.0030.04313.33
5.3.250.0040.03613.23
5.3.240.0020.04313.25
5.3.230.0060.04013.28
5.3.220.0030.03613.31
5.3.210.0050.04213.23
5.3.200.0020.04413.27
5.3.190.0030.04013.29
5.3.180.0030.04313.20
5.3.170.0070.03713.22
5.3.160.0040.03513.26
5.3.150.0050.03813.28
5.3.140.0020.03013.32
5.3.130.0030.04313.24
5.3.120.0070.04013.27
5.3.110.0030.04213.28
5.3.100.0020.03112.96
5.3.90.0030.03212.97
5.3.80.0050.03912.99
5.3.70.0000.03912.99
5.3.60.0050.03912.96
5.3.50.0020.04312.97
5.3.40.0030.03312.96
5.3.30.0030.03512.93
5.3.20.0030.03012.77
5.3.10.0000.04312.79
5.3.00.0000.02712.84
5.2.170.0030.06313.43
5.2.160.0100.05713.43
5.2.150.0030.06313.43
5.2.140.0000.05013.43
5.2.130.0130.05313.43
5.2.120.0000.06313.43
5.2.110.0000.03713.43
5.2.100.0000.04013.43
5.2.90.0000.03313.43
5.2.80.0030.05313.43
5.2.70.0030.06313.43
5.2.60.0000.05313.43
5.2.50.0030.06313.43
5.2.40.0100.05013.43
5.2.30.0030.06013.43
5.2.20.0000.06313.43
5.2.10.0030.06313.43
5.2.00.0030.05313.43
5.1.60.0000.05713.43
5.1.50.0030.04013.43
5.1.40.0000.05313.43
5.1.30.0000.05713.43
5.1.20.0030.05013.43
5.1.10.0070.04713.43
5.1.00.0130.04313.43
5.0.50.0000.04013.43
5.0.40.0030.04713.43
5.0.30.0030.05713.43
5.0.20.0030.03013.43
5.0.10.0030.04013.43
5.0.00.0030.06713.43
4.4.90.0000.03713.43
4.4.80.0030.03313.43
4.4.70.0000.03713.43
4.4.60.0070.03313.43
4.4.50.0000.03013.43
4.4.40.0100.04313.43
4.4.30.0000.03713.43
4.4.20.0070.03013.43
4.4.10.0000.04013.43
4.4.00.0030.05013.43
4.3.110.0030.03313.43
4.3.100.0000.02013.43
4.3.90.0030.03313.43
4.3.80.0000.05313.43
4.3.70.0000.03713.43
4.3.60.0070.02713.43
4.3.50.0070.02013.43
4.3.40.0030.05013.43
4.3.30.0000.03313.43
4.3.20.0000.03313.43
4.3.10.0030.01713.43
4.3.00.0000.02013.43

preferences:
56.29 ms | 401 KiB | 5 Q