3v4l.org

run code in 300+ PHP versions simultaneously
<?php function calculate_token($string) { $token_parts = array(); for ($i = 0; $i < strlen($string); $i++) { $char = $string[$i]; $md5_hash = md5($char); $ascii_value = ord($md5_hash[0]); array_push($token_parts, strval($ascii_value)); } $token = implode("-", $token_parts); return $token; } function check_token($input_token, $valid_token) { $input_token_parts = explode("-", $input_token); $valid_token_parts = explode("-", $valid_token); for ($i = 0; $i < count($input_token_parts); $i++) { if ($input_token_parts[$i] != $valid_token_parts[$i]) { echo "El carácter " . ($i + 1) . " del token es incorrecto.\n"; } } } // Tu token $input_token = '75959'; // Reemplaza esto con tu token // Calcula el token $token = calculate_token($input_token); // Token válido $valid_token = '56-101-52-51-56'; // Verifica el token check_token($token, $valid_token); ?>

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.00.0120.01220.05
8.4.150.0020.00114.05
8.4.140.0140.00717.68
8.4.130.0120.00817.74
8.4.120.0140.00720.84
8.4.110.0110.00922.39
8.4.100.0170.00517.84
8.4.90.0160.00517.82
8.4.80.0100.01019.03
8.4.70.0110.01119.72
8.4.60.0130.00718.75
8.4.50.0130.00620.61
8.4.40.0070.01417.91
8.4.30.0060.00319.05
8.4.20.0150.00020.37
8.4.10.0130.00619.21
8.3.280.0110.00918.48
8.3.270.0080.01116.46
8.3.260.0110.00816.54
8.3.250.0130.00519.12
8.3.240.0090.00916.57
8.3.230.0110.00916.67
8.3.220.0100.00818.95
8.3.210.0110.01018.46
8.3.200.0060.00316.50
8.3.190.0100.00418.97
8.3.180.0110.00718.70
8.3.170.0090.00920.49
8.3.160.0070.00416.93
8.3.150.0030.00617.33
8.3.140.0170.00318.56
8.3.130.0080.00016.73
8.3.120.0080.01220.79
8.3.110.0080.00020.94
8.3.100.0000.00924.06
8.3.90.0050.00326.77
8.3.80.0060.00318.30
8.3.70.0090.00616.63
8.3.60.0060.00916.50
8.3.50.0030.01218.37
8.3.40.0110.00420.22
8.3.30.0120.00321.86
8.3.20.0000.00724.18
8.3.10.0050.00324.66
8.3.00.0050.00326.16
8.2.290.0100.00920.55
8.2.280.0070.01318.24
8.2.270.0090.00617.39
8.2.260.0120.00616.61
8.2.250.0060.00318.24
8.2.240.0000.00917.16
8.2.230.0040.00422.58
8.2.220.0030.00637.54
8.2.210.0080.00026.77
8.2.200.0090.00018.16
8.2.190.0110.00416.58
8.2.180.0130.01016.75
8.2.170.0120.00918.95
8.2.160.0140.00022.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0040.00421.11
8.2.110.0130.00622.07
8.2.100.0110.01120.93
8.2.90.0130.01918.96
8.2.80.0290.00618.56
8.2.70.0230.00618.79
8.2.60.0220.00618.47
8.2.50.0070.00719.72
8.2.40.0080.00519.01
8.2.30.0250.00618.82
8.2.20.0170.01019.10
8.2.10.0220.01018.79
8.2.00.0180.00718.82
8.1.330.0130.00618.44
8.1.320.0100.00816.12
8.1.310.0140.00418.68
8.1.300.0130.00616.38
8.1.290.0060.00330.84
8.1.280.0100.01025.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0220.01118.61
8.1.230.0240.01218.68
8.1.220.0140.01018.47
8.1.210.0320.00619.88
8.1.200.0190.01318.21
8.1.190.0140.00519.65
8.1.180.0100.00518.42
8.1.170.0080.00518.43
8.1.160.0110.00018.73
8.1.150.0090.00320.55
8.1.140.0060.00818.43
8.1.130.0090.00618.54
8.1.120.0040.00818.55
8.1.110.0080.00519.61
8.1.100.0110.00418.41
8.1.90.0130.00018.53
8.1.80.0090.00418.50
8.1.70.0080.00318.67
8.1.60.0120.00418.58
8.1.50.0140.00318.55
8.1.40.0110.00418.69
8.1.30.0080.00419.02
8.1.20.0130.00318.55
8.1.10.0120.00018.90
8.1.00.0090.00318.74
8.0.300.0120.00417.83
8.0.290.0110.00417.83
8.0.280.0070.00717.80
8.0.270.0110.00417.82
8.0.260.0080.00318.29
8.0.250.0110.00418.00
8.0.240.0050.00917.96
8.0.230.0100.00318.31
8.0.220.0130.00317.85
8.0.210.0110.00417.82
8.0.200.0110.00417.96
8.0.190.0090.00318.32
8.0.180.0140.00017.83
8.0.170.0120.00317.93
8.0.160.0120.00317.83
8.0.150.0130.00317.77
8.0.140.0080.00817.91
8.0.130.0140.00018.29
8.0.120.0110.00417.75
8.0.110.0070.00318.26
8.0.100.0150.00017.88
8.0.90.0110.00417.88
8.0.80.0110.00417.74
8.0.70.0150.00017.74
8.0.60.0050.00917.94
8.0.50.0120.00317.88
8.0.30.0090.00518.25
8.0.20.0130.00318.00
8.0.10.0140.00018.10

preferences:
100.04 ms | 403 KiB | 5 Q