3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * It should go without saying that this is insecure. * * Don't use it! * * @ref http://www.cryptofails.com/post/87697461507/46esab-high-quality-cryptography-direct-from */ function encodeString($str){ for($i=0; $i<5;$i++) { $str=strrev(base64_encode($str)); // apply base64 first and then reverse the string } return $str; } function decodeString($str){ for($i=0; $i<5;$i++) { $str=base64_decode(strrev($str)); // apply base64 first and then reverse the string } return $str; } # ~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~8<~ # $a = array( 'a', 'aaa', 'aaaaaa', str_repeat('a', 126), str_repeat('a', 1024), str_repeat('a', 2048) ); $sizeOfA = count($a); $length = array(); $encoded = array(); for ($i = 0; $i < $sizeOfA; ++$i) { $encoded[$i] = encodeString($a[$i]); $length[$i] = strlen($encoded[$i]); } var_dump($length); var_dump($encoded);

Abusive script

This script was stopped while abusing our resources

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.110.0130.00320.94
8.3.100.0110.00424.06
8.3.90.0080.00026.77
8.3.80.0040.00818.18
8.3.70.0070.01318.30
8.3.60.0130.00716.63
8.3.50.0130.00722.00
8.3.40.0090.00918.89
8.3.30.0120.00319.21
8.3.20.0030.00520.20
8.3.10.0000.00821.83
8.3.00.0080.00022.40
8.2.230.0060.00322.58
8.2.220.0050.00537.54
8.2.210.0080.00026.77
8.2.200.0050.00516.63
8.2.190.0090.01218.25
8.2.180.0140.00718.13
8.2.170.0090.00618.75
8.2.160.0110.00422.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0040.00420.70
8.2.110.0030.00622.31
8.2.100.0040.00720.45
8.1.290.0060.00330.84
8.1.280.0090.00925.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0060.00319.13
8.1.230.0110.00020.43
7.4.20.0060.01416.48
7.4.10.0070.01016.59
7.4.00.0030.01515.92
7.3.140.0140.00416.52
7.3.130.0130.00616.62
7.3.120.0120.00916.38
7.3.110.0080.01116.52
7.3.100.0130.00315.88
7.3.90.0050.01215.56
7.3.80.0110.01115.76
7.3.70.0110.00515.65
7.3.60.0110.00715.63
7.3.50.0040.01115.40
7.3.40.0120.00715.21
7.3.30.0040.01415.25
7.3.20.0970.00515.05
7.3.10.0970.01015.02
7.3.00.1080.00715.05
7.2.270.0060.01216.54
7.2.260.0060.01516.84
7.2.250.0090.00816.70
7.2.240.0060.01516.82
7.2.230.0100.01416.66
7.2.220.0090.00615.79
7.2.210.0080.01115.91
7.2.200.0060.01115.62
7.2.190.0040.01315.80
7.2.180.0080.00715.56
7.2.170.0120.00715.56
7.2.160.0080.01015.46
7.2.150.0930.01115.42
7.2.140.0910.01015.53
7.2.130.1120.00915.33
7.2.120.0880.00615.31
7.2.110.0820.00815.38
7.2.100.0990.00515.42
7.2.90.0750.01115.36
7.2.80.0890.00815.36
7.2.70.0700.00815.23
7.2.60.0630.00915.53
7.2.50.0710.00715.37
7.2.40.0660.00715.34
7.2.30.0650.00915.31
7.2.20.0740.01015.42
7.2.10.0530.00715.32
7.2.00.0560.00815.97
7.1.330.0210.01215.85
7.1.320.0180.00714.92
7.1.310.0110.01314.98
7.1.300.0190.00314.72
7.1.290.0160.00814.92
7.1.280.0090.01014.56
7.1.270.1030.00814.35
7.1.260.1150.01014.31
7.1.250.0880.00814.39
7.1.240.0900.01014.27
7.1.230.0730.01014.32
7.1.220.0840.00614.31
7.1.210.0900.00914.31
7.1.200.0730.01014.61
7.1.190.0780.01014.32
7.1.180.0630.01114.28
7.1.170.0710.00814.28
7.1.160.0740.01114.30
7.1.150.0590.01014.14
7.1.140.0630.00814.22
7.1.130.0600.01114.24
7.1.120.0490.00714.19
7.1.110.0650.01114.27
7.1.100.0480.00814.80
7.1.90.0370.01014.32
7.1.80.0400.00914.30
7.1.70.0750.00814.63
7.1.60.0390.00917.28
7.1.50.0410.00917.16
7.1.40.0680.02522.51
7.1.30.0720.01021.16
7.1.20.0810.01121.08
7.1.10.0860.01214.38
7.1.00.0820.00614.43
7.0.330.1240.01113.93
7.0.320.0630.01213.96
7.0.310.0710.00813.75
7.0.300.0700.01013.86
7.0.290.0740.00613.82
7.0.280.0570.00813.85
7.0.270.0690.01113.84
7.0.260.0690.01013.78
7.0.250.0510.00913.93
7.0.240.0620.00914.03
7.0.230.0590.00813.86
7.0.220.0550.00814.01
7.0.210.0460.00813.99
7.0.200.0380.00814.34
7.0.190.0410.00913.95
7.0.180.0860.02215.42
7.0.170.0450.01214.11
7.0.160.0900.00814.08
7.0.150.0810.00914.03
7.0.140.0810.00714.04
7.0.130.0950.00714.11
7.0.120.1110.00714.18
7.0.110.0790.00814.08
7.0.100.0810.00714.10
7.0.90.0820.00614.07
7.0.80.0820.00714.13
7.0.70.0760.00814.05
7.0.60.0770.00914.08
7.0.50.0780.00814.20
7.0.40.0790.00914.11
7.0.30.0620.01014.20
7.0.20.0730.01014.14
7.0.10.0730.00714.09
7.0.00.0750.00814.16
5.6.400.0110.01314.87
5.6.390.0170.00814.79
5.6.380.0150.00914.76
5.6.370.0150.01014.55
5.6.360.0130.01114.77
5.6.350.0170.00814.84
5.6.340.0120.01014.59
5.6.330.0140.01014.65
5.6.320.0150.00914.60
5.6.310.0140.00714.66
5.6.300.0140.02416.18
5.6.290.0140.02416.17
5.6.280.0180.02116.18
5.6.270.0130.02216.11
5.6.260.0150.02316.18
5.6.250.0130.02416.28
5.6.240.0130.02916.20
5.6.230.0120.02416.21
5.6.220.0200.02216.14
5.6.210.0120.02516.24
5.6.200.0120.02516.18
5.6.190.0140.02416.19
5.6.180.0160.02516.16
5.6.170.0140.02616.20
5.6.160.0130.02616.26
5.6.150.0150.02416.23
5.6.140.0140.02316.20
5.6.130.0140.02216.16
5.6.120.0130.02116.21
5.6.110.0130.02416.19
5.6.100.0130.02116.17
5.6.90.0100.02616.21
5.6.80.0110.02016.05
5.6.70.0130.02015.98
5.6.60.0110.02316.02
5.6.50.0130.02116.04
5.6.40.0160.01915.99
5.6.30.0150.01915.97
5.6.20.0130.02116.00
5.6.10.0140.02016.04
5.6.00.0140.01815.92
5.5.380.0110.02114.66
5.5.370.0130.02314.60
5.5.360.0110.02214.56
5.5.350.0150.01914.49
5.5.340.0070.02714.69
5.5.330.0100.02714.63
5.5.320.0140.02514.66
5.5.310.0120.02214.67
5.5.300.0130.02214.65
5.5.290.0090.02314.59
5.5.280.0080.02514.75
5.5.270.0140.01814.59
5.5.260.0110.02214.55
5.5.250.0120.02214.52
5.5.240.0110.01914.34
5.5.230.0120.02114.46
5.5.220.0100.02114.47
5.5.210.0110.02014.44
5.5.200.0140.01914.39
5.5.190.0110.02214.46
5.5.180.0130.01814.41
5.5.170.0150.00814.03
5.5.160.0090.02214.43
5.5.150.0100.02014.52
5.5.140.0110.02114.54
5.5.130.0110.01914.32
5.5.120.0100.02014.53
5.5.110.0140.01914.49
5.5.100.0080.02314.39
5.5.90.0130.01814.45
5.5.80.0130.02414.39
5.5.70.0110.02214.32
5.5.60.0140.02214.42
5.5.50.0090.02314.46
5.5.40.0130.01814.31
5.5.30.0130.02114.37
5.5.20.0120.02514.40
5.5.10.0140.01714.37
5.5.00.0090.02114.47
5.4.450.0140.02013.67
5.4.440.0080.02313.64
5.4.430.0110.01813.64
5.4.420.0120.01713.61
5.4.410.0120.02213.58
5.4.400.0080.01713.53
5.4.390.0120.01813.50
5.4.380.0120.01513.54
5.4.370.0120.01713.52
5.4.360.0100.01813.47
5.4.350.0090.01913.43
5.4.340.0110.01713.49
5.4.330.0110.00711.80
5.4.320.0130.01913.51
5.4.310.0070.01913.56
5.4.300.0100.01913.54
5.4.290.0130.01513.53
5.4.280.0100.01713.43
5.4.270.0100.01713.47
5.4.260.0130.01613.53
5.4.250.0100.01713.46
5.4.240.0100.02013.52
5.4.230.0120.01813.45
5.4.220.0130.01813.49
5.4.210.0100.01713.51
5.4.200.0120.01513.42
5.4.190.0090.02213.50
5.4.180.0090.02013.47
5.4.170.0080.02013.47
5.4.160.0090.02113.50
5.4.150.0130.01813.51
5.4.140.0100.02112.87
5.4.130.0070.02012.96
5.4.120.0120.01412.97
5.4.110.0120.01812.87
5.4.100.0110.01612.93
5.4.90.0090.01712.91
5.4.80.0100.01712.95
5.4.70.0110.01912.89
5.4.60.0130.01712.89
5.4.50.0090.02012.89
5.4.40.0110.01812.98
5.4.30.0110.01712.91
5.4.20.0100.01912.92
5.4.10.0100.02012.91
5.4.00.0080.02012.74
5.3.290.0200.00313.20
5.3.280.0120.01212.98
5.3.270.0080.01313.11
5.3.260.0130.00513.22
5.3.250.0140.00313.04
5.3.240.0130.00813.04
5.3.230.0170.00012.95
5.3.220.0170.00313.06
5.3.210.0070.01113.28
5.3.200.0080.01113.07
5.3.190.0150.00713.16
5.3.180.0110.01113.15
5.3.170.0070.01313.09
5.3.160.0080.01013.06
5.3.150.0090.00913.05
5.3.140.0120.00713.20
5.3.130.0130.01413.07
5.3.120.0140.01413.16
5.3.110.0150.01013.06
5.3.100.0030.02013.21
5.3.90.0170.00613.13
5.3.80.0180.00913.01
5.3.70.0060.01613.17
5.3.60.0040.01513.09
5.3.50.0070.01313.07
5.3.40.0110.00713.07
5.3.30.0190.00613.09
5.3.20.0090.01213.11
5.3.10.0090.00912.91
5.3.00.0080.01212.86
5.2.170.0100.00712.08
5.2.160.0090.00912.14
5.2.150.0130.00212.08
5.2.140.0070.01512.13
5.2.130.0070.00711.95
5.2.120.0130.00712.05
5.2.110.0170.00212.07
5.2.100.0030.01312.08
5.2.90.0060.01311.97
5.2.80.0070.01012.00
5.2.70.0100.00712.00
5.2.60.0030.01111.92
5.2.50.0070.01012.15
5.2.40.0090.00912.11
5.2.30.0120.00612.03
5.2.20.0090.00611.93
5.2.10.0080.00912.02
5.2.00.0140.00011.66
5.1.60.0090.00610.97
5.1.50.0060.00710.98
5.1.40.0060.01111.13
5.1.30.0120.00611.18
5.1.20.0090.00511.14
5.1.10.0090.00411.33
5.1.00.0060.00911.13
5.0.50.0040.00810.39
5.0.40.0040.00710.39
5.0.30.0040.01010.39
5.0.20.0030.01010.39
5.0.10.0050.00510.39
5.0.00.0030.00810.39
4.4.90.0000.00610.39
4.4.80.0030.00310.39
4.4.70.0050.00210.39
4.4.60.0040.00410.39
4.4.50.0030.00610.39
4.4.40.0050.00310.39
4.4.30.0040.00410.39
4.4.20.0030.00610.39
4.4.10.0030.00310.39
4.4.00.0050.00210.39
4.3.110.0030.00610.39
4.3.100.0050.00210.39
4.3.90.0090.00010.39
4.3.80.0000.00910.39
4.3.70.0020.00410.39
4.3.60.0020.00510.39
4.3.50.0030.00610.39
4.3.40.0020.00710.39
4.3.30.0020.00410.39
4.3.20.0000.00610.39
4.3.10.0000.00710.39
4.3.00.0000.00610.39

preferences:
33.06 ms | 403 KiB | 5 Q