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?F>GH<IJKLMNOPQRSTUVWXYZ0123456789'); //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 60 // $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.4.00.0070.01014.85
7.3.120.0100.00914.86
7.3.110.0050.01214.87
7.3.100.0050.00814.71
7.3.90.0040.01414.72
7.3.80.0060.00814.77
7.3.70.0040.00814.86
7.3.60.0100.00714.73
7.3.50.0070.00814.77
7.3.40.0020.01114.78
7.3.30.0060.00514.88
7.3.20.0100.00316.63
7.3.10.0130.00316.61
7.3.00.0050.00916.55
7.2.250.0030.01515.24
7.2.240.0110.00914.90
7.2.230.0070.00914.97
7.2.220.0100.00514.97
7.2.210.0090.00614.72
7.2.200.0050.00715.06
7.2.190.0050.00714.89
7.2.180.0070.01014.84
7.2.170.0020.01214.83
7.2.60.1170.00814.81
7.2.00.0060.00619.44
7.1.330.0090.00515.69
7.1.320.0050.01015.79
7.1.310.0040.01115.63
7.1.300.0070.00415.75
7.1.290.0060.00915.63
7.1.280.0060.00815.65
7.1.270.0020.01115.91
7.1.260.0090.00615.77
7.1.200.0070.00715.82
7.1.100.0040.00718.05
7.1.70.0030.00617.19
7.1.60.0160.01019.30
7.1.50.0030.01616.98
7.1.00.0070.07322.32
7.0.200.0000.00716.77
7.0.140.0070.07321.93
7.0.120.0000.03321.96
7.0.60.0070.07320.05
7.0.50.0100.06017.90
7.0.40.0070.08720.09
7.0.30.0300.06320.21
7.0.20.0230.04320.09
7.0.10.0200.04020.03
7.0.00.0030.09020.13
5.6.280.0000.07720.99
5.6.210.0170.07320.72
5.6.200.0030.04318.15
5.6.190.0170.07720.61
5.6.180.0230.08720.32
5.6.170.0200.03720.45
5.6.160.0070.08320.61
5.6.150.0100.07318.11
5.6.140.0130.05018.12
5.6.130.0070.04718.12
5.6.120.0030.04720.98
5.6.110.0100.04720.89
5.6.100.0030.04321.13
5.6.90.0030.04321.01
5.6.80.0070.04020.28
5.6.70.4300.03720.36
5.5.350.0330.06720.39
5.5.340.0100.08317.93
5.5.330.0030.04320.19
5.5.320.0170.05020.45
5.5.310.0270.08720.27
5.5.300.0030.08317.98
5.5.290.0030.06017.91
5.5.280.0030.06020.89
5.5.270.0100.05020.86
5.5.260.0070.04020.86
5.5.250.0000.06020.58
5.5.240.0130.07320.25
5.4.450.0370.03319.40
5.4.440.0170.05319.24
5.4.430.0370.04319.11
5.4.420.0900.03019.48
5.4.410.0700.04719.29
5.4.400.0300.04018.88
5.4.390.0270.03318.93
5.4.380.0730.04018.93
5.4.370.0630.04019.13
5.4.360.0600.04019.13
5.4.350.0230.03719.25
5.4.340.0770.05019.21
5.4.320.0670.04019.25
5.4.310.0530.03019.22
5.4.300.0500.03318.87
5.4.290.0570.03718.77
5.4.280.0430.04319.21
5.4.270.0730.04018.91
5.4.260.0670.04018.92
5.4.250.0800.04019.03
5.4.240.0730.03319.05
5.4.230.0270.05018.95
5.4.220.0100.04319.02
5.4.210.0430.04019.07
5.4.200.0330.04319.12
5.4.190.0430.04319.11
5.4.180.0470.04018.89
5.4.170.0330.04018.92
5.4.160.0430.04319.01
5.4.150.0630.03319.10
5.4.140.1200.03316.37
5.4.130.0600.03016.18
5.4.120.0330.03316.28
5.4.110.0500.04316.38
5.4.100.0370.03716.16
5.4.90.0530.04016.45
5.4.80.0500.06316.41
5.4.70.0600.03016.35
5.4.60.0570.03716.25
5.4.50.0530.04316.40
5.4.40.0700.03716.39
5.4.30.0800.03016.25
5.4.20.0770.03016.42
5.4.10.0600.04716.23
5.4.00.0930.03315.64
5.3.290.0730.03015.64
5.3.280.0700.03715.64
5.3.270.0330.04715.64
5.3.260.0430.03315.64
5.3.250.0470.03315.64
5.3.240.0770.03315.64
5.3.230.0770.04015.64
5.3.220.0630.04315.64
5.3.210.0400.04015.64
5.3.200.0500.03315.64
5.3.190.0800.03315.64
5.3.180.0830.05015.64
5.3.170.0730.03715.64
5.3.160.0470.04315.64
5.3.150.0800.03015.64
5.3.140.0630.04015.64
5.3.130.0630.04015.64
5.3.120.0600.03315.64
5.3.110.0500.04715.64
5.3.100.0700.02715.64
5.3.90.0700.03715.64
5.3.80.0530.04015.64
5.3.70.0070.03015.64
5.3.60.0530.03015.64
5.3.50.0570.03315.64
5.3.40.0800.04715.64
5.3.30.0730.04315.64
5.3.20.0400.03715.64
5.3.10.0730.02715.64
5.3.00.0500.03315.64
5.2.170.0470.03015.64
5.2.160.0630.01715.64
5.2.150.0630.03015.64
5.2.140.0430.03315.64
5.2.130.0670.02315.64
5.2.120.0430.03015.64
5.2.110.0430.03015.64
5.2.100.0300.03015.64
5.2.90.0370.03715.64
5.2.80.0500.02715.64
5.2.70.0530.02315.64
5.2.60.0270.02715.64
5.2.50.0600.03015.64
5.2.40.0670.04015.64
5.2.30.0470.03015.64
5.2.20.0330.03715.64
5.2.10.0370.03315.64
5.2.00.0530.03315.64
5.1.60.0600.02015.64
5.1.50.0330.02315.64
5.1.40.0270.03015.64
5.1.30.0330.03015.64
5.1.20.0470.02015.64
5.1.10.0430.02015.64
5.1.00.0430.02315.64
5.0.50.0230.01715.64
5.0.40.0200.02315.64
5.0.30.0170.02315.64
5.0.20.0270.01715.64
5.0.10.0200.01715.64
5.0.00.0130.02715.64
4.4.90.0130.02015.64
4.4.80.0230.01015.64
4.4.70.0270.02015.64
4.4.60.0130.01715.64
4.4.50.0100.01715.64
4.4.40.0170.02715.64
4.4.30.0170.01315.64
4.4.20.0170.01315.64
4.4.10.0130.01715.64
4.4.00.0170.02715.64
4.3.110.0370.02015.64
4.3.100.0030.01715.64
4.3.90.0230.01315.64
4.3.80.0230.02015.64
4.3.70.0230.01715.64
4.3.60.0370.01315.64
4.3.50.0270.02315.64
4.3.40.0130.02315.64
4.3.30.0130.01015.64
4.3.20.0070.01315.64
4.3.10.0230.01015.64
4.3.00.0070.01315.64

preferences:
33.22 ms | 401 KiB | 5 Q