3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Huawei E303 | E369 | E357 Free Unlocker * **/ class hw { public function calculate($imei, $mode){ $arrayofbytes = array(); $digesthash = md5($imei.$this->mode($mode)); $arrayofbytes = $this->bytearray($digesthash); return $this->xorbytes($arrayofbytes); } private function mode($arg){ $this->unlock = "5e8dd316726b0335"; $this->flash = "97b7bc6be525ab44"; if($arg == 'unlock'){ return $this->unlock; } else{ return $this->flash; } } private function bytearray($hash){ $splitdigest = substr(chunk_split($hash,2,":"),0,-1); $arrdigest = explode(":",$splitdigest); return $arrdigest; } private function xorbytes($arr){ foreach (range(0,3) as $i) { $code = dechex(hexdec($arr[$i]) ^ hexdec($arr[4+$i]) ^ hexdec($arr[8+$i]) ^ hexdec($arr[12+$i])); if(strlen($code)< 2) { $code = "0" . $code; } $codes = $codes . $code; } $tmpcdec = hexdec($codes); $tmp1dec = hexdec("1ffffff"); $tmp2dec = hexdec("2000000"); $c = $tmpcdec & $tmp1dec; $c = $c | $tmp2dec; return $c; } } echo "<head><title>Huawei Code Calculator</title></head> Huawei E303 | E369 | E357 Code calculator<br><br>"; $imei = htmlspecialchars($_POST['imei']); $hw = new hw(); if(strlen($imei) == 15){ $imei = htmlspecialchars($imei); echo "Results:<br>"; echo "Unlock ". $hw->calculate($imei,"unlock"); echo "<br>"; echo "Flash ".$hw->calculate($imei,"flash"); } else{ if($imei < 15 && $imei > 1) { echo "Error : Invalid IMEI"; } else { echo "Enter imei on box to calculate"; } } echo "<br><br> <form method='post' action=''> IMEI : <input type='text' name='imei' maxlength='15'><br> <input type='submit' value='CALCULATE'> </form>"; echo "<hr>"; echo "Credits to Original algo sharer<br> Script Kiddie PHP<br>"; ?>

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.5.10.0130.00520.11
8.5.00.0130.00820.39
8.4.150.0030.00014.05
8.4.140.0130.01017.86
8.4.130.0120.00818.75
8.4.120.0100.01124.10
8.4.110.0110.01118.78
8.4.100.0130.00818.84
8.4.90.0100.01122.49
8.4.80.0120.00820.40
8.4.70.0020.00618.20
8.4.60.0080.00318.76
8.4.50.0140.00918.73
8.4.40.0090.00017.79
8.4.30.0100.01017.76
8.4.20.0060.01317.97
8.4.10.0080.00817.87
8.3.280.0080.01218.66
8.3.270.0120.00716.68
8.3.260.0080.00616.90
8.3.250.0040.00519.01
8.3.240.0110.00917.27
8.3.230.0130.00616.66
8.3.220.0060.00219.03
8.3.210.0110.01118.34
8.3.200.0050.00416.76
8.3.190.0120.00717.37
8.3.180.0110.00717.02
8.3.170.0070.00019.01
8.3.160.0170.00317.38
8.3.150.0130.00716.82
8.3.140.0030.00717.18
8.3.130.0100.01018.65
8.3.120.0060.00320.67
8.3.110.0080.00020.94
8.3.100.0040.00424.06
8.3.90.0040.00426.77
8.3.80.0060.00316.63
8.3.70.0180.00416.63
8.3.60.0120.00916.75
8.3.50.0090.01021.12
8.3.40.0140.00318.83
8.3.30.0030.01219.22
8.3.20.0080.00020.39
8.3.10.0050.00321.78
8.3.00.0030.00617.50
8.2.290.0070.00420.54
8.2.280.0110.00918.42
8.2.270.0070.00716.95
8.2.260.0030.00616.86
8.2.250.0040.00416.99
8.2.240.0060.00318.84
8.2.230.0060.00322.58
8.2.220.0160.00037.54
8.2.210.0030.00626.77
8.2.200.0060.00316.63
8.2.190.0030.01716.86
8.2.180.0060.00918.66
8.2.170.0150.00018.92
8.2.160.0030.01622.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00021.11
8.2.110.0080.00420.47
8.2.100.0000.01119.58
8.2.90.0080.00017.88
8.2.80.0040.00418.88
8.2.70.0080.00017.75
8.2.60.0040.00417.75
8.2.50.0040.00417.55
8.2.40.0040.00419.35
8.2.30.0000.00818.21
8.2.20.0080.00017.87
8.2.10.0080.00018.06
8.2.00.0050.00318.01
8.1.330.0140.00521.95
8.1.320.0110.01018.04
8.1.310.0070.01118.09
8.1.300.0000.00920.14
8.1.290.0030.00630.84
8.1.280.0120.00325.92
8.1.270.0090.00020.78
8.1.260.0050.00226.35
8.1.250.0050.00328.09
8.1.240.0030.00623.73
8.1.230.0080.00422.70
8.1.220.0080.00018.64
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0150.00316.61
8.1.180.0040.00418.10
8.1.170.0000.00817.62
8.1.160.0070.00021.92
8.1.150.0090.00020.60
8.1.140.0040.00417.39
8.1.130.0040.00417.67
8.1.120.0000.00717.39
8.1.110.0040.00417.36
8.1.100.0040.00417.48
8.1.90.0000.00817.54
8.1.80.0100.00017.42
8.1.70.0030.00317.50
8.1.60.0000.00817.59
8.1.50.0050.00317.55
8.1.40.0030.00617.53
8.1.30.0040.00417.60
8.1.20.0040.00417.66
8.1.10.0000.00817.66
8.1.00.0040.00417.44
8.0.300.0060.00318.77
8.0.290.0040.00416.88
8.0.280.0030.00318.38
8.0.270.0040.00417.21
8.0.260.0060.00017.31
8.0.250.0030.00616.98
8.0.240.0050.00316.98
8.0.230.0030.00316.89
8.0.220.0080.00016.86
8.0.210.0060.00016.94
8.0.200.0050.00316.90
8.0.190.0000.00717.02
8.0.180.0000.00717.07
8.0.170.0030.00616.89
8.0.160.0040.00417.04
8.0.150.0000.00816.96
8.0.140.0040.00416.86
8.0.130.0030.00613.36
8.0.120.0000.00916.95
8.0.110.0030.00516.99
8.0.100.0050.00316.79
8.0.90.0000.00716.80
8.0.80.0100.00616.96
8.0.70.0080.00016.85
8.0.60.0040.00417.02
8.0.50.0050.00516.84
8.0.30.0100.00717.15
8.0.20.0140.00517.40
8.0.10.0000.00816.95
8.0.00.0060.01116.93
7.4.330.0000.00515.04
7.4.320.0030.00316.54
7.4.300.0000.00716.52
7.4.290.0000.00716.52
7.4.280.0040.00416.63
7.4.270.0000.00816.59
7.4.260.0000.00716.49
7.4.250.0030.00516.48
7.4.240.0020.00616.64
7.4.230.0040.00416.63
7.4.220.0120.00616.60
7.4.210.0070.01116.59
7.4.200.0050.00216.52
7.4.160.0130.00316.55
7.4.150.0120.00817.40
7.4.140.0070.01117.86
7.4.130.0090.00916.54
7.4.120.0100.01116.69
7.4.110.0120.00916.66
7.4.100.0100.01016.40
7.4.90.0090.00916.69
7.4.80.0030.01919.39
7.4.70.0130.00716.43
7.4.60.0130.00316.74
7.4.50.0000.00816.66
7.4.40.0110.00816.61
7.4.30.0060.01516.75
7.4.00.0040.01414.79
7.3.330.0030.00313.41
7.3.320.0050.00013.45
7.3.310.0040.00416.54
7.3.300.0070.00016.32
7.3.290.0070.00016.32
7.3.280.0070.01216.44
7.3.270.0090.01317.40
7.3.260.0130.00316.80
7.3.250.0090.00916.47
7.3.240.0100.00716.42
7.3.230.0090.01216.47
7.3.210.0090.00916.70
7.3.200.0040.01419.39
7.3.190.0120.00416.57
7.3.180.0060.00916.48
7.3.170.0030.01516.51
7.3.160.0080.00816.43
7.2.330.0140.00316.87
7.2.320.0100.01016.33
7.2.310.0060.01316.49
7.2.300.0100.00716.65
7.2.290.0090.01316.54
7.2.60.0090.00616.77
7.2.00.0030.01318.90
7.1.200.0070.00715.79
7.1.100.0030.01018.24
7.1.70.0000.00817.08
7.1.60.0040.02219.59
7.1.50.0060.01116.99
7.1.00.0030.07022.30
7.0.200.0000.00716.69
7.0.60.0030.09020.06
7.0.50.0130.05717.89
7.0.40.0070.06320.30
7.0.30.0330.05320.12
7.0.20.0930.05720.11
7.0.10.0070.04720.33
7.0.00.0130.08020.07
5.6.280.0070.07021.09
5.6.210.0030.04320.49
5.6.200.0070.07318.23
5.6.190.0100.08020.55
5.6.180.0500.05320.68
5.6.170.0330.03020.59
5.6.160.0100.07720.54
5.6.150.0000.05018.15
5.6.140.0030.08718.15
5.6.130.0130.06318.18
5.6.120.0200.07721.01
5.6.110.0030.04020.99
5.6.100.0170.07320.97
5.6.90.0070.04021.00
5.6.80.0030.07020.48
5.5.350.0100.05020.42
5.5.340.0070.03718.09
5.5.330.0100.08320.29
5.5.320.0000.04320.32
5.5.310.0300.08320.30
5.5.300.0170.07317.98
5.5.290.0170.06017.95
5.5.280.0030.08720.79
5.5.270.0170.07320.87
5.5.260.0170.06320.88
5.5.250.0100.07020.70
5.5.240.0000.08020.20
5.4.450.0270.05319.59
5.4.440.0230.06319.47
5.4.430.0100.06319.19
5.4.420.0400.03319.47
5.4.410.0230.04719.42
5.4.400.0100.05718.88
5.4.390.0030.06319.18
5.4.380.0130.05319.12
5.4.370.0200.04719.27
5.4.360.0270.04319.17
5.4.350.0170.05018.87
5.4.340.0130.05719.18
5.4.320.0200.05019.13
5.4.310.0170.05018.98
5.4.300.0200.05018.86
5.4.290.0200.04719.20
5.4.280.0100.05718.98
5.4.270.0370.03019.12
5.4.260.0030.06019.20
5.4.250.0070.06018.97
5.4.240.0170.05019.11
5.4.230.0130.05318.97
5.4.220.0200.05019.14
5.4.210.0100.05719.05
5.4.200.0130.05016.86
5.4.190.0100.05718.93
5.4.180.0130.05318.99
5.4.170.0230.04719.08
5.4.160.0230.04319.20
5.4.150.0200.04719.03
5.4.140.0170.05016.32
5.4.130.0170.04716.62
5.4.120.0100.05316.54
5.4.110.0100.05316.29
5.4.100.0170.05016.54
5.4.90.0200.04716.35
5.4.80.0170.04716.56
5.4.70.0130.05016.29
5.4.60.0270.03716.55
5.4.50.0130.04716.59
5.4.40.0200.04316.59
5.4.30.0230.04016.27
5.4.20.0130.05316.39
5.4.10.0130.05016.54
5.4.00.0200.04315.99
5.3.290.0200.04714.56
5.3.280.0170.04714.71
5.3.270.0100.05714.58
5.3.260.0130.05314.68
5.3.250.0100.05314.53
5.3.240.0170.05014.58
5.3.230.0170.05014.73
5.3.220.0230.04314.45
5.3.210.0100.05714.55
5.3.200.0130.05014.65
5.3.190.0170.04714.68
5.3.180.0170.04714.58
5.3.170.0100.05314.45
5.3.160.0130.05014.49
5.3.150.0170.05014.41
5.3.140.0230.04014.53
5.3.130.0200.04714.62
5.3.120.0200.04714.59
5.3.110.0130.05314.54
5.3.100.0130.06014.01
5.3.90.0170.05013.94
5.3.80.0130.05313.91
5.3.70.0030.06013.88
5.3.60.0130.05014.11
5.3.50.0100.05714.07
5.3.40.0100.05313.84
5.3.30.0270.03313.81
5.3.20.0130.05713.82
5.3.10.0100.05313.68
5.3.00.0030.06013.51
5.2.170.0100.04311.22
5.2.160.0200.03311.08
5.2.150.0130.04011.29
5.2.140.0200.03711.12
5.2.130.0030.05011.10
5.2.120.0170.03311.02
5.2.110.0100.04311.05
5.2.100.0130.03711.14
5.2.90.0100.04311.18
5.2.80.0130.04011.03
5.2.70.0070.04711.18
5.2.60.0100.04310.96
5.2.50.0170.03710.92
5.2.40.0100.04010.86
5.2.30.0030.04710.92
5.2.20.0100.04011.07
5.2.10.0170.03010.79
5.2.00.0000.05010.67
5.1.60.0100.03310.13
5.1.50.0130.03010.12
5.1.40.0100.03310.05
5.1.30.0170.03010.31
5.1.20.0100.03710.47
5.1.10.0100.03310.21
5.1.00.0070.03710.19
5.0.50.0070.0308.50
5.0.40.0000.0338.55
5.0.30.0030.0438.38
5.0.20.0030.0308.32
5.0.10.0070.0278.16
5.0.00.0030.0538.25
4.4.90.0030.0235.91
4.4.80.0100.0175.75
4.4.70.0030.0235.75
4.4.60.0030.0235.84
4.4.50.0070.0205.74
4.4.40.0030.0475.84
4.4.30.0070.0205.76
4.4.20.0100.0175.79
4.4.10.0070.0205.96
4.4.00.0230.0175.95
4.3.110.0070.0205.79
4.3.100.0070.0205.67
4.3.90.0030.0205.67
4.3.80.0100.0275.76
4.3.70.0000.0235.73
4.3.60.0030.0205.69
4.3.50.0100.0175.76
4.3.40.0030.0375.61
4.3.30.0100.0174.43
4.3.20.0030.0204.57
4.3.10.0070.0174.48
4.3.00.0070.0207.51

preferences:
186.85 ms | 403 KiB | 5 Q