3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { global $d; $d = new DOMDocument; $c = $d->createDocumentFragment(); $g = $d->createElement('fiz', 'buz'); $h = $d->createElement('red', 'xen'); $c->appendChild($g); $c->appendChild($h); return $c->childNodes; } foreach (foo() as $x) { var_dump($x->nodeValue); } var_dump(get_class($d));

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.40.0090.00618.70
8.3.30.0080.00818.92
8.3.20.0080.00020.52
8.3.10.0040.00423.48
8.3.00.0070.00019.10
8.2.170.0100.00322.96
8.2.160.0070.00722.30
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0020.00526.16
8.2.120.0000.00819.66
8.2.110.0090.00022.11
8.2.100.0070.00420.48
8.2.90.0040.00419.36
8.2.80.0040.00418.22
8.2.70.0050.00518.04
8.2.60.0060.00318.22
8.2.50.0080.00018.10
8.2.40.0080.00019.34
8.2.30.0000.00719.44
8.2.20.0040.00417.80
8.2.10.0040.00418.14
8.2.00.0040.00417.68
8.1.270.0040.00418.89
8.1.260.0070.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00024.11
8.1.230.0080.00319.04
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0050.00517.35
8.1.180.0000.00818.10
8.1.170.0030.00521.05
8.1.160.0000.00719.04
8.1.150.0000.00719.00
8.1.140.0070.00017.34
8.1.130.0090.00017.90
8.1.120.0000.00717.44
8.1.110.0050.00217.42
8.1.100.0030.00317.57
8.1.90.0040.00417.56
8.1.80.0000.00717.61
8.1.70.0020.00517.44
8.1.60.0050.00317.63
8.1.50.0040.00417.54
8.1.40.0030.00617.55
8.1.30.0040.00417.57
8.1.20.0000.00817.61
8.1.10.0000.00817.55
8.1.00.0020.00517.55
8.0.300.0040.00419.82
8.0.290.0090.00016.75
8.0.280.0040.00418.50
8.0.270.0060.00317.14
8.0.260.0000.00617.31
8.0.250.0000.00716.97
8.0.240.0000.00917.03
8.0.230.0030.00316.98
8.0.220.0000.00716.86
8.0.210.0070.00016.88
8.0.200.0030.00316.94
8.0.190.0000.00816.93
8.0.180.0040.00416.86
8.0.170.0030.00516.90
8.0.160.0000.00716.96
8.0.150.0050.00316.79
8.0.140.0030.00616.83
8.0.130.0030.00313.31
8.0.120.0000.00816.80
8.0.110.0000.00716.87
8.0.100.0030.00616.75
8.0.90.0030.00516.78
8.0.80.0070.01016.81
8.0.70.0000.00717.00
8.0.60.0050.00316.90
8.0.50.0030.00516.82
8.0.30.0080.01417.19
8.0.20.0090.01317.40
8.0.10.0080.00016.97
8.0.00.0090.01116.99
7.4.330.0060.00015.07
7.4.320.0000.00616.51
7.4.300.0000.00716.67
7.4.290.0070.00016.70
7.4.280.0040.00416.50
7.4.270.0030.00316.70
7.4.260.0080.00016.57
7.4.250.0040.00416.49
7.4.240.0040.00416.58
7.4.230.0030.00316.69
7.4.220.0100.01016.63
7.4.210.0120.00816.49
7.4.200.0000.00716.55
7.4.160.0070.00716.72
7.4.150.0040.01217.40
7.4.140.0080.00917.86
7.4.130.0100.00816.69
7.4.120.0080.01016.55
7.4.110.0040.01516.56
7.4.100.0140.00716.49
7.4.90.0170.00316.40
7.4.80.0070.01419.39
7.4.70.0100.00616.47
7.4.60.0090.00816.60
7.4.50.0030.00516.65
7.4.40.0130.00316.55
7.4.30.0130.00716.46
7.4.00.0060.01014.86
7.3.330.0030.00313.28
7.3.320.0020.00213.17
7.3.310.0000.00716.28
7.3.300.0000.00716.38
7.3.290.0090.00616.33
7.3.280.0120.00816.28
7.3.270.0130.01017.40
7.3.260.0110.00716.64
7.3.250.0030.01616.45
7.3.240.0130.00616.52
7.3.230.0090.00916.39
7.3.210.0100.00616.38
7.3.200.0120.00619.39
7.3.190.0090.00616.50
7.3.180.0070.01016.47
7.3.170.0120.00916.34
7.3.160.0050.01116.58
7.3.10.0030.01416.59
7.3.00.0030.01316.14
7.2.330.0030.01416.95
7.2.320.0090.01216.86
7.2.310.0150.00316.50
7.2.300.0230.00016.70
7.2.290.0130.01016.79
7.2.130.0030.01416.70
7.2.120.0040.00716.86
7.2.110.0060.01016.70
7.2.100.0030.00616.90
7.2.90.0100.00716.89
7.2.80.0100.00716.62
7.2.70.0110.00516.80
7.2.60.0150.00517.03
7.2.50.0140.01416.78
7.2.40.0090.00617.09
7.2.30.0050.01116.90
7.2.20.0090.00416.78
7.2.10.0070.00716.86
7.2.00.0090.00618.19
7.1.250.0000.01615.75
7.1.200.0120.00615.71
7.1.100.0060.00617.94
7.1.70.0040.00817.34
7.1.60.0100.01019.22
7.1.50.0050.00516.71
7.1.00.0070.07322.27
7.0.200.0060.00616.68
7.0.140.0000.07721.92
7.0.60.0000.04319.98
7.0.50.0130.06017.87
7.0.40.0070.04720.15
7.0.30.0370.06720.19
7.0.20.0300.04720.25
7.0.10.0130.08720.08
7.0.00.0070.07320.25
5.6.210.0100.06020.53
5.6.200.0030.06318.22
5.6.190.0070.08320.67
5.6.180.0330.07720.48
5.6.170.0370.07020.50
5.6.160.0070.09020.41
5.6.150.0070.05718.15
5.6.140.0000.05018.28
5.6.130.0130.07018.14
5.6.120.0130.03321.00
5.6.110.0030.06020.90
5.6.100.0070.05021.04
5.6.90.0070.05321.00
5.6.80.0100.04320.48
5.5.350.0200.04720.50
5.5.340.0070.05718.11
5.5.330.0100.08320.31
5.5.320.0230.04720.30
5.5.310.0230.06720.20
5.5.300.0030.04017.95
5.5.290.0030.08318.04
5.5.280.0100.08320.88
5.5.270.0030.05020.88
5.5.260.0030.08720.80
5.5.250.0030.04020.69
5.5.240.0100.05020.03
5.4.450.0730.04319.48
5.4.440.0270.04719.36
5.4.430.0200.05019.63
5.4.420.0200.05019.52
5.4.410.0170.05019.51
5.4.400.0200.05019.07
5.4.390.0070.06019.02
5.4.380.0200.05318.84
5.4.370.0330.04318.55
5.4.360.0200.05318.82
5.4.350.0270.06718.55
5.4.340.0170.05718.47
5.4.320.0300.05018.73
5.4.310.0130.06018.77
5.4.300.0130.05718.74
5.4.290.0130.05718.53
5.4.280.0230.06018.78
5.4.270.0200.06718.78
5.4.260.0200.05318.76
5.4.250.0170.05718.62
5.4.240.0200.05018.77
5.4.230.0200.05018.57
5.4.220.0100.06318.62
5.4.210.0230.05018.46
5.4.200.0170.05316.67
5.4.190.0270.04318.61
5.4.180.0300.04318.52
5.4.170.0200.06018.46
5.4.160.0200.05318.45
5.4.150.0300.04318.51
5.4.140.0270.04316.18
5.4.130.0070.06016.34
5.4.120.0200.05316.22
5.4.110.0300.03716.29
5.4.100.0130.05316.31
5.4.90.0200.04716.22
5.4.80.0230.04316.44
5.4.70.0100.06316.26
5.4.60.0100.05716.27
5.4.50.0070.06016.26
5.4.40.0270.04316.31
5.4.30.0170.05316.26
5.4.20.0130.05716.29
5.4.10.0270.05716.24
5.4.00.0200.04715.66
5.3.290.0300.04314.76
5.3.280.0200.06714.76
5.3.270.0200.07314.62
5.3.260.0230.05014.80
5.3.250.0070.06714.66
5.3.240.0200.05014.77
5.3.230.0200.05714.88
5.3.220.0170.05314.54
5.3.210.0200.05014.73
5.3.200.0100.05714.76
5.3.190.0230.04714.54
5.3.180.0170.05014.61
5.3.170.0200.05714.78
5.3.160.0200.04714.77
5.3.150.0130.05714.66
5.3.140.0200.06014.73
5.3.130.0270.04314.73
5.3.120.0170.05714.64
5.3.110.0130.05714.54
5.3.100.0170.05014.14
5.3.90.0170.05014.07
5.3.80.0130.05314.18
5.3.70.0130.05314.22
5.3.60.0100.05714.09
5.3.50.0170.05314.23
5.3.40.0330.04314.16
5.3.30.0130.05013.88
5.3.20.0070.05713.90
5.3.10.0170.04713.79
5.3.00.0100.06013.74
5.2.170.0100.04311.25
5.2.160.0100.04311.25
5.2.150.0070.04711.21
5.2.140.0130.04011.27
5.2.130.0170.04011.14
5.2.120.0270.03011.23
5.2.110.0200.03311.19
5.2.100.0170.03711.21
5.2.90.0170.03711.27
5.2.80.0100.04711.20
5.2.70.0130.05711.38
5.2.60.0130.04711.15
5.2.50.0070.04711.04
5.2.40.0070.04311.20
5.2.30.0170.03711.17
5.2.20.0200.03311.06
5.2.10.0170.03710.96
5.2.00.0170.03710.77
5.1.60.0130.0309.98
5.1.50.0170.02710.20
5.1.40.0130.03310.08
5.1.30.0170.03010.32
5.1.20.0230.04010.39
5.1.10.0130.04010.11
5.1.00.0100.05010.10
5.0.50.0030.0408.80
5.0.40.0070.0308.40
5.0.30.0130.0408.26
5.0.20.0100.0338.27
5.0.10.0100.0278.19
5.0.00.0100.0478.18
4.4.90.0100.0175.93
4.4.80.0070.0205.88
4.4.70.0070.0205.87
4.4.60.0070.0205.86
4.4.50.0030.0235.87
4.4.40.0100.0305.89
4.4.30.0070.0205.96
4.4.20.0070.0276.03
4.4.10.0070.0306.05
4.4.00.0070.0405.91
4.3.110.0070.0205.81
4.3.100.0070.0205.95
4.3.90.0070.0235.84
4.3.80.0070.0335.81
4.3.70.0070.0235.87
4.3.60.0000.0305.80
4.3.50.0070.0235.82
4.3.40.0100.0305.78
4.3.30.0030.0234.58
4.3.20.0000.0274.53
4.3.10.0030.0234.60
4.3.00.0170.0207.59

preferences:
56.47 ms | 400 KiB | 5 Q