3v4l.org

run code in 300+ PHP versions simultaneously
<?php function apikey( $length ) { $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"; $size = strlen( $chars ); for( $i = 0; $i < $length; $i++ ) { $str= $chars[ rand( 0, $size - 1 ) ]; echo $str; } } $apikey = apikey(32); echo $apikey;

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)
7.3.120.0090.00615.02
7.3.110.0090.00314.68
7.3.100.0070.00414.75
7.3.90.0040.00814.80
7.3.80.0130.00214.85
7.3.70.0070.00514.79
7.3.60.0090.00814.81
7.3.50.0030.01314.92
7.3.40.0080.00814.86
7.3.30.0070.00814.66
7.3.20.0070.00816.54
7.3.10.0120.00616.72
7.3.00.0070.00816.47
7.2.240.0040.01215.31
7.2.230.0040.01115.23
7.2.220.0040.01115.21
7.2.210.0050.01414.96
7.2.200.0030.01214.97
7.2.190.0050.00914.92
7.2.180.0020.01415.05
7.2.170.0080.01015.03
7.2.160.0080.00714.98
7.2.150.0080.01016.99
7.2.140.0080.00616.84
7.2.130.0050.01116.99
7.2.120.0100.00816.90
7.2.110.0130.00316.74
7.2.100.0070.00916.79
7.2.90.0070.00716.95
7.2.80.0080.00816.95
7.2.70.0060.01016.88
7.2.60.0060.01116.94
7.2.50.0130.00217.03
7.2.40.0050.01017.07
7.2.30.0050.01017.00
7.2.20.0070.00817.01
7.2.10.0080.00616.96
7.2.00.0070.00816.83
7.1.330.0000.01815.63
7.1.320.0070.00315.96
7.1.310.0080.00815.80
7.1.300.0100.00315.77
7.1.290.0080.00615.89
7.1.280.0050.00915.93
7.1.270.0110.00115.82
7.1.260.0080.00615.65
7.1.250.0060.00715.64

preferences:
33.3 ms | 403 KiB | 5 Q