3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Crypt { /** * Returns an encrypted & utf8-encoded */ public static function encrypt($pure_string, $encryption_key = 'poney') { $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $encrypted_string = mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, $pure_string, MCRYPT_MODE_ECB, $iv); return $encrypted_string; } /** * Returns decrypted original string */ public static function decrypt($encrypted_string, $encryption_key = 'poney') { $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $decrypted_string = mcrypt_decrypt(MCRYPT_BLOWFISH, $encryption_key, $encrypted_string, MCRYPT_MODE_ECB, $iv); return $decrypted_string; } } $hashParams = array( 'plopi' => 'gato', 'token' => 'lol' ); var_dump($hashParams); $hashParams = 46521; $strEncoded = Crypt::encrypt(json_encode($hashParams)); echo "\n encoded\t:" . json_encode($hashParams). "\n"; echo "\n encoded\t:" . $strEncoded. "\n"; echo "\n decode encoded\t:" . Crypt::decrypt($strEncoded)."\n"; var_dump(json_decode(Crypt::decrypt($strEncoded), true));

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.120.0000.01620.72
8.3.110.0030.00620.94
8.3.100.0030.00624.06
8.3.90.0060.00326.77
8.3.80.0060.00317.97
8.3.70.0030.01216.63
8.3.60.0130.00918.67
8.3.50.0070.01222.11
8.3.40.0110.00418.67
8.3.30.0060.00819.21
8.3.20.0050.00220.34
8.3.10.0000.00921.77
8.3.00.0040.00419.12
8.2.240.0080.00017.18
8.2.230.0070.01122.58
8.2.220.0120.00637.54
8.2.210.0080.00026.77
8.2.200.0100.00018.29
8.2.190.0090.00618.51
8.2.180.0100.01318.66
8.2.170.0160.00022.96
8.2.160.0100.00322.17
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0000.00819.44
8.2.110.0070.00321.11
8.2.100.0080.00417.72
8.2.90.0050.00318.09
8.2.80.0080.00017.97
8.2.70.0060.00317.50
8.2.60.0050.00617.91
8.2.50.0000.00918.07
8.2.40.0000.00818.22
8.2.30.0040.00418.04
8.2.20.0030.00717.73
8.2.10.0040.00418.01
8.2.00.0050.00217.66
8.1.300.0030.00620.30
8.1.290.0040.00430.84
8.1.280.0000.01825.92
8.1.270.0080.00018.87
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0070.00319.14
8.1.230.0050.00520.82
8.1.220.0000.00817.79
8.1.210.0050.00318.85
8.1.200.0000.01217.35
8.1.190.0050.00317.23
8.1.180.0000.00818.10
8.1.170.0040.00418.66
8.1.160.0040.00422.04
8.1.150.0040.00418.86
8.1.140.0000.00819.05
8.1.130.0030.00417.86
8.1.120.0030.00517.35
8.1.110.0050.00217.45
8.1.100.0000.00817.38
8.1.90.0040.00317.34
8.1.80.0070.00017.43
8.1.70.0070.00017.40
8.1.60.0040.00417.63
8.1.50.0040.00417.47
8.1.40.0030.00717.59
8.1.30.0060.00317.67
8.1.20.0050.00317.63
8.1.10.0050.00317.54
8.1.00.0000.00817.59
8.0.300.0040.00420.13
8.0.290.0060.00316.75
8.0.280.0090.00018.42
8.0.270.0040.00416.85
8.0.260.0000.00617.23
8.0.250.0030.00516.96
8.0.240.0030.00317.04
8.0.230.0030.00316.98
8.0.220.0030.00316.99
8.0.210.0070.00016.95
8.0.200.0030.00616.88
8.0.190.0030.00617.00
8.0.180.0030.00716.93
8.0.170.0040.00416.83
8.0.160.0050.00317.01
8.0.150.0030.00516.84
8.0.140.0000.00716.85
8.0.130.0050.00013.32
8.0.120.0000.00816.93
8.0.110.0040.00416.96
8.0.100.0040.00416.93
8.0.90.0000.00716.84
8.0.80.0100.01016.81
8.0.70.0000.00716.94
8.0.60.0080.00016.82
8.0.50.0000.00816.80
8.0.30.0120.01017.13
8.0.20.0050.01317.40
8.0.10.0050.00217.02
8.0.00.0090.00916.83
7.4.330.0000.00515.03
7.4.320.0030.00316.57
7.4.300.0040.00416.55
7.4.290.0030.00316.66
7.4.280.0030.00516.47
7.4.270.0020.00516.68
7.4.260.0000.00716.56
7.4.250.0000.00716.50
7.4.240.0070.00016.60
7.4.230.0080.00016.49
7.4.220.0110.00716.52
7.4.210.0110.00316.57
7.4.200.0030.00416.44
7.4.160.0060.00916.54
7.4.150.0130.00617.40
7.4.140.0050.01217.86
7.4.130.0120.00616.50
7.4.120.0070.00916.60
7.4.110.0190.00316.58
7.4.100.0070.01016.50
7.4.90.0080.00816.70
7.4.80.0100.00719.39
7.4.70.0140.00316.54
7.4.60.0100.00716.65
7.4.50.0000.00816.48
7.4.40.0040.01316.61
7.4.30.0120.00616.60
7.4.00.0070.00614.92
7.3.330.0000.00713.26
7.3.320.0030.00313.35
7.3.310.0000.00716.40
7.3.300.0000.00716.41
7.3.290.0060.01116.41
7.3.280.0070.01116.38
7.3.270.0120.01017.40
7.3.260.0070.01116.37
7.3.250.0120.00516.37
7.3.240.0170.00316.57
7.3.230.0090.00916.55
7.3.210.0050.01116.34
7.3.200.0080.00919.39
7.3.190.0160.00616.56
7.3.180.0070.01116.41
7.3.170.0030.01416.63
7.3.160.0120.00916.30
7.3.120.0070.01114.46
7.3.110.0090.00914.57
7.3.100.0100.00714.89
7.3.90.0110.00414.66
7.3.80.0060.00914.91
7.3.70.0120.00314.71
7.3.60.0110.00714.95
7.3.50.0110.00314.68
7.3.40.0100.00714.89
7.3.30.0070.00714.78
7.3.20.0070.00316.64
7.3.10.0040.00816.65
7.3.00.0040.00716.61
7.2.330.0060.01216.27
7.2.320.0200.00316.25
7.2.310.0150.00316.50
7.2.300.0060.01116.58
7.2.290.0110.00716.42
7.2.250.0030.01614.96
7.2.240.0120.00914.99
7.2.230.0030.00915.15
7.2.220.0000.01514.86
7.2.210.0070.01014.84
7.2.200.0090.00614.95
7.2.190.0100.01015.00
7.2.180.0030.01314.91
7.2.170.0070.00714.93
7.2.60.0040.01116.85
7.1.330.0100.00315.77
7.1.320.0070.00715.86
7.1.310.0000.01415.40
7.1.300.0050.00815.53
7.1.290.0050.00915.73
7.1.280.0100.00315.87
7.1.270.0040.00815.55
7.1.260.0000.00915.76
7.1.200.0060.00915.38
7.1.70.0120.00617.11
7.1.60.0130.01019.46
7.1.50.0030.01416.85
7.1.00.0030.07722.37
7.0.200.0040.00416.63
7.0.140.0030.03322.04
7.0.110.0100.08019.95
7.0.100.0170.07319.90
7.0.90.0030.09019.98
7.0.80.0130.07020.01
7.0.70.0070.06719.93
7.0.60.0070.03719.89
7.0.50.0100.03720.48
7.0.40.0030.04720.22
7.0.30.0100.05320.11
7.0.20.0000.05320.10
7.0.10.0030.04320.02
7.0.00.0100.03720.11
5.6.280.0030.07321.13
5.6.260.0100.05020.62
5.6.250.0030.05720.83
5.6.240.0030.08320.65
5.6.230.0100.07320.64
5.6.220.0070.03720.41
5.6.210.0070.05020.53
5.6.200.0030.04021.22
5.6.190.0030.04321.26
5.6.180.0030.04321.07
5.6.170.0070.04721.04
5.6.160.0030.04321.07
5.6.150.0130.03021.26
5.6.140.0070.04021.18
5.6.130.0030.04721.16
5.6.120.0000.04321.27
5.6.110.0200.02321.14
5.6.100.0000.04721.17
5.6.90.0000.05021.00
5.6.80.0030.04720.44
5.6.70.0030.06320.56
5.6.60.0100.06720.43
5.6.50.0070.03720.50
5.6.40.0070.03720.33
5.6.30.0030.04020.40
5.6.20.0070.03720.36
5.6.10.0070.03720.38
5.6.00.0070.03720.65
5.5.380.0100.07720.49
5.5.370.0000.05020.20
5.5.360.0130.03020.51
5.5.350.0070.04020.39
5.5.340.0070.03720.94
5.5.330.0070.03720.96
5.5.320.0030.04320.93
5.5.310.0000.05720.77
5.5.300.0070.04320.88
5.5.290.0030.05321.03
5.5.280.0000.08720.89
5.5.270.0000.04721.05
5.5.260.0130.03721.00
5.5.250.0000.04720.70
5.5.240.0000.04720.38
5.5.230.0070.07320.35
5.5.220.0100.04320.39
5.5.210.0100.04320.48
5.5.200.0030.04020.25
5.5.190.0030.05320.21
5.5.180.0070.03720.41
5.5.160.0000.04320.27
5.5.150.0070.07320.37
5.5.140.0070.08320.28
5.5.130.0130.07020.28
5.5.120.0130.07320.27
5.5.110.0100.07720.13
5.5.100.0070.07720.23
5.5.90.0070.04320.16
5.5.80.0070.07320.10
5.5.70.0130.07720.21
5.5.60.0070.08320.29
5.5.50.0170.04320.23
5.5.40.0030.08020.09
5.5.30.0200.06720.05
5.5.20.0100.07020.10
5.5.10.0170.07020.13
5.5.00.0030.05720.10
5.4.450.0000.04719.66
5.4.440.0000.04319.50
5.4.430.0030.04019.50
5.4.420.0030.04719.34
5.4.410.0030.07319.20
5.4.400.0000.04719.11
5.4.390.0070.04719.01
5.4.380.0030.03719.02
5.4.370.0070.03719.25
5.4.360.0070.03719.31
5.4.350.0030.04019.04
5.4.340.0000.04019.23
5.4.320.0030.04019.03
5.4.310.0100.07019.14
5.4.300.0100.07719.00
5.4.290.0070.07719.27
5.4.280.0200.07319.08
5.4.270.0030.07719.05
5.4.260.0070.07319.04
5.4.250.0070.06019.01
5.4.240.0100.07319.22
5.4.230.0030.04719.04
5.4.220.0130.07319.36
5.4.210.0100.07019.36
5.4.200.0130.06719.18
5.4.190.0030.07718.98
5.4.180.0030.07319.33
5.4.170.0100.06719.29
5.4.160.0130.07019.00
5.4.150.0170.07019.25
5.4.140.0030.04716.44
5.4.130.0070.04316.39
5.4.120.0100.06716.45
5.4.110.0170.06016.38
5.4.100.0200.04716.64
5.4.90.0130.06316.57
5.4.80.0070.04316.62
5.4.70.0130.06016.53
5.4.60.0100.04016.51
5.4.50.0100.04016.38
5.4.40.0030.04716.38
5.4.30.0100.06316.49
5.4.20.0100.06316.51
5.4.10.0030.08016.71
5.4.00.0070.04715.97
5.3.290.0100.03014.70
5.3.280.0030.04714.73
5.3.270.0030.04714.75
5.3.260.0000.08714.64
5.3.250.0070.07014.63
5.3.240.0000.06314.70
5.3.230.0030.07714.63
5.3.220.0130.06714.43
5.3.210.0130.06314.59
5.3.200.0030.07714.60
5.3.190.0070.07314.70
5.3.180.0070.07714.55
5.3.170.0100.07014.53
5.3.160.0030.07714.71
5.3.150.0030.05714.80
5.3.140.0100.06714.60
5.3.130.0000.07714.64
5.3.120.0070.08014.59
5.3.110.0030.05314.56
5.3.100.0070.07314.00
5.3.90.0030.05713.99
5.3.80.0070.06314.04
5.3.70.0100.05313.98
5.3.60.0000.04314.02
5.3.50.0030.07713.98
5.3.40.0130.07013.93
5.3.30.0130.06713.95
5.3.20.0070.07013.71
5.3.10.0070.03313.64
5.3.00.0030.04713.80
5.2.170.0030.05711.87
5.2.160.0000.04011.87
5.2.150.0000.05711.87
5.2.140.0030.06311.87
5.2.130.0070.04011.87
5.2.120.0070.02711.87
5.2.110.0030.03011.87
5.2.100.0100.05711.87
5.2.90.0070.03311.87
5.2.80.0100.05711.87
5.2.70.0130.03711.87
5.2.60.0100.05311.87
5.2.50.0030.06011.87
5.2.40.0100.03711.87
5.2.30.0000.06311.87
5.2.20.0000.06711.87
5.2.10.0100.05011.87
5.2.00.0070.02711.87
5.1.60.0030.04711.87
5.1.50.0030.02711.87
5.1.40.0000.04711.87
5.1.30.0030.05711.87
5.1.20.0070.05311.87
5.1.10.0030.06311.87
5.1.00.0070.04311.87
5.0.50.0030.02711.87
5.0.40.0030.04311.87
5.0.30.0030.06311.87
5.0.20.0100.03711.87
5.0.10.0070.02311.87
5.0.00.0100.04711.87
4.4.90.0000.03711.87
4.4.80.0000.03711.87
4.4.70.0000.01711.87
4.4.60.0030.03711.87
4.4.50.0030.02011.87
4.4.40.0000.04311.87
4.4.30.0000.03711.87
4.4.20.0030.03011.87
4.4.10.0000.03011.87
4.4.00.0030.04711.87
4.3.110.0030.03711.87
4.3.100.0030.02711.87
4.3.90.0030.02311.87
4.3.80.0030.05011.87
4.3.70.0000.03011.87
4.3.60.0000.02011.87
4.3.50.0030.01711.87
4.3.40.0030.05011.87
4.3.30.0030.02311.87
4.3.20.0000.02711.87
4.3.10.0030.03311.87
4.3.00.0000.02311.87

preferences:
30.37 ms | 403 KiB | 5 Q