3v4l.org

run code in 300+ PHP versions simultaneously
<?php function base16Encode($arg){ $ret = ''; for($i=0; $i < strlen($arg); $i++){ $tmp = ord(substr($arg, $i, 1)); $ret .= dechex($tmp); } return $ret; } function encode($text) { return bin2hex($text); } function decode($base16){ return pack("H*", $base16); } function encrypt($key, $link){ $cp = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', ''); @mcrypt_generic_init($cp, $key, $key); $enc = mcrypt_generic($cp, $link); mcrypt_generic_deinit($cp); mcrypt_module_close($cp); return $enc; } $key="KEY"; echo $transmitKey = base16Encode($key); echo "\r\n"; echo encode($key); $link="URL"; $crypted = base64_encode(encrypt($key, $link)); //echo $crypted;

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.3.60.0070.00716.75
8.3.50.0070.01516.63
8.3.40.0140.00718.98
8.3.30.0090.00618.75
8.3.20.0000.00820.39
8.3.10.0030.00523.57
8.3.00.0080.00019.38
8.2.180.0000.01416.63
8.2.170.0080.00822.96
8.2.160.0140.00420.57
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00019.20
8.2.120.0040.00426.35
8.2.110.0060.00322.08
8.2.100.0110.00017.84
8.2.90.0090.00018.28
8.2.80.0090.00017.97
8.2.70.0080.00018.05
8.2.60.0000.00818.16
8.2.50.0030.00718.10
8.2.40.0000.00820.36
8.2.30.0000.00821.16
8.2.20.0040.00418.00
8.2.10.0080.00017.93
8.2.00.0000.00717.94
8.1.280.0090.00925.92
8.1.270.0040.00422.15
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0040.00422.05
8.1.230.0080.00421.04
8.1.220.0000.00917.78
8.1.210.0050.00318.77
8.1.200.0060.00317.25
8.1.190.0030.00517.22
8.1.180.0000.00818.10
8.1.170.0030.00518.34
8.1.160.0000.00819.03
8.1.150.0040.00418.88
8.1.140.0060.00319.49
8.1.130.0040.00418.70
8.1.120.0070.00017.30
8.1.110.0040.00417.30
8.1.100.0050.00317.24
8.1.90.0100.00317.42
8.1.80.0000.00717.29
8.1.70.0030.00517.46
8.1.60.0050.00317.57
8.1.50.0060.00317.41
8.1.40.0000.00817.45
8.1.30.0040.00417.62
8.1.20.0100.00317.57
8.1.10.0000.00817.48
8.1.00.0000.00717.50
8.0.300.0000.00819.83
8.0.290.0000.00816.88
8.0.280.0040.00418.44
8.0.270.0030.00517.26
8.0.260.0000.00816.95
8.0.250.0030.00316.91
8.0.240.0000.00817.04
8.0.230.0080.00016.99
8.0.220.0030.00316.89
8.0.210.0050.00316.85
8.0.200.0030.00616.85
8.0.190.0060.00316.92
8.0.180.0000.00716.91
8.0.170.0040.00416.91
8.0.160.0040.00416.89
8.0.150.0040.00416.83
8.0.140.0000.00916.80
8.0.130.0000.00613.33
8.0.120.0070.00016.80
8.0.110.0050.00316.76
8.0.100.0040.00416.94
8.0.90.0070.00016.89
8.0.80.0100.00616.95
8.0.70.0040.00416.77
8.0.60.0000.00816.91
8.0.50.0000.00716.79
8.0.30.0120.00617.03
8.0.20.0120.01017.40
8.0.10.0000.00716.96
8.0.00.0130.00516.81
7.4.330.0050.00015.55
7.4.320.0030.00316.53
7.4.300.0030.00316.61
7.4.290.0030.00616.48
7.4.280.0000.00916.43
7.4.270.0000.00716.67
7.4.260.0000.00613.27
7.4.250.0030.00316.50
7.4.240.0000.00716.42
7.4.230.0070.00016.33
7.4.220.0050.01116.57
7.4.210.0130.00216.54
7.4.200.0030.00316.63
7.4.160.0160.00316.52
7.4.150.0130.00417.40
7.4.140.0140.00917.86
7.4.130.0170.00616.68
7.4.120.0100.01016.57
7.4.110.0070.01116.34
7.4.100.0070.01016.39
7.4.90.0100.00716.41
7.4.80.0200.00319.39
7.4.70.0060.01016.40
7.4.60.0090.00616.72
7.4.50.0130.00316.66
7.4.40.0070.01016.55
7.4.30.0170.00016.51
7.4.00.0070.01015.01
7.3.330.0040.00413.39
7.3.320.0000.00513.43
7.3.310.0040.00416.48
7.3.300.0000.00616.30
7.3.290.0000.00716.31
7.3.280.0070.00916.42
7.3.270.0140.00317.40
7.3.260.0200.01316.71
7.3.250.0120.00616.37
7.3.240.0070.01116.41
7.3.230.0160.00616.40
7.3.210.0120.00916.40
7.3.200.0090.00916.45
7.3.190.0000.01716.61
7.3.180.0070.01016.37
7.3.170.0070.01016.67
7.3.160.0100.00616.50
7.2.330.0170.00316.73
7.2.320.0030.01316.75
7.2.310.0060.01316.80
7.2.300.0150.00616.71
7.2.290.0000.02216.59
7.2.60.0030.01416.75
7.2.00.0060.00619.18
7.1.200.0030.01115.87
7.1.100.0070.00717.77
7.1.70.0030.00917.03
7.1.60.0130.01035.09
7.1.50.0190.00434.50
7.1.40.0210.01434.54
7.1.30.0160.02034.32
7.1.20.0220.00634.55
7.1.10.0060.00616.59
7.1.00.0070.00716.88
7.0.200.0070.00316.64
7.0.190.0000.01116.60
7.0.180.0090.00616.00
7.0.170.0040.01116.41
7.0.160.0070.00616.41
7.0.150.0060.00816.20
7.0.140.0120.00616.35
7.0.130.0030.01016.47
7.0.120.0060.00616.41
7.0.110.0060.00616.36
7.0.100.0060.00616.28
7.0.90.0050.00516.21
7.0.80.0060.00616.30
7.0.70.0040.00816.24
7.0.60.0040.00816.01
7.0.50.0060.00616.12
7.0.40.0000.01116.41
7.0.30.0080.00316.53
7.0.20.0040.00816.30
7.0.10.0030.00916.36
7.0.00.0060.00616.35

preferences:
54.91 ms | 400 KiB | 5 Q