Position: Home page » Ethereum » PHP processing Ethereum big numbers

PHP processing Ethereum big numbers

Publish: 2021-04-29 03:18:58
1. curl方法,file_get_contents,
2. public function onTask($serv, $task_ id, $from_ id, $task_ data)
{
$area = $task_ data;// The parameter is region number
$rows = 50// How many entries per page
/ / switch the master database connection according to the parameter area number of the master database address
/ / switch the slave database connection according to the parameter area number of the slave database instance
3. Bit operation is OK, you treat it as a string and write an algorithm for bit operation again..
4. What's the number
you can try converting numbers to strings
5. $a=1;
$b=2;
$c=3;
if($a<$b){$d=$a;$a=$b;$b=$d;}
if($b<$c){$d=$b;$b=$c;$c=$d;}
if($a<$b){$d=$a;$a=$b;$b=$d;}
echo $a.$b.$c;
6. $str=& #39; 51227 0 54581 0 51229 0 0 51225 0 50620 0 51228 0 0 0 50659 0 51226 0 0 0 0 0 0 0 0 0 0 0 0 0 50677 0 50730 0 50730 0 0 0 0 0 0 0 0 51809 0 51809 0 51809 0 51809 0 & #39;< br/>$arr=explode(' &# 39; $ str): / / split
$num=count($arr);/ Total
for ($i=0;$ i<$ num;$ i++){/circle
echo $arr[$i.]& #39; & lt; br/ > &# <39;< br/>}
7. PHP will make mistakes when calculating large number operations. When the number is too large, the number will become a scientific count. Then how to carry out PHP large number operations, including addition, subtraction, multiplication and division, power operation, square root, molus operation
to solve the problem of scientific counting, just add a pair of quotation marks when assigning values.
for example,
& lt;? php
$n = ' 22222222222222222222222222220';< br />echo $n;< br />?& gt;< If there are no quotation marks, 2.2222e + 28 will be displayed, and 22222220 will be displayed after quotation marks
8. I think there's something wrong with this design idea,
only need 10 to generate 10,
in addition to consuming more CPU of the computer,
the results are almost the same

the idea to solve this problem is:
put all the generated numbers in an array,
arrange them in reverse order through the rsort() function, and take the top 10.
9.

The materials to be prepared are: computer, PHP editor and browser

First, open the PHP editor and create a new PHP file, such as index.php

10. preg_ Replace () starts with the characters in your (), including () contents. You can use str_ Replace this method will replace the one you don't want with an empty one

str_ replace(" No.2: & quote& quot;& quot;,$ re);
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750