3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mymodule_decrypt_value($string) { // Si es una cadena vacía no hay nada que hacer if (empty($string)) { return FALSE; } $key ="12EstaClave34es56dificil489ssswf"; $iv ="Imphartoz.37hAES"; if (empty($key)) { watchdog('mymodule', 'No hay una clave para descifrar.', array(), WATCHDOG_ERROR); return FALSE; } if (empty($iv)) { watchdog('mymodule', 'No hay un vector de inicialización para descifrar.', array(), WATCHDOG_ERROR); return FALSE; } $plaintext_dec = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, base64_decode($string), MCRYPT_MODE_CBC, $iv); // Eliminar el padding return mymodule_unpadPKCS7($plaintext_dec); } function mymodule_unpadPKCS7($data) { $last = substr($data, -1); return substr($data, 0, strlen($data) - ord($last)); } mymodule_decrypt_value("V36B+ya6eMwElOoxswqGBw=="); echo "<h1>Hello, PHP!</h1>"; ?>

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.00618.55
8.3.50.0160.00321.14
8.3.40.0120.00918.96
8.3.30.0070.00719.04
8.3.20.0040.00420.29
8.3.10.0060.00320.36
8.3.00.0080.00019.25
8.2.180.0180.00317.00
8.2.170.0040.01122.96
8.2.160.0070.00720.34
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00421.10
8.2.110.0030.00622.27
8.2.100.0090.00617.72
8.2.90.0000.00719.09
8.2.80.0060.00317.97
8.2.70.0000.00917.38
8.2.60.0030.00517.80
8.2.50.0000.00918.07
8.2.40.0040.00418.09
8.2.30.0000.00719.50
8.2.20.0080.00017.62
8.2.10.0080.00017.99
8.2.00.0040.00417.68
8.1.280.0100.01025.92
8.1.270.0040.00423.79
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00923.91
8.1.230.0110.00019.04
8.1.220.0000.00917.79
8.1.210.0000.00818.77
8.1.200.0040.00717.23
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0060.00318.52
8.1.160.0050.00321.97
8.1.150.0070.00018.82
8.1.140.0020.00917.41
8.1.130.0000.00717.84
8.1.120.0040.00417.47
8.1.110.0000.00717.30
8.1.100.0080.00017.38
8.1.90.0070.00017.35
8.1.80.0040.00317.42
8.1.70.0040.00417.37
8.1.60.0060.00317.63
8.1.50.0050.00317.53
8.1.40.0050.00317.50
8.1.30.0000.00817.48
8.1.20.0000.00817.71
8.1.10.0080.00017.58
8.1.00.0030.00517.57
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0030.00318.32
8.0.270.0000.00817.08
8.0.260.0070.00017.12
8.0.250.0030.00317.01
8.0.240.0040.00416.86
8.0.230.0000.00716.96
8.0.220.0040.00416.93
8.0.210.0030.00316.86
8.0.200.0030.00317.03
8.0.190.0030.00616.94
8.0.180.0080.00016.92
8.0.170.0000.00816.82
8.0.160.0000.00817.00
8.0.150.0000.00816.82
8.0.140.0000.00716.92
8.0.130.0000.00513.29
8.0.120.0080.00016.88
8.0.110.0000.00716.93
8.0.100.0040.00416.79
8.0.90.0030.00316.70
8.0.80.0130.00316.86
8.0.70.0000.00816.90
8.0.60.0070.00016.81
8.0.50.0050.00216.95
8.0.30.0100.01116.92
8.0.20.0110.00917.40
8.0.10.0030.00617.04
8.0.00.0130.00816.64
7.4.330.0030.00315.00
7.4.320.0030.00316.60
7.4.300.0030.00316.59
7.4.290.0030.00316.50
7.4.280.0040.00416.49
7.4.270.0030.00316.63
7.4.260.0040.00416.64
7.4.250.0040.00416.59
7.4.240.0030.00416.61
7.4.230.0030.00316.59
7.4.220.0140.00316.55
7.4.210.0080.00516.68
7.4.200.0040.00416.43
7.4.160.0030.01416.57
7.4.150.0140.00717.40
7.4.140.0090.00917.86
7.4.130.0090.00816.67
7.4.120.0080.01016.47
7.4.110.0140.00416.47
7.4.100.0160.00316.53
7.4.90.0130.00316.43
7.4.80.0100.00619.39
7.4.70.0080.00816.43
7.4.60.0100.00616.62
7.4.50.0000.00816.63
7.4.40.0080.01116.49
7.4.30.0080.00816.66
7.4.00.0100.00615.01
7.3.330.0030.00313.08
7.3.320.0030.00313.18
7.3.310.0000.00716.41
7.3.300.0000.00716.31
7.3.290.0120.00316.25
7.3.280.0110.00516.33
7.3.270.0140.00317.40
7.3.260.0140.00316.29
7.3.250.0090.00816.33
7.3.240.0090.01216.48
7.3.230.0060.01016.59
7.3.210.0110.00716.30
7.3.200.0110.00619.39
7.3.190.0040.01216.21
7.3.180.0040.01216.23
7.3.170.0050.01116.27
7.3.160.0080.00816.39
7.2.330.0040.01316.75
7.2.320.0100.01516.57
7.2.310.0040.01516.54
7.2.300.0070.00916.68
7.2.290.0090.00616.76
7.2.60.0130.00316.83
7.2.00.0060.00619.51
7.1.200.0060.00615.77
7.1.100.0000.01318.05
7.1.70.0000.00816.89
7.1.60.0100.01319.61
7.1.50.0130.00716.84
7.1.00.0030.07722.40
7.0.200.0400.00014.45
7.0.140.0070.06322.00
7.0.60.0130.06320.05
7.0.50.0100.07717.96
7.0.40.0030.04720.11
7.0.30.0330.06720.13
7.0.20.0330.04020.24
7.0.10.0330.07020.10
7.0.00.0070.04320.27
5.6.280.0000.07321.08
5.6.210.0100.08020.53
5.6.200.0030.05318.23
5.6.190.0030.06020.49
5.6.180.0230.06320.52
5.6.170.0230.05320.55
5.6.160.0070.04320.45
5.6.150.0030.04018.17
5.6.140.0070.08318.27
5.6.130.0000.06718.15
5.6.120.0000.07021.05
5.6.110.0130.07720.93
5.6.100.0070.08721.16
5.6.90.0100.06721.04
5.6.80.0070.04020.43
5.6.70.4370.03320.52
5.5.350.0100.07320.49
5.5.340.0070.08317.99
5.5.330.0030.05720.46
5.5.320.0200.08320.28
5.5.310.0300.06720.34
5.5.300.0070.05718.04
5.5.290.0030.08017.99
5.5.280.0070.06720.79
5.5.270.0100.08320.93
5.5.260.0130.04020.88
5.5.250.0070.05320.63
5.5.240.0030.08320.21
5.4.450.2830.04319.41
5.4.440.3400.05019.53
5.4.430.3870.03719.59
5.4.420.3730.04019.60
5.4.410.3300.03019.36
5.4.400.3470.03019.20
5.4.390.0100.05019.17
5.4.380.3300.04018.85
5.4.370.3200.05019.20
5.4.360.3400.03719.16
5.4.350.3100.04319.03
5.4.340.3430.04019.09
5.4.320.3130.04319.31
5.4.310.3900.03319.28
5.4.300.3230.03719.28
5.4.290.2970.04719.06
5.4.280.3670.03319.04
5.4.270.3570.03019.20
5.4.260.3370.04318.88
5.4.250.3430.04319.18
5.4.240.3170.03719.10
5.4.230.3830.04319.14
5.4.220.3200.04019.20
5.4.210.3730.03319.13
5.4.200.3730.03718.95
5.4.190.3700.04019.31
5.4.180.3630.03719.19
5.4.170.3800.03719.04
5.4.160.3800.03319.14
5.4.150.3870.03319.14
5.4.140.3300.03716.40
5.4.130.3370.03316.77
5.4.120.3230.02716.51
5.4.110.3930.03316.51
5.4.100.3930.04016.38
5.4.90.3300.04016.59
5.4.80.3400.03716.58
5.4.70.3230.03316.66
5.4.60.3430.04016.51
5.4.50.3800.03016.29
5.4.40.3570.03716.55
5.4.30.3900.03016.52
5.4.20.2900.04016.51
5.4.10.3230.03716.30
5.4.00.3130.03315.91
5.3.290.3870.03714.73
5.3.280.3900.03714.59
5.3.270.3570.03314.61
5.3.260.3730.04314.58
5.3.250.3770.03714.57
5.3.240.3900.03714.59
5.3.230.3370.04014.65
5.3.220.3430.03314.58
5.3.210.3730.04014.50
5.3.200.3830.04014.68
5.3.190.3230.03014.59
5.3.180.3300.04314.56
5.3.170.3230.04014.59
5.3.160.3870.03714.49
5.3.150.3530.03714.56
5.3.140.3530.03714.53
5.3.130.3900.04714.60
5.3.120.3770.03014.46
5.3.110.3070.02714.66
5.3.100.3070.03013.96
5.3.90.3100.03714.10
5.3.80.3170.03314.04
5.3.70.3230.02714.18
5.3.60.3170.03013.91
5.3.50.3600.04313.96
5.3.40.3100.04313.87
5.3.30.3400.04313.95
5.3.20.2930.04013.71
5.3.10.3130.03313.88
5.3.00.3770.03013.86
5.2.170.2300.03311.07
5.2.160.2230.02311.31
5.2.150.2430.02311.06
5.2.140.2500.02311.06
5.2.130.3130.03311.04
5.2.120.2830.02711.14
5.2.110.2400.03011.19
5.2.100.2830.03011.06
5.2.90.3230.03011.01
5.2.80.3300.02711.02
5.2.70.3270.03011.32
5.2.60.3000.02010.96
5.2.50.2700.02711.13
5.2.40.2530.02711.16
5.2.30.2230.03010.88
5.2.20.2430.03010.89
5.2.10.2170.03010.91
5.2.00.2130.03010.70
5.1.60.2230.0209.89
5.1.50.2570.0279.98
5.1.40.2700.0239.89
5.1.30.2270.03010.25
5.1.20.2330.02310.26
5.1.10.2230.02710.02
5.1.00.2630.03010.00
5.0.50.1570.0239.52
5.0.40.1230.0209.52
5.0.30.1470.0379.52
5.0.20.1200.0239.52
5.0.10.0830.0209.52
5.0.00.1030.0279.52
4.4.90.1270.0179.52
4.4.80.1200.0139.52
4.4.70.1230.0139.52
4.4.60.1430.0209.52
4.4.50.0930.0179.52
4.4.40.0970.0279.52
4.4.30.1500.0179.52
4.4.20.1200.0179.52
4.4.10.1300.0179.52
4.4.00.1370.0279.52
4.3.110.1430.0109.52
4.3.100.1070.0139.52
4.3.90.1070.0179.52
4.3.80.1330.0279.52
4.3.70.1300.0179.52
4.3.60.1000.0179.52
4.3.50.1230.0179.52
4.3.40.1270.0209.52
4.3.30.0700.0279.52
4.3.20.0730.0209.52
4.3.10.0800.0239.52
4.3.00.0730.0139.52

preferences:
51.65 ms | 401 KiB | 5 Q