3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = "1234567890123456"; $iv = "abcdefghijkl"; $token = implode(";", array("foo", "bar", "baz")); print "Token: " . base64_encode($token) . "\n"; print "\n"; $cipher = openssl_encrypt($token, 'aes-128-cbc', $key, OPENSSL_RAW_DATA, $iv); print "Cipher: " . base64_encode($cipher) . "\n"; print "Error: " . openssl_error_string() . "\n"; print "\n"; $plain = openssl_decrypt(substr($cipher, 12), 'aes-128-cbc', $key, OPENSSL_RAW_DATA, $iv); print "Token: " . base64_encode($token) . "\n"; print "Cipher: " . base64_encode($cipher) . "\n"; print "Plain: " . base64_encode($plain) . "\n"; var_dump(openssl_error_string());

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.70.0070.01416.58
8.3.60.0150.00018.55
8.3.50.0050.01321.96
8.3.40.0100.01018.97
8.3.30.0100.00718.99
8.3.20.0000.00820.35
8.3.10.0050.00521.72
8.3.00.0040.00417.80
8.2.180.0110.01118.54
8.2.170.0100.00722.96
8.2.160.0030.01020.35
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0050.00320.92
8.2.110.0030.00620.22
8.2.100.0070.00717.91
8.2.90.0030.00519.28
8.2.80.0030.00517.97
8.2.70.0050.00317.63
8.2.60.0050.00317.93
8.2.50.0030.00618.07
8.2.40.0060.00318.22
8.2.30.0070.00318.16
8.2.20.0050.00317.63
8.2.10.0080.00018.12
8.2.00.0050.00217.71
8.1.280.0170.00325.92
8.1.270.0050.00323.92
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0000.01120.92
8.1.230.0030.00917.52
8.1.220.0050.00317.79
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0080.00017.23
8.1.180.0050.00318.10
8.1.170.0000.00918.57
8.1.160.0030.00522.02
8.1.150.0040.00418.91
8.1.140.0030.00517.52
8.1.130.0000.00717.72
8.1.120.0000.00717.53
8.1.110.0000.00817.40
8.1.100.0000.00717.43
8.1.90.0040.00417.53
8.1.80.0000.00817.48
8.1.70.0070.00017.48
8.1.60.0000.00717.53
8.1.50.0000.00917.57
8.1.40.0040.00417.42
8.1.30.0000.00817.63
8.1.20.0000.00817.71
8.1.10.0000.00817.49
8.1.00.0040.00417.50
8.0.300.0050.00318.77
8.0.290.0030.00616.63
8.0.280.0000.00718.46
8.0.270.0070.00017.27
8.0.260.0060.00017.21
8.0.250.0000.00717.10
8.0.240.0070.00017.05
8.0.230.0030.00317.04
8.0.220.0000.00916.86
8.0.210.0030.00516.88
8.0.200.0000.00617.07
8.0.190.0000.00716.92
8.0.180.0030.00517.01
8.0.170.0080.00016.96
8.0.160.0040.00416.96
8.0.150.0070.00016.84
8.0.140.0070.00316.80
8.0.130.0030.00313.39
8.0.120.0040.00416.89
8.0.110.0040.00416.93
8.0.100.0000.00816.75
8.0.90.0000.00716.97
8.0.80.0040.01216.85
8.0.70.0000.00716.91
8.0.60.0000.00716.90
8.0.50.0000.00716.81
8.0.30.0020.01617.21
8.0.20.0120.00817.40
8.0.10.0040.00416.87
8.0.00.0110.00916.77
7.4.330.0050.00015.11
7.4.320.0060.00016.47
7.4.300.0000.00616.53
7.4.290.0000.00616.52
7.4.280.0050.00316.61
7.4.270.0030.00516.63
7.4.260.0040.00416.59
7.4.250.0000.00716.63
7.4.240.0040.00416.52
7.4.230.0030.00416.41
7.4.220.0120.00416.56
7.4.210.0000.01416.73
7.4.200.0000.00716.38
7.4.160.0120.00416.47
7.4.150.0000.01917.40
7.4.140.0110.01117.86
7.4.130.0110.00616.59
7.4.120.0110.00916.43
7.4.110.0120.01216.45
7.4.100.0090.00916.57
7.4.90.0090.01516.73
7.4.80.0170.00619.39
7.4.70.0090.00816.46
7.4.60.0100.01316.67
7.4.50.0000.00816.35
7.4.40.0110.01116.66
7.4.30.0160.00016.40
7.4.00.0040.01115.03
7.3.330.0030.00313.21
7.3.320.0060.00013.16
7.3.310.0000.00816.33
7.3.300.0040.00416.30
7.3.290.0100.00316.29
7.3.280.0100.00716.27
7.3.270.0080.00817.40
7.3.260.0130.00316.34
7.3.250.0130.00816.30
7.3.240.0130.00316.43
7.3.230.0100.00716.56
7.3.210.0080.00816.39
7.3.200.0130.00719.39
7.3.190.0140.00316.25
7.3.180.0110.01116.43
7.3.170.0120.00316.27
7.3.160.0130.00316.42
7.3.120.0070.00714.68
7.3.10.0070.01016.72
7.3.00.0030.00816.48
7.2.330.0100.01316.78
7.2.320.0070.01116.41
7.2.310.0130.01016.45
7.2.300.0120.00916.61
7.2.290.0090.00616.74
7.2.130.0040.01117.10
7.2.120.0030.00917.14
7.2.110.0060.00916.68
7.2.100.0090.00316.86
7.2.90.0120.00416.96
7.2.80.0000.01417.04
7.2.70.0100.00316.72
7.2.60.0060.00716.99
7.2.50.0080.00816.95
7.2.40.0060.01017.00
7.2.30.0040.00816.89
7.2.20.0040.00817.03
7.2.10.0030.01016.91
7.2.00.0070.01218.06
7.1.250.0000.01215.50
7.1.200.0060.00915.73
7.1.100.0040.01118.20
7.1.70.0030.00716.93
7.1.60.0060.01619.25
7.1.50.0140.01016.91
7.1.00.0100.07022.41
7.0.200.0060.01016.69
7.0.140.0100.06022.02
7.0.60.0300.06719.87
7.0.50.0030.05017.90
7.0.40.0070.05319.96
7.0.30.0270.05720.39
7.0.20.0100.04720.20
7.0.10.0100.03720.19
7.0.00.0070.08020.14
5.6.280.0000.07721.08
5.6.210.0070.07720.54
5.6.200.0030.04018.31
5.6.190.0100.08020.52
5.6.180.0330.07320.57
5.6.170.0300.08020.55
5.6.160.0000.04320.55
5.6.150.0130.06018.18
5.6.140.0170.03018.21
5.6.130.0100.05718.18
5.6.120.0030.05720.97
5.6.110.0130.07721.12
5.6.100.0100.08020.93
5.6.90.0070.07721.02
5.6.80.0070.03320.36
5.5.350.0300.06320.34
5.5.340.0100.07717.92
5.5.330.0130.04720.63
5.5.320.0270.03320.28
5.5.310.0500.05720.34
5.5.300.0130.07717.94
5.5.290.0070.05018.07
5.5.280.0100.04720.91
5.5.270.0000.09020.73
5.5.260.0030.04720.87
5.5.250.0070.08720.60
5.5.240.0030.07020.16
5.4.450.1000.08019.69
5.4.440.0730.07319.69
5.4.430.1530.08019.32
5.4.420.0230.06019.30
5.4.410.0100.05318.81
5.4.400.0400.07018.73
5.4.390.0400.05318.73
5.4.380.0270.07318.73
5.4.370.0030.05018.52
5.4.360.0070.04018.70
5.4.350.0100.03911.98
5.4.340.0080.03711.98
5.4.320.0050.03712.46
5.4.310.0040.03912.46
5.4.300.0040.03812.46
5.4.290.0040.03812.46
5.4.280.0050.03512.36
5.4.270.0100.03612.36
5.4.260.0040.03912.36
5.4.250.0120.03712.35
5.4.240.0020.03912.36
5.4.230.0090.05112.35
5.4.220.0060.03512.35
5.4.210.0050.03512.35
5.4.200.0030.04112.35
5.4.190.0100.04712.34
5.4.180.0060.03512.35
5.4.170.0060.03512.36
5.4.160.0040.03712.36
5.4.150.0080.04312.35
5.4.140.0060.03612.03
5.4.130.0090.03412.02
5.4.120.0080.03211.98
5.4.110.0060.03411.97
5.4.100.0030.03711.97
5.4.90.0080.03911.97
5.4.80.0090.04311.97
5.4.70.0080.03911.97
5.4.60.0040.03611.97
5.4.50.0110.03611.97
5.4.40.0090.03311.96
5.4.30.0030.04211.96
5.4.20.0020.03911.96
5.4.10.0050.03511.96
5.4.00.0040.03711.45
5.3.290.0060.03812.80
5.3.280.0060.04212.71
5.3.270.0060.03812.72
5.3.260.0050.04112.72
5.3.250.0050.03812.72
5.3.240.0080.04012.72
5.3.230.0070.03812.71
5.3.220.0070.03512.68
5.3.210.0070.03712.68
5.3.200.0060.03512.68
5.3.190.0040.04712.68
5.3.180.0080.04612.67
5.3.170.0050.03712.67
5.3.160.0050.03812.67
5.3.150.0030.03912.67
5.3.140.0070.03512.66
5.3.130.0060.04112.66
5.3.120.0060.03812.66
5.3.110.0120.03812.66
5.3.100.0060.03712.12
5.3.90.0020.03912.08
5.3.80.0060.04212.07
5.3.70.0050.04212.07
5.3.60.0070.03512.06
5.3.50.0090.03712.00
5.3.40.0110.04712.00
5.3.30.0080.04111.96
5.3.20.0090.04411.74
5.3.10.0080.03311.71
5.3.00.0020.03911.70
5.2.170.0060.0299.20
5.2.160.0050.0289.19
5.2.150.0080.0309.20
5.2.140.0040.0399.19
5.2.130.0070.0369.15
5.2.120.0040.0289.16
5.2.110.0070.0309.16
5.2.100.0080.0259.16
5.2.90.0080.0359.16
5.2.80.0110.0349.15
5.2.70.0050.0309.15
5.2.60.0040.0309.10
5.2.50.0070.0279.07
5.2.40.0020.0319.05
5.2.30.0050.0299.03
5.2.20.0030.0309.01
5.2.10.0050.0278.93
5.2.00.0030.0308.80
5.1.60.0050.0238.08
5.1.50.0050.0248.08
5.1.40.0070.0318.06
5.1.30.0080.0278.41
5.1.20.0080.0278.43
5.1.10.0070.0338.15
5.1.00.0050.0258.16
5.0.50.0010.0226.63
5.0.40.0020.0206.50
5.0.30.0030.0316.31
5.0.20.0030.0206.28
5.0.10.0030.0206.25
5.0.00.0020.0316.25
4.4.90.0030.0234.78
4.4.80.0030.0184.75
4.4.70.0020.0164.76
4.4.60.0030.0154.75
4.4.50.0020.0154.77
4.4.40.0010.0264.71
4.4.30.0060.0194.76
4.4.20.0010.0174.84
4.4.10.0040.0144.85
4.4.00.0030.0254.76
4.3.110.0020.0164.67
4.3.100.0040.0224.66
4.3.90.0050.0124.64
4.3.80.0040.0304.58
4.3.70.0030.0204.63
4.3.60.0040.0134.63
4.3.50.0040.0144.62
4.3.40.0030.0304.54
4.3.30.0020.0203.30
4.3.20.0030.0153.27
4.3.10.0020.0173.23
4.3.00.0130.0207.13

preferences:
43.87 ms | 401 KiB | 5 Q