3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($i = 0; $i <= 10; $i += 1) { //loop to calculate parameters for substr $randcomb = str_shuffle('a0b1c2d3e4f5g6h7i8j9k0l!m@n#o$p%q^r&s*tuv_w-x=y+zAB:C?|D/E?FGHIJKLMNOPQRSTUVWXYZ0123456789'); //creates a shuffled alphanumeric string //$param1 = ($i+6) - 6; //this formula ensures all integers are positive and above zero //$param2 = $param1 + 6; // this formula ensures all integers increment by 6 spaces //if($param2 >= 60) { //since the second parameter goes over 6 // $param2 = ($param1 + 6) - 6; //subtract 6 //} //$key = substr($randcomb, $param1, $param2); //generate random key //echo $key."<BR>"; //display it for debugging echo substr($randcomb, 0,6)."<BR>"; }

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.2.60.0030.01016.55
7.2.00.0000.01319.23
7.1.100.0000.01118.11
7.1.70.0000.00717.15
7.1.60.0120.01219.40
7.1.50.0130.01316.79
7.1.00.0030.06722.40
7.0.200.0040.00416.41
7.0.140.0100.06322.09
7.0.60.0130.07020.06
7.0.50.0030.08317.85
7.0.40.0070.05020.27
7.0.30.0200.04020.15
7.0.20.0300.06320.17
7.0.10.0100.08320.16
7.0.00.0130.05720.00
5.6.280.0030.07320.78
5.6.210.0200.07020.50
5.6.200.0130.06318.13
5.6.190.0000.05020.41
5.6.180.3800.04020.77
5.6.170.0300.07020.49
5.6.160.0030.04320.50
5.6.150.0000.08018.22
5.6.140.0100.07318.12
5.6.130.0000.04718.08
5.6.120.0000.09321.02
5.6.110.0000.07721.13
5.6.100.0030.08321.13
5.6.90.0100.08020.97
5.6.80.0100.07320.53
5.6.70.3030.02720.52
5.5.350.0030.08020.39
5.5.340.0070.08017.93
5.5.330.0000.04320.20
5.5.320.0230.07720.41
5.5.310.0230.03320.24
5.5.300.0100.06717.91
5.5.290.0100.08017.91
5.5.280.0030.04320.79
5.5.270.0170.07320.67
5.5.260.0030.08320.86
5.5.250.0000.06020.66
5.5.240.0270.05320.19
5.4.450.0500.03719.09
5.4.440.0430.05019.37
5.4.430.0230.04019.07
5.4.420.0570.05019.39
5.4.410.0800.03019.13
5.4.400.0600.04018.90
5.4.390.0600.05019.10
5.4.380.0400.03319.06
5.4.370.0270.04719.06
5.4.360.0730.03719.07
5.4.350.0630.04019.07
5.4.340.0370.04318.77
5.4.320.0670.04319.25
5.4.310.0630.04719.07
5.4.300.0500.04719.21
5.4.290.0630.03319.25
5.4.280.0670.03019.21
5.4.270.0600.04019.21
5.4.260.0770.03319.05
5.4.250.0830.05018.76
5.4.240.0270.04018.79
5.4.230.0400.03719.21
5.4.220.0700.04719.05
5.4.210.0670.04019.04
5.4.200.0400.04019.06
5.4.190.0400.04018.87
5.4.180.0830.03719.02
5.4.170.0870.03018.79
5.4.160.0500.05019.13
5.4.150.0500.03719.04
5.4.140.0770.03316.27
5.4.130.0530.04316.23
5.4.120.0400.04016.26
5.4.110.0500.03716.29
5.4.100.0730.04016.43
5.4.90.0300.04716.43
5.4.80.0600.04316.46
5.4.70.0600.04716.30
5.4.60.0430.04016.36
5.4.50.0400.05016.38
5.4.40.0300.05016.18
5.4.30.0500.04316.20
5.4.20.0430.03716.05
5.4.10.0430.03716.30
5.4.00.0570.03315.98
5.3.290.0270.05016.19
5.3.280.0870.04316.19
5.3.270.0670.04716.19
5.3.260.0530.04716.19
5.3.250.0230.04016.19
5.3.240.0730.03316.19
5.3.230.0400.06316.19
5.3.220.0270.03715.27
5.3.210.0770.04715.27
5.3.200.0270.03715.27
5.3.190.0500.04015.27
5.3.180.0170.05015.27
5.3.170.0300.04015.27
5.3.160.0870.04715.27
5.3.150.0430.04315.27
5.3.140.0330.04015.27
5.3.130.0730.03715.27
5.3.120.0370.04315.27
5.3.110.0630.03715.27
5.3.100.0700.03315.27
5.3.90.0670.04015.27
5.3.80.0430.04015.27
5.3.70.0300.03015.27
5.3.60.0500.04315.27
5.3.50.0500.03315.27
5.3.40.0700.04315.27
5.3.30.0330.03015.27
5.3.20.0330.03715.27
5.3.10.0370.03715.27
5.3.00.0530.04015.27
5.2.170.0570.02315.27
5.2.160.0300.02715.27
5.2.150.0000.03015.27
5.2.140.0670.03015.27
5.2.130.0900.02015.27
5.2.120.0270.03315.27
5.2.110.0670.02715.27
5.2.100.0130.03315.27
5.2.90.0670.02315.27
5.2.80.0700.02715.27
5.2.70.0730.02315.27
5.2.60.0230.03015.27
5.2.50.0470.03315.27
5.2.40.0370.04315.27
5.2.30.0330.02715.27
5.2.20.0200.03015.27
5.2.10.0370.04015.27
5.2.00.0330.02315.27
5.1.60.0430.02015.27
5.1.50.0170.02715.26
5.1.40.0130.03015.26
5.1.30.0230.02015.26
5.1.20.0230.03315.26
5.1.10.0130.03015.26
5.1.00.0600.02315.26
5.0.50.0170.02715.26
5.0.40.0300.02015.26
5.0.30.0170.04015.26
5.0.20.0430.01315.26
5.0.10.0100.02315.26
5.0.00.0130.02315.26
4.4.90.0070.01715.27
4.4.80.0130.01715.27
4.4.70.0400.01315.27
4.4.60.0130.01315.27
4.4.50.0200.01715.27
4.4.40.0230.02715.26
4.4.30.0200.01315.26
4.4.20.0230.01715.26
4.4.10.0170.01315.26
4.4.00.0070.06015.26
4.3.110.0170.02015.26
4.3.100.0070.01715.26
4.3.90.0300.01015.26
4.3.80.0100.02315.26
4.3.70.0170.01715.26
4.3.60.0200.01715.26
4.3.50.0230.00315.26
4.3.40.0130.02315.26
4.3.30.0100.01015.26
4.3.20.0130.01315.26
4.3.10.0030.01315.26
4.3.00.0070.02015.26

preferences:
35.95 ms | 401 KiB | 5 Q