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("Arwani Wawau" , "secured"); echo "This is encoded string: $encoded \n"; // Now to decode the encoded text $decoded = simple_decrypt($encoded , "secured"); echo "This is decoded string: $decoded \n";

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.0120.00316.75
8.3.50.0030.01018.08
8.3.40.0120.00318.80
8.3.30.0100.00719.09
8.3.20.0040.00420.34
8.3.10.0050.00321.93
8.3.00.0080.00018.04
8.2.180.0110.00716.63
8.2.170.0000.01222.96
8.2.160.0130.00020.52
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0090.00926.16
8.2.120.0080.00020.97
8.2.110.0060.00322.23
8.2.100.0070.00417.91
8.2.90.0040.00417.63
8.2.80.0000.00818.98
8.2.70.0040.00417.93
8.2.60.0000.00817.93
8.2.50.0030.00618.10
8.2.40.0040.00420.46
8.2.30.0040.00419.82
8.2.20.0080.00017.75
8.2.10.0040.00418.01
8.2.00.0000.00817.75
8.1.280.0150.00625.92
8.1.270.0090.00022.08
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0060.00320.96
8.1.230.0040.00820.96
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0040.00417.11
8.1.190.0070.00717.39
8.1.180.0060.00618.10
8.1.170.0000.00918.47
8.1.160.0000.00721.89
8.1.150.0000.00718.77
8.1.140.0040.00417.34
8.1.130.0000.00717.83
8.1.120.0050.00217.33
8.1.110.0080.00017.30
8.1.100.0040.00417.17
8.1.90.0040.00417.41
8.1.80.0080.00017.40
8.1.70.0040.00417.38
8.1.60.0040.00417.43
8.1.50.0030.00517.43
8.1.40.0040.00417.46
8.1.30.0000.00817.58
8.1.20.0050.00317.64
8.1.10.0040.00417.50
8.1.00.0060.00317.48
8.0.300.0050.00320.16
8.0.290.0030.00616.75
8.0.280.0000.00718.36
8.0.270.0070.00016.77
8.0.260.0060.00017.20
8.0.250.0000.00716.87
8.0.240.0040.00416.93
8.0.230.0000.00716.92
8.0.220.0040.00416.79
8.0.210.0000.00716.89
8.0.200.0000.00717.03
8.0.190.0040.00416.86
8.0.180.0080.00016.93
8.0.170.0040.00416.92
8.0.160.0030.00416.99
8.0.150.0030.00516.80
8.0.140.0030.00516.76
8.0.130.0050.00013.37
8.0.120.0000.00716.89
8.0.110.0000.00716.90
8.0.100.0070.00016.79
8.0.90.0000.00816.90
8.0.80.0160.00616.92
8.0.70.0070.00016.86
8.0.60.0070.00016.86
8.0.50.0000.00716.99
8.0.30.0150.00717.12
8.0.20.0050.02217.41
8.0.10.0000.00816.93
8.0.00.0100.00716.86
7.4.330.0000.00515.03
7.4.320.0030.00316.41
7.4.300.0030.00316.52
7.4.290.0030.00316.44
7.4.280.0000.00916.60
7.4.270.0030.00316.47
7.4.260.0040.00416.45
7.4.250.0040.00416.50
7.4.240.0040.00316.51
7.4.230.0040.00416.38
7.4.220.0110.00716.34
7.4.210.0060.00816.53
7.4.200.0000.00716.59
7.4.160.0000.01616.54
7.4.150.0090.01617.40
7.4.140.0080.01217.86
7.4.130.0090.00816.48
7.4.120.0090.01116.41
7.4.110.0200.00416.63
7.4.100.0170.00716.53
7.4.90.0100.00716.40
7.4.80.0200.00319.39
7.4.70.0060.01016.41
7.4.60.0160.00016.54
7.4.50.0000.00816.60
7.4.40.0150.00316.35
7.4.30.0140.00316.54
7.4.00.0060.00614.73
7.3.330.0000.00613.13
7.3.320.0000.00513.31
7.3.310.0040.00416.37
7.3.300.0070.00016.31
7.3.290.0070.00916.29
7.3.280.0090.00916.36
7.3.270.0100.01017.40
7.3.260.0100.00716.46
7.3.250.0070.01316.35
7.3.240.0130.01016.35
7.3.230.0080.00816.42
7.3.210.0080.00816.48
7.3.200.0090.01019.39
7.3.190.0070.01016.51
7.3.180.0070.01316.34
7.3.170.0090.00616.67
7.3.160.0070.01016.52
7.2.330.0030.01516.38
7.2.320.0070.01116.60
7.2.310.0100.01316.40
7.2.300.0030.01216.59
7.2.290.0100.00716.53
7.2.80.0180.00316.51
7.2.60.0040.01116.86
7.2.00.0030.00919.20
7.1.200.0030.00915.70
7.1.70.0100.00316.88
7.1.60.0090.00317.12
7.1.50.0070.01316.76
7.1.00.0000.07322.46
7.0.200.0030.01316.82
7.0.140.0030.03022.12
7.0.60.0070.04020.05
7.0.50.0030.05318.00
7.0.40.0100.08020.14
7.0.30.0330.04020.17
7.0.20.0330.07320.24
7.0.10.0070.05020.12
7.0.00.0130.07320.27
5.6.280.0130.06320.81
5.6.210.0130.05320.69
5.6.200.0000.06018.22
5.6.190.0130.03720.50
5.6.180.0170.04720.82
5.6.170.0330.07320.56
5.6.160.0130.05720.48
5.6.150.0030.08318.29
5.6.140.0100.06018.19
5.6.130.0000.04718.20
5.6.120.0070.07321.07
5.6.110.0030.09021.09
5.6.100.0100.06721.04
5.6.90.0100.08021.11
5.6.80.0130.07720.44
5.5.350.0200.08020.42
5.5.340.0030.08318.21
5.5.330.0070.08720.43
5.5.320.0370.06720.35
5.5.310.0300.07320.52
5.5.300.0070.08017.99
5.5.290.0070.07318.05
5.5.280.0070.07020.88
5.5.270.0100.07720.89
5.5.260.0100.08020.73
5.5.250.0030.04020.75
5.5.240.0270.06020.34
5.4.450.0130.06019.67
5.4.440.0430.05719.53
5.4.430.0170.05019.26
5.4.420.0200.05019.40
5.4.410.0130.05018.74
5.4.400.0130.07018.55
5.4.390.0100.05318.86
5.4.380.0100.05718.76
5.4.370.0230.05718.63
5.4.360.0230.05318.81
5.4.350.0230.05318.54
5.4.340.0300.04718.52
5.4.320.0230.05718.52
5.4.310.0430.04318.54
5.4.300.0270.05018.75
5.4.290.0170.05718.86
5.4.280.0270.05318.87
5.4.270.0400.05318.79
5.4.260.0200.05318.79
5.4.250.0230.05718.76
5.4.240.0330.06318.53
5.4.230.0470.04018.50
5.4.220.0330.04318.52
5.4.210.0200.05718.61
5.4.200.0270.04716.80
5.4.190.0370.05018.77
5.4.180.0170.06018.64
5.4.170.0270.05018.78
5.4.160.0370.04318.81
5.4.150.0270.05318.49
5.4.140.0170.06016.50
5.4.130.0170.05716.30
5.4.120.0200.04316.28
5.4.110.0200.04716.39
5.4.100.0300.04716.49
5.4.90.0170.05716.28
5.4.80.0330.03716.29
5.4.70.0130.05716.33
5.4.60.0200.04716.35
5.4.50.0230.04716.31
5.4.40.0270.04716.31
5.4.30.0200.05316.34
5.4.20.0430.03716.30
5.4.10.0430.06316.21
5.4.00.0230.06315.73
5.3.290.0100.06014.68
5.3.280.0200.05314.63
5.3.270.0270.04314.61
5.3.260.0200.05314.79
5.3.250.0300.04314.79
5.3.240.0200.05014.60
5.3.230.0170.05314.79
5.3.220.0300.04014.68
5.3.210.0230.05014.62
5.3.200.0230.04714.74
5.3.190.0330.04014.63
5.3.180.0230.04714.55
5.3.170.0130.05714.59
5.3.160.0230.04714.79
5.3.150.0170.05714.61
5.3.140.0170.06014.55
5.3.130.0300.05314.60
5.3.120.0270.05014.60
5.3.110.0200.05714.76
5.3.100.0230.05014.09
5.3.90.0300.04714.12
5.3.80.0270.05014.07
5.3.70.0230.05714.12
5.3.60.0130.06013.98
5.3.50.0270.04313.97
5.3.40.0230.04714.16
5.3.30.0200.05313.91
5.3.20.0230.04713.82
5.3.10.0170.05013.82
5.3.00.0170.05313.75
5.2.170.0100.05011.19
5.2.160.0130.04311.20
5.2.150.0170.04011.17
5.2.140.0200.04011.18
5.2.130.0170.04011.16
5.2.120.0170.03711.31
5.2.110.0130.04311.21
5.2.100.0100.04311.14
5.2.90.0200.03711.21
5.2.80.0200.03711.14
5.2.70.0130.04311.10
5.2.60.0200.04011.18
5.2.50.0170.04311.07
5.2.40.0130.04011.00
5.2.30.0130.04311.09
5.2.20.0230.03311.00
5.2.10.0270.03010.85
5.2.00.0200.03310.91
5.1.60.0130.03310.03
5.1.50.0070.0409.99
5.1.40.0100.03710.01
5.1.30.0100.03310.55
5.1.20.0100.04310.39
5.1.10.0100.03010.18
5.1.00.0030.03710.18
5.0.50.0030.0308.67
5.0.40.0070.0278.41
5.0.30.0070.0408.41
5.0.20.0000.0308.20
5.0.10.0070.0278.26
5.0.00.0130.0338.30
4.4.90.0070.0175.94
4.4.80.0070.0206.01
4.4.70.0000.0305.92
4.4.60.0130.0175.99
4.4.50.0070.0235.89
4.4.40.0070.0375.91
4.4.30.0000.0275.89
4.4.20.0100.0205.96
4.4.10.0070.0236.04
4.4.00.0130.0306.05
4.3.110.0100.0205.84
4.3.100.0130.0175.95
4.3.90.0170.0175.87
4.3.80.0070.0335.82
4.3.70.0030.0235.86
4.3.60.0070.0205.83
4.3.50.0100.0205.81
4.3.40.0100.0305.75
4.3.30.0100.0174.56
4.3.20.0030.0234.57
4.3.10.0030.0234.61
4.3.00.0000.0306.75

preferences:
84.69 ms | 400 KiB | 5 Q