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 \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.0100.01018.56
8.3.50.0130.00522.92
8.3.40.0140.00018.97
8.3.30.0040.01119.12
8.3.20.0070.00020.29
8.3.10.0070.00623.22
8.3.00.0070.00622.10
8.2.180.0170.00316.88
8.2.170.0120.00622.96
8.2.160.0120.00322.25
8.2.150.0070.00025.66
8.2.140.0030.00924.66
8.2.130.0140.00325.41
8.2.120.0080.00021.93
8.2.110.0050.00423.46
8.2.100.0080.00221.25
8.2.90.0000.00821.21
8.2.80.0040.00421.76
8.2.70.0020.00621.21
8.2.60.0110.00421.14
8.2.50.0010.00721.14
8.2.40.0090.00322.27
8.2.30.0020.00722.02
8.2.20.0040.00721.18
8.2.10.0070.00121.36
8.2.00.0020.00621.19
8.1.280.0090.00925.92
8.1.270.0050.00924.66
8.1.260.0020.00625.51
8.1.250.0040.00726.38
8.1.240.0050.00424.29
8.1.230.0020.00821.88
8.1.220.0040.00521.20
8.1.210.0050.00421.72
8.1.200.0090.00220.95
8.1.190.0050.00420.95
8.1.180.0020.00621.38
8.1.170.0020.00921.58
8.1.160.0060.00221.71
8.1.150.0020.00621.74
8.1.140.0060.00220.96
8.1.130.0040.00421.24
8.1.120.0060.00521.01
8.1.110.0070.00121.04
8.1.100.0070.00421.00
8.1.90.0020.00621.03
8.1.80.0040.00421.00
8.1.70.0030.00520.97
8.1.60.0060.00621.04
8.1.50.0070.00421.07
8.1.40.0060.00321.08
8.1.30.0030.00521.10
8.1.20.0040.00421.11
8.1.10.0060.00521.07
8.1.00.0070.00221.06
8.0.300.0060.00222.22
8.0.290.0080.00220.71
8.0.280.0070.00421.49
8.0.270.0010.00620.94
8.0.260.0040.00621.52
8.0.250.0040.00720.83
8.0.240.0140.00220.75
8.0.230.0050.00720.81
8.0.220.0100.00320.77
8.0.210.0100.00220.74
8.0.200.0030.00620.75
8.0.190.0030.00520.76
8.0.180.0030.00520.81
8.0.170.0080.00420.78
8.0.160.0050.00420.82
8.0.150.0080.00320.79
8.0.140.0080.00320.77
8.0.130.0070.00319.01
8.0.120.0060.00620.77
8.0.110.0040.00420.74
8.0.100.0020.00820.84
8.0.90.0110.00020.76
8.0.80.0120.00320.81
8.0.70.0030.00920.76
8.0.60.0130.00620.79
8.0.50.0090.00720.68
8.0.30.0070.01019.60
8.0.20.0100.00919.82
8.0.10.0100.00720.76
8.0.00.0110.00919.36
7.4.330.0040.00419.85
7.4.320.0110.00820.54
7.4.300.0160.00720.64
7.4.290.0140.00720.53
7.4.280.0140.00620.51
7.4.270.0130.00520.57
7.4.260.0110.00320.55
7.4.250.0060.00620.59
7.4.240.0100.00619.23
7.4.230.0110.00520.63
7.4.220.0210.00620.64
7.4.210.0100.00920.59
7.4.200.0100.00220.53
7.4.190.0270.00724.66
7.4.180.0210.00824.66
7.4.160.0130.00720.61
7.4.150.0180.00421.03
7.4.140.0110.00920.13
7.4.130.0150.00519.16
7.4.120.0150.00819.20
7.4.110.0170.00820.48
7.4.100.0200.00720.65
7.4.90.0180.00920.56
7.4.80.0190.00922.03
7.4.70.0170.00820.67
7.4.60.0120.01020.52
7.4.50.0160.00820.51
7.4.40.0230.00220.64
7.4.30.0200.00520.69
7.4.20.0250.00424.66
7.4.10.0240.00324.66
7.4.00.0110.01118.22
7.3.330.0130.00618.88
7.3.320.0120.00418.96
7.3.310.0110.00620.42
7.3.300.0100.00720.49
7.3.290.0120.00718.36
7.3.280.0100.01018.41
7.3.270.0310.01821.03
7.3.260.0160.00720.61
7.3.250.0190.00419.09
7.3.240.0170.00820.53
7.3.230.0150.00620.63
7.3.220.0120.00424.66
7.3.210.0120.01120.45
7.3.200.0150.01022.03
7.3.190.0120.00720.46
7.3.180.0200.00420.48
7.3.170.0130.00220.54
7.3.160.0100.00720.69
7.3.150.0140.00324.66
7.3.140.0220.00024.66
7.3.130.0290.00024.66
7.3.120.0170.00919.85
7.3.110.0070.01019.89
7.3.100.0120.01319.66
7.3.90.0200.00219.70
7.3.80.0140.00919.59
7.3.70.0120.01119.66
7.3.60.0160.00319.75
7.3.50.0170.00519.68
7.3.40.0100.01119.67
7.3.30.0090.00818.02
7.3.20.1520.00418.68
7.3.10.1230.00918.67
7.3.00.0920.00718.60
7.2.340.0230.00024.66
7.2.330.0170.01020.46
7.2.320.0180.00720.49
7.2.310.0130.01120.67
7.2.300.0150.00720.61
7.2.290.0190.00520.49
7.2.280.0140.00424.66
7.2.270.0150.00024.66
7.2.260.0150.01224.66
7.2.250.0080.01019.86
7.2.240.0130.00719.80
7.2.230.0110.00819.69
7.2.220.0100.00819.79
7.2.210.0110.00519.74
7.2.200.0120.00519.79
7.2.190.0060.01019.66
7.2.180.0080.00719.77
7.2.170.0140.00519.79
7.2.160.0140.00719.50
7.2.150.1370.00819.80
7.2.140.2110.01119.79
7.2.130.1590.00819.71
7.2.120.1850.00719.64
7.2.110.0870.00817.90
7.2.100.0960.01317.89
7.2.90.1210.00918.05
7.2.80.1000.00417.81
7.2.70.1570.00417.99
7.2.60.0700.00817.56
7.2.50.0920.01117.92
7.2.40.0880.00418.04
7.2.30.1360.00618.09
7.2.20.0730.00718.01
7.2.10.1170.00317.84
7.2.00.0460.00518.14
7.1.330.0090.00518.89
7.1.320.0070.00820.02
7.1.310.0100.00319.98
7.1.300.0090.00320.13
7.1.290.0170.00520.13
7.1.280.0120.00220.12
7.1.270.1100.00418.07
7.1.260.1210.00417.97
7.1.250.1600.00819.02
7.1.240.1390.00619.28
7.1.230.1380.01117.41
7.1.220.1480.00317.32
7.1.210.1770.00417.36
7.1.200.0750.00616.98
7.1.190.0840.00817.35
7.1.180.0860.01117.38
7.1.170.1080.00917.36
7.1.160.0850.00317.32
7.1.150.0890.00717.43
7.1.140.0590.00617.37
7.1.130.0930.00617.32
7.1.120.1440.00717.37
7.1.110.1450.00717.45
7.1.100.1160.00817.29
7.1.90.0760.00317.40
7.1.80.0830.00617.38
7.1.70.0590.00917.20
7.1.60.0650.00922.43
7.1.50.0650.00721.66
7.1.40.0720.00923.43
7.1.30.0590.01323.41
7.1.20.0670.00923.38
7.1.10.0670.00617.42
7.1.00.0320.01718.32
7.0.330.0750.00318.12
7.0.320.0770.00718.33
7.0.310.1130.00717.25
7.0.300.0650.00617.20
7.0.290.0600.00717.19
7.0.280.0750.00917.14
7.0.270.0880.00617.19
7.0.260.1320.01117.20
7.0.250.1600.00617.14
7.0.240.1140.00617.25
7.0.230.0780.00617.18
7.0.220.1400.00317.30
7.0.210.0770.01017.31
7.0.200.0600.00517.05
7.0.190.0680.00817.13
7.0.180.0620.00917.24
7.0.170.0680.01017.29
7.0.160.0610.00617.24
7.0.150.0650.00417.17
7.0.140.0540.01218.37
7.0.130.0660.00617.22
7.0.120.0590.00617.27
7.0.110.0460.01517.91
7.0.100.0400.01417.94
7.0.90.0390.01517.93
7.0.80.0350.01617.90
7.0.70.1140.01617.88
7.0.60.0390.01717.97
7.0.50.0300.02617.94
7.0.40.0400.02017.86
7.0.30.0450.01417.87
7.0.20.0390.02317.86
7.0.10.0420.02317.79
7.0.00.0270.00917.76
5.6.400.0120.01119.42
5.6.390.0160.00819.38
5.6.380.0080.01017.58
5.6.370.0150.00517.67
5.6.360.0140.00617.67
5.6.350.0130.00317.65
5.6.340.0130.00917.77
5.6.330.0130.00917.70
5.6.320.0150.00717.63
5.6.310.0100.00717.68
5.6.300.0120.00617.68
5.6.290.0140.00317.57
5.6.280.0130.02618.50
5.6.270.0100.00517.72
5.6.260.0090.01718.45
5.6.250.0120.01218.43
5.6.240.0090.01518.42
5.6.230.0100.01818.35
5.6.220.0090.01718.34
5.6.210.0060.02818.29
5.6.200.0090.02718.40
5.6.190.0090.02318.39
5.6.180.0100.01518.36
5.6.170.0110.02118.44
5.6.160.0090.01718.42
5.6.150.0090.01218.49
5.6.140.0060.01718.29
5.6.130.0120.02418.36
5.6.120.0090.02718.36
5.6.110.0140.02018.35
5.6.100.0090.01518.40
5.6.90.0090.02518.34
5.6.80.0090.01818.20
5.6.70.0100.02318.21
5.6.60.0090.01918.17
5.6.50.0070.01518.14
5.6.40.0090.01418.16
5.6.30.0070.01718.21
5.6.20.0070.01718.15
5.6.10.0080.01918.18
5.6.00.0070.01617.99
5.5.380.0080.01616.80
5.5.370.0050.01716.80
5.5.360.0110.01616.97
5.5.350.0120.01416.86
5.5.340.0080.02816.98
5.5.330.0100.01516.93
5.5.320.0100.01416.75
5.5.310.0100.01716.88
5.5.300.0110.02916.91
5.5.290.0110.01316.92
5.5.280.0130.02516.90
5.5.270.0090.02616.91
5.5.260.0090.01616.99
5.5.250.0120.01516.87
5.5.240.0060.01716.73
5.5.230.0090.02616.71
5.5.220.0090.01916.75
5.5.210.0100.01916.78
5.5.200.0080.01416.72
5.5.190.0080.01216.78
5.5.180.0060.01716.64
5.5.170.0110.00517.40
5.5.160.0100.01416.81
5.5.150.0110.01216.72
5.5.140.0090.01716.79
5.5.130.0080.01416.74
5.5.120.0070.01416.76
5.5.110.0060.02316.71
5.5.100.0090.01416.61
5.5.90.0140.01216.70
5.5.80.0100.01316.75
5.5.70.0120.01116.63
5.5.60.0120.02116.70
5.5.50.0120.01616.74
5.5.40.0100.01216.63
5.5.30.0080.01216.73
5.5.20.0070.01616.72
5.5.10.0110.02316.67
5.5.00.0060.02716.67
5.4.450.0120.01316.68
5.4.440.0080.02016.77
5.4.430.0080.01716.79
5.4.420.0080.01516.73
5.4.410.0090.01216.62
5.4.400.0120.01616.65
5.4.390.0100.01016.63
5.4.380.0080.01616.60
5.4.370.0040.01716.62
5.4.360.0090.02116.64
5.4.350.0110.01316.64
5.4.340.0100.01316.68
5.4.330.0090.00915.85
5.4.320.0140.01316.70
5.4.310.0110.01116.65
5.4.300.0070.01716.63
5.4.290.0080.01516.60
5.4.280.0080.01216.61
5.4.270.0130.01016.61
5.4.260.0080.01316.58
5.4.250.0090.01416.56
5.4.240.0110.01116.59
5.4.230.0090.01916.59
5.4.220.0120.01016.62
5.4.210.0120.02316.65
5.4.200.0110.01416.66
5.4.190.0080.02316.61
5.4.180.0070.02116.55
5.4.170.0100.01616.55
5.4.160.0080.02416.74
5.4.150.0110.01316.60
5.4.140.0060.02215.93
5.4.130.0060.01115.96
5.4.120.0100.02015.91
5.4.110.0100.01616.00
5.4.100.0140.00815.99
5.4.90.0100.01216.00
5.4.80.0100.01416.01
5.4.70.0100.02115.97
5.4.60.0090.01315.89
5.4.50.0080.02515.96
5.4.40.0080.01915.96
5.4.30.0120.01015.95
5.4.20.0090.01915.92
5.4.10.0080.01415.96
5.4.00.0080.01215.75

preferences:
29.01 ms | 401 KiB | 5 Q