3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new XMLWriter(); $xml->openMemory(); echo "Does not work" . PHP_EOL; $xml->startElement('parent'); $xml->openElement('child'); $xml->closeElement('child'); $xml->writeAttribute('parentAttribute', 'a value'); $xml->endElement(); echo $xml->outputMemory() . PHP_EOL; echo "Works" . PHP_EOL; $xml2 = new XMLWriter(); $xml2->openMemory(); $xml2->startElement('parent'); $xml2->writeAttribute('parentAttribute', 'a value'); $xml2->writeElement('child'); $xml2->endElement(); echo $xml2->outputMemory();

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.0060.01216.63
8.3.50.0040.01416.67
8.3.40.0090.00618.79
8.3.30.0110.00718.94
8.3.20.0080.00020.36
8.3.10.0090.00023.84
8.3.00.0070.00319.60
8.2.180.0070.00718.22
8.2.170.0140.00022.96
8.2.160.0130.00020.54
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0070.00022.23
8.2.120.0000.00826.35
8.2.110.0110.00020.98
8.2.100.0060.00617.78
8.2.90.0060.00319.38
8.2.80.0000.00818.16
8.2.70.0030.00617.50
8.2.60.0090.00018.05
8.2.50.0000.00918.16
8.2.40.0040.00422.44
8.2.30.0030.00621.09
8.2.20.0000.00818.13
8.2.10.0070.00018.16
8.2.00.0040.00417.94
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0050.00226.35
8.1.250.0000.00728.09
8.1.240.0060.00322.59
8.1.230.0060.00621.02
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.25
8.1.190.0060.00317.13
8.1.180.0040.00418.10
8.1.170.0000.00818.64
8.1.160.0080.00019.11
8.1.150.0070.00020.75
8.1.140.0000.00719.70
8.1.130.0030.00318.89
8.1.120.0030.00317.46
8.1.110.0030.00517.42
8.1.100.0000.00717.43
8.1.90.0030.00617.41
8.1.80.0040.00317.47
8.1.70.0020.00517.47
8.1.60.0000.00817.63
8.1.50.0000.00717.56
8.1.40.0030.00617.64
8.1.30.0040.00417.70
8.1.20.0040.00417.68
8.1.10.0050.00317.58
8.1.00.0040.00417.57
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0040.00418.49
8.0.270.0000.00717.24
8.0.260.0070.00016.95
8.0.250.0070.00017.01
8.0.240.0040.00416.99
8.0.230.0090.00017.11
8.0.220.0000.00717.04
8.0.210.0000.00716.98
8.0.200.0030.00317.05
8.0.190.0030.00617.01
8.0.180.0000.00916.96
8.0.170.0000.00716.94
8.0.160.0040.00416.92
8.0.150.0040.00416.94
8.0.140.0080.00016.99
8.0.130.0000.00513.55
8.0.120.0000.00816.84
8.0.110.0070.00017.09
8.0.100.0070.00016.85
8.0.90.0000.00717.05
8.0.80.0060.00916.91
8.0.70.0000.00716.91
8.0.60.0000.00816.81
8.0.50.0040.00416.95
8.0.30.0050.01317.16
8.0.20.0090.00917.40
8.0.10.0050.00316.98
8.0.00.0080.01116.99
7.4.330.0050.00015.55
7.4.320.0030.00316.71
7.4.300.0070.00016.69
7.4.290.0030.00316.58
7.4.280.0060.00316.57
7.4.270.0070.00016.76
7.4.260.0050.00013.47
7.4.250.0090.00016.67
7.4.240.0000.00716.59
7.4.230.0030.00316.74
7.4.220.0070.01016.45
7.4.210.0070.00716.57
7.4.200.0000.00816.44
7.4.160.0160.00316.63
7.4.150.0060.01217.40
7.4.140.0120.00517.86
7.4.130.0150.00316.96
7.4.120.0090.00916.62
7.4.110.0120.00616.70
7.4.100.0070.01016.57
7.4.90.0090.00916.82
7.4.80.0170.00019.39
7.4.70.0070.01016.70
7.4.60.0060.00916.67
7.4.50.0000.01516.66
7.4.40.0090.00816.54
7.4.30.0100.00716.43
7.4.00.0060.00915.22
7.3.330.0000.00513.31
7.3.320.0030.00313.26
7.3.310.0050.00216.40
7.3.300.0030.00316.31
7.3.290.0080.00816.36
7.3.280.0080.00816.36
7.3.270.0160.00317.40
7.3.260.0110.00716.50
7.3.250.0090.00916.54
7.3.240.0110.00616.60
7.3.230.0130.00616.39
7.3.210.0080.00816.70
7.3.200.0180.00316.69
7.3.190.0130.00316.52
7.3.180.0120.00316.46
7.3.170.0030.01316.41
7.3.160.0080.00816.56
7.3.120.0170.00014.92
7.3.110.0070.01114.59
7.3.100.0030.01014.86
7.3.90.0070.01014.84
7.3.80.0090.00314.77
7.3.70.0040.01114.54
7.3.60.0000.01414.64
7.3.50.0110.00414.66
7.3.40.0070.00714.92
7.3.30.0060.00614.84
7.3.20.0080.00816.49
7.3.10.0090.00916.64
7.3.00.0080.00416.63
7.2.330.0160.01016.47
7.2.320.0120.00416.52
7.2.310.0150.00416.67
7.2.300.0170.00016.74
7.2.290.0140.00516.87
7.2.240.0070.01314.92
7.2.230.0060.00914.93
7.2.220.0100.00715.20
7.2.210.0110.00414.62
7.2.200.0030.01014.93
7.2.190.0070.01015.01
7.2.180.0100.00314.84
7.2.170.0060.00614.92
7.2.160.0040.01115.09
7.2.150.0070.01016.86
7.2.140.0000.01116.82
7.2.130.0070.01116.86
7.2.120.0070.00716.72
7.2.110.0030.00716.97
7.2.100.0000.01817.09
7.2.90.0040.00716.75
7.2.80.0070.00716.97
7.2.70.0100.00316.86
7.2.60.0050.01016.82
7.2.50.0030.01016.91
7.2.40.0090.00616.86
7.2.30.0080.00816.80
7.2.20.0060.00916.90
7.2.10.0060.00916.73
7.2.00.0080.00618.19
7.1.330.0070.01015.69
7.1.320.0080.00415.61
7.1.310.0050.00515.82
7.1.300.0110.00415.42
7.1.290.0040.00815.87
7.1.280.0130.00015.43
7.1.270.0120.00315.42
7.1.260.0080.00415.68
7.1.250.0030.01415.55
7.1.200.0100.00315.84
7.1.100.0070.00318.24
7.1.70.1130.01315.21
7.1.60.2030.00333.16
7.1.50.2200.02032.96
7.1.40.2230.01732.45
7.1.30.2800.01732.57
7.1.20.2100.01732.62
7.1.10.2170.01314.73
7.1.00.2070.01014.56
7.0.200.2630.01314.71
7.0.190.2970.01014.65
7.0.180.1700.01014.46
7.0.170.3230.01014.36
7.0.160.3070.01314.21
7.0.150.2130.01014.41
7.0.140.1530.01314.48
7.0.130.2600.01014.69
7.0.120.2730.01714.54
7.0.110.2770.00714.55
7.0.100.2500.01314.62
7.0.90.1830.01314.43
7.0.80.2600.01314.34
7.0.70.2730.01714.56
7.0.60.2930.01014.16
7.0.50.3200.00714.66
7.0.40.3270.01014.81
7.0.30.2570.01014.74
7.0.20.3130.00314.64
7.0.10.2800.01314.64
7.0.00.2430.01314.63

preferences:
43.13 ms | 400 KiB | 5 Q