3v4l.org

run code in 300+ PHP versions simultaneously
<?php function random_password( $length = 8 ) { $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?"; $password = substr( str_shuffle( $chars ), 0, $length ); return $password; } foreach ($i = 0 ; $i < 20 ; $i++) { echo random_password()."\n"; }

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)
5.4.230.0120.04112.39
5.4.220.0110.04512.39
5.4.210.0090.04212.39
5.4.200.0120.04212.39
5.4.190.0210.06212.39
5.4.180.0120.03912.39
5.4.170.0130.03812.40
5.4.160.0120.03912.39
5.4.150.0130.03812.39
5.4.140.0110.04112.08
5.4.130.0080.04312.06
5.4.120.0130.03612.02
5.4.110.0160.03312.02
5.4.100.0130.03912.02
5.4.90.0140.03912.02
5.4.80.0120.03912.02
5.4.70.0090.04112.01
5.4.60.0090.04012.02
5.4.50.0130.03712.02
5.4.40.0160.03212.00
5.4.30.0100.04012.00
5.4.20.0100.05411.99
5.4.10.0100.04112.00
5.4.00.0110.04011.49
5.3.280.0160.04212.71
5.3.270.0130.05112.72
5.3.260.0290.06412.72
5.3.250.0130.04012.72
5.3.240.0120.04212.72
5.3.230.0190.04012.71
5.3.220.0120.04212.68
5.3.210.0140.04312.68
5.3.200.0220.06412.68
5.3.190.0150.04412.67
5.3.180.0160.03812.67
5.3.170.0180.06612.67
5.3.160.0130.04112.67
5.3.150.0130.04912.67
5.3.140.0250.05912.66
5.3.130.0110.04512.66
5.3.120.0120.04312.66
5.3.110.0130.04112.65
5.3.100.0130.03812.12
5.3.90.0120.04012.09
5.3.80.0080.04512.08
5.3.70.0120.04112.08
5.3.60.0090.04312.07
5.3.50.0120.04012.01
5.3.40.0100.04312.01
5.3.30.0120.04011.96
5.3.20.0120.03911.75
5.3.10.0150.04111.71
5.3.00.0180.06311.70

preferences:
133.67 ms | 1398 KiB | 7 Q