3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Walter Sobchak, 5, 3hp, £50000, £10000, none, 1 Alien, 13, 3hp, £250000, £35000, none, 1 Hit Girl, 12, 3hp, £280000, £29000, Potential, Leader, 1 Dovahkiin, 14, 3hp, £450000, £35000, Special Ability: Fus Ro Dah!, 1 Bub and Bob, 5, 2hp, £100000, £5000, Unique Ability: Bubble Bobble!, 1 Big Daddy, 11, 3hp, £200000, £30000, none, 1 Godzilla, 17, 3hp, £750000, £50000, none, 1 Neo, 14, 3hp, £550000, £38000, Potential, 1 Darth Maul, 14, 3hp, £450000, £30000, none, 1 Tyler Durden, 7, 3hp, £170000, £26000, none, 1 Sin, 18, 1hp, £1100000, £60000, Keeps coming back…, 2 Gypsy Danger, 17, 3hp, £750000, £50000, none, 1 Jaws, 6, 3hp, £100000, £10000, none, 2 The Reapers, 20, 3hp, £1400000, £60000, Unique Ability: You exist because we allow it. And you will die because we demand it, 1 The Wicked Witch of the West, 13, 3hp, £250000, £35000, seeker, 1"; $str = str_replace("hp,",",",$str); $str = str_replace("£","",$str); $str = str_replace(", none","",$str); $sep = explode("\n",$str); $row = ''; for($i=0;$i<count($sep);$i++) { $sep2 = explode(",",$sep[$i]); $name = $sep2[0]; $br = $sep2[1]; $hp = $sep2[2]."hp"; $value = "£".number_format($sep2[3]); $wage = "£".number_format($sep2[4]); if (count($sep2)==6) { $ability1 = $ability2 = ''; $dice = $sep2[5]; } elseif (count($sep2)==7) { $ability1 = $sep2[5]; $ability2 = ''; $dice = $sep2[6]; } elseif (count($sep2)==8) { $ability1 = $sep2[5]; $ability2 = $sep2[6]; $dice = $sep2[7]; } else { print "error"; } $row .= "<dt>$name</dt><dd>$br</dd><dd>$hp</dd><dd>$value</dd><dd>$wage</dd><dd>$ability1</dd><dd>$ability2</dd><dd>$dice</dd>"; } echo "<dl>$row</dl>"; ?>

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)
8.3.60.0070.00718.43
8.3.50.0120.00422.05
8.3.40.0150.00618.79
8.3.30.0110.00419.27
8.3.20.0050.00220.30
8.3.10.0040.00421.79
8.3.00.0000.00822.39
8.2.180.0090.00916.75
8.2.170.0090.00922.96
8.2.160.0040.01120.65
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0050.00326.16
8.2.120.0040.00419.60
8.2.110.0030.00620.66
8.2.100.0060.00617.97
8.2.90.0050.00319.53
8.2.80.0000.00818.28
8.2.70.0040.00417.72
8.2.60.0040.00417.93
8.2.50.0090.00018.10
8.2.40.0040.00418.34
8.2.30.0000.00718.33
8.2.20.0070.00017.73
8.2.10.0050.00319.50
8.2.00.0040.00417.76
8.1.280.0170.00325.92
8.1.270.0040.00422.36
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0000.00923.92
8.1.230.0120.00020.38
8.1.220.0000.00817.80
8.1.210.0080.00018.77
8.1.200.0040.00517.25
8.1.190.0060.00317.36
8.1.180.0000.00818.10
8.1.170.0050.00518.71
8.1.160.0040.00422.18
8.1.150.0070.00018.66
8.1.140.0050.00317.59
8.1.130.0040.00417.88
8.1.120.0040.00417.57
8.1.110.0040.00417.63
8.1.100.0000.00817.58
8.1.90.0100.00017.50
8.1.80.0000.00717.65
8.1.70.0030.00317.60
8.1.60.0060.00317.61
8.1.50.0000.00817.57
8.1.40.0000.00717.56
8.1.30.0050.00417.73
8.1.20.0040.00417.77
8.1.10.0000.00817.71
8.1.00.0040.00417.49
8.0.300.0000.00718.77
8.0.290.0060.00316.88
8.0.280.0030.00318.55
8.0.270.0000.00717.39
8.0.260.0050.00216.88
8.0.250.0000.00717.11
8.0.240.0030.00617.14
8.0.230.0030.00516.99
8.0.220.0030.00317.00
8.0.210.0040.00416.95
8.0.200.0000.00817.12
8.0.190.0040.00416.99
8.0.180.0070.00017.04
8.0.170.0000.00716.96
8.0.160.0000.00716.92
8.0.150.0070.00017.01
8.0.140.0050.00316.99
8.0.130.0000.00613.51
8.0.120.0050.00316.91
8.0.110.0070.00017.04
8.0.100.0000.00716.87
8.0.90.0020.00516.93
8.0.80.0130.00416.96
8.0.70.0040.00417.04
8.0.60.0000.00716.82
8.0.50.0040.00416.87
8.0.30.0050.01417.37
8.0.20.0080.01117.48
8.0.10.0040.00417.18
8.0.00.0120.00817.10
7.4.330.0020.00515.00
7.4.320.0000.00616.73
7.4.300.0030.00316.65
7.4.290.0030.00316.79
7.4.280.0030.00316.75
7.4.270.0030.00316.55
7.4.260.0000.00716.57
7.4.250.0040.00416.57
7.4.240.0040.00416.73
7.4.230.0070.00016.86
7.4.220.0040.01416.77
7.4.210.0030.01516.71
7.4.200.0000.00716.55
7.4.190.0000.00816.47
7.4.160.0040.01116.88
7.4.150.0230.00317.40
7.4.140.0140.00717.86
7.4.130.0080.01116.61
7.4.120.0090.00916.68
7.4.110.0120.00916.76
7.4.100.0090.00916.70
7.4.90.0130.00316.80
7.4.80.0070.01019.39
7.4.70.0130.00516.66
7.4.60.0130.00316.63
7.4.50.0000.00816.49
7.4.40.0150.00322.77
7.4.30.0110.00516.77
7.4.00.0070.01015.09
7.3.330.0020.00313.32
7.3.320.0060.00013.41
7.3.310.0050.00316.45
7.3.300.0030.00316.50
7.3.290.0090.00616.42
7.3.280.0090.00816.52
7.3.270.0100.00717.40
7.3.260.0160.00316.49
7.3.250.0110.00916.58
7.3.240.0030.01916.53
7.3.230.0100.00716.44
7.3.210.0100.00716.64
7.3.200.0040.01419.39
7.3.190.0060.01616.43
7.3.180.0130.00316.44
7.3.170.0090.00916.42
7.3.160.0000.01616.55
7.3.120.0060.00915.21
7.2.330.0110.00716.76
7.2.320.0120.01216.88
7.2.310.0060.01216.93
7.2.300.0170.00316.85
7.2.290.0090.00816.86
7.2.60.0100.00316.89
7.2.00.0040.00819.36
7.1.200.0040.00815.99
7.1.100.0070.00718.09
7.1.70.0000.00717.14
7.1.60.0120.01219.82
7.1.50.0100.01317.00
7.1.00.0070.07022.39
7.0.200.0040.00816.79
7.0.140.0170.06322.09
7.0.60.0030.07019.84
7.0.50.0100.03717.97
7.0.40.0030.07020.23
7.0.30.0230.07020.11
7.0.20.0270.08320.02
7.0.10.0030.05020.01
7.0.00.0030.04720.12
5.6.280.0000.07320.87
5.6.210.0130.08720.73
5.6.200.0100.04018.21
5.6.190.0130.08320.37
5.6.180.0230.08020.55
5.6.170.0270.05720.47
5.6.160.0070.04320.57
5.6.150.0030.04018.09
5.6.140.0070.04018.15
5.6.130.0100.07718.18
5.6.120.0130.04721.15
5.6.110.0130.04021.00
5.6.100.0070.04021.09
5.6.90.0070.06020.96
5.6.80.0230.06020.38
5.5.350.0000.03320.43
5.5.340.0100.07718.00
5.5.330.0130.07720.43
5.5.320.0070.04720.21
5.5.310.0370.07720.35
5.5.300.0130.05018.02
5.5.290.0030.04317.91
5.5.280.0030.04720.66
5.5.270.0130.05720.93
5.5.260.0100.03320.86
5.5.250.0070.03720.59
5.5.240.3130.02720.24
5.4.450.0570.04319.42
5.4.440.0070.06319.52
5.4.430.0600.05719.56
5.4.420.0100.06019.14
5.4.410.0070.05718.86
5.4.400.0330.06318.74
5.4.390.1100.06718.51
5.4.380.0270.05018.77
5.4.370.0100.04018.59
5.4.360.0100.04718.70
5.4.350.0060.04012.00
5.4.340.0040.04311.99
5.4.320.0050.04912.48
5.4.310.0050.04012.47
5.4.300.0080.03612.48
5.4.290.0090.05012.48
5.4.280.0030.03812.37
5.4.270.0100.07018.80
5.4.260.0130.07318.79
5.4.250.0130.05318.76
5.4.240.0100.07718.86
5.4.230.0070.07318.95
5.4.220.0170.05318.73
5.4.210.0100.05319.00
5.4.200.0170.05318.77
5.4.190.0170.07018.89
5.4.180.0130.06318.96
5.4.170.0100.05318.84
5.4.160.0170.05718.77
5.4.150.0170.05718.77
5.4.140.0030.06016.38
5.4.130.0100.06716.46
5.4.120.0100.05016.32
5.4.110.0030.05316.57
5.4.100.0070.05716.27
5.4.90.0100.06016.28
5.4.80.0100.06016.30
5.4.70.0100.07016.48
5.4.60.0170.06316.35
5.4.50.0030.08316.50
5.4.40.0070.05716.51
5.4.30.0200.05716.24
5.4.20.0200.06016.41
5.4.10.0070.05716.38
5.4.00.0070.05715.90
5.3.290.0120.05312.80
5.3.280.0170.06314.77
5.3.270.0000.06014.71
5.3.260.0170.06314.79
5.3.250.0070.07714.69
5.3.240.0070.05714.63
5.3.230.0130.05314.39
5.3.220.0170.04314.45
5.3.210.0000.06014.65
5.3.200.0200.05714.64
5.3.190.0170.05014.46
5.3.180.0070.06014.66
5.3.170.0200.05714.44
5.3.160.0200.06714.38
5.3.150.0200.05014.67
5.3.140.0200.05714.64
5.3.130.0130.05014.46
5.3.120.0130.07314.73
5.3.110.0030.05714.62
5.3.100.0070.05314.21
5.3.90.0070.07014.12
5.3.80.0000.05714.12
5.3.70.0030.05313.91
5.3.60.0100.06013.89
5.3.50.0170.05013.86
5.3.40.0070.05013.84
5.3.30.0100.04713.79
5.3.20.0170.05313.74
5.3.10.0130.05013.59
5.3.00.0100.06313.68
5.2.170.0070.05311.37
5.2.160.0030.04311.29
5.2.150.0070.06311.51
5.2.140.0000.06711.35
5.2.130.0070.06011.33
5.2.120.0070.05311.21
5.2.110.0000.04711.33
5.2.100.0030.04311.32
5.2.90.0100.03311.24
5.2.80.0170.03711.24
5.2.70.0130.05311.39
5.2.60.0100.05711.21
5.2.50.0070.05310.99
5.2.40.0030.04711.04
5.2.30.0100.03711.20
5.2.20.0000.06311.18
5.2.10.0170.04711.18
5.2.00.0100.04011.08
5.1.60.0170.03710.36
5.1.50.0000.0439.98
5.1.40.0070.03310.15
5.1.30.0030.04010.41
5.1.20.0030.05010.34
5.1.10.0070.04710.05
5.1.00.0100.04710.24
5.0.50.0030.0438.83
5.0.40.0100.0378.41
5.0.30.0030.0578.32
5.0.20.0030.0338.32
5.0.10.0070.0338.45
5.0.00.0030.0438.40
4.4.90.0070.0276.68
4.4.80.0030.0236.68
4.4.70.0030.0306.68
4.4.60.0030.0236.68
4.4.50.0100.0136.68
4.4.40.0100.0406.68
4.4.30.0000.0336.68
4.4.20.0000.0276.68
4.4.10.0000.0336.68
4.4.00.0030.0406.68
4.3.110.0000.0336.68
4.3.100.0030.0236.68
4.3.90.0100.0176.68
4.3.80.0030.0476.68
4.3.70.0000.0236.68
4.3.60.0000.0306.68
4.3.50.0070.0206.68
4.3.40.0030.0406.68
4.3.30.0000.0336.68
4.3.20.0030.0276.68
4.3.10.0000.0306.68
4.3.00.0070.01315.57

preferences:
45.94 ms | 401 KiB | 5 Q