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-gcm', $key, OPENSSL_RAW_DATA, $iv); print "Cipher: " . base64_encode($cipher) . "\n"; print "Error: " . openssl_error_string() . "\n"; print "\n"; $plain = openssl_decrypt($cipher, 'aes-128-gcm', $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.5.10.0080.00820.09
8.5.00.0200.01120.40
8.4.150.0030.00014.05
8.4.140.0140.00817.63
8.4.130.0120.00917.90
8.4.120.0100.00920.74
8.4.110.0090.01122.24
8.4.100.0050.00417.96
8.4.90.0110.00822.79
8.4.80.0060.00418.00
8.4.70.0120.00818.09
8.4.60.0110.00720.48
8.4.50.0110.00922.43
8.4.40.0200.00019.59
8.4.30.0220.01217.56
8.4.20.0190.01317.72
8.4.10.0230.00517.77
8.3.280.0130.00718.66
8.3.270.0120.00816.86
8.3.260.0140.00616.91
8.3.250.0100.00818.56
8.3.240.0110.00817.17
8.3.230.0100.00916.79
8.3.220.0040.00417.13
8.3.210.0110.00816.69
8.3.200.0060.00316.66
8.3.190.0100.00916.57
8.3.180.0120.00716.45
8.3.170.0120.00319.06
8.3.160.0230.00717.56
8.3.150.0250.00718.57
8.3.140.0180.01017.35
8.3.130.0200.00717.80
8.3.120.0180.00617.69
8.3.110.0160.00718.76
8.3.100.0140.01116.59
8.3.90.0220.00721.70
8.3.80.0230.00517.35
8.3.70.0190.01316.51
8.3.60.0240.00517.38
8.3.50.0220.00620.21
8.3.40.0200.00918.16
8.3.30.0220.00718.13
8.3.20.0220.00218.78
8.3.10.0190.00420.48
8.3.00.0130.00319.29
8.2.290.0090.00620.53
8.2.280.0130.00718.54
8.2.270.0180.00717.70
8.2.260.0170.01016.69
8.2.250.0140.00916.73
8.2.240.0240.00716.78
8.2.230.0160.00719.47
8.2.220.0200.00520.41
8.2.210.0190.00221.55
8.2.200.0210.00616.52
8.2.190.0230.00816.58
8.2.180.0230.00716.58
8.2.170.0270.00020.35
8.2.160.0220.00519.04
8.2.150.0170.00520.91
8.2.140.0200.00121.15
8.2.130.0220.00621.85
8.2.120.0180.00619.81
8.2.110.0170.00819.24
8.2.100.0190.00617.71
8.2.90.0170.00617.76
8.2.80.0150.00818.27
8.2.70.0170.00717.50
8.2.60.0170.00917.50
8.2.50.0260.00817.74
8.2.40.0210.00417.81
8.2.30.0150.00717.69
8.2.20.0130.00817.57
8.2.10.0140.00817.87
8.2.00.0190.00417.60
8.1.330.0090.01021.78
8.1.320.0120.00718.45
8.1.310.0180.00916.36
8.1.300.0190.00517.26
8.1.290.0120.01217.66
8.1.280.0210.00720.96
8.1.270.0170.00620.59
8.1.260.0210.00221.80
8.1.250.0170.00622.57
8.1.240.0170.00819.60
8.1.230.0180.00519.07
8.1.220.0190.00317.64
8.1.210.0130.00918.10
8.1.200.0180.00517.32
8.1.190.0120.01017.39
8.1.180.0160.00618.19
8.1.170.0120.00917.92
8.1.160.0160.00319.59
8.1.150.0130.00717.93
8.1.140.0160.00617.27
8.1.130.0140.00817.54
8.1.120.0140.00817.41
8.1.110.0120.00917.16
8.1.100.0170.00417.36
8.1.90.0140.00717.31
8.1.80.0190.00217.37
8.1.70.0160.00517.30
8.1.60.0120.01217.40
8.1.50.0130.00817.45
8.1.40.0120.00417.50
8.1.30.0070.00517.50
8.1.20.0100.00217.59
8.1.10.0130.00717.45
8.1.00.0140.00717.26
8.0.300.0170.00318.31
8.0.290.0160.00516.68
8.0.280.0170.00417.58
8.0.270.0100.00917.01
8.0.260.0160.00516.87
8.0.250.0160.00516.86
8.0.240.0160.00616.79
8.0.230.0190.00616.80
8.0.220.0170.00616.74
8.0.210.0150.00616.76
8.0.200.0120.01016.79
8.0.190.0160.00516.77
8.0.180.0150.00516.66
8.0.170.0150.00816.71
8.0.160.0180.00516.92
8.0.150.0160.00316.66
8.0.140.0150.00516.77
8.0.130.0130.00515.01
8.0.120.0120.01016.79
8.0.110.0210.00016.73
8.0.100.0140.00816.64
8.0.90.0180.00316.77
8.0.80.0150.01516.73
8.0.70.0180.00416.75
8.0.60.0190.00516.56
8.0.50.0180.00416.65
8.0.30.0170.00716.93
8.0.20.0180.00817.14
8.0.10.0220.00016.86
8.0.00.0140.01016.76
7.4.330.0170.00315.67
7.4.320.0180.00316.34
7.4.300.0090.01016.47
7.4.290.0140.00716.31
7.4.280.0120.00816.29
7.4.270.0110.00916.45
7.4.260.0130.00716.40
7.4.250.0150.00716.30
7.4.240.0130.00316.42
7.4.230.0150.00316.39
7.4.220.0190.00516.36
7.4.210.0150.00616.48
7.4.200.0160.00416.27
7.4.190.0160.00416.43
7.4.180.0260.00616.33
7.4.160.0180.00716.23
7.4.150.0150.01216.75
7.4.140.0140.00817.31
7.4.130.0090.01416.39
7.4.120.0140.00916.42
7.4.110.0160.01016.23
7.4.100.0160.01016.43
7.4.90.0180.00716.49
7.4.80.0130.01317.83
7.4.70.0160.00816.42
7.4.60.0150.00916.37
7.4.50.0130.00716.31
7.4.40.0210.00519.38
7.4.30.0180.01016.23
7.4.20.0290.00615.94
7.4.10.0270.00516.11
7.4.00.0190.00515.61
7.3.330.0120.00714.67
7.3.320.0140.00314.38
7.3.310.0090.00316.14
7.3.300.0060.00516.16
7.3.290.0140.01016.26
7.3.280.0090.00816.23
7.3.270.0070.00916.76
7.3.260.0150.00516.16
7.3.250.0140.00816.24
7.3.240.0180.01216.27
7.3.230.0150.01016.17
7.3.220.0260.00715.88
7.3.210.0200.00816.12
7.3.200.0160.00917.62
7.3.190.0190.00616.29
7.3.180.0180.00616.27
7.3.170.0190.00616.15
7.3.160.0170.00716.27
7.3.150.0290.00416.08
7.3.140.0270.00616.00
7.3.130.0250.00815.99
7.3.120.0200.00415.39
7.3.110.0280.00416.00
7.3.100.0280.00016.00
7.3.90.0260.00016.28
7.3.80.0210.01415.88
7.3.70.0240.00816.07
7.3.60.0310.00415.95
7.3.50.0210.01215.98
7.3.40.0380.00016.16
7.3.30.0300.00316.41
7.3.20.0230.01017.96
7.3.10.0280.00417.89
7.3.00.0260.00617.64
7.2.340.0310.00016.13
7.2.330.0160.00816.47
7.2.320.0160.00816.50
7.2.310.0210.00416.47
7.2.300.0230.00116.52
7.2.290.0160.00816.46
7.2.280.0180.01416.22
7.2.270.0250.00716.00
7.2.260.0230.01016.02
7.2.250.0300.01515.89
7.2.240.0220.01016.11
7.2.230.0260.00615.63
7.2.220.0290.00416.18
7.2.210.0320.00315.92
7.2.200.0280.00416.48
7.2.190.0160.01616.51
7.2.180.0240.00716.36
7.2.170.0250.00316.37
7.2.160.0250.00616.19
7.2.150.0320.00018.09
7.2.140.0270.00518.20
7.2.130.0260.00618.34
7.2.120.0200.01218.21
7.2.110.0250.00718.25
7.2.100.0270.00518.18
7.2.90.0200.01218.33
7.2.80.0270.00718.25
7.2.70.0310.00418.23
7.2.60.0190.00917.53
7.2.50.0210.01318.00
7.2.40.0260.00718.20
7.2.30.0240.00818.36
7.2.20.0260.00618.12
7.2.10.0310.00318.45
7.2.00.0170.00418.93
7.1.330.0130.01616.98
7.1.320.0260.00316.98
7.1.310.0200.00917.10
7.1.300.0260.00316.86
7.1.290.0170.01117.17
7.1.280.0190.01017.04
7.1.270.0170.01316.91
7.1.260.0290.00016.84
7.1.250.0180.01316.93
7.1.240.0250.00916.65
7.1.230.0230.00316.99
7.1.220.0160.01317.05
7.1.210.0260.00316.99
7.1.200.0140.00316.28
7.1.190.0250.00317.05
7.1.180.0170.01316.83
7.1.170.0190.01017.02
7.1.160.0250.00416.73
7.1.150.0160.01217.20
7.1.140.0190.00916.97
7.1.130.0180.01116.82
7.1.120.0250.00316.71
7.1.110.0260.00416.82
7.1.100.0140.01117.19
7.1.90.0160.01316.93
7.1.80.0160.00217.24
7.1.70.0090.00216.94
7.1.60.0130.00618.34
7.1.50.0140.00917.03
7.1.40.0220.00617.02
7.1.30.0240.00617.16
7.1.20.0210.00817.06
7.1.10.0220.00716.97
7.1.00.0110.04119.87
7.0.330.0170.00716.57
7.0.320.0160.01216.63
7.0.310.0220.00616.86
7.0.300.0200.00816.66
7.0.290.0300.00816.55
7.0.280.0200.00916.64
7.0.270.0210.00616.88
7.0.260.0230.00516.77
7.0.250.0220.00616.88
7.0.240.0190.00916.90
7.0.230.0230.00517.03
7.0.220.0200.00816.99
7.0.210.0230.00917.07
7.0.200.0100.00716.78
7.0.190.0190.00616.56
7.0.180.0250.00416.83
7.0.170.0180.00916.89
7.0.160.0180.00916.64
7.0.150.0220.01116.65
7.0.140.0140.03719.44
7.0.130.0250.00416.80
7.0.120.0260.00316.77
7.0.110.0210.00716.74
7.0.100.0300.00016.88
7.0.90.0150.01216.65
7.0.80.0190.00916.91
7.0.70.0250.00416.28
7.0.60.0140.03818.23
7.0.50.0150.02217.26
7.0.40.0120.02518.36
7.0.30.0210.04618.61
7.0.20.0250.04318.40
7.0.10.0170.03418.44
7.0.00.0190.04218.43
5.6.400.0190.00615.71
5.6.390.0210.00815.65
5.6.380.0240.00715.67
5.6.370.0270.00815.62
5.6.360.0220.00315.76
5.6.350.0210.00715.74
5.6.340.0210.00715.62
5.6.330.0250.00315.62
5.6.320.0220.00615.74
5.6.310.0180.00915.83
5.6.300.0250.00415.62
5.6.290.0250.00315.62
5.6.280.0130.04018.37
5.6.270.0210.00715.62
5.6.260.0220.00615.62
5.6.250.0230.01115.83
5.6.240.0250.00615.64
5.6.230.0190.01015.75
5.6.220.0230.00615.62
5.6.210.0150.04118.22
5.6.200.0140.04517.02
5.6.190.0120.03018.14
5.6.180.0180.02518.20
5.6.170.0240.04418.14
5.6.160.0120.02718.11
5.6.150.0200.03017.08
5.6.140.0110.03017.06
5.6.130.0160.02117.09
5.6.120.0110.02518.47
5.6.110.0130.02718.52
5.6.100.0110.04218.37
5.6.90.0170.04318.33
5.6.80.0130.03918.12
5.6.70.2140.02418.02
5.6.60.0200.00915.64
5.6.50.0230.01015.62
5.6.40.0260.00315.76
5.6.30.0250.00015.76
5.6.20.0130.01015.62
5.6.10.0140.00315.70
5.6.00.0060.00615.63
5.5.380.0080.00515.68
5.5.370.0120.00915.77
5.5.360.0190.00515.62
5.5.350.0110.02018.03
5.5.340.0120.02216.85
5.5.330.0130.04717.97
5.5.320.0160.03017.94
5.5.310.0190.02617.96
5.5.300.0150.04316.85
5.5.290.0210.03316.85
5.5.280.0130.02318.27
5.5.270.0130.05018.24
5.5.260.0130.04418.28
5.5.250.0110.04118.14
5.5.240.0260.04017.98
5.5.230.0230.00415.80
5.5.220.0300.00515.62
5.5.210.0290.00615.62
5.5.200.0190.00815.62
5.5.190.0190.00815.62
5.5.180.0170.01015.62
5.5.170.0220.00615.62
5.5.160.0180.00915.62
5.5.150.0190.00815.62
5.5.140.0230.00315.62
5.5.130.0190.00815.62
5.5.120.0270.00015.62
5.5.110.0230.00315.62
5.5.100.0170.01015.62
5.5.90.0180.00915.62
5.5.80.0210.00715.62
5.5.70.0240.00315.62
5.5.60.0120.01515.62
5.5.50.0270.00015.62
5.5.40.0230.00415.77
5.5.30.0210.00615.62
5.5.20.0300.01315.66
5.5.10.0210.00615.62
5.5.00.0270.00015.62
5.4.450.0390.02117.66
5.4.440.0180.03417.54
5.4.430.0220.02917.61
5.4.420.0210.03217.68
5.4.410.0200.03217.34
5.4.400.0220.02917.45
5.4.390.0210.02817.45
5.4.380.0280.02617.13
5.4.370.0240.03017.21
5.4.360.0250.03017.19
5.4.350.0210.03517.19
5.4.340.0310.03117.14
5.4.330.0180.00315.62
5.4.320.0120.02114.04
5.4.310.0090.02214.04
5.4.300.0080.01814.04
5.4.290.0110.02314.04
5.4.280.0120.02913.98
5.4.270.0100.02913.98
5.4.260.0130.02513.97
5.4.250.0120.02313.97
5.4.240.0090.02413.98
5.4.230.0120.02313.97
5.4.220.0140.02313.97
5.4.210.0130.02313.97
5.4.200.0140.02813.97
5.4.190.0130.03413.97
5.4.180.0120.02213.97
5.4.170.0110.02413.97
5.4.160.0120.02813.97
5.4.150.0120.02913.97
5.4.140.0170.02613.81
5.4.130.0100.02513.81
5.4.120.0170.02013.79
5.4.110.0140.02313.79
5.4.100.0140.02413.78
5.4.90.0110.03013.78
5.4.80.0110.02513.79
5.4.70.0120.02913.78
5.4.60.0150.02213.78
5.4.50.0150.02113.78
5.4.40.0130.02713.78
5.4.30.0100.02413.77
5.4.20.0140.02313.78
5.4.10.0140.02713.78
5.4.00.0090.03113.52
5.3.290.0080.03014.21
5.3.280.0130.02514.17
5.3.270.0120.02514.17
5.3.260.0130.02314.17
5.3.250.0110.02414.17
5.3.240.0090.02614.17
5.3.230.0130.02114.16
5.3.220.0140.02114.15
5.3.210.0100.02514.15
5.3.200.0130.02314.15
5.3.190.0140.02314.15
5.3.180.0130.02814.15
5.3.170.0180.04314.14
5.3.160.0120.02714.14
5.3.150.0190.04014.15
5.3.140.0140.02814.14
5.3.130.0160.03614.14
5.3.120.0130.03414.14
5.3.110.0080.03614.14
5.3.100.0140.03913.87
5.3.90.0140.02113.85
5.3.80.0150.03313.85
5.3.70.0130.03113.85
5.3.60.0140.03413.84
5.3.50.0120.02813.81
5.3.40.0150.02813.81
5.3.30.0150.03313.78
5.3.20.0150.04013.67
5.3.10.0110.03113.65
5.3.00.0170.03113.64
5.2.170.0110.02312.39
5.2.160.0090.02712.39
5.2.150.0080.02312.39
5.2.140.0100.02312.39
5.2.130.0100.02312.37
5.2.120.0120.01512.37
5.2.110.0140.01812.38
5.2.100.0110.01812.38
5.2.90.0120.01912.37
5.2.80.0090.02512.37
5.2.70.0090.02812.37
5.2.60.0100.02012.34
5.2.50.0110.02712.33
5.2.40.0140.02212.32
5.2.30.0100.02212.31
5.2.20.0100.02412.30
5.2.10.0120.02012.27
5.2.00.0140.01812.20
5.1.60.0080.01511.84
5.1.50.0040.02011.84
5.1.40.0110.01411.83
5.1.30.0060.02012.00
5.1.20.0090.01912.02
5.1.10.0070.02111.88
5.1.00.0110.01811.88
5.0.50.0120.01611.12
5.0.40.0070.02011.05
5.0.30.0040.02710.95
5.0.20.0070.01610.94
5.0.10.0100.01410.93
5.0.00.0110.03210.92
4.4.90.0060.01210.20
4.4.80.0050.01810.19
4.4.70.0080.00810.19
4.4.60.0080.00910.19
4.4.50.0090.01610.20
4.4.40.0030.01810.17
4.4.30.0040.01210.19
4.4.20.0050.00910.23
4.4.10.0060.01110.23
4.4.00.0050.01410.19
4.3.110.0020.01210.14
4.3.100.0080.00610.14
4.3.90.0060.01110.13
4.3.80.0020.01910.10
4.3.70.0050.00910.12
4.3.60.0040.01210.12
4.3.50.0060.01010.13
4.3.40.0060.01910.08
4.3.30.0050.0109.45
4.3.20.0040.0119.44
4.3.10.0070.0099.43
4.3.00.0100.01214.54

preferences:
149.56 ms | 403 KiB | 5 Q