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;
Output for git.master_jit, git.master, rfc.property-hooks
Fatal error: Uncaught ValueError: gmp_init(): Argument #1 ($num) is not an integer string in /in/vvukC:15 Stack trace: #0 /in/vvukC(15): gmp_init('f141ffe8c85ebcc...', 16) #1 {main} thrown in /in/vvukC on line 15
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
33.13 ms | 405 KiB | 5 Q