3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dec_to_hex($dec) { $sign = ""; // suppress errors if( $dec < 0){ $sign = "-"; $dec = abs($dec); } $hex = Array( 0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 'a', 11 => 'b', 12 => 'c', 13 => 'd', 14 => 'e', 15 => 'f' ); do { $h = $hex[($dec%16)] . $h; $dec /= 16; } while( $dec >= 1 ); return $sign . $h; } 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 = dec_to_hex($id); 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.0110.00318.55
8.3.50.0120.01022.11
8.3.40.0090.00619.04
8.3.30.0110.00718.92
8.3.20.0100.00718.90
8.3.10.0080.00021.05
8.3.00.0030.00722.11
8.2.180.0000.01516.88
8.2.170.0060.00922.96
8.2.160.0140.00722.27
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00421.18
8.2.110.0060.00320.50
8.2.100.0090.00317.91
8.2.90.0000.00819.15
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0040.00418.05
8.2.50.0060.00318.07
8.2.40.0040.00418.47
8.2.30.0030.00621.47
8.2.20.0040.00417.93
8.2.10.0050.00217.81
8.2.00.0000.00817.75
8.1.280.0090.01225.92
8.1.270.0120.00623.99
8.1.260.0030.00626.35
8.1.250.0050.00328.09
8.1.240.0030.00722.67
8.1.230.0110.00021.09
8.1.220.0050.00318.77
8.1.210.0060.00318.97
8.1.200.0030.00617.22
8.1.190.0040.00419.41
8.1.180.0040.00418.10
8.1.170.0060.00318.59
8.1.160.0060.00318.88
8.1.150.0020.00518.57
8.1.140.0040.00417.44
8.1.130.0000.00817.90
8.1.120.0030.00517.53
8.1.110.0040.00417.43
8.1.100.0060.00317.50
8.1.90.0040.00417.38
8.1.80.0080.00017.56
8.1.70.0030.00517.42
8.1.60.0060.00617.65
8.1.50.0040.00417.38
8.1.40.0030.00517.57
8.1.30.0000.00717.57
8.1.20.0050.00317.71
8.1.10.0000.00817.57
8.1.00.0000.00917.58
8.0.300.0000.00719.95
8.0.290.0000.00817.30
8.0.280.0000.00818.45
8.0.270.0030.00317.33
8.0.260.0030.00316.86
8.0.250.0060.00317.09
8.0.240.0080.00317.12
8.0.230.0000.00717.06
8.0.220.0000.00816.94
8.0.210.0000.00717.02
8.0.200.0000.00817.00
8.0.190.0040.00417.02
8.0.180.0040.00417.05
8.0.170.0080.00017.08
8.0.160.0000.00717.02
8.0.150.0000.00716.92
8.0.140.0040.00416.98
8.0.130.0030.00313.40
8.0.120.0080.00016.90
8.0.110.0000.00716.99
8.0.100.0070.00016.85
8.0.90.0050.00216.99
8.0.80.0060.01116.99
8.0.70.0000.00716.94
8.0.60.0040.00417.07
8.0.50.0070.00016.88
8.0.30.0100.00817.18
8.0.20.0140.00917.40
8.0.10.0040.00417.13
8.0.00.0110.00616.93
7.4.330.0030.00316.77
7.4.320.0060.00016.63
7.4.300.0000.00616.43
7.4.290.0070.00016.66
7.4.280.0030.00316.59
7.4.270.0030.00316.59
7.4.260.0000.00613.33
7.4.250.0070.00016.45
7.4.240.0000.00716.48
7.4.230.0000.00716.55
7.4.220.0080.00916.56
7.4.210.0070.01116.72
7.4.200.0030.00516.61
7.4.190.0000.00716.71
7.4.160.0130.00916.68
7.4.150.0080.00817.40
7.4.140.0090.00917.86
7.4.130.0090.01016.52
7.4.120.0070.01116.64
7.4.110.0070.01016.64
7.4.100.0040.01516.50
7.4.90.0160.00616.57
7.4.80.0070.01119.39
7.4.70.0040.01516.59
7.4.60.0070.01016.36
7.4.50.0050.00316.54
7.4.40.0070.01022.77
7.4.30.0130.00316.46
7.4.10.0050.00915.81
7.4.00.0070.00915.50
7.3.330.0000.00613.30
7.3.320.0060.00013.44
7.3.310.0030.00316.28
7.3.300.0040.00416.35
7.3.290.0100.01016.37
7.3.280.0060.01116.43
7.3.270.0250.01317.40
7.3.260.0120.00918.24
7.3.250.0180.00316.68
7.3.240.0070.01016.55
7.3.230.0070.01116.50
7.3.210.0160.00316.43
7.3.200.0090.01319.39
7.3.190.0110.00716.43
7.3.180.0040.01116.32
7.3.170.0130.00516.62
7.3.160.0090.00616.34
7.3.130.0090.00715.48
7.3.120.0060.00915.46
7.3.110.0050.01215.49
7.3.100.0020.01415.48
7.3.90.0100.00715.68
7.3.80.0070.01015.46
7.3.70.0040.00815.49
7.3.60.0050.00815.64
7.3.50.0130.00515.59
7.3.40.0080.00815.54
7.3.30.0060.00715.63
7.3.20.0080.00517.44
7.3.10.0100.00617.27
7.3.00.0090.00617.08
7.2.330.0070.01116.78
7.2.320.0170.00616.82
7.2.310.0090.00916.76
7.2.300.0030.01316.81
7.2.290.0170.00016.85
7.2.260.0110.00715.97
7.2.250.0060.01015.81
7.2.240.0030.01315.77
7.2.230.0040.01515.90
7.2.220.0070.01115.76
7.2.210.0080.00815.88
7.2.200.0030.01015.98
7.2.190.0040.01315.72
7.2.180.0100.00715.87
7.2.170.0070.00516.01
7.2.160.0040.00915.82
7.2.150.0060.00717.74
7.2.140.0030.01217.59
7.2.130.0060.00717.43
7.2.120.0040.01117.40
7.2.110.0120.00317.53
7.2.100.0040.01117.50
7.2.90.0050.01017.65
7.2.80.0100.00717.58
7.2.70.0090.00317.52
7.2.60.0040.00817.33
7.2.50.0090.00517.54
7.2.40.0080.00517.47
7.2.30.0040.01017.54
7.2.20.0080.00717.52
7.2.10.0050.00717.29
7.2.00.0080.00917.90
7.1.330.0050.01016.73
7.1.320.0090.00916.59
7.1.310.0050.00816.76
7.1.300.0100.00616.54
7.1.290.0110.00716.73
7.1.280.0050.00816.66
7.1.270.0090.00716.72
7.1.260.0030.00716.56
7.1.250.0070.00816.36
7.1.240.0020.01416.77
7.1.230.0110.00416.51
7.1.220.0090.00416.58
7.1.210.0030.01316.72
7.1.200.0080.00916.66
7.1.190.0030.00816.68
7.1.180.0070.00916.67
7.1.170.0100.00516.65
7.1.160.0050.00916.77
7.1.150.0070.00616.62
7.1.140.0040.01016.69
7.1.130.0000.01616.73
7.1.120.0130.00316.44
7.1.110.0050.00716.71
7.1.100.0030.01017.20
7.1.90.0050.00816.71
7.1.80.0020.01216.66
7.1.70.0060.00516.79
7.1.60.0060.01117.65
7.1.50.0130.00822.77
7.1.40.0030.01016.69
7.1.30.0030.01216.80
7.1.20.0060.00616.64
7.1.10.0030.00916.72
7.1.00.0100.02818.59
7.0.330.0050.01016.14
7.0.320.0100.00516.28
7.0.310.0110.00716.23
7.0.300.0090.00516.33
7.0.290.0090.00316.39
7.0.280.0050.00616.24
7.0.270.0040.01116.20
7.0.260.0020.01216.21
7.0.250.0020.00716.36
7.0.240.0070.00516.24
7.0.230.0020.00916.24
7.0.220.0050.01016.33
7.0.210.0050.00516.34
7.0.200.0060.00615.95
7.0.190.0030.01416.43
7.0.180.0080.00516.38
7.0.170.0060.00416.41
7.0.160.0020.01116.30
7.0.150.0090.00516.23
7.0.140.0090.02818.28
7.0.130.0070.00416.26
7.0.120.0060.00816.32
7.0.110.0060.00916.04
7.0.100.0050.01116.31
7.0.90.0020.01116.29
7.0.80.0080.00516.31
7.0.70.0020.03118.13
7.0.60.0060.03118.12
7.0.50.0060.03018.27
7.0.40.0040.03216.21
7.0.30.0040.03716.21
7.0.20.0080.02716.11
7.0.10.0030.02916.25
7.0.00.0060.03316.26
5.6.400.0080.00515.32
5.6.390.0060.00815.23
5.6.380.0070.00915.43
5.6.370.0060.00615.23
5.6.360.0020.01215.43
5.6.350.0030.01115.48
5.6.340.0060.00415.08
5.6.330.0050.01015.14
5.6.320.0070.00515.34
5.6.310.0080.00615.36
5.6.300.0050.01215.28
5.6.290.0080.00915.39
5.6.280.0090.02617.17
5.6.270.0050.01315.27
5.6.260.0100.00215.22
5.6.250.0050.01215.16
5.6.240.0000.01315.18
5.6.230.0060.00715.32
5.6.220.0070.02216.94
5.6.210.0090.02217.17
5.6.200.0080.03217.24
5.6.190.0040.03617.27
5.6.180.0070.02617.15
5.6.170.0050.02917.17
5.6.160.0050.03417.01
5.6.150.0040.03517.12
5.6.140.0080.02917.15
5.6.130.0050.03117.16
5.6.120.0010.03217.28
5.6.110.0060.03317.21
5.6.100.0080.03117.21
5.6.90.0060.03217.16
5.6.80.0050.02717.00
5.6.70.0070.02916.93
5.6.60.0070.02216.91
5.6.50.0050.02716.82
5.6.40.0060.02017.07
5.6.30.0030.03316.92
5.6.20.0090.02617.02
5.6.10.0070.03116.95
5.6.00.0040.03116.85
5.5.380.0030.01215.05
5.5.370.0060.00515.11
5.5.360.0030.03516.91
5.5.350.0070.02816.79
5.5.340.0080.02816.95
5.5.330.0060.03217.14
5.5.320.0090.03017.09
5.5.310.0030.03417.19
5.5.300.0020.03817.07
5.5.290.0100.02917.10
5.5.280.0030.03617.23
5.5.270.0010.03817.09
5.5.260.0110.02717.07
5.5.250.0070.03316.99
5.5.240.0050.03116.96
5.5.230.0050.03016.72
5.5.220.0090.02316.77
5.5.210.0040.02616.85
5.5.200.0050.02216.86
5.5.190.0030.03316.77
5.5.180.0090.02816.77
5.5.170.0030.01014.99
5.5.160.0070.03216.81
5.5.150.0060.03316.83
5.5.140.0040.03016.68
5.5.130.0050.03216.90
5.5.120.0090.02216.82
5.5.110.0030.03116.75
5.5.100.0040.03216.74
5.5.90.0110.02716.86
5.5.80.0060.03216.86
5.5.70.0060.03016.78
5.5.60.0080.02816.56
5.5.50.0070.02516.79
5.5.40.0080.02016.81
5.5.30.0020.03316.90
5.5.20.0040.03016.76
5.5.10.0050.03116.88
5.5.00.0060.02516.67
5.4.450.0090.02814.92
5.4.440.0020.02614.93
5.4.430.0020.02814.89
5.4.420.0030.02014.74
5.4.410.0030.02914.88
5.4.400.0060.02714.81
5.4.390.0040.02514.75
5.4.380.0030.02014.73
5.4.370.0050.02814.57
5.4.360.0090.01314.77
5.4.350.0020.02314.67
5.4.340.0060.02814.64
5.4.330.0020.00812.58
5.4.320.0060.02714.70
5.4.310.0030.03114.76
5.4.300.0030.03214.73
5.4.290.0020.02714.68
5.4.280.0070.02014.80
5.4.270.0020.03114.73
5.4.260.0050.02914.66
5.4.250.0050.02814.67
5.4.240.0040.02714.77
5.4.230.0060.02714.66
5.4.220.0070.03014.72
5.4.210.0070.02214.70
5.4.200.0030.03014.70
5.4.190.0050.02814.66
5.4.180.0060.02914.73
5.4.170.0020.02914.62
5.4.160.0050.02314.60
5.4.150.0020.02714.66
5.4.140.0050.02313.75
5.4.130.0020.02613.87
5.4.120.0070.02713.83
5.4.110.0050.02913.81
5.4.100.0060.01913.77
5.4.90.0080.02413.80
5.4.80.0040.02513.84
5.4.70.0030.02213.86
5.4.60.0060.02613.82
5.4.50.0020.02513.84
5.4.40.0010.02913.87
5.4.30.0050.02613.83
5.4.20.0020.02313.84
5.4.10.0020.03013.88
5.4.00.0080.01713.70
5.3.290.0090.02713.55
5.3.280.0010.02913.36
5.3.270.0040.02813.44
5.3.260.0040.02513.49
5.3.250.0010.03213.31
5.3.240.0070.01213.39
5.3.230.0030.03013.38
5.3.220.0050.02413.33
5.3.210.0060.03113.34
5.3.200.0060.02613.31
5.3.190.0050.02613.41
5.3.180.0060.02013.37
5.3.170.0060.02913.42
5.3.160.0060.02813.46
5.3.150.0090.02313.34
5.3.140.0030.02713.33
5.3.130.0070.02513.38
5.3.120.0050.02513.38
5.3.110.0080.02613.45
5.3.100.0040.02513.22
5.3.90.0060.01813.18
5.3.80.0030.03013.18
5.3.70.0040.02813.22
5.3.60.0040.02513.11
5.3.50.0010.02313.15
5.3.40.0040.03213.19
5.3.30.0050.02213.17
5.3.20.0020.02913.04
5.3.10.0080.02313.01
5.3.00.0070.02412.97
5.2.170.0070.05712.52
5.2.160.0000.06312.52
5.2.150.0000.05312.52
5.2.140.0030.06312.52
5.2.130.0000.06312.52
5.2.120.0000.04012.52
5.2.110.0000.05312.52
5.2.100.0030.06012.52
5.2.90.0000.06012.52
5.2.80.0030.05712.52
5.2.70.0030.05712.52
5.2.60.0000.06312.52
5.2.50.0000.04312.52
5.2.40.0100.03712.52
5.2.30.0030.06712.52
5.2.20.0030.06012.52
5.2.10.0100.05712.52
5.2.00.0000.06712.52
5.1.60.0030.05012.52
5.1.50.0070.04312.52
5.1.40.0000.05012.52
5.1.30.0030.06012.52
5.1.20.0030.05312.52
5.1.10.0000.05012.52
5.1.00.0030.05012.52
5.0.50.0030.04312.52
5.0.40.0030.03312.52
5.0.30.0000.04312.52
5.0.20.0000.04312.52
5.0.10.0030.03712.52
5.0.00.0000.07012.52
4.4.90.0030.03012.52
4.4.80.0000.03012.52
4.4.70.0070.03012.52
4.4.60.0000.03712.52
4.4.50.0030.03312.52
4.4.40.0000.05012.52
4.4.30.0000.03012.52
4.4.20.0000.03712.52
4.4.10.0070.02312.52
4.4.00.0030.05312.52
4.3.110.0030.02712.52
4.3.100.0000.03312.52
4.3.90.0000.03312.52
4.3.80.0000.04712.52
4.3.70.0030.03012.52
4.3.60.0000.02712.52
4.3.50.0070.03012.52
4.3.40.0030.05012.52
4.3.30.0000.04012.52
4.3.20.0000.03712.52
4.3.10.0000.04012.52
4.3.00.0030.03312.52

preferences:
46.71 ms | 401 KiB | 5 Q