3v4l.org

run code in 300+ PHP versions simultaneously
<?php function simple_encrypt($text, $salt = "earlysandwich.com") { return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $salt, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)))); } // This function will be used to decrypt data. function simple_decrypt($text, $salt = "earlysandwich.com") { return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $salt, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))); } // Encrypt a tring and echo it $encoded = simple_encrypt("this text will be encoded and decoded" , "secured"); echo "This is encoded string: ". $encoded; echo "<br />"; //this is to insert a new line in page // Now to decode the encoded text $decoded = simple_decrypt($encoded , "secured"); echo "This is decoded string: ". $decoded;

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.0100.00819.96
8.5.00.0120.00920.04
8.4.150.0010.00014.05
8.4.140.0120.00917.86
8.4.130.0110.00917.76
8.4.120.0120.00920.43
8.4.110.0110.00922.25
8.4.100.0120.00917.75
8.4.90.0050.00518.77
8.4.80.0060.00618.05
8.4.70.0130.00518.02
8.4.60.0130.00818.42
8.4.50.0150.00617.82
8.4.40.0090.00917.78
8.4.30.0170.00317.86
8.4.20.0110.01117.72
8.4.10.0130.00617.84
8.3.280.0130.00718.55
8.3.270.0110.00716.57
8.3.260.0120.00716.80
8.3.250.0120.00918.78
8.3.240.0080.00716.48
8.3.230.0130.00616.63
8.3.220.0110.00817.18
8.3.210.0110.01316.59
8.3.200.0050.00416.71
8.3.190.0060.00317.07
8.3.180.0130.00716.46
8.3.170.0040.01419.13
8.3.160.0070.01118.34
8.3.150.0150.00317.13
8.3.140.0070.01318.53
8.3.130.0060.00318.72
8.3.120.0160.00020.68
8.3.110.0060.00320.94
8.3.100.0030.00624.06
8.3.90.0000.00826.77
8.3.80.0070.00318.43
8.3.70.0120.00318.31
8.3.60.0060.01018.68
8.3.50.0100.00822.92
8.3.40.0100.01018.97
8.3.30.0140.00019.09
8.3.20.0050.00220.34
8.3.10.0080.00023.52
8.3.00.0000.00819.68
8.2.290.0110.00920.23
8.2.280.0040.00418.31
8.2.270.0070.01116.98
8.2.260.0080.00018.80
8.2.250.0060.00316.82
8.2.240.0130.00319.06
8.2.230.0080.00822.58
8.2.220.0060.00337.54
8.2.210.0060.00926.77
8.2.200.0030.00618.54
8.2.190.0120.00918.29
8.2.180.0060.00918.50
8.2.170.0070.01022.96
8.2.160.0100.00320.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0080.00019.71
8.2.110.0090.00019.38
8.2.100.0030.00917.62
8.2.90.0050.00319.22
8.2.80.0040.00417.97
8.2.70.0080.00017.50
8.2.60.0070.00417.68
8.2.50.0030.00518.07
8.2.40.0080.00018.21
8.2.30.0070.00019.35
8.2.20.0040.00417.56
8.2.10.0030.00517.94
8.2.00.0000.00817.57
8.1.330.0110.00720.36
8.1.320.0140.01016.13
8.1.310.0040.00416.89
8.1.300.0110.00718.04
8.1.290.0000.00930.84
8.1.280.0030.01425.92
8.1.270.0060.00324.01
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0070.00321.48
8.1.230.0070.00417.42
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0060.00317.22
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0060.00318.59
8.1.160.0000.00718.83
8.1.150.0030.00618.77
8.1.140.0000.00717.26
8.1.130.0070.00017.84
8.1.120.0000.00717.26
8.1.110.0050.00217.36
8.1.100.0030.00317.41
8.1.90.0040.00417.23
8.1.80.0040.00417.21
8.1.70.0040.00417.30
8.1.60.0000.00817.43
8.1.50.0060.00617.43
8.1.40.0040.00417.46
8.1.30.0000.00817.50
8.1.20.0050.00317.59
8.1.10.0040.00417.55
8.1.00.0040.00417.44
8.0.300.0000.00718.77
8.0.290.0000.00816.63
8.0.280.0030.00318.38
8.0.270.0000.00717.22
8.0.260.0030.00317.08
8.0.250.0000.00617.01
8.0.240.0000.00716.99
8.0.230.0000.00816.83
8.0.220.0030.00316.93
8.0.210.0030.00316.89
8.0.200.0000.00716.83
8.0.190.0050.00516.80
8.0.180.0000.00717.01
8.0.170.0040.00416.83
8.0.160.0020.00516.91
8.0.150.0030.00316.88
8.0.140.0040.00416.85
8.0.130.0060.00013.35
8.0.120.0040.00416.82
8.0.110.0040.00416.89
8.0.100.0040.00416.73
8.0.90.0000.00716.74
8.0.80.0090.00616.97
8.0.70.0040.00416.86
8.0.60.0040.00416.78
8.0.50.0000.00716.89
8.0.30.0110.00817.15
8.0.20.0080.01117.40
8.0.10.0030.00517.01
8.0.00.0120.00616.84
7.4.330.0030.00315.02
7.4.320.0000.00616.42
7.4.300.0000.00716.33
7.4.290.0000.00716.47
7.4.280.0050.00316.47
7.4.270.0070.00016.38
7.4.260.0070.00016.54
7.4.250.0040.00416.38
7.4.240.0040.00416.51
7.4.230.0070.00016.66
7.4.220.0070.01316.35
7.4.210.0080.00616.43
7.4.200.0000.00716.36
7.4.160.0040.01116.30
7.4.150.0090.00917.40
7.4.140.0080.01117.86
7.4.130.0100.00716.54
7.4.120.0100.01016.58
7.4.110.0040.01416.60
7.4.100.0060.01216.52
7.4.90.0150.00316.70
7.4.80.0090.00619.39
7.4.70.0070.01116.44
7.4.60.0060.01316.47
7.4.50.0030.00616.15
7.4.40.0120.00616.43
7.4.30.0070.01016.52
7.4.00.0100.00715.09
7.3.330.0000.00513.39
7.3.320.0050.00013.25
7.3.310.0030.00316.19
7.3.300.0030.00516.32
7.3.290.0100.00516.29
7.3.280.0100.00716.31
7.3.270.0100.00717.40
7.3.260.0140.00916.22
7.3.250.0070.01016.30
7.3.240.0130.00316.60
7.3.230.0000.01616.39
7.3.210.0150.00916.26
7.3.200.0120.00919.39
7.3.190.0060.01216.61
7.3.180.0120.00316.33
7.3.170.0090.00616.54
7.3.160.0080.00916.37
7.3.120.0110.00715.02
7.3.110.0060.00914.71
7.3.100.0060.00614.66
7.3.90.0110.00414.67
7.3.80.0000.01214.52
7.3.70.0080.00414.58
7.3.60.0040.00414.92
7.3.50.0040.01014.94
7.3.40.0040.00714.44
7.3.30.0110.00314.66
7.3.20.0000.01416.52
7.3.10.0060.01016.51
7.3.00.0000.01016.66
7.2.330.0170.00016.67
7.2.320.0110.00716.32
7.2.310.0070.01016.46
7.2.300.0110.00616.27
7.2.290.0100.01416.23
7.2.250.0090.00915.07
7.2.240.0090.00415.11
7.2.230.0040.01114.63
7.2.220.0040.01114.96
7.2.210.0060.00615.00
7.2.200.0100.00615.03
7.2.190.0030.00714.85
7.2.180.0030.00715.01
7.2.170.0060.00614.77
7.2.60.0000.00916.66
7.2.00.0000.01419.28
7.1.330.0060.00615.63
7.1.320.0090.00615.72
7.1.310.0060.00615.81
7.1.300.0000.01215.56
7.1.290.0000.00815.74
7.1.280.0070.00715.55
7.1.270.0000.01615.63
7.1.260.0000.01115.62
7.1.200.0070.00715.55
7.1.100.0070.00717.83
7.1.70.0000.01017.13
7.1.60.0110.01419.34
7.1.50.0100.01016.86
7.1.00.0100.06722.45
7.0.200.0030.00616.40
7.0.140.0030.07322.09
7.0.60.0070.06319.90
7.0.50.0100.07717.83
7.0.40.0030.04720.28
7.0.30.0300.05720.31
7.0.20.0300.06720.12
7.0.10.0070.06320.12
7.0.00.0130.07320.26
5.6.280.0130.06320.82
5.6.210.0130.07720.77
5.6.200.0000.04318.23
5.6.190.0070.04020.51
5.6.180.0230.05020.44
5.6.170.0170.04320.52
5.6.160.0030.07320.63
5.6.150.0100.07718.30
5.6.140.0130.06718.18
5.6.130.0100.06018.33
5.6.120.0100.06721.02
5.6.110.0100.04721.16
5.6.100.0100.04021.07
5.6.90.0030.06021.17
5.6.80.0030.04020.57
5.5.350.0270.07020.41
5.5.340.0130.03317.98
5.5.330.0000.04720.51
5.5.320.0470.07320.36
5.5.310.0200.09020.24
5.5.300.0030.08318.03
5.5.290.0130.07318.09
5.5.280.0030.08020.74
5.5.270.0030.09021.05
5.5.260.0100.04320.90
5.5.250.0100.09020.73
5.5.240.0230.06320.32
5.4.450.0070.03319.61
5.4.440.0070.05719.38
5.4.430.0430.04019.59
5.4.420.0100.07319.55
5.4.410.0000.06319.02
5.4.400.0100.05318.82
5.4.390.0070.06018.75
5.4.380.0270.06018.52
5.4.370.0130.05318.57
5.4.360.0100.06018.78
5.4.350.0200.04313.80
5.4.340.0070.05013.79
5.4.320.0130.04314.30
5.4.310.0130.04014.28
5.4.300.0130.03714.30
5.4.290.0030.04714.27
5.4.280.0130.03014.10
5.4.270.0200.04014.11
5.4.260.0100.04014.27
5.4.250.0070.04014.39
5.4.240.0100.03714.21
5.4.230.0170.03314.18
5.4.220.0070.04314.36
5.4.210.0130.04714.09
5.4.200.0070.04314.38
5.4.190.0100.03714.19
5.4.180.0070.04014.28
5.4.170.0170.03014.24
5.4.160.0070.04014.22
5.4.150.0070.04014.17
5.4.140.0100.05013.84
5.4.130.0070.04013.90
5.4.120.0070.03713.79
5.4.110.0130.03313.85
5.4.100.0070.03713.78
5.4.90.0100.03714.00
5.4.80.0070.04013.80
5.4.70.0070.04313.76
5.4.60.0130.03713.85
5.4.50.0130.03313.71
5.4.40.0070.04013.79
5.4.30.0170.03013.70
5.4.20.0130.03313.71
5.4.10.0100.03313.75
5.4.00.0100.03713.47
5.3.290.0130.04314.71
5.3.280.0130.03314.57
5.3.270.0170.03314.67
5.3.260.0170.03714.55
5.3.250.0130.03314.79
5.3.240.0100.03714.63
5.3.230.0030.04714.79
5.3.220.0130.03714.57
5.3.210.0070.04314.61
5.3.200.0030.04314.68
5.3.190.0070.04714.73
5.3.180.0170.04714.61
5.3.170.0070.04314.54
5.3.160.0170.03014.49
5.3.150.0070.04314.67
5.3.140.0100.03714.48
5.3.130.0030.04714.53
5.3.120.0030.04714.54
5.3.110.0070.04314.47
5.3.100.0100.03713.98
5.3.90.0030.04313.95
5.3.80.0070.04013.98
5.3.70.0070.04014.09
5.3.60.0170.03314.05
5.3.50.0100.03714.12
5.3.40.0170.02714.00
5.3.30.0100.03013.94
5.3.20.0100.03013.68
5.3.10.0030.03713.78
5.3.00.0070.03713.62
5.2.170.0000.03711.19
5.2.160.0030.03011.21
5.2.150.0030.03011.10
5.2.140.0000.03311.14
5.2.130.0070.03011.16
5.2.120.0030.03011.18
5.2.110.0000.03311.17
5.2.100.0000.03311.23
5.2.90.0030.03011.06
5.2.80.0100.03011.13
5.2.70.0000.04011.22
5.2.60.0070.02711.04
5.2.50.0030.03011.07
5.2.40.0070.02710.97
5.2.30.0030.03010.91
5.2.20.0030.03011.00
5.2.10.0000.03311.02
5.2.00.0100.02310.70
5.1.60.0030.02310.08
5.1.50.0000.0279.96
5.1.40.0030.0279.94
5.1.30.0070.02310.28
5.1.20.0070.02310.34
5.1.10.0070.02310.02
5.1.00.0030.02710.02
5.0.50.0030.0208.60
5.0.40.0030.0208.36
5.0.30.0070.0278.19
5.0.20.0070.0178.24
5.0.10.0030.0208.18
5.0.00.0000.0338.21
4.4.90.0000.0175.87
4.4.80.0070.0105.86
4.4.70.0000.0175.95
4.4.60.0000.0175.81
4.4.50.0030.0136.01
4.4.40.0030.0235.82
4.4.30.0000.0175.84
4.4.20.0030.0135.91
4.4.10.0030.0135.88
4.4.00.0000.0275.90
4.3.110.0070.0105.77
4.3.100.0030.0135.84
4.3.90.0030.0135.74
4.3.80.0030.0235.78
4.3.70.0030.0135.75
4.3.60.0000.0175.86
4.3.50.0030.0135.76
4.3.40.0070.0205.71
4.3.30.0000.0174.54
4.3.20.0030.0134.49
4.3.10.0030.0134.48
4.3.00.0030.02015.77

preferences:
18.69 ms | 403 KiB | 5 Q