3v4l.org

run code in 300+ PHP versions simultaneously
<?php function password($len = 12) { $chars = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'; $len = strlen($chars); $multiplier = floor(256 / $len); $bytes = openssl_random_pseudo_bytes($len); return $multiplier; } echo password();

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.40.0110.00418.82
8.3.30.0070.00718.76
8.3.20.0040.00420.20
8.3.10.0090.00023.79
8.3.00.0050.00322.13
8.2.170.0070.00722.96
8.2.160.0120.00319.20
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0040.00421.13
8.2.120.0080.00026.35
8.2.110.0090.00022.12
8.2.100.0000.01217.72
8.2.90.0060.00318.96
8.2.80.0030.00518.16
8.2.70.0050.00517.75
8.2.60.0030.00618.04
8.2.50.0050.00318.10
8.2.40.0050.00320.78
8.2.30.0040.00421.10
8.2.20.0000.01118.00
8.2.10.0040.00418.18
8.2.00.0000.00718.05
8.1.270.0000.00722.27
8.1.260.0080.00026.35
8.1.250.0030.00328.09
8.1.240.0000.00822.20
8.1.230.0040.00719.24
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0000.00917.47
8.1.190.0000.00817.25
8.1.180.0000.00818.10
8.1.170.0070.00019.01
8.1.160.0040.00419.13
8.1.150.0040.00420.64
8.1.140.0080.00019.54
8.1.130.0070.00018.79
8.1.120.0030.00317.47
8.1.110.0050.00217.33
8.1.100.0040.00417.45
8.1.90.0050.00317.50
8.1.80.0070.00017.35
8.1.70.0080.00017.48
8.1.60.0080.00417.53
8.1.50.0000.00817.56
8.1.40.0080.00017.53
8.1.30.0030.00617.61
8.1.20.0030.00617.57
8.1.10.0080.00017.52
8.1.00.0000.00717.54
8.0.300.0040.00419.95
8.0.290.0040.00416.88
8.0.280.0030.00318.50
8.0.270.0070.00017.25
8.0.260.0000.00816.93
8.0.250.0030.00317.11
8.0.240.0000.00816.96
8.0.230.0090.00017.09
8.0.220.0070.00017.01
8.0.210.0000.00716.86
8.0.200.0000.00616.95
8.0.190.0080.00017.05
8.0.180.0040.00417.06
8.0.170.0070.00016.87
8.0.160.0030.00316.85
8.0.150.0030.00316.99
8.0.140.0040.00416.89
8.0.130.0080.00013.29
8.0.120.0000.00716.91
8.0.110.0040.00416.94
8.0.100.0000.00716.88
8.0.90.0030.00416.92
8.0.80.0100.00716.90
8.0.70.0050.00316.82
8.0.60.0000.00716.84
8.0.50.0030.00516.95
8.0.30.0070.00917.00
8.0.20.0100.01017.40
8.0.10.0050.00317.14
8.0.00.0140.00316.80
7.4.330.0000.00515.55
7.4.320.0000.00816.53
7.4.300.0060.00016.55
7.4.290.0030.00316.56
7.4.280.0040.00416.63
7.4.270.0060.00016.55
7.4.260.0030.00316.67
7.4.250.0040.00416.57
7.4.240.0070.00016.66
7.4.230.0070.00016.70
7.4.220.0070.02016.64
7.4.210.0130.00316.62
7.4.200.0040.00416.46
7.4.160.0060.01416.57
7.4.150.0040.01517.40
7.4.140.0090.01117.86
7.4.130.0130.00916.67
7.4.120.0090.01116.64
7.3.330.0000.00513.32
7.3.320.0050.00013.36
7.3.310.0070.00016.40
7.3.300.0000.00816.41
7.3.290.0030.01116.44
7.3.280.0080.00716.41
7.3.270.0060.01117.40
7.3.260.0150.00316.47
7.3.250.0120.00916.62
7.3.240.0070.01016.48
7.1.70.0100.00917.22

preferences:
40.47 ms | 400 KiB | 5 Q