3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 輸入偏移量hash值 $txid = "f141ffe8c85ebcc6448d17751897d627.."; // 輸入預計算的原本獎號 $number = 150; // 預設偏移量為 0-255 $shift_offset = 255; // 總共幾個籤數 $tag_count = 350; $dec = gmp_init($txid, 16); $mod = gmp_mod($dec, $shift_offset); $shift_number = (int)gmp_strval($mod) + $number; if ($shift_number > $tag_count) { $shift_number = $shift_number % $tag_count; if ($shift_number == 0) { $shift_number = $tag_count; } } echo $shift_number;

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.4.20.0050.00319.76
8.4.10.0200.00518.80
8.3.150.0070.01117.26
8.3.140.0110.00317.71
8.3.130.0110.00117.54
8.3.120.0050.00818.44
8.3.110.0150.00316.55
8.3.100.0160.00116.59
8.3.90.0070.01121.60
8.3.80.0120.00823.69
8.3.70.0150.00723.55
8.3.60.0180.00316.56
8.3.50.0150.00523.64
8.3.40.0160.00417.32
8.3.30.0110.00717.46
8.3.20.0140.00417.36
8.3.10.0120.00417.23
8.3.00.0040.00817.53
8.2.270.0180.00017.38
8.2.260.0100.00317.08
8.2.250.0110.00316.81
8.2.240.0120.00316.69
8.2.230.0090.00618.64
8.2.220.0120.00127.06
8.2.210.0110.00221.67
8.2.200.0130.00423.73
8.2.190.0120.00723.55
8.2.180.0100.00716.09
8.2.170.0090.01217.58
8.2.160.0090.00917.70
8.2.150.0110.00817.26
8.2.140.0140.00617.37
8.2.130.0140.00417.36
8.2.120.0190.00017.44
8.2.110.0160.00417.47
8.2.100.0130.00417.43
8.2.90.0120.00917.46
8.2.80.0150.00417.49
8.2.70.0180.00017.38
8.2.60.0150.00417.26
8.2.50.0090.00917.31
8.2.40.0170.00017.54
8.2.30.0130.00417.27
8.2.20.0090.00917.15
8.2.10.0130.00317.37
8.2.00.0080.00817.40
8.1.310.0020.00717.62
8.1.300.0110.00116.19
8.1.290.0110.00723.58
8.1.280.0120.00616.01
8.1.270.0090.01317.01
8.1.260.0120.00817.14
8.1.250.0210.00730.83
8.1.240.0110.00517.16
8.1.230.0120.00417.09
8.1.220.0140.00217.27
8.1.210.0130.00417.16
8.1.200.0120.00616.91
8.1.190.0130.00417.00
8.1.180.0080.00817.18
8.1.170.0130.00417.07
8.1.160.0130.00317.21
8.1.150.0110.00925.32
8.1.140.0190.00820.50
8.1.130.0180.00017.06
8.1.120.0120.00417.33
8.1.110.0130.00417.23
8.1.100.0090.00917.04
8.1.90.0090.00917.09
8.1.80.0150.00217.00
8.1.70.0100.00717.01
8.1.60.0130.00517.29
8.1.50.0120.00617.19
8.1.40.0090.00917.46
8.1.30.0150.00317.31
8.1.20.0110.00817.24
8.1.10.0190.00017.50
8.1.00.0160.00417.07

preferences:
42.25 ms | 403 KiB | 5 Q