3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randomAlphaNum($length){ $alphNums = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; $newString = str_shuffle(str_repeat($alphNums, rand(1, $length))); return substr($newString, rand(0,strlen($newString)-$length), $length); } $domain = 'drmouse.com.ar'; $opt = array( CURLOPT_HEADER => 0, CURLOPT_URL => 'http://namey.muffinlabs.com/name.json?count=10&frequency=all&with_surname=true', CURLOPT_RETURNTRANSFER => 1 ); $ch = curl_init(); curl_setopt_array($ch, $opt); $results = curl_exec($ch); curl_close($ch); $results = json_decode($results); foreach ($results as $i => $name) { $fullname = explode(' ', $name); $names['doc'][] = strtolower("{$fullname[0]}{$fullname[1]}") . "@{$domain}"; $names['1pa'][] = "{$names['doc'][$i]} " . randomAlphaNum(18); $names['csv'][] = str_replace(' ', ",{$fullname[0]},{$fullname[1]},", $names['1pa'][$i]); } foreach (array('csv', '1pa', 'doc') as $place) { echo "<p><strong>{$place}:</strong></p>\n<ul>"; foreach ($names[$place] as $name) { echo "<li>{$name}</li>\n"; } echo '</ul>'; }

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.30.0070.01316.63
7.4.20.0100.01416.77
7.4.10.0110.00816.50
7.4.00.0090.00915.60
7.3.150.0030.01316.28
7.3.140.0250.00616.55
7.3.130.0150.00616.66
7.3.120.0080.00915.40
7.3.110.0120.00515.52
7.3.100.0080.01215.47
7.3.90.0080.00815.43
7.3.80.0020.01215.40
7.3.70.0060.00615.48
7.3.60.0040.01215.32
7.3.50.0080.00615.14
7.3.40.0070.00715.40
7.3.30.0050.00915.36
7.3.20.0080.00816.55
7.3.10.0070.00916.46
7.3.00.0050.00716.52
7.2.280.0060.01916.46
7.2.270.0160.00516.56
7.2.260.0120.01016.35
7.2.250.0090.01115.55
7.2.240.0110.00915.38
7.2.230.0080.00915.48
7.2.220.0080.00915.51
7.2.210.0080.00715.55
7.2.200.0060.00915.41
7.2.190.0070.00515.42
7.2.180.0070.00515.39
7.2.170.0060.01015.44
7.2.160.0060.00916.45
7.2.150.0120.00916.61
7.2.140.0250.00616.69
7.2.130.0060.01016.59
7.2.120.0130.00816.56
7.2.110.0100.00716.50
7.2.100.0150.00916.58
7.2.90.0030.01516.64
7.2.80.0140.00616.73
7.2.70.0090.01216.52
7.2.60.0160.00316.48
7.2.50.0060.01216.57
7.2.40.0130.01316.67
7.2.30.0030.01216.61
7.2.20.0340.01216.39
7.2.10.0170.00616.44
7.2.00.0050.01317.94
7.1.330.0100.00715.57
7.1.320.0130.00615.75
7.1.310.0090.00715.54
7.1.300.0050.01015.62
7.1.290.0040.00915.54
7.1.280.0080.00915.52
7.1.270.0070.01015.57
7.1.260.0100.00715.63
7.1.250.0130.00815.56
7.1.240.0110.01515.20
7.1.230.0180.00615.25
7.1.220.0090.01915.54
7.1.210.0100.01315.11
7.1.200.0200.00715.35
7.1.190.0100.01815.38
7.1.180.0130.01315.29
7.1.170.0120.01215.21
7.1.160.0140.00915.26
7.1.150.0090.01215.44
7.1.140.0120.01215.18
7.1.130.0100.01015.27
7.1.120.0110.01115.11
7.1.110.0170.00715.48
7.1.100.0150.00615.64
7.1.90.0170.00615.54
7.1.80.0200.00015.45
7.1.70.0060.00716.28
7.1.60.0110.01217.42
7.1.50.0150.01016.11
7.1.40.0090.01315.30
7.1.30.0000.02115.54
7.1.20.0210.00315.56
7.1.10.0130.00615.36
7.1.00.0090.04218.82
7.0.330.0120.01215.16
7.0.320.0180.00615.16
7.0.310.0130.01215.16
7.0.300.0220.00515.06
7.0.290.0140.00715.04
7.0.280.0230.00915.17
7.0.270.0090.01415.05
7.0.260.0110.01015.05
7.0.250.0140.00715.12
7.0.240.0200.00015.04
7.0.230.0080.01215.03
7.0.220.0190.00515.07
7.0.210.0130.01015.06
7.0.200.0190.01015.94
7.0.190.0140.00714.88
7.0.180.0170.00515.11
7.0.170.0170.00615.01
7.0.160.0130.01015.11
7.0.150.0080.01114.98
7.0.140.0090.04318.64
7.0.130.0320.00715.06
7.0.120.0040.01514.86
7.0.110.0110.00715.12
7.0.100.0170.00415.09
7.0.90.0210.00615.22
7.0.80.0140.00715.22
7.0.70.0230.00315.18
7.0.60.0150.04417.55
7.0.50.0080.02916.60
7.0.40.0140.02517.75
7.0.30.0310.02817.67
7.0.20.0150.02817.58
7.0.10.0190.02717.77
7.0.00.0160.04217.68
5.6.400.0100.00715.78
5.6.390.0140.01415.75
5.6.380.0140.01415.88
5.6.370.0160.01615.99
5.6.360.0270.00415.60
5.6.350.0130.01015.69
5.6.340.0140.01015.61
5.6.330.0180.00515.85
5.6.320.0090.01215.82
5.6.310.0160.00815.65
5.6.300.0100.01715.91
5.6.290.0190.00915.59
5.6.280.0090.04318.50
5.6.270.0070.01515.76
5.6.260.0170.01115.96
5.6.250.0170.01116.11
5.6.240.0130.01315.87
5.6.230.0160.01215.92
5.6.220.0190.01315.92
5.6.210.0140.04018.43
5.6.200.0140.04216.98
5.6.190.0180.02218.17
5.6.180.1720.02218.23
5.6.170.0190.05018.21
5.6.160.0110.03318.33
5.6.150.0190.04016.95
5.6.140.0140.04516.97
5.6.130.0150.05017.09
5.6.120.0180.04018.45
5.6.110.0190.03818.49
5.6.100.0210.02918.43
5.6.90.0090.04418.45
5.6.80.0140.03818.17
5.6.70.0230.04118.13
5.6.60.0220.00615.90
5.6.50.0150.01915.81
5.6.40.0170.00915.89
5.6.30.0170.01215.87
5.6.20.0130.01315.80
5.6.10.0130.01615.72
5.6.00.0150.00815.88
5.5.380.0230.00515.70
5.5.370.0180.01115.93
5.5.360.0160.01615.69
5.5.350.0210.04018.06
5.5.340.0110.02816.99
5.5.330.0160.04618.02
5.5.320.0190.04418.00
5.5.310.0290.01918.09
5.5.300.0130.02316.87
5.5.290.0110.03416.91
5.5.280.0180.04218.25
5.5.270.0120.02618.27
5.5.260.0140.03818.22
5.5.250.0130.03918.16
5.5.240.0170.02217.92
5.5.230.0070.02115.73
5.5.220.0130.01615.96
5.5.210.0240.01515.61
5.5.200.0170.01115.84
5.5.190.0130.01115.68
5.5.180.0190.01015.75
5.5.170.0160.01215.73
5.5.160.0150.00915.82
5.5.150.0040.02015.58
5.5.140.0180.01115.81
5.5.130.0140.01215.90
5.5.120.0210.00915.59
5.5.110.0160.01215.46
5.5.100.0130.01315.88
5.5.90.0170.00915.91
5.5.80.0190.01115.90
5.5.70.0190.00915.64
5.5.60.0190.01015.77
5.5.50.0210.02015.51
5.5.40.0180.01515.50
5.5.30.0170.00915.58
5.5.20.0170.01015.88
5.5.10.0260.00615.78
5.5.00.0170.01215.64
5.4.450.0140.03515.88
5.4.440.0440.04016.08
5.4.430.0470.04515.96
5.4.420.0370.00615.99
5.4.410.0130.03215.78
5.4.400.0190.03915.53
5.4.390.0210.03615.62
5.4.380.0150.03415.64
5.4.370.0110.02415.63
5.4.360.0140.02715.61
5.4.350.0100.02212.26
5.4.340.0100.02012.27
5.4.330.0090.00912.68
5.4.320.0070.03212.61
5.4.310.0120.02312.46
5.4.300.0090.02512.49
5.4.290.0060.03412.51
5.4.280.0110.02512.45
5.4.270.0100.02412.53
5.4.260.0100.03012.37
5.4.250.0120.03612.47
5.4.240.0090.04112.47
5.4.230.0100.03512.43
5.4.220.0120.03512.47
5.4.210.0140.02212.52
5.4.200.0150.02212.43
5.4.190.0110.02112.44
5.4.180.0100.02912.44
5.4.170.0080.03712.45
5.4.160.0060.02612.44
5.4.150.0130.02212.50
5.4.140.0070.02812.30
5.4.130.0140.01812.43
5.4.120.0150.02512.28
5.4.110.0100.02912.29
5.4.100.0110.02312.24
5.4.90.0170.02612.27
5.4.80.0080.03312.35
5.4.70.0140.02512.27
5.4.60.0100.02612.29
5.4.50.0150.01612.31
5.4.40.0130.04312.28
5.4.30.0110.03512.32
5.4.20.0100.02812.20
5.4.10.0120.02912.19
5.4.00.0110.02912.03
5.3.290.0110.02212.93
5.3.280.0090.03312.81
5.3.270.0130.03412.89
5.3.260.0060.03512.90
5.3.250.0110.03212.92
5.3.240.0140.02912.82
5.3.230.0120.03012.82
5.3.220.0130.02712.84
5.3.210.0070.03512.81
5.3.200.0080.02412.81
5.3.190.0110.02312.80
5.3.180.0090.03012.86
5.3.170.0100.03412.86
5.3.160.0090.03612.90
5.3.150.0090.03512.91
5.3.140.0140.04112.86
5.3.130.0120.02912.85
5.3.120.0080.03512.80
5.3.110.0130.03612.80
5.3.100.0090.03112.58
5.3.90.0140.05312.69
5.3.80.0120.02812.51
5.3.70.0080.04012.53
5.3.60.0070.02412.51
5.3.50.0160.02012.50
5.3.40.0070.03012.46
5.3.30.0080.02512.48
5.3.20.0130.03112.30
5.3.10.0080.02612.27
5.3.00.0110.02012.17
5.2.170.0080.02110.60
5.2.160.0100.01810.61
5.2.150.0080.02510.61
5.2.140.0060.02910.61
5.2.130.0100.01810.54
5.2.120.0070.02110.55
5.2.110.0100.02010.55
5.2.100.0080.01910.59
5.2.90.0070.01910.53
5.2.80.0100.01510.52
5.2.70.0050.02110.49
5.2.60.0080.01810.47
5.2.50.0080.01910.48
5.2.40.0110.01510.52
5.2.30.0070.02210.49
5.2.20.0100.02510.38
5.2.10.0110.02210.30
5.2.00.0100.02610.20
5.1.60.0030.0259.74
5.1.50.0090.0209.74
5.1.40.0090.0219.73
5.1.30.0080.0189.92
5.1.20.0080.0189.91
5.1.10.0030.0249.78
5.1.00.0100.0179.78
5.0.50.0070.0139.02
5.0.40.0070.0148.95
5.0.30.0100.0208.86
5.0.20.0050.0148.84
5.0.10.0050.0138.82
5.0.00.0020.0238.82
4.4.90.0020.0128.07
4.4.80.0030.0108.06
4.4.70.0030.0108.06
4.4.60.0030.0118.06
4.4.50.0050.0088.07
4.4.40.0050.0138.04
4.4.30.0030.0108.06
4.4.20.0020.0128.11
4.4.10.0030.0118.11
4.4.00.0070.0168.06
4.3.110.0080.0108.02
4.3.100.0040.0108.02
4.3.90.0050.0108.00
4.3.80.0060.0147.97
4.3.70.0030.0098.00
4.3.60.0020.0118.00
4.3.50.0050.0088.00
4.3.40.0050.0127.95
4.3.30.0020.0097.35
4.3.20.0010.0127.33
4.3.10.0020.0117.31
4.3.00.0100.0139.48

preferences:
45.64 ms | 400 KiB | 5 Q